Sciter : GUI Application with Golang using HTML/CSS

Update : 25-12-2019

This is the words from Sciter's Web site,

Sciter brings a stack of web technologies to desktop UI development. Web designers and developers can reuse their experience and expertise in creating modern looking desktop applications. Various GUI frameworks offer different UI declaration and styling languages, such as QML and XAML (Microsoft WPF). On the contrary, Sciter allows using time proven, robust, and flexible HTML and CSS for GUI definition and GPU accelerated rendering.
Before using sciter I already tried other alternatives but none of them was satisfactory as an example first i tried andlabs/ui libraryi already have written a post on it. You can read it on post gui programming with golang.  But this library is still under construction and has no support for production apps.
Secondly, I go for electron but the problem was my simple calc like the app was of size 150mb. Which is 15mb of go and other was the electron. 
Before some time I found another alternative, s…

Creating nested documents in firestore

  1. Firestore returning no records yet, I see them in console
  2. Collection not retuning any element.
  3. ... ... 

You might facing issues written above. Then it might be this case.

You might getting empty response in this kind of query though there are elements in firestore.

 function (querySnapshot) {
            querySnapshot.forEach(function (doc) {   
              console.log(, " = ",;

I face the same problem. Though data was stored sucessfully ( I was guessing, which was wrong actully ).  To verify that your data is not stored as you expceted you can do check this.
Key in italics font means element is deleted
Key in italics font means element is deleted

If key of your data is in italic font then your data is not stored or is marked as deleted [ that was happening in my case ]. See in image.

Now you might thinking, that I have created element and  not deleted it then why it's showing as deleted.

Truth is that if you want to create nested

  • collection ( parent collection )
    • document ( parent docuemnt ) 
    • collection ( child collection ) 
      • document ( child document )

you have to create first parent document and after using its referance you have to create child document.

You should find reson behind this behaviour your self , but for now, perfect way to handle this would be is make sure you code creating documents at every level explicitly.

For example,

var collectoinRef= db.collection(collection1).doc((doc1))

    .then((docSnapshot) => {

      // If document we are going to use as parent document is exist then 
      // we just have to set the child doc inside collectin of that document
      if (docSnapshot.exists) {
          .then(() => {
         // Something ....            
      // But if document we want to use as parent not exist, Then first we have to 
      // create it.
      // If that document is just used for arragment of elements then just pass empty
      // object set({}) and it will creat empty document for you.
      // After creation of empty parent object you can create collection of child docs 
      // inside it.
      } else {
  // Creating empty parent object
         collectoinRef.doc(doc1).set({}).then(() => {
          // creating child object inside parent object
          // after succefull insertion of parent object
            .then(() => {
             // Something ....        


Popular posts from this blog

Sciter : GUI Application with Golang using HTML/CSS

setup hyperledger fabric on windows 10

Apache : setup basic auth with apache in windows