Share

Vroom

File Release Notes and Changelog

Release Name: 2.1.4

Notes:
Date: 29-JUL-2008
Project Name: Vroom
Version: 2.1.4 Beta
Status: Beta Testing

Note: Please use vroom project website to register bugs/issues and/or request new features.

Release Notes:
--------------
The framework is tested for limited functionality and is found to be okay. The developed application has been tested
on Internet Explorer 7.0, Firefox 3.0 and Safari 3.1.2 and works perfect.

Change Since 2.1.3:
-------------------
New Features:
1 - Support added for #{contextPath} variable in <stylesheet> and <script> tag's url attribute. This is done because
    a webpage application can be packaged as part of an .EAR file and/or may access resources available in other
    web applications on the same server. Now if used url="/style.css" the framework will assume that this is external
    resource. To make in internal resource, #{contextPath} needs to be added. E.g. url="#{contextPath}/style.css"

Bug Fixed:

2031272 - url in stylesheet doesn't work. There was a small check in the code which was ignoring url if the body of
          stylesheet tag is null. Since body of the stylesheet tag was never null but empty string, the url was always
          getting ignored. The check has been corrected and test.


Change Since 2.1.2:
-------------------
New Features:
1 - Access to bean properties in vroom-config.xml
    Users can access now any java bean using the following definition in the config file:

    <event type="onload" method="getProperties" bean-class="com.myco.bean.TestBean" var="tb" scope="session">
        <call type="update" tag="body" attribute="innerHTML">
        <![CDATA[
            value1 = #{value1}
            value2 = #{value2}
        ]]>
        </call>
    </event>

    or you can also access a single propery by using following configuration:

    <event type="onload" method="getValue1" bean-class="com.myco.bean.TestBean" var="tb" scope="session">
        <call type="update" tag="body" attribute="innerHTML">
        <![CDATA[
            value1 = #{value}
        ]]>
        </call>
    </event>

2 - Added two additional method signatures which are considered to be valid and can be bound to any HTML event:

    public void|Object methodName();
    public void|Object methodName(HttpServletRequest req);

    Note: You can return all basic types, collections, maps, properties, resource bundles, request, response,
    or any java bean.

3 - The availablity of the request object in vroom-config.xml has been removed since the complete request object
    is translated into json string on every server call and there was unnecessary traffic of large json string even
    it's not used. However session Id, context path and locale are still available with following names:

    #{sessionId}
    #{contextPath}
    #{locale} --> it's JSON String... if you want to use it as an object you need to convert it to JSON object
                  as follows:

                  var locale = JSON.parse('#{locale}');
                  if(locale.language == 'en') {
                    // do something for english...
                  } else {
                    // take care of the rest...
                  }
    #{locale.language} --> gives you 'en' if the language is english.                  

Bugs Fixed:
-----------
Some undiscovered bugs related to Java script has been fixed.

Change Since 2.1.1:
-------------------
New Features:
1 - vroom.js has been revised and following changes have been made:

    VroomUtils class is introduced with following utility methods:
    triggerEvent(elemId, event) // this was available as vroomTriggerEvent(elemId, event) i previous version.
    populateSelect(elemId, jsonString)
    populateSelect(elemId, jsonString, labelVar, valueVar)
    generateRadioGroup(elemId, name, jsonString, cols, styleClass)
    generateRadioGroupEx(elemId, name, jsonString, labelVar, valueVar, cols, styleClass)
    generateCheckBoxGroup(elemId, name, jsonString, cols, styleClass)
    generateCheckBoxGroupEx(elemId, name, jsonString, labelVar, valueVar, cols, styleClass)

2 - A Java Bean has been added to net.openkoncept.vroom.bean package as LabelValueBean. This can be used to build
    collections that can be used to populate select and generate radio and checkbox groups.

3 - An attribute 'name' is added to <meta/> tag of vroom-config.xml. Previous version (vroom-config-2.0.xsd) supported
    only http-equiv and content attributes but now the framework knows the name attribute as well so you can write the
    meta as follows:

    <meta name="author" content="Farrukh Ijaz"/>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>

4 - Request and session objects are directly accessible in vroom-config.xml file. Now you can access request and session
    values using following notation in vroom-config.xml:

    <call type="script">
    <![CDATA[
        alert('Your session ID is #{request.session.id}.');
    ]]>
    </call>

    or

    <call type="update" tag="body" attribute="innerHTML">
    <![CDATA[
    <p>
    Your session id is #{request.session.id}.
    </p>
    ]]>
    </call>

