Friday, August 30, 2013

2.3 Baked, 2.4 In The Oven!

As of August 9th, 2013, Rice version 2.3 is now available to the public! This release includes several new features and improvements to KRAD. In this post, I will highlight some of these, and look ahead to the 2.4 release scheduled for early 2014.

Unified Header

Unified header gives you the ability to pack lots of useful information into your view header. You can combine the page text, add two more titles (area and support title), and provide view metadata.

Bookmarkable URLs and JS Back Button Support

Web requests/responses have changed greatly with the use of AJAX. We can now make frequent updates and requests on behalf of the user, even without their knowledge. This is a great thing, but one drawback is these requests occur without the browser's history tracking. In other words, the browser does not know how to rebuild the current state or allow the user to go back to a previous client state.

Thankfully, with HTML 5 History support we can give the browser the necessary information about our requests, so that the user may bookmark a certain point, or use the back button to go back to a previous point. Examples where this is used are page changes and dialogs (lightboxes).

Session Support

Kuali applications commonly maintain a lot of temporary state as the user interacts with the system. For example a user could be completing a document that contains several pages, or even use one screen for their entire workday. In order to free up shared resources, the user's state (or session) will be cleared after a configured period of inactivity. A user loosing thirty minutes (or more) of work is a very bad thing! Therefore features have been implemented in KRAD to help prevent the user from loosing data, and to gracefully handle a timeout when it does occur. These features include a session timeout warning dialog that allows the user to extend their session (shown below), configurable session timeout redirects, and a configurable timeout view.

Bootstrap, Less, and the Theme Builder

Version 2.3 comes with a new look and feel built with the Bootstrap library. This replaces the previous KRAD and legacy (KNS based) themes (look and feels). Along with this, a theme builder is provided that supports Less files, minification with versioning, and theme inheritance. For more information see Theme Blog Post.

Breadcrumbs and History

Like Breadcrumbs? If so, you'll very much like the new Breadcrumbs component. It is a complete rewrite of the previous component, and provides a huge amount of new functionality. Among this functionality is the ability to create 'sibling' breadcrumbs. These are items that appear under a breadcrumb item, and can be represented in a dropdown list or a suggest box (see screenshot below).

Breadcrumbs come in two flavors: location based and path based. Location based breadcrumbs serve as a site index. They tell you where you are at in terms of the application structure (e.g. 'Home -> Course Administration -> Edit Course 103'). The other flavor, path based breadcrumbs, show you where you came from. They give you the ability to navigate back to a view within a sequence of requests (e.g. 'Lookup A -> Lookup B -> Lookup C'). Applications can choose which type of Breadcrumbs works best for a particular view or context.

To support path based breadcrumbs, KRAD has also introduced the concept of 'flow'. Currently this is implemented using request parameters and controller methods (side note: down the road this could morph into declarative flow management, or possibly use of Spring Web Flow). Besides supporting path based breadcrumbs, the history manager also supports controller navigation actions (such as going back to the previous view).


Other notable 2.3 improvements include:

  • Dirty Fields - The third party dirty fields plugin has been dropped and replaced with a custom plugin. The previous plugin had several issues which are now resolved.
  • Row CSS - Adding custom CSS classes for table rows is now easier with use of map configuration. Classes can be specified by index, the 'even', 'odd' keywords, or even based on an EL expression that can check values for the current line.
  • Performance - As development approaches completion of KNS Equivalency and KRAD Phase 3 (functional requirements for Kuali applications), performance tuning is becoming a high priority. 2.3 improves the general runtime performance and also provides optimizations that can be taken advantage of in certain situations. Profiling shows reductions of up to 80% off the response time.


The release of 2.3 is significant not only due to the previously listed features, but also that it roughly marks the half way point to the 2.4 release. A good case can be made for 2.4 being the most important release of Rice so far. Without question, it will be the most important release for KRAD. Let's look ahead to the improvements and new features 2.4 will bring.

KNS Equivalency 

  If you have been following KRAD closely, you have likely heard the term 'KNS Equivalency'. This refers to the point at which KRAD will contain all the features provided by the KNS. This effort might be surprising given the number of features KRAD currently has. However, even though KRAD offers many more features and flexibility, there are certain places where the KNS provided an option or small feature not available in KRAD yet (or in many cases not provided at the same level of convenience). This effort will fill those gaps.
  In addition to feature completion, this effort includes developing a conversion guide and a set of conversion scripts. Our goal is to make the conversion effort as painless as possible for existing KNS applications.

KRAD Phase 3

  2.4 will continue Phase 3 development of KRAD. The main deliverables include:

  • Events - Simply put, this will bring the ability to generate client side events and client side updates declaratively in KRAD. Tools such as Angular JS are being looked at to provide the backbone for this functionality. We are really excited about this work! In fact, I will likely dedicate a post for describing this enhancement in the near future. It will be a killer feature!
  • Nested Views - Nested views will be our take on iframes, without all the problems inherent to iframe use. Currently in KRAD, only a single view can be rendered at one time. With this enhancement, multiple views can be rendered asynchronously (by nesting).
  Let's take an example. Suppose your application requires a shopping cart to be presented on each page. The shopping cart can be developed independently of other views (with its own view, form, controller, etc.). For views that should display the shopping cart, a simple group can be created that references the shopping cart view. On render of the parent view, an asynchronous call will be made to fetch the contents of the shopping cart, which will then be inserted into the appropriate DOM position. Very cool!
  • Accessibility - Phase 3 is also slated to include a second round of accessibility work using ARIA. Creating accessible table and tab structures, along with general cleanup for achieving WCAG 2.0 certification will be the priorities.
  • Keyboard Support - Keyboard support (beyond standard browser keyboard support) will be added in 2.4. Out of the box KRAD components (such as navigation) will be enriched with keyboard shortcuts. Applications will also be able to define enter key actions based on the user's location within a view. Finally, applications will be able to create custom shortcuts where desired.

JPA Support

The long awaited JPA support will arrive in 2.4. This includes not only JPA support, but also an overhauled data access layer that will setup KRAD applications for the future. Since Eric will be addressing this item in his posts, I will leave the details for him.


Could there be more? Actually, there is!

  • Performance - Performance work will continue in 2.4 (more accurately, there are plans for a 2.3 patch which will likely contain the remaining performance improvements). This will also include cleanup/optimization of the HTML output.
  • Security - KNS equivalency mandates a certain level of security be implemented. In addition, Kuali is taking a close look at security (developer training, tools, etc.) and discovered issues are being addressed in the software.
  • Tooling - KRAD tooling has not been top priority so far, but a lot of good work has occurred 'on the side'. Some of this will come to fruition for 2.4. This includes a custom schema for the UIF, along with support for Emmet. The new UXI project is also spinning up and will be contributing work to Rice. This is likely to include things such as the ability to build UIs outside of the normal Java development environment (for example, just with a standard text editor, this is another likely post in the near future!) and much more work with the KRAD Bootstrap theme, UI best practices, and accessibility.

  You can see why Rice 2.4 is a critical release for the Kuali projects and the community. This will end a three year cultivation of KRAD, and marks the start of the KNS conversion process. Forward Charge!

1 comment:

  1. i have read your article really it is very nice and useful for me. i have also read some article regarding Cleanup CSS and HTML