Friday, February 25, 2011

Re: To smart GWT or not

Hi Sanjiv,

I tried to create simple application with List grid, which fetches JSON data from server. These data get displayed correctly in ListGrid.. But when I tried  to add some more data to existing data on click of a button, then nothing happens. The data does not get added to Grid. I spent  3 hours to figure out the issue, but could not found , as smart gwt is just black box like thing where we can not debug.
So it is very frustrating to  use , as very difficult to figure out what going wrong in such simple application. I am attaching the source code of this simple application. Can you please tell me where I am going wrong?


regards,

Nagin

On Sat, Feb 12, 2011 at 1:54 AM, Sanjiv Jivan <sanjiv.jivan@gmail.com> wrote:
Hi Nagin,
Thanks for the feedback. These are questions that come up quite frequently and I've answered them earlier but perhaps they should be added to the FAQ. 

1) Regarding the size of SmartGWT, one should realize that loading a SmartGWT application is very comparable to loading GMail in terms of size when you read your email. During actual deployments, all applications need to be configured optimally and this means that at the very least configuring the web server to serve JS files in GZip format as well as configuring the appropriate Expires headers. These are best practices not specific to Smart GWT and you can read more about them here : http://developer.yahoo.com/yslow/help/#guidelines 

Gmail is used by a lot of users and its load time is certainly acceptable. So back to the comparison with Gmail, here's a screenshot of YSlow load stats when loading Gmail :


As you can see, the total size of GMail that serves Gzipped resources is 994K.

Here's a screenshot of the YSlow load stats of a Smart GWT showcase which is properly configured with the appropriate Expires headers and GZipped resources : 


As you can see, it has a total size of 918K when loaded with an empty cache. The size would have been over 2MB had the server not been configured to serve GZipped JS files, and so would the size of the GMail app but the point is you must always configure the server correctly to serve the JS files in compressed GZip format for actual deployments. 

Secondly, during production deployments you should also configure the SmartClient JS files to have "Expires" headers set to a future date like a year from today. This is what the Smart GWT Showcase demo does :


and when this is configured, then the actual SmartClient JS files will only be loaded the first time the user accesses the application. When they access the application subsequently, 0 bytes of the SmartClient JS files will be loaded since it is picked up from the browser cache.


So when developers talk about the size / load time of Smart GWT, one must realize these are development environment concerns only that will be non-issues when actually deploying the production application. This is similar to running the app in GWT dev / hosted mode versus web / compiled mode where GWT hosted mode will always be slower than running the compiled application.

2) The SmartClient JS files are compressed. Are you sure you're not inheriting SmartGwtDebug instead of the SmartGwt module? If you haven't sorted it out already then lets continue this discussion on the SmartGWT forums.

3) Regarding Smart GWT "not being written in native GWT so that it can take advantage of GWT's optimized java script compiler" : You have to ask yourself what kind of application you're building? Sure, if you only want to use a single Smart GWT widget like a TreeGrid in your entire application and the application needs to load super-fast on a high traffic internet site where every KB downloaded matters, then using SmartGWT might not be the best choice. As noted above, if you do configure the server with to server gzipped files with a future Expires header, then the end user will only incur the overhead of loading the SmartClient JS files once. Again, if this is not acceptable for your app then SmartGWT might not be the best choice. For most intranet applications the load time of  ~500K of gzipped files is a non-issue.

The other thing many developers do when evaluating SmartGWT is they build out a HelloWorld app and are not pleased by the size of the compiled output due to the SmartClient JS files. What one needs to realize is that this is a fixed / constant that will not increase in size even when their application grows to have tens to hundreds of screens. A good example of this is the SmartGWT Showcase that has around 300 screens and the SmartClient JS file size remains the same.

4) Regarding extensibility of SmartGWT widgets : SmartGWT widgets are customizable and many users have done exactly this. Without knowing exactly what you're trying to customize its hard to comment but as you've probably noticed and as seen in the Showcase, SmartGWT widgets are extremely powerful with deep configuration options not available in most RIA toolkits. If you still find a feature missing, you have the option of adding it yourself, filing an issue in SmartGWT issue tracker, or contacting Isomorphic support to build it out for you. The option you chose depends on whether you're a hobbyist, how quickly you need the feature, or whether you work for a company that feels your time is better served working on their application / business logic rather than get into UI toolkit level enhancements. 

In the end there is no one-size-fits-all. You'll have to determine the features you need for your application, how much of it is provided by core GWT or any other toolkit, the cost of building missing features in-house, and compare it to the client and server integration features, support and stability of Smart GWT and decide for yourself. I would recommend that you read the SmartGWT quick start guide ( http://www.smartclient.com/releases/SmartGWT_Quick_Start_Guide.pdf ) if you haven't already done so since it covers a lot of frequently asked questions and features provided by the library.

Hope this addresses all your concerns :) 

Thanks,
Sanjiv


On Thu, Feb 10, 2011 at 2:30 AM, Nagin Kothari <naginkothari@gmail.com> wrote:
Sanjiv,
 
I know I am reopening this thread,  not to criticise Smart GWT, but want to give some feedback.
 
First of all let me acknowledge that it is very good library with lot of cool and fantastic features. I experimented with it and liked it and planning to use it in one of my project.But I have some doubts and questions , which you I thought you will be best person to answer . Hence this mail.
 
1. I am using  GWT and want to use some Smart GWT widgets in that application.But it looks like I have to include lot of Smart client JS file which size is about 2MB. Client need to download all these JS libs above our GWT compiled script. this become very huge download for client, Even I want to use  Smart GWT's grid , I realized that I have to include  almost everything except few small smart-client JS.So my question is why is so and what is work around for it?
 
2.Second, smart-client scripts are not in compressed format (like GWT is). it is like GWT pretty format. If it is compressed then size of all script files will be reduced.
 
3. My third question is - Why smart GWT is not written in GWT so that it can take advantage of GWT's optimised java script compiler.Smart GWT widget the can be extended by user to customize it. Right now Smart GWT widgets are just black box for developer.
 
Theses are few question I had in mind., Over all features provided by smart GWT are great.
 
Thank and regards,
 
Nagin Kothari

On Fri, Dec 3, 2010 at 9:24 PM, Sanjiv Jivan <sanjiv.jivan@gmail.com> wrote:
Jaroslav,
If you're happy with GWT that's great but please do not make such vague and baseless claims about Smart GWT. Legitimate bugs reported are fixed really quickly and existing users can attest to this. Smart GWT currently has around 42 open defects with a majority of them being low priority, and 16 enhancement requests ( http://code.google.com/p/smartgwt/issues/list ). Considering the depth and breadth of features provided by the framework this is a pretty low number of defects.

3 of the 7 issues that you filed were invalid, and 2 defects that were fixed and the remaining 2 were marked WontFix since they were trivial pieces of functionality that the user could easily implement.


And when you were advised how to implement a warning dialog before record deletion on this issue that you filed  ( http://code.google.com/p/smartgwt/issues/detail?id=325 ), you responded by "you are sad". Nice way to show your appreciation when using a free product.

Sanjiv

2010/12/3 Jaroslav Záruba <jaroslav.zaruba@gmail.com>

...until you run into some SmartGWT magic - like widgets not working
without otherwise completely useless 'final' (have fun trying figure
that out), newly spanned records not appearing in tree, styles not
getting applied until mouseover, etc.
What looks like polished set of awesome widgets might turn into
nightmare which makes you throwing your deadlines out of the window.

(Like I said before, this particular experience with SmartGWT is one
year old.)

With GWT the start might be slower but you can predict the deadlines +
you're not working with 'black box'.

On 3 pro, 00:00, ckendrick <charles.kendr...@gmail.com> wrote:
> Sorry that's quite absurd: SmartGWT is often introduced to solve
> performance problems, and it solves them.
>
> SmartGWT is intentionally designed to have a one-time-ever download of
> a feature rich runtime in exchange for reducing subsequent server
> requests.  For example, Adaptive Filtering greatly reduces the
> costliest types of database hits:
>
>    http://www.smartclient.com/smartgwt/showcase/#grid_adaptive_filter_fe...
>
> .. and allows you to introduce an extremely powerful data highlighting
> system with no server load at all:
>
>    http://blog.isomorphic.com/?p=234
>
> If your application is the kind we target - complex enterprise
> applications which are used repeatedly and for significant lengths of
> time - this provides a gigantic performance boost, and once-ever
> download of cachable JavaScript files is a negligible factor.
>
> Look at a deployed SmartGWT application and you've got users humming
> along, ripping through the interface and nothing being downloaded
> anymore because it's all cached.  And everyone is getting fast
> responses from the database because the Smart GWT framework is
> minimizing database load.
>
> The larger your application becomes, the more these benefits accrue.
> And, by the time you've built an application with comparable
> functionality with core GWT or another GWT-based framework, you're
> going to be downloading the same size runtime as SmartGWT anyway.
>
> On Dec 1, 1:44 pm, aarnott <andrew.wj.arn...@gmail.com> wrote:
>
>
>
>
>
>
>
> > I've found Smart GWT to have rather poor performance and it comes at
> > the added cost of massive javascript libraries (even when they are
> > gzipped). If you are anything like me, you will probably find that you
> > lose time in the long run by going with Smart GWT because you will
> > want to get rid of it later to boost performance.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit@googlegroups.com.
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

1 comment:

  1. Hai, I want to add Time Zone Settings on my client side application using smart gwt. How can I get browser time zones using smart gwt.
    pls tell me the solution for this issue.

    ReplyDelete