Thursday, July 9, 2009

GWT and MVP (Model View Presenter) Pattern

After watching the google wave presentation at Google I/O, I changed my mind about the GWT (Google Web Toolkit) and I've been studying it hard. From the technical view, GWT is amazing and it's getting better on each new release. I was searching for best practices using GWT and I found this presentation: "GWT App Architecture Best Practices - Ray Ryan". Ray Ryan gives a lot of tips on how to create a well-structured and testable application using GWT. On the first thought I found it a little bit complex: when you deal with a simple screen it's easy to understand, but when you have to deal with a more complex screen, things get way more complex.

Ray Ryan presents the MVP (Passive View) pattern as a good solution, and it is. I spent many hours trying to figure out a way to implement the communication between the presenters. After this hard work I found - in my opinion - a good way to implement it, and I decided to share it with the world. I decided to share this knowledge as a sample application. You can find this application on http://gwt-mvp-sample.googlecode.com.

I'm not very experienced in this pattern so you might find some bugs or wrong concepts. The idea is to talk about it, to share knowledge. Feel free to change the source code, send me e-mails, add issues, etc.

I'm looking forward to your replies.

Tuesday, April 21, 2009

JavaScript Inheritance Implementation

I'm not used to develop in Javascript but, as a fan of programming languages and object-oriented paradigm, my friend Otavio Avila and I decided to develop a kind of inheritance in JavaScript. He is a very experienced javascript developer and html coder, with helped me a lot with my lack of knowledge in these areas. You can check more about it in http://jsii.googlecode.com. The project is licensed in LGPL that enables you to use it in your commercial, or not, applications.