A Dev Mindset | The Art of Software Development

Google Web Toolkit (GWT) is a development toolkit for building and optimizing complex browser-based applications. GWT is used by many products at Google, including Google Wave and Google AdWords. It’s open source, completely free, and used by thousands of developers around the world.

Since the first release, some 2 years ago, a lot of applications have been developed in GWT and lots of bad code has been developed and hopefully, lessons were learned.

In a nutshell, the Lego Framework is a framework easing the process of making GWT applications by using intuitive concepts, proven best practices and conventions. If you have already developed a GWT application, you probably know that GWT code tends to tangle up and weight down the capability of the extensibility and scalability with the growing complexity.

The Lego Framework combines the following:

  • ‘Lego’ like approach of building screens in a GWT application
  • Intuitive MVC paradigm with simple concepts like Screens, Components, Events and Monitors
  • Component-oriented & event driven code, resulting in high decoupling
  • Embedded usage of free and open source rich widget library (SmartGWT)
  • Simple to use support for internationalization

Not familiar with GWT development?

Do not worry. The Lego Framework is not only intended for people familiar with GWT, it can be also a perfect place for you to start building your GWT applications; you have everything in place.

Take a look at the following links for complete usage, demo application, code and explanation of the Lego Framework:

Google Code Project Page
User Guide (HTML, PDF)
Browse Source Code
Online Demo Application

, ,

Dec/09

26

Developing smarter JPA code

If you have worked with persistence in Java, and the chances are very high that you have worked, you probably know that it is the responsibility of the developer to manually take care of the bidirectional relationships between the entities.

As the JPA specification mandates:

It is the developer’s responsibility to keep the in-memory
references held on the owning side and those held on the inverse
side consistent with each other when they change.

Furthermore:

It is particularly important to ensure that changes to the
inverse side of a relationship result in appropriate updates on
the owning side, so as to ensure the changes are not lost when
they are synchronized to the database.

The above means that the developer will need to handle and update the references between the entities himself, instead of primarily focusing in business logic implementations.

It would be nice for the persistence provider or some utility library to take care of the wirings and re-wirings of the entity reference relationships and let the developer to focus on the business logic.

Most importantly, by moving away this responsibility from the developer, you’re moving away the potential of introducing bugs and inconsistencies in your code.

JpaToolbox is just the library that does the above. This simple lightweight library came out as a by-product of the first time I encountered the situation to manually take care of the entity relationships.

I have been using it since in my projects. Hope you will find it useful too.

Take a look at the following links for complete usage, code and explanation of the JpaToolbox library:

Google Code Project Page
User Guide (HTML, PDF)
Browse Source Code

, ,

Older posts >>

To top