Rolls of GWT, Dart, Java, Spring, Grails, Design Patterns and other pro web development goodies.
Sunday, November 13, 2011
Subjective thoughts on best practice with GWT applications.
If you have spent anytime with me you know I love GWT. But in my humble opinion there are ways to build web applications that still involve the gamut of javascript frameworks and bog-standard HTML5 and javascript. Through my vast and continued learning experience of GWT I am beginning to see it in its current guise as being great for building complex and large widgets embedded in a web environment that is built in a more traditional web application framework. Using the word tradition is kind of absurd in the web application design sphere because a tradition is established in a matter of months and then disposed for a new tradition within a couple of years. However we appear to be heading towards a path of convergence in how and the way we code. I recognise this as entirely subjective but for companies adopting GWT for the first time, experimenting with complex GWT widgets, then embedding them into their existing web applications is a great way to start on the GWT path.
Model-View-Controller (MVC) and Model-View-Presenter (MVP) are becoming the de-facto design patterns for building desktop, web and mobile applications. Developers pay attention, if these are not on your resume, get them on there as fast as possible. You should not leave home without it. Many frameworks in almost every language develop according to this pattern. So whether you are using Ruby on Rails, Grails, GWT, Spring MVC, Backbone.js they all design their frameworks around this convention. GWT is a little late to the game with regards to this and so two additional frameworks have been around for a while which in my opinion currently offer a lot more features than the "Activities and Places" inbuilt infrastructure. These two frameworks are GWT-Platform and MVP4G. They are both on Google Code and both have extensive user collaboration and input. Developing outside of GWT in the standard HTML-CSS-JS arena backbone.js offers a Javascript implementation of MVC. I haven't used it as of yet but from the brief tutorials I have read it appears to be very easy to use.
In a similar vein, Dependency Injection is also a must have. Design your code to interfaces and inject interfaces at runtime. This is achievable in GWT using Google GIN on the client and Google GUICE on the server. However my current overwhelming suggestion on the server is the Spring framework. If you are writing Java server code and not using Spring, you are probably writing lots of boilerplace bullshit. Stop it now!. My server side framework knowledge is limited so would love to hear from other developers on alternatives, but from what I have seen this is well adopted, supported and promoted in the media and job adverts. Spring is about more than Dependency Injection but this is at the core of the framework. If you want to develop modular, testable code then you need to use DI.
Using the Facebook web site as an example lets look at how you might construct this from scratch. Some GWT developers will suggest that the whole site should be built in GWT. I disagree but more on that later. However I believe that you will have a more flexible and productive if you develop the complex parts of your web site in GWT and embed them into the website. So when looking at your newsfeed the complex box that controls updating your status etc might be a small GWT application but it is embedded in an AJAX-controlled feed panel table. The reason I think this? Unless your whole team consists of ninja, ex-Google GWT developers that worked on the ad-sense or ad-words interface, then you are going to experience delays in your project as you migrate your developers to a new way or working. By concentrating complexity in small manageable chunks you reduce your exposure to delays in your project.
Monday, January 10, 2011
A personal review of GWT for 2010
2010 has been an exciting year and I wanted to thank everyone who commented, got in touch and generally helped out. A big thankyou goes out to the people at GWTP project. Philippe and Christian thanks for all your help in utilising the framework in my example application.
The year started with a change of career. For the past 15 years I have primarily been a Microsoft developer working for various commercial interests in London, Iceland, and now the USA. Currently living in Seattle, the Gaceland for computer programmers, or as we are now known Software Engineers, I decided that it was time to change my career track and learn a proper programming language (let the flame wars begin).
I am now sure whether I particularly dislike Windows, or whether I just needed a change of scenery but the Microsoft programming platform doesn't jive with my liberal view on life. I always wanted to learn an open source language, partly because I am an academic at heart and partly t stick it to the man. So the scene was set, and the only real option was to learn the current professional language de jour, JAVA.
One thing I also failed to mention was my love of Google. Any company which adopts open source as much as they have means they have to be admired in some way. Computer Programming tools are not proprietary systems. They are ideas that should be shared with everyone, in the same way that the cure for Malaria, will one day hopefully. I am not saying that all software built with open source tools should not be commercial far from it. But the ideas and tools we use should be at their core.
So I was learning Java and has a long term ASP.Net developer was looking for something that improved my programming environment. Google App Engine was the first oh wow moment three years ago, where I thought, this takes all the hassle out of programming. Then when I discovered Google Web Toolkit and what that actually means for feature rich internet applications. I thought oh wow oh wow.
So for the past year I have been learning Java with GWT on GAE. I learn best by example and building a contact application was the best way forward. I have a passion for helping small businesses and developing software which is functionally logical. So much software is plain old bad. GWT liberates the developer to programme professionally at all levels in the stack, thus improving and professionalising their daily routine. Google continues to build on this great architecture by partnering with Spring and Roo, to introduce Rapid Application Development tools. Plus they continue to enhance and develop the library. Speed Tracer looks awesome, performance tuning built in on the server and client side. Need I say more. Google needs to be congratulated for this piece of kit because it has improved my development daily routine no end.
Where am I now? Well on the basis of my skills developed during the past year I have landed a job with a startup, doing yes you guessed it... Java-GWT development. 2011 continues to be exciting. I also transferred to a Mac which I have been wanting to do for ages, and with the launch of this new career it will help me do so. Here is to 2011.
Continue to read, continue to ask questions, and lets have a great 2011.
Thursday, July 15, 2010
Soho CRM Moves to GWTP
So I have been using the framework extensively, often asking questions in the forum and have even been invited to contribute to the project. Therefore I started where all responsible people should, and contributed to the much loved documentation. Since I needed a FAQ page I created the start of one. Now after two weeks I have learned a lot, and have the start of my CRM application in Google App Engine - http://sohocrm.appspot.com.
Wednesday, June 30, 2010
All aboard the GWT-Platform
After attending Google IO 2010, and having previously used the MVC paradigm in Python and Ruby on Rails, and after reading several Google articles on the framework I decided that this "sort" of architecture was the way to go. Google recommends the MVP framework and so this is the approach I initially took. After reading the articles and going through the Contacts examples it was easy to see, although I didn't fully understand, that this approach was very logical. However, I don't really like using however as a linking word as it indicates a lack of vocabulary, but anyway, and however, I ultimately decided not to go with Google MVP because their examples didn't cover enough of the scenarios I needed to see before I could fully move on in converting sohocrm.appspot.com to this framework.
That's when I came across GWT-Platform which is headed by several very knowledgeable people and which incorporates MVP, Dependency Injection, Command Pattern and an RPC dispatcher into one framework. So many bases covered in one framework, could this be the way to go? After reading their documentation and completing the examples it seemed this could be the choice. They have some simple examples and one very complicated (PuzzleBazar). Which after you delve into answer most of your questions, along with the responsive discussion forum over at GWTP Google Groups.
After reviewing their new contributors issue list over at Google Code. I decided it was time to get involved and the Clean up Wiki issue seemed the way to go. As I will still be learning this framework for many months to come, I shall be bothering Philippe Beaudoin at the discussion forum, in trying to come up with and answer many F.A.Q. questions new users to the framework may have. At the moment I feel like I am, not quite at the rabbit hole, but sometime next week I hope to step through it.
In summary. GWTP has a lot of interesting features in one package, and while it might take some upfront work in learning the framework, the OCD inside all of us will be satisfied by its logical approach.