Sunday, January 2, 2011

Comparison of Web Frameworks

Vladimir Tsvetkov wrote: “It’s interesting weather someone really tried to approach this from more scientific point of view?”
Of course there should be a scientific approach to the comparison of Java Web Frameworks.

... And as any scientific approach that should better end with some numbers. Those from the matrix indeed give little. Giving "the same requirements to 10 teams ..." would be a good idea, if not so expensive. Besides this approach - when each team is "highly-specialized in one particular framework" does not cover the learning curve. Probably taking 100 randomly chosen teams would be better. That is indeed a scientific approach, but out of pure experimental science.

Speaking more seriously we may remember something (alas, mostly forgotten) from early days of science of programming, specifically the things about complexity and the relative levels of programming languages. Things like that are indeed measurable.

Applied to Web Frameworks we may think about some imaginable average Web application with typical functionality as a working entity and then go back in time and estimate the size of same application from the point of view of developer's effort. The developers creatively write what they think about the product developed using certain language, or rather a set of languages defined by technology (aka framework). That includes programming language of course (and you are not going to use Cobol, right?) and other things like configurations, HTML used in various ways and so on. The level of this combined language is high if the given framework permits to code the project with lesser number of operators.

As said experimental parallel programming of test project is not realistic (though the history knows some examples), but same as for comparison languages+compilers some artificial but sophisticated test sets may be developed with time. Programming such a test might take maximum a few days from any team "highly-specialized in one particular framework".

As an example and possibly as a staring point I may suggest a set of tests I have developed to test my own framework - see http://www.hybridjava.com:8080/HJ_Sample/

Saturday, November 20, 2010

What is HybridJava

HybridJava is a Java™ -based component-oriented MVC technology for programming dynamic web content. Most of existing frameworks claim that they support "components", but if you look closer it turns out that in each case this term has a different meaning. Most often they speak about one or more types of components from the following list:

  • components to build page Model from
  • components to build page Controller from
  • components to build page View from

  • For instance a popular book on Struts "Programming Jakarta Struts" has three chapters in a row (5-7) titled "Struts Controller Components", "Struts Model Components", "Struts View Components" and those three types of components are notably uncorrelated. In HybridJava technology, on the other hand, - each component follows the MVC paradigm, incapsulating its own Model, its own Controller, and its own View rendering method in one Java class.

    HybridJava technology implementation basically consists of two parts – a Compiler from HybridJava Language and a Framework. The latter also serves as the run-time for the Compiler. The compiler processes files .page and .widget and generates Java sources of pages that fit the MVC framework on construction. HybridJava API is wrapped around standard Servlet API, but operates on pages and components level so you may forget about request and response.

    HybridJava Language is easy to learn for those who already know just Java and HTML, since it is about 46% Java and 46% HTML. Pure Java is also our Expression Language. The overall volume of HybridJava technology documentation is less than 15 pages.

    The HybridJava Framework API is pretty compact - only about two dozens of methods total. Framework supports validation and "Previous Page" button.

    HybridJava technology implementation is Pure Java. Current version is 1.02. With this version the source code of HybridJava Framework is provided as Open Source. You may see that it is less than 1000 Java lines long and suggest why it is working so fast. Of course there are ways to make it work even faster. Having in mind that the rest of your application is also generated in the Java source form the technology as a whole looks quite transparent.

    HybridJava Home