Bugs Fixed:
2017208 - Support for '-' character in filename has been added. The framework can work well with files '-' in their
          names e.g. test-form.jsp or user-account.jsp.

Requested Features:
2017215 - Postback feature has been added. If a form defined in vroom-config.xml has a navigation with forward set to
          true and the form has elements. Then the forwarded request will automatically update html elements on the
          target url if the element name matches. E.g.

          <form method="authenticate" bean-class="com.myco.bean.LoginBean" var="login" scope="request">
              <navigation outcome="success" url="/welcome.jsp"/>
              <navigation outcome="failure" url="/login.jsp" forward="true"/>
              <element id="email"/>
              <element id="password"/>
          </form>

          As per the above definition, if the authenticate method of LoginBean class returns failure, the html elements
          email and password will automatically get populated with the modified value. It means if you don't want to
          postback password, you need to set password to null in authenticate method.

------------------------------------------------------------------------------------------------------------------------

Date: 27-JUN-2008
Project Name: Vroom
Version: 2.1.1 RC
Status: Beta Testing

Note: Please use vroom project website to register bugs/issues and/or request new features.

Release Notes:
--------------
The framework is tested for limited functionality and is found to be okay. The developed application has been tested
on Internet Explorer 7.0, Firefox 3.0 and Safari 3.1.2 and works perfect.

Change Since 2.1.0:
-------------------
Bugs Fixed:
2008723 - The content-type has been updated to include 'charset=UTF-8'. The locale problem is fixed now and has been
          tested for Arabic locale. Other languages should also work fine.
2011274 - Support for File[] for mutli file upload has been added.
2011692 - The javascript function vroomSetForm has been corrected to not override submit method and enctype.

New Features:
2008734 - Javascript method vroomTriggerEvent has been added to invoke some events of other HTML elements. The use is as
          follows:
          vroomTriggerEvent('btnClick', 'onclick');
          vroomTriggerEvent('btnClick', 'click');
          Where 'btnClick' is the html id of a button and 'onclick' or 'click' is the onclick event of the button.
2008730 - The binding method signature can accept the ResourceBundle as return type. This helps to access locale specific
          properties in vroom configuration file.

------------------------------------------------------------------------------------------------------------------------

Date: 27-JUN-2008
Project Name: Vroom
Version: 2.1.0 RC
Status: Beta Testing

Note: Please use vroom project website to register bugs/issues and/or request new features.

Release Notes:
--------------
The framework is tested for limited functionality and is found to be okay. The developed application has been tested
on Internet Explorer 7.0, Firefox 3.0 and Safari 3.1.2 and works perfect.

Change Since 2.0.0:
-------------------
New Features:
1. The framework automatically populates the properties of backing beans for those elements which are defined in <form>
   tag of the configuration:

   E.g.

   <webpage uri="/register.jsp">
       <form id="regForm" method="register" bean-class="com.myco.bean.RegisterBean" var="register" scope="request">
           <navigation outcome="success" url="/confirmation.jsp"/>
           <element id="txtFullName" property="fullname"/>
           <element id="filSomeFile" property="someFile"/>
           <element id="txtDOB" property="dob" format="dd/MM/yyyy"/>
       </form>
   </webpage>

   When the page will be submitted the framework will automatically invoke a server side method named "register" in
   RegisterBean class. All the elements defined in the above tag will be submitted and the corresponding properties
   available in the RegisterBean class will automatically be populated.

   Supported types are String, Short, Integer, Long, Float, Double, Boolean, java.util.Date and
   org.apache.commons.fileupload.FileItem for input type file.

2. Addition of two attributes in <element> tag (child of <form> tag in the config file). These attributes are as follows:

   property: Used to specify the field name that should be populated on form submit. It the property is not set, the
   framework by default will use id as property attribute when assigning values.

   E.g.

   <element id="txtRegDate" property="regDate"/>
   <element id="txtRegDate"/>

   In the first case the element id and property are different. The framework will use property field to assign value of
   txtRegDate. In case of second definition, the framework doesn't find property defined by the user so it will consider
   txtRegDate as property and assign the value.

   format: This is used to format the text entered before assigning it to corresponding property. At the moment only
   java.util.Date types use format tag during submission process.

   E.g.

   <element id="txtRegDate" property="regDate" format="MM/dd/yyyy"/>

   The framework will take the value of txtRegDate and before assigning it to regDate property, it will create an object
   of java.util.Date using the format "MM/dd/yyyy".

