Tuesday, August 7, 2012

RichFaces 4.3.0.M1 Release Announcement

RichFaces

The first milestone release of RichFaces 4.3 (4.3.0.M1) is now available. This is a significant release, with primary focus on improving the RichFaces Component Development Kit (CDK) – the tool we use to author our JSF components. A second goal of the release was to improve our MyFaces support, which we accomplished by fixing a number of issues, and identifying some further issues to be addressed in a subsequent 4.3 milestone release.

To try out this release: You can download the distribution directly, or for maven users, increment the RichFaces version in your pom.xml to 4.3.0.20120802-M1. For more information on setting up a RichFaces 4 application, refer to our getting started guide.

CDK Improvements

RichFaces Component Development Kit (CDK) is a heavy-lifter in the RichFaces Framework. The CDK is the tool we use to author our JSF components. Improvements we make to the CDK improve our ability to deliver components, and will reduce our turnaround on delivering new features for developing web applications.

RichFaces developer Paul Dijou has written up a great summary of the recent CDK improvements. For further details on what has changed, you can refer to the list of individual issues addressed. While the bulk of CDK changes have landed in M1, we will undoubtedly introduce further improvements throughout the rest of the 4.3 release cycle as we push the boundaries on what’s possible with the CDK in our RichFaces Bootstrap sandbox project.

“Real” Tests

Testing of our components and framework has always been a primary concern of the RichFaces project. All our releases to date have been tested not only with unit tests, but also with a large battery of significant number of functional tests. However, functional tests treat the JSF servlet as a black box – we know what we put it and we can test what comes out. On the other hand, unit tests mock the environment where our implementation runs, hiding any issues that would occur only in a real environment. If you think about it, these tests operate in a blind-folded manner: what’s happening as the container executes our application logic?

To this end, the RichFaces project has co-ordinated with the Arquillian project in the development of a new extension: “Arquillian Warp”. With Warp, we can write tests that assert state simultaneously on both the client and the server. For JSF, this means our tests can assert state at arbitrary points throughout the JSF lifecycle. As you can imagine, this opens up a whole new category of tests we can write, as we can not only assert that our application logic has the desired effect, but also that it executes as we expect.

Warp reuses outstanding Arquillian integration with various containers, which allows us to test the integration of RichFaces with many application servers and servlet containers. Furthermore, Warp leverages the Arquillian Drone extension for running Selenium-based tests. Arquillian’s flexibility together with Drone’s ability to drive both real and mocked browsers (ie. HtmlUnit), allows us to run tests using minimal resources in continuous integration, and we can run those same tests in “real” environments to verify integration with many real containers.

Our integration tests makes heavy use of ShrinkWrap to create micro-deployments allowing us to separate the project into small testable pieces. ShrinkWrap Resolvers provides support for resolving various modules from our multi-module project, while ShrinkWrap Descriptors allows us to programatically describe configuration files (like faces-config.xml and web.xml), property files, and Facelet files – which enable us to write tests once and run them in many different configurations.

So far we’ve used this new capability within the framework to harden our RichFaces Push and Resource Mapping implementation, and we will continue to develop new cross-container integration tests of our components and frameworks to complement our already impressive test suite.

Issue highlights

This milestone release addresses a number of bugs as well as new features. For a full list of issues addressed, be sure to check out the Release Notes. However, there are a couple of issues I would like to call out in this blog.

The rich:jQuery function in EL to call a jQuery object from a JSF id as in:
#{rich:jquery('your-id']}

This is a convenience method introduced as a short-hand for the current:
$('##{rich:clientId('your-id')}')

The RichFaces a4j:push feature now has a max inactive timeout, that specifies the maximum amount of time a session is allowed to be inactive. This is an experimental feature, put in place as a workaround while we resolve the underlying issue RF-12219. Try it out, let us know what you think!

Component Upgrades

The RichFaces project is very much an open source project, and leverages other open source projects wherever possible. In this milestone release, we updated the version dependency of some of our upstream projects. These include:

  • RF-12176 – Upgrade to Atmosphere 1.0.0.beta4
  • RF-12334 – Upgrade Mojarra to 2.1.7
  • RF-12335 – Upgrade MyFaces to 2.1.8
  • RF-12336 – Upgrade jQuery to 1.7.2
  • RF-12371 – Upgrade Maven project dependency to 3.0.4

MyFaces Issues

With this release, we’ve also turned our attention to a number of MyFaces issues that we hadn’t addressed with our recent releases. In order to co-ordinate with the JBoss EAP 6 release, we focused predominantly on Mojarra compatibility. However RichFaces is a container agnostic project, and we’re making a concerted effort to improve our MyFaces compatibility with our 4.3 release.

This effort is being facilitated both by the Arquillian Warp project mentioned above, as well as by the TomEE project. TomEE gives us an excellent pre-bundled/pre-configured Tomcat and MyFaces environment against which we can both develop and debug our components – without requiring us to assemble the required jars, and “roll our own appserver”.

As with our CDK improvements, fixing MyFaces issues will continue throughout the 4.3 release. M1 is just a first step in this direction.

What’s Next?

In a recent RichFaces community meeting, we set some goals for the M2 release of RichFaces 4.3. These goals include:

  • Restructure the build (according to the requirements being collected in our wiki)
  • Proceed with further MyFaces fixes
  • Iteration/repeating issues
  • Critical/Popular bugs

Also, be sure to follow the RichFaces Bootstrap project:

In the RichFaces Bootstrap Sandbox project, we are developing our next-generation component set based on top of the Twitter bootstrap project. RichFaces developer Paul Dijou has an excellent write-up on the latest bootstrap updates. Also, check out JSF+LESS blog by RichFaces developer Lukas Fryc, showcasing the real-time CSS/LESS development going on in our Bootstrap project – JSF component styling at it’s best!

Friday, July 13, 2012

JAXconf-2012: JSF - Components & Mobile

JAX Conf 2012

RichFaces represented at the 2012 JAX conference in San Francisco this week. I presented three times on two JSF topics. The conference was overall a great success in my opinion – while not the most highly attended conference at which I’ve presented, those that attended were highly engaged and happy to have such direct access to the speakers.

Indeed this was one of my preferred aspects to JAX conf. One couldn’t help but be impressed with the calibre of speakers that flocked to the JAX brand for their 2nd annual North American conference. Unfortunately I missed the speaker summit over the weekend, but there was no shortage of conversation during the famous “hallway track”. Events like JAX are great catalysts, bringing communities together to foster fantastic innovation! It’s surely just a matter of time until the US and Canadian java developers catch on – next year’s conference will be an even bigger success, I’m sure!

Communities coming together at JAX

My first presentation on Mobile JSF + RichFaces was quite similar to the mobile RichFaces talk I presented earlier this month at JBoss World. The session begins with my proposal that the mobile web is important and unavoidable in today’s market. I then demonstrate how one can build mobile web applications using “vanilla JSF”, then we look at the value-add of introducing RichFaces to simplify the process of building mobile web applications with JSF. Feel free to dig into the slides.

My second talk on JSF components took a similar approach. We begin at looking how we can quickly, rapidly, and easily build custom JSF components leveraging existing jQuery plugins. We then finish by looking at how building similar components with the RichFaces CDK gives us greater expressivity, and an effective workaround for some known JSF 2 composite components bugs. I had the pleasure of giving this talk twice at the conference: the first time in an abbreviated form at a JAX community evening event, and again a 2nd time the following day to the JAX conf attendees, this time diving further into the details. Check out the slides here.

Overall I have to say this is one of my favourite conferences both to attend and at which to present. The folks who run JAX definitely know how to put a conference together, and I look forward to speaking again at any future events!


Monday, July 2, 2012

JBW-2012 and RichFaces Mobile

I just returned from an excellent trip to the Red Hat Summit/JBoss World in Boston. The event was fantastic, kicking off with a great keynote demoing Drools in a Mobile scenario. Following the keynote were a number of great sessions, including one I presented on the topic of Mobile RichFaces Applications.

The session was well received, with some good discussion afterwards. In the session I motivated mobile web applications as a must-have in today’s market – users’ will want and expect a functional web application even if your native application is better. I then demonstrated how JSF w/ RichFaces can be an effective means for providing mobile web applications, particularly if it’s a technology stack in which you are already invested. Feel free to check out my slides (be sure to use the space key to advance through the pages). I’m looking forward to seeing the mobile applications people will do with these tools, particularly once we get our mobile slidfast components out the door.

After my session on RichFaces mobile, we re-convened for a mobile BOF with some of the other mobile related projects at JBoss (Aerogear, Errai, and the Demo app Ticket Monster). Here the discussion got very lively with a number of personalities both on the panel and in the audience getting their opinions out. It’s always great to hear user/customer feedback on our projects, with people oftentimes using the tools we provide in use cases we never envisioned.

Aside from the sessions, BOFs, and the invaluable “hallway track” there were plenty of other things to do in the great city of Boston. I managed to catch a game at Fenway park: the Red Sox vs. the Blue Jays – sadly my fellow Canadians weren’t able to pull through with a win. We also got to visit the park again two days later in a conference event. This time we had a free-run over the park and I got my picture taken swinging over home plate!

Thanks to all my team mates and our fantastic user community who made the event a success – I look forward to seeing you again next year!


Wednesday, June 6, 2012

RichFaces 3 Showcase on OpenShift

For those of you still developing against RichFaces 3 (you should strongly consider migrating to RichFaces 4!) we have deployed the RichFaces 3 showcase (also referred to as the RichFaces 3 “demo”) to OpenShift, Red Hat’s PaaS offering. This is the same cloud environment we use to host the RichFaces 4 showcase.

This deployment of the RichFaces 3 showcase not only ensures that this useful and valuable resource will continue to be available to you, the developer community, but also serves to demonstrate how you can take advantage of OpenShift and the latest JBoss AS 7 releases to host your Richfaces 3/4 applications! Leverage the scalability of cloud computing today!


Tuesday, May 15, 2012

RichFaces 4.2.2.Final Release Announcement

RichFaces 4.2.2.Final is available, the second RichFaces 4.2 micro release. This release was originally intended to focus on changes required to better align with the upcoming JBoss AS 7.1.2 release. However we had some community members step forward with some fixes, and those contributions ended up turning this release into a reasonable bug fix release!

I would like to give a big shout out to Luca Nardelli, Adrian Gonzalez, and Jason Porter. These are RichFaces users who contributed back to the project with bug fixes and new features; improving the quality of the JSF component framework we all use to build applications on a daily basis. Three cheers for OSS, and our community contributors! If you would also like to get involved and contribute code to the project, check out our ContributorGettingStartedGuide wiki page!

To try out this release, you can download the distribution directly, or for maven users, increment the RichFaces version in your pom.xml to 4.2.2.Final. For more information on setting up a RichFaces 4 application, refer to our getting started guide.

What’s new with 4.2.2.Final?

The rich:tooltip has seen a number of improvements centered around changing the javascript implementation to use the RichFaces Javascript Service feature, and defer javascript loading until all components are rendered. Nice catch Luca! Specific issues resolved with this approach include:

  • [RF-10839] – tooltip: attachment using target not works if tooltip defined before the component to which it attaches.
  • [RF-11370] – rich:toolTip: targetted example causes NPE for some IDs
  • [RF-12198] – rich:tooltip does not work inside a4j:commandButton
  • [RF-12199] – rich:tooltip does not work inside h:graphicImage

For those migrating from RichFaces 3, Adrian has contributed improvements to the Xcss2Ecss conversion utility:

  • [RF-11994] – Xcss2EcssConverter error handling f:importResource
  • [RF-12010] – ecss hot reloading

A number of other fixes are seen with:

  • rich:dataTable and rich:extendedDataTable
  • validation and messages
  • dependency updates, matching changes in the upcoming JBoss AS 7.1.2 release

Lastly I’ll mention a simple feature, but one which I’m sure many will find useful. The a4j:log component has a new mode of operation, the console mode, allowing a4j:log messages to be output to the browser javascript error console.

What’s Next?

We’ll shortly begin our 4.3.0.M1 sprint which will focus on MyFaces compatibility issues and some CDK improvements in this first milestone. Concurrent to this, we will be working in the RichFaces Sandbox to deliver our next-generation component set. Should any of the above initiatives appeal to you, feel free to get involved, and help move the project forward!


Tuesday, May 15, 2012

I'm Awestruct

I’m officially Awestruct! with this launch of my new blog. My old blogger.com blog will soon redirect here, as I have ported over all the content. Thanks blogger.com for keeping the data Open by providing a data export API! It has me leaving your great service with a nothing but positive experience.

If you haven’t heard, Awestruct is a great Ruby-based tool for building static HTML websites. A project originally started by Bob McWhirter, it has grown in true Open Source fashion with a number of new users and contributors. While awestruct is centred around creating websites with static HTML content, HTML these days is very far from static. With so many content providers providing web APIs, it’s easy to consume content with javascript and give a static page a dynamic feel. Some examples of truly fantastic dynamic capabilities include:

  • the comment system of this new blog (driven by Disqus)
  • the twitter feed in the side panel

These are both great examples of content both consumed and created by a javascript interface on a “static” HTML website.

Other content areas that seem to be dynamic (eg. requiring a database back end) are in fact static. Things like a tag cloud and blog archive are really only dynamic at the time you publish your material. There is no need to query a database with every page render – simply build up an index whenever a page is published. And this is just a simple blog!

I encourage you to take the time to explore the Arquillian website, which is truly a great example of what can be done with static HTML and harvesting dynamic data at publish time, and engaging the project community to contribute content to the site. I look forward to seeing what similar goals we can accomplish with the RichFaces website as we port it to being built with Awestruct.

Switching over to awestruct has given me a great chance to explore some new technologies:

There’s nothing like trying something new to expose pre-conceptions you didn’t even know you had. I look forward to seeing how I can take the lessons I’ve learnt, and fold them in to make the JSF web development experience better.

Lastly, a word on the tools used to manage this blog. With this new setup:

  • I author my content in my favourite plain text editor (Emacs!)
  • push content to github.
  • publish with a simple rsync.

Finally I get to leverage the tools I use everyday and am intimately familiar with to create content and share my ideas. Hopefully this gets me bogging more frequently – that’s the plan at least!


Friday, May 4, 2012

RichFaces Bootstrap

I’m happy to share the news that the RichFaces community has started an effort to wrap Twitter Bootstrap with the RichFaces CDK. If you haven’t yet heard, Twitter’s Bootstrap project is a set of HTML/CSS/js “widgets” that you can use for building a website/web application with an emphasis on a fluid layouts that adapt well to mobile devices. The RichFaces community effort centres around providing a set of first-class JSF components built using these Bootstrap widgets via the RichFaces CDK.

This is still early days for the effort, consider what we have so far as a Proof of Concept. The work is being done in the RichFaces Sandbox, where new ideas/components are explored and proven before migrating in the the framework core. We’ll explore how to bring these Bootstrap components into the framework proper when the effort is complete. The reason for this blog post is to let people know what the community is doing and invite people to get involved!

Take a look at the RichFaces bootstrap demo to see what the components look like. Keep in mind we used the RichFaces bootstrap JSF components to build the demo itself, (a dogfood demo if you will!). So far we’ve stubbed out a number of bootstrap components with the CDK, and we have a bootstrap “enabled” commandButton component (build on top of the robust a4j:commandButton).

Some example bootstrap components that I particularly like are:

b:buttonDropdown

The buttonDropdown can be used to provide alternate actions for a button on your page:

b:gridContainer

The bootstrap grid components (gridContainer/gridRow/gridColumn) provide a powerful means to layout your page. Being proper JSF components, they are also valid JSF execute/render targets.

I’ll blog more about the individual components as they get fleshed out. There’s a ton of blog material here!

RichFaces Bootstrap Roadmap

Our roadmap for these bootstrap components moving forward involves:

  1. RFSBOX-7 Finish wrapping the remaining bootstrap components
  2. RFSBOX-8 Flesh out the attributes of the already wrapped components
  3. RFSBOX-9 Couple the widget events into the RichFaces/JSF event subsytem (eg. for enabling JSF behaviours)
  4. Migrate/wrap (or re-implement if required) the existing RF 4 components

The task is big, and we could use your commits! So if you are interested in either RichFaces, Bootstrap, or both – be sure to drop by #richfaces on IRC (freenode.net) to discuss how you can get involved and influence how these components will shape up!

Concurrent to the work we do in our sandbox, we are still very much focused on improving the current set of RichFaces 4 components. We have another 4.2 micro release coming out soon, and are planning the Milestone releases for the 4.3 release train.

Lastly, I’d like to close with a big shoutout to Paul Dijou, a Richfaces community member who has been instrumental in getting this effort off the ground! Thanks Paul, and keep those pull request coming!