Sergeonclear

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Thursday, February 17, 2011

GWT + Smart GWT

Posted on 6:57 AM by Unknown

Technology stack:

            Client side: GWT Sdk 2.1 / Smart GWT 2.4          

            Server side:  Spring 3 mvc application which returns response in JSON data format. / Tomcat 6

            Development tools  : Eclipse Helios 3.6 /  GWT plug-in / GWT designer plug-in (this has useful features to design the UI, but consumes lot of memory and quite buggy and annoying) / To show debug console: javascript: isc.showConsole()

 POC Implementation Approach:

            A simple application to use Smart GWT components was designed. The key areas to investigate were – how well the UI components fit together and client server interaction options.

            *.gwt.xml defines the GWT module with core classes to be inherited and also the entry point class. The entry point class onModuleLoad() method is the first to be called in the GWT application to load the rest of the UI components.

            Used Smart GWT components for layout - VLayout, HLayout and SectionStack for collapsible sections.

            Smart GWT ListGrid widget, can easily render the search result data by setting a specific Datasource.

 (Note: This notion of datasource is not the same a database datasource; it is just a terminology for abstracting client server communication by Smart GWT).

 Various datasource can be used to handle JSON, XML, RPC, etc server responses. These can be found in package : com.smartgwt.client.data.*DataSource

             The prototype uses RestDataSource to consume JSON response generated by a Spring MVC 3 application.                     

            Once these components are organized in the Entry point class, using the gwt compiler generate all the JavaScript and HTML code required by the app. This can be deployed to a server.

Initial impression

Pros:

  • Less JavaScript and HTML to write and maintain.
  • Open source Smart GWT code allows viewing code and identifying bugs easily: code source link . Also an active smart GWT development forum is helpful.
  • Choice of Smart GWT datasource allows you to mock data for static prototypes and then switch to real web application for data. Also this decouples client UI development from server side build.
  • Swing style UI development:  Using smart GWT, you get a swing development feel, with components added into container classes and event handlers defined for

Components                       

  • Ready  to use components:

                Using Smart GWT you get widgets out of the box, but best practise around usage and modification needs to be identified. . Smart GWT has a rich set of ready to use widgets, a showcase is available here  

Cons:

  • Modular design for building large scale apps is yet to be identified. Initial impression shows SmartGWT is not written with MVP pattern in mind as suggested by Google.
  • Unit testing :

            How best to make SmartGWT components unit testable needs to be identified. There is not much mention of how the Smart GWT components can be unit tested. If we consider using only GWT, this can be achieved using junit GWTTest case.            

TODO:

  • Smart GWT or just GWT:  Building a GWT application from scratch without using any frameworks will need considerable amount of effort to follow the standard MVP pattern. But this is more flexible and unit testable, though time consuming. GWT best practise suggests using MVP design pattern for building larger applications.
  • SmartGWT has its own approach, where you use a widget, introduce a  
  • datasource into it and you are done. Yet to identify the best practise around building
  • such smart GWT components in a modularised (or MVP) fashion.
  • Using framework GWT-platform and SmartGWT could be an option to try MVP architecture as mentioned here. This would need more investigation.
  • Validation/message/exceptions display and other generic feature support of smart GWT is yet to be investigated.
  • Client server architecture:  Having Spring MVC + Spring core on the server side and GWT + Smart GWT on the client side could be a good stack of open source technologies, but given that GWT by default uses RPC for client server interaction, usage of these needs to be better evaluated. (esp. authentication/session handling/security etc).
GWT performance tuning
Server side tracing link
Client side Speed tracer link
Appstats for java link

Debug setting:

Run GWT Development Mode

  • Go into the Run Configuration menu and create a new Web Application configuration (this little Google g).
  • Select the slf4gwt-samples-client-app project and set com.google.gwt.dev.DevMode as the Main Class. On the Server tab uncheck Run built-in server and on the GWT tab set the URL as http://localhost:8080/slf4gwt-samples-server-app.
  • Save and run!
  • Select the src/main/webapp directory from the project and you are done. Now the GWT development mode runs.
  • There will be an Eclipse view called Development Mode, that shows you the URL for development mode. Copy it into your browser.
Run GWT debug on tomcat:
 1. Get google plugin for eclipse
2. Then in eclipse, right click on your project and choose Debug as -> Web Application (running on external server)
3. Enter URL of your web app on tomcat (like http://localhost:8080/YourApp/YourApp.html and eclipse will give you new one - it will add stuff like ?gwt.codesvr=127.0.0.1:9997
And you can hot replace the code as the code will be served from eclipse and not from application deployed in tomcat. So cool. Thanks google

GWT compiler performance tip:
   Add 4 in gwt-maven-plugin setting ..more
  Gwt plugin




Useful links
GWT:
Smart GWT : has rich set of gwt components.
Smart GWT+ GWT +MVP example
GWT debug mode on tomcat link2
Modular GWT

JSON GWT integration :

GWT gui designer

GWT EventBus sample





Email ThisBlogThis!Share to XShare to Facebook
Posted in gwt javascript | No comments
Newer Post Older Post Home

0 comments:

Post a Comment

Subscribe to: Post Comments (Atom)

Popular Posts

  • LinuxPerformance Tuning(apache,tomcat,linux) and related
    Web profiling -- HTTPAnalyzer -- -- YSlow --CSS,Javascript report , time/size measurement for individual component is good. -- F...
  • (no title)
    Hardware/Software stack:  iPhone 3Gs having iOS 5.1.1(latest as of today).  The Xcdode 4.2 failed to detect this iphone as it has support on...
  • Spring interceptor ordering
    SimpleUrlHandlerMapping uses a hashMap to hold the interceptors. Ordering can only be guaranteed by setting  order property.. By default it ...
  • SVN/ Subversion Tips and traps
    SVN could be tricky and waste a hell lot of time. Case Issue : Normally we run SVN server in linux. Our dev env will be in windows NT. Windo...
  • Liferay CMS/ web content management/ workflow/ staging
    Liferay out of the box has a web content management system. The web pages can mostly have these web content (articles) as web pages. The web...
  • Cobertura- junit coverage tool
    First, you need to add a task definition to the build.xml file. This top-level taskdef element specifies that the cobertura.jar file is i...
  • XSLT caching Transformers
     The usage of cached transformer objects is recommended here A sample implementation of CachingTransformerFactory is here The above code abs...
  • Rewrite rules in apache and IIS
    Well we can control how the server serves stuff to clients by defining rewrite rules. As servers are dumb, its important to explain well abo...
  • Real-Time Tracking and Tuning for Busy Tomcat Servers
    A very nice article which details on possible options for tomcat server monitoring to tweak its performance. http://www.devx.com/Java/Articl...
  • External Javascript from Java Servlets
    Copied from http://myappsecurity.blogspot.com/2007/01 Like to thank anurag for the content. /breaking-same-origin-barrier-of.html External ...

Categories

  • AJAX javascript
  • All about UK Visa HSMP VS H1
  • All about UK Visa HSMP VS H1 hsmp assistance
  • amazon
  • android apps ship control radio hindi
  • Apache 2.x setup Quick guide for Linux
  • apache commons configurator usage
  • apache commons usage
  • arsenals for developers
  • article
  • Batch script to load developer environment
  • Blind folded chess
  • Castor castor convert dtd to xsd
  • cloud comparision price
  • cloud comparison blog
  • cloud computing monthly price
  • cloud usage
  • Cobertura- junit coverage tool
  • Code generators
  • cron jobs expressions
  • cruisecontrol cruise control
  • debugging eclipse tips
  • developer tools
  • document library
  • easy mock jmock vs mocking java tdd
  • External Javascript from Java Servlets
  • fedora 9 lenovo 3000 n200 windows xp dual boot problem
  • Fire fox plugins and tweaks
  • Free PHP hosting
  • gods debris the religion war scott adams dilbert
  • google app engine
  • gwt javascript
  • hibernate second level cache
  • i18n locale localization internationalization spring liferay portlet locale
  • ibatis sybase mapping
  • image gallery
  • iphone apps bri8 apple
  • iphone shsh 3gs ipsw downgrade ifaith tinyumbrella ios5.1.1 to ios5.0
  • java
  • java JDBC
  • javascript junit testing
  • Javascript trouble shooting tool
  • Jboss overview
  • jmeter load testing custom java sampler javasamplerclient xml test
  • JNDI test JSP page
  • Joomla CMS
  • JProfiler setup jprofiler on linux
  • jquery IE AJAX issues
  • jquery spring AJAX
  • keyboard music java typing soothing notes auto suggest
  • liferay kids version
  • liferay web 2.0 java/j2ee
  • linux - the difference between hard and soft links
  • linux mysql
  • linux mysql setup quick start
  • Linux ssh autologin with putty
  • LINUX usefuls
  • linux)
  • LinuxPerformance Tuning(apache
  • log4j setup useful
  • lucene solr
  • mac m701 android skype not working crash
  • maven
  • maven cut reduce build time
  • microsoft ODBC oracle dll connection issues
  • Mobile Ad Services (adwhirl)
  • opsourcecloud
  • oracle connect by hierarchy
  • oracle table previlege
  • Oracle thin vs OCI(type II/thick) drivers
  • pdf 2 text
  • Pega PRPC
  • php
  • rackspacecloud
  • Rewrite rules in apache and IIS
  • scaffold
  • setting up a static ip on SKY broadband
  • setup quick start
  • Single Sign on - OpenSSO with Liferay
  • smart gwt
  • smtp email test mock server james
  • SMTP MAIL telnet windows
  • Software tools mind map freemind j2ee tools
  • Speed typing tips.
  • Spring + Hibernate Usefuls BaseDAOHibernate
  • Spring annotations with spring-mock not working 2.0 2.5.6
  • spring jndi datasource lookup
  • Spring portlet mvc and spring servlet mvc validation
  • Spyware trojan and virus removal tools
  • struts magic
  • SVN/ Subversion Tips and traps
  • tabbed ms dos console cygwin console
  • Texter - An auto text expander autotyper
  • Textpad tricks
  • The art of debugging
  • tomcat
  • Tomcat Exploded war - cut deployment time
  • Tomcat on linux tips
  • Tomcat on linux tips commands
  • TypeIt4Me
  • Typinator
  • Useful Eclipse Plugins
  • Useful Eclipse Plugins eclipse shortcuts keys
  • Useful tools
  • web content
  • xcode cocos2d iphone box2d
  • xpath xml xquery

Blog Archive

  • ►  2013 (19)
    • ►  August (17)
    • ►  July (1)
    • ►  January (1)
  • ►  2012 (7)
    • ►  August (1)
    • ►  June (4)
    • ►  April (2)
  • ▼  2011 (20)
    • ►  November (1)
    • ►  October (1)
    • ►  August (1)
    • ►  July (3)
    • ►  June (1)
    • ►  April (2)
    • ►  March (4)
    • ▼  February (1)
      • GWT + Smart GWT
    • ►  January (6)
  • ►  2010 (27)
    • ►  December (3)
    • ►  July (2)
    • ►  May (3)
    • ►  April (2)
    • ►  March (5)
    • ►  February (10)
    • ►  January (2)
  • ►  2009 (32)
    • ►  December (5)
    • ►  November (2)
    • ►  September (3)
    • ►  August (6)
    • ►  June (4)
    • ►  May (4)
    • ►  April (3)
    • ►  March (2)
    • ►  February (3)
  • ►  2008 (28)
    • ►  December (1)
    • ►  October (2)
    • ►  September (2)
    • ►  August (4)
    • ►  July (7)
    • ►  June (1)
    • ►  April (2)
    • ►  March (2)
    • ►  February (2)
    • ►  January (5)
  • ►  2007 (24)
    • ►  December (3)
    • ►  November (2)
    • ►  October (6)
    • ►  September (1)
    • ►  August (3)
    • ►  July (8)
    • ►  June (1)
Powered by Blogger.

About Me

Unknown
View my complete profile