Fundamental Advantage
GWT takes the web layer programming to JAVA. So, the obvious advantages of Java start getting into play. It will provide Object Oriented programming. It will also provide great debugging and compile time checks. Since it generates HTML and Javascript, it will also have ability to hide some complexity within its generator.
Fundamental Disadvantage
The disadvantage starts from the same statement. GWT takes the web layer programming to JAVA. If you know JAVA, probably you will never look out for an alternative language to write your business logic. It's self sufficient and great. But when it comes to writing configurations for a JAVA application. We use property files, database, XML etc. We never store configurations in a JAVA class file. Think hard, why is that?
This is because configuration is a static data. It often require hierarchy. It is supposed to be readable. It never requires compilation. It doesn't require knowledge of JAVA programming language. In short, it is a different ball game. Now the question is, how it relates to our discussion?
Now, lets think about a web page. Do you think when we write a web page we write a business logic? Absolutely not. Web page is just a configuration. It is a configuration of hierarchical containers and fields. We need to write business logic for the data that will be captured from and displayed on the web page and not to create the web page itself.
Previous paragraph makes a very very strong statement. This will explain why HTML and XML based web pages are still the most popular ones. XML is the best in business to write configurations. A framework must allow a clear separation of web page from business logic (the goal of MVC framework). By doing this a web designer will be able to apply his skills of visualization and artistry to create brilliant looking web pages just by configuring XMLs and without being bothered about the intricacies of a programming language. Developers will be able to use their best in business JAVA for writing business logic.
Finally, lets talk about the repercussions in direct terms. GWT breaks this principal so it is bound to fail. The cost for developing GWT application will be very high because you will need multiskill programmers to write web pages. The required look and feel will be very hard to achieve. The turn around time of modifying the web page will be very high because of unnecessary compilation. And lastly, since you are writing web pages in JAVA it is very easy to corrupt it with business logic. Unknowingly you will introduce complexities that must be avoided.
But by not using it you are missing the object oriented programming from Web Pages. Quite bad. Now the next question, do I really need JAVA to achieve Object Oriented Programming? Answer is no. If you have heard of frameworks like JSF and ASP.NET. They have component based architecture. Components are nothing but "Encapsulations", one of the pillars of Object Oriented programming paradigm. But what about "Abstraction" and "Inheritance". Well none of the UI frameworks that support MVC pattern have an answer to it yet. This is where the framework that I have written pitches in.
Imagine if you can do something as shown below to create a web page:
<type id="address">
<textbox id="line1"/>
<textbox id="line2"/>
</type>
<type id="CustomerPage">
<abstract id="profile"/>
<address id="home"/>
<address id="office"/>
</page>
<type id="MyCustomerPage" extends="CustomerPage">
<override id="profile">
<textbox id="firstName"/>
<textbox id="lastName"/>
<textbox id="securityNumber"/>
</override>
</type>
Above sample shows all OOP principles, "Abstraction" in Customer page, "Encapsulation" in address widget and "Inheritance" in My customer page. All of it using XML syntax.
If it looks like reading something unprecedented then read more on the Ercilla Web UI framework that we have created. OOP is just one feature of Ercilla Web. There are hundreds more. Do follow the link
It's a guarantee that you have never seen something like this before.
No comments:
Post a Comment