Friday, April 10, 2015

Oracle's MVC 1.0 | JCP JSR 371 | Markup-JAVA Translation (Just JSP/JSF)

Team.

Oracle's MVC 1.0 | JCP JSR 371

In April of 2014, we suggested that Oracle consider a JAVA Specification Request (JSR) which created a general purpose servlet for use as a controller in a "standard" MVC architecture. They considered it in one of the JCP Executive Committee meetings that Spring. Upon advice from a few JAVA Champions who attended the meeting, we started this open source project. The JAVA Community Process (JCP) Team stated that if there was enough interest in CABOOSE, they might consider it in the future; however, they felt that their current style of MVC using servlets and JSF was sufficient.

Our inquiry in the Spring of 2014, must have sparked some ideas in the JCP since they took a poll of the JAVA community and saw a need for a JSR addressing the most common architecture of web applications, the Type-II model-view-controller (MVC). They call this JSR MVC 1.0, and it can be found at jcp.org:

https://jcp.org/en/jsr/detail?id=371

If you find these pages on CABOOSE interesting, you should consider participating in the development of JSR 371. It would definitely be worth following. Also, consider joining the CABOOSE project at java.net.

JSR 371 uses servlets, JAVA Server Faces (JSF), and Actions in the description of an MVC. This style of MVC was developed from experiences with the Struts and Spring MVC. It might be labelled a Style-III MVC. Currently, among JEE MVC there are a pair of styles. Style-I, the oldest, used servlets and JSP as controllers, and Style-II uses servlets for the controllers and JSP/JSF for the view.
These "Styles" are commonly called "Types" which can be redundant and confusing when one discusses the original Type-I MVC which supports callbacks from the view and is commonly found in desktop applications and Type-II MVC which is "flatter", found on the web, and does not support view callbacks.

Also, please share what you like about CABOOSE with the JCP's JSR 371 team plus any enhancements which you might have conceived.

Also, it might be worth becoming conversant in Microsofts MVC 1.0 and learning from their successes and mistakes in its creation. The following is link is a starting point for discovering more:

http://www.microsoft.com/en-us/download/details.aspx?id=5388

MVC 1.0 was released in 2009 and likely is much like Struts and Spring with the notion of an "Action".

It is only Markup Translation

We have heard some complaints from a few young engineers that they do not really understand JSP and JSF. This would suggest that the CABOOSE approach might be an improvement in some ways over Style-II and III, Type-II MVCs. CABOOSE might be more intuitive, but JSP and JSF are a very powerful concept. When working with JSPs/JSFs, one should always remember that the markup is translated producing a JAVA servlet. So, a "choose/when" tag becomes a multi-way selection in JAVA such as a  "switch" or "if-then-else ladder". And, a "foreach" becomes a "for" control structure.
Search the web for techniques that will provide the transliterated JAVA servlet source. Then, JSP/JSF will likely be more understandable.

This is a direct ("literal") translation and also called a "transliteration" among software engineers and computer scientist. In fact, we have only scratched the surface of using markup in the creation of "valid" computer programs and easing development for those who are language novices.

Markup languages simplify the development effort. Consider the difficulty of programming a graphical user interface on a desktop in the early 1990s versus creating an application with the same behavior using HTML plus the reusable widgets found in every browser. Anyone who can type is capable of creating a "simple" web page. Markup is easily learned.

At some point, it might be common that there is a markup for writing high-level language programs. Being text-based, this markup will likely be as simple as the "Lego-like" interfaces found in the experimental language Scratch @ MIT and Google's AppCreator.

So do not let JSP/JSF baffle you!

Have a Great Weekend.

No comments:

Post a Comment