3. Support for File Upload using Apache Commons Library. You can define a property of type
   org.apache.commons.fileupload.FileItem in your backing bean and bind it to input type file of your html page.

------------------------------------------------------------------------------------------------------------------------   

Date: 23-JUN-2008
Project Name: Vroom
Version: 2.0.0 RC
Status: Beta Testing

Release Notes:
--------------
The framework is tested for limited functionality and is found to be okay. If you find any bug or behavior that is not
expected, please register a bug/issue on the vroom project website http://www.sf.net/projects/vroom

- Remake of Vroom 1.0.x
- Various bugs fixed
- Various features added

Schema Changes:
---------------
1. <document> tag is renamed with <webpage> tag
2. path attribute is renamed with uri attribute
3. <meta>, <stylesheet>, <script>, <object> tags have been added
4. <form> tag has new attributes named method and enc-type
5. <update> tag is replaced with <call> tag
6. Huge list of event types are supported including w3c, microsoft and xul.

Backing Bean valid Method Signature:
------------------------------------
Following signature is removed:

    public String[] <method-name>(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, String);

Following signature is added:

    public void|Object <method-name>(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse);

Valid object types are String, Map, net.openkoncept.json.JSONObject or any public JavaBean class

Note: JSON java api is packaged as part of vroom.jar. You can also download it from following url:

    http://www.json.org/java/

About Vroom:
------------

The previous version of Vroom was just the html/jsp webpage and java bean binding framework which provided
facility to integrate with Struts and other frameworks using a configuration file.

Vroom 2.0.0 is a re-make of Vroom. It has been architected as a complete web application development
framework and is re-written from scratch. There is no backward compatibility between Vroom 1.0.x and Vroom 2.0.0.

There are dozens of new features introduced in Vroom 2 and these features which makes life of both the web
application designer and developer easy.

1. Vroom provides clear separation between the presentation layer and the business layer.
2. It does not introduce any custom tags so nothing to learn new.
3. Vroom works with HTML components by their id, tag and names so the maximum a web designer/developer is
   required to assign unique ids to HTML components which are required to control by the Vroom controller.
