Answered: What is the working mechanism of Sencha GXT?

Hi All,

I am new to Sencha GXT. I am curious about the internal processing mechanism of GXT. I am confused about the script file creations and the location it gets stored. Does the application always have to connect to cloud server and compile the JNI to JSNI? Or it is a one time process and the final script is stored locally in our web server? Please enlighten me. Pardon me if my question looks like a little ignorant.

Sencha GXT is built on top of Google's GWT. Most code is written in Java and gets compiled to JavaScript at compile time via the GWT compiler. JSNI provides a mechanism for writing JavaScript in your Java files and accessing that JavaScript via Java method calls.

I'm a little confused as to your question about connecting to a cloud server for compilation. GXT and GWT are web applications and as such can be run locally on any computer running a web server or even using an embedded web server. Compilation is (and should be) done locally.

The compiler will generate a separate <md5hash>.cache.html file for each browser/version combination you wish to support. The file to serve to a requesting user's browser is determined by the XXX.nocache.js file included at the top of your index.html (or equivalent) file.

Sencha GXT is built on top of Google's GWT. Most code is written in Java and gets compiled to JavaScript at compile time via the GWT compiler. JSNI provides a mechanism for writing JavaScript in your Java files and accessing that JavaScript via Java method calls.

I'm a little confused as to your question about connecting to a cloud server for compilation. GXT and GWT are web applications and as such can be run locally on any computer running a web server or even using an embedded web server. Compilation is (and should be) done locally.

The compiler will generate a separate <md5hash>.cache.html file for each browser/version combination you wish to support. The file to serve to a requesting user's browser is determined by the XXX.nocache.js file included at the top of your index.html (or equivalent) file.

Thank you Adam. Now I am clear with how the files are compiled locally and created, fed to the browser according to the version. May I ask you a suggestion? I am trying to create widgets for a web app. These widgets has to contain existing html code from JSP page and nothing else. More over these widgets has to be draggable (Identical to what you can see it in Portal Demo Example of ExtJS). What would you suggest for me? GXT or EXT JS 4?

Wow. I don't know ExtJS at all. I tried dabbling in it once but never got anywhere. Additionally, I found the documentation unhelpful at the time. This may have changed since.

I'm not sure I understand your requirements exactly. When you say your widgets have to contain existing HTML code from JSP pages, what do you mean?

From a ground-up standpoint the argument for a J/S-based framework vs. GWT-based one (that I've seen) boils down to whether or not you and your team are Java developers or JavaScript developers. At my company, everyone knows Java and we don't have many J/S developers (and some folks were scared of J/S) and so we went with the GWT-based solution of GXT. What is the make-up of your company?

As far as a recommendation in your case, I need some more answers first. If you're still not sure, I would suggest developing a demo app in both frameworks and seeing which one is easier to work with and results in the faster development time.

Well I am both Java and JS developer. My requirement is pretty simple. I have to design a ExtJS panel or wiindow or what ever else which would be draggable. But the inner content of the panel/window thing would not contain any bit of ExtJS. This means I have to place pure HTML code in it. These HTML code are pre programmed in JSP files. Thats not a problem. I think I have found a solution with ExtJS. But anyway thanks for your time and replies Adam. I learnt a bit about GXT from your responses.

Portal Example in Est JS 5

The current example of GXT 3 PortalLayoutContainers, it doesn't have the feature of dynamically creating columns and rows while doing the drag and drop. this is feature is available only in ExtJS Portal example. which is very cool.

Portal Example in Est JS 5

The current example of GXT 3 PortalLayoutContainers, it doesn't have the feature of dynamically creating columns and rows while doing the drag and drop. this is feature is available only in ExtJS Portal example. which is very cool.