Monday, January 25, 2010

State of the art web application Ajax frameworks


I can't see any other web application framework more mature than the GWT from google and ZK from potix corporation. Both ajax frameworks is implemented in Java. Each has different implementation approach. ZK uses server-centric approach while GWT uses client-centric(hosted mode is somewhat server centric as well). Both has advantages over the other. These list is the prominent I found so far.


Advantages of GWT over ZK
  • GWT is compiled in javascript, so Converting your web application to have offline support is pretty slick and seamless. Unlike ZK which most of the codes is run in the server.
    • More info:
      • Offline support for web application is a very usable feature so users won't have to connect to a network all the time to continue the use of their applications. Offline is the new hype in HTML 5.0 specification which for now is implemented using google gears plugin. Google gears plugin is available to most web browsers and it is installed by default with the newly available high performance google chrome browser.
  • It is easy to create custom components for your app in GWT from scratch which you could base your components from already defined GWT components, or you could extend those components with ease.
  • GWT provides an unrelenting flexibility with your components in a consistent manner (using same java codes) unlike zk you have to code custom flexibilty in javascript.
  • GWT does not require to use Java as the server side code to implement business logic in the server. In fact you could use any server platforms such as PHP, python, .net, etc. aside from Java.

Advantages of ZK over GWT
  • Coding business logic in ZK is pretty slick, simple and higher security imposition, where as in GWT it is a little bit tricky to link your client side logic and server side logic.
  • Scaling your application depends on your server you deployed your application. So whenever you need your users to have a better application performance, You just have to upgrade server resources.
  • ZK provides a lot of ready to use widgets and components.

Strengths of Java which is not found in PHP

There is a long list of advantages of some languages from other language but I just list down some of the prominent I found out so far.
This is not a comparison of languages over another language. This is just a little angle to looking one language over the other.


  1. When declaring Class members, you could use a function to define the member property
    • example: public String myText = SomeOtherClass.getMyText();
    • which is not allowed in PHP
  2. PHP has no method overloading (methods with the same name but with different signatures in which the right method to be invoked is determined by the matching supplied parameters and return values)
    • example in Java
      • public void getData(int Param)
      • public void getData(String Param)
      • public void getData(int Param1, String Param)
    • This could be in a similar way done in PHP by appending the data type into the function
      • function getData_int(Param)
      • function getData_string(Param)
      • function getData_int_string(Param1,Param2=null)
      • or something like:
        • function getData(param){
              type =  getType(param);     if(type==int){         ...     }else if(type == String){
                  ...
              }
      • }
  3. Namespace in PHP is very odd to see
    • in php: \\com\\somecompany\\webui::MainModule
    • in java is desirable: com.somecompany.webui.
    • when using php in procedural language codes you write is short and readable, but in OOP php(5.0+), theres a need to explicitly use $this-> to every method/property call of members in the class, which hinders readability of code, where as in java, you are not required to write "this" as long as there is no conflict to a method local variable.

A little bit of IT

There is an endless knowledge in the area of IT and Programming, Let's just make simple things. Let's just talk a certain little bit of it, rather than creating a large file of body of knowledge that we are not sure it is.