4. It can be integrated with other web frameworks such as Struts and JSF with minimum configuration.
5. Vroom is driven by a configuration file typically named as vroom-config.xml. This file provides following
   abilities:

   1) To define webpages based on uri patterns (regular expressions) which are managed by the framework.
      E.g. a uri pattern "/|/[a-z]*.(jsp|htm|html)" can be used for any webpage which has a uri matching
      with the pattern. This would not be very clear at this stage how these uri patterns help but with a
      few examples it will become very clear that how powerful are pattern based configurations.

      Example 1:

      <webpage uri="/test.jsp">
        ...
      </webpage>

      Example 2:

      <webpage uri="/[a-z]*.(jsp|html|do)">
        ...
      </webpage>

      Note: To support various extensions, you must define a url-mapping for each extension type in the web.xml file
      for VroomFilter.

   2) Meta tags, Scripts and Stylesheets can be injected using the configuration file to many pages automatically.
      E.g. if you want to configure Google Analytics to all your webpages, instead of inserting the script
      in everypage or using a common include file, you can configure in Vroom's configuration file to inject
      scripts provide by Google to all or selected webpages based on the uri pattern. This approach
      automatically include new pages to work with Google Analytics.

      E.g. here is a sample, how a stylesheet and a script is injected:

      <webpage uri="/|/[a-z]*.jsp">
          <meta content="no-cache" http-equiv="Pragma"/>
          <meta content="-1" http-equiv="Expires"/>
          <meta content="no-cache" http-equiv="Cache-Control"/>
          <meta content="no-store" http-equiv="Cache-Control"/>
          <meta content="max-age=0" http-equiv="Cache-Control"/>
          <script type="text/javascript" url="/resources/myscript.js"/>
          <script type="text/javascript">
          function someUsefulFunction() {
              //... some implementation ...
          }
          </script>
          <stylesheet type="text/css" url="/resources/mystylesheet.css"/>
          <stylesheet type="text/css">
          body, h1, h2, h3, h4, h5, h6 {
              font-family: "Arial";
          }
          input, textarea, select {
              font-family: "Courier New";
          }
          </stylesheet>
      </webpage>

   3) Html forms can be bound with server side java beans. These forms optionally can get benefit of built-in
      navigation functionality like JSF where response can be forwarded or redirected to other webpages or
      servlets based on outcomes.

      E.g. if you have a login.jsp and you want to redirect/forward the response to a welcome/error page,
      below is how you do that in Vroom:

      <webpage uri="/login.jsp">
          <form id="loginForm" method="autheticate" bean-class="com.myco.SomeBean" var="someBean" scope="application">
              <navigation outcome="success" url="/welcome.jsp"/>
              <navigation outcome="failure" url="/login.jsp" forward="true"/>
          </form>
      </webpage>

   4) Almost every event of Forms, Html Elements, Tags and Objects (browser, document, window etc) can be
      bound with server side java method. This type of binding in Vroom is known as Dynamic Binding. This
      binding is hierarchael E.g.

      <webpage uri="/somepage.jsp" bean-class="com.myco.BeanA" var="beanA" scope="session">
          <form id="someForm">
              <element id="button1">
                  <event type="onclick" method="method1">
                      <call type="script" value="alert('Button1 Clicked!');"/>
                  </event>
              </element>
              <event type="onsubmit" method="method2">
                  <call type="script" value="alert('Form Submitted!');"/>
              </event>
          </form>
          <element id="button2">
              <event type="onclick" method="method3">
                  <call type="update" id="button2" attribute="disabled" value="disabled"/>
              </event>
          </element>
          <event type="onload" method="method4">
              <call type="update" name="document" attribute="title" value="This title is set by Vroom!"/>
          </event>
      </webpage>

      In the above configuration all the events are accessing method defined in com.myco.BeanA class. If you want to
      use a different class on for a Form, Element, or Event, you can specify the bean-class, var and scope attributes
      of the respective tag to point to required Bean class.

   5) Almost every event of Forms, Html Elements, Tags and Objects (browser, document, window etc) can be
      bound with custom script written within the configuration file. This binding in Vroom is known as
      Static Binding.

      E.g. You can replace the webpage text with your own text as follows:

      <webpage uri="/test.jsp">
          <event type="onload">
              <call type="update" tag="body" attribute="innerHTML">
              <![CDATA[
                  <h2>Welcome to Vroom!</h2>
                  <p>This is page is desiged by Vroom</p>
              ]]>
              </call>
          </event>
      </webpage>


   6) Any java bean method follows following method signature can be used for binding provided the java bean
      class is public and there is one no argument constructor:

      void|Object <methodName>(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse);

      You may want to return nothing e.g. you may want to kill user session if the user closes the browser
      E.g. following code will be more than enough to configure you application to achieve above mentioned
      functionality:

      <webpage uri="/|/index.jsp" bean-class="com.myco.SomeBean" var="someBean" scope="application">
          <event type="onunload" method="killUserSession"/>
      </webpage>

      And in the SomeBean java class define the following method:

      public void killUserSession(HttpServletRequest req, HttpServletResponse resp) {
          req.getSession().invalidate();
      }

      And that's it. When the browser is closes if the index.jsp page was active, the user session will
      automatically be killed.

      You may also want to alert user that his/her session is killed, the only thing you need to do is modify
      the above configuration and add a call tag as child tag of the element tag as follows:

      <webpage uri="/|/index.jsp" bean-class="com.myco.SomeBean" var="someBean" scope="application">
          <event type="onunload" method="killUserSession">
              <call type="script">
                  alert('Dear user! you session is automatically killed because you closed the window.');
              </call>
          </event>
      </webpage>

      Perhaps you would like to include the user name in the alert but how you would get that? it's very simple
      E.g. if you're user was authenticated using LDAP and his/her name is available in the request. You can
      add the following code in the killUserSession method and change the return type to String:

      public String killUserSession(HttpServletRequest req, HttpServletResponse resp) {
          String user = (req.getUserPrincipal() != null) ? req.getUserPrincipal().getName() : "user";
          req.getSession().invalidate();
          return user;
      }

      and simple modify the javascript in the call tag as follows:

      <webpage uri="/|/index.jsp" bean-class="com.myco.SomeBean" var="someBean" scope="application">
          <event type="onunload" method="killUserSession">
              <call type="script">
                  alert('Dear #{string}! you session is automatically killed because you closed the window.');
              </call>
          </event>
      </webpage>

      And that's it! You see, you can include server side data in your javascript as well.

      There is much more exciting stuff, Vroom provides, download the Vroom-2.0.0.pdf file from the project
      website to learn more about the cool stuff of Vroom 2.0.0.


Future Release (Vroom 2.1.0)
----------------------------

In the next version of Vroom, you'll be able to use Web Services without the Web Service Client Generation.

Changes: