Some of my requirements for the overall solution were:
- Open Source
- Rich Internet Application Framework
- Build in Java
- Flexible and powerful
- Following good practices and design patterns
- Full-featured development environment
- Easy Deployments
- Scalable and Redundant back-end
- None to low maintenance cost
- Cost efficient hosting -free or pay as you grow
After spending some time on research and evaluating several solutions I reassured my self that there is no "out of the box" perfect solution that you can use. There are always pros and cons that you have to decide what is the best for you in a given situation and learn to manage its limitations.
At the moment I have decided that the core of the solution should be build on Google App Engine/Java and Google Web Toolkit.
This goodies from the Google with Eclipse Plug-in and some additional extensions (which I will mention later) are the solid base for kind of stuff I'm aiming for.
If it happens that you never heard about it you should definitely go to:
GAE website:http://code.google.com/appengine/
GWT website: http://code.google.com/webtoolkit/
and Google IO conference: http://code.google.com/events/io/2009/sessions.htm
or just google for it ... there is plenty resources out there.
Google App Engine among its advantages has a lot of weaknesses and limitations so you need to be at least aware of them. If against all odds you consider to give a try (as I did) you should learn how to dill with it.
Google is also aware about its limitations and with the time is improving them.
If you want to find out more about GAE and its "problematic features" I recommend reading:
- http://highscalability.com/blog/2009/2/21/google-appengine-a-second-look.html
- http://code.google.com/events/io/2009/sessions/BuildingScalableComplexApps.html
- http://highscalability.com/blog/2010/1/22/how-buddypoke-scales-on-facebook-using-google-app-engine.html
- http://bygsoft.wordpress.com/2010/01/09/cloudy-combo-google-app-engine-and-amazon-s3-combo-pack/
- http://blog.dantup.com/2009/12/microsoft-windows-azure-vs-google-app.html
Because of the GAE special nature and its limitations you should follow good practises for your application design and use/build framework which will limit potential work needed to migrate to other hosting/storage solution.
I decided that i will stick with GWT no matter if my application is on GAE/J or somewhere else. This is such a cool technology that I can not imagine any other way of doing web development from now on. Its very powerful, and development experience is great.
To fully utilize its power you should follow best practices which were presented by Ray Ryan at Google I/O 2009 entitled Google Web Toolkit Architecture: Best Practices For Architecting Your GWTApp (You have to watch it)
This excellent talk laid out several best practise approaches for designing your GWT application based on the team's experiences while developing the new AdWords interface. Some of the key recommendations were:
- Use an MVP pattern;
- Use a command pattern;
- Use an Event Bus (a.k.a Event Collaboration);
- Use Dependency Injection.
This talk caused GWT community maelstrom and in its results few implementations of its ides were created.
For more details on that topic I recommend following reading:
- GWT-Presenter - An implementation of the MVP pattern
- GWT-Dispatch - An implementation of the command pattern
- Google Gin - Dependency Injection based on Google's Guice (client site - GWT)
- Google Guice 2.0 A dependency injection framework for Java (server site)
- Nice tutorial that shows how to put all this stuff together: http://blog.hivedevelopment.co.uk/2009/08/google-web-toolkit-gwt-mvp-example.html
And two complete frameworks that implements above (and a little bit more):
- mvp4g
- gwt-platform - one which I have decided to use.
One weakness of GWT is a relatively small amount of out of the box standard widgets. Likely there is a simple solution for that. Use Ext GWT which is a Java library for building rich Internet applications with Google Web Toolkit (GWT). To give you some idea how to integrate with mvp framework see example EmployeeAdminWithGXT at http://mvp4gshowcase.appspot.com/
At the end I would like to mention quickly something about JDO and its implementation for GAE which is officially promoted way of accessing Google Data Store. Unfortunately neither JDO nor JPA (which is build on top JDO and is also partially supported) is not the best way to access it. Google data store isn't RDBMS, so it requires some special treatment. That's way JDO implementation for GAE is not perfect and it is causing developers live harder by making staff more difficult that it supposed to be. That's way you should consider to use some alternatives... fortunately there are some. Google provides low level API which is used by JDO implementation any way. I don't recommend using it directly but to use frameworks like Objectify, Twig or SimpleDS that make some stuff easier and more efficient. For the comparison of this frameworks please read this great article at http://borglin.net/gwt-project/?page_id=604 (and the rest of this blog ... author had to go through the same process as i did). I have decided to use Twig
Happy coding and stay tuned
G.
No comments:
Post a Comment