Thursday Mar 26, 2015

New book: "Web Development with Java and JSF"

During JavaLand, I had the pleasure to meet Michael Müller. Michael is well known in the German Java sphere as he wrote numerous articles for various IT medias. In addition, Michael is an avid JSF user and a JSF EG member.

Michael is currently writing a book titled "Web Development with Java and JSF". Since Michael is a passionate JSF user, JSF is obviously an important topic in his book. But this is not another book about JSF only. Michael's goal is to cover Web Application development at large. That means that different but related topics are also discussed through his book. There are for examples sections on JPA, Bean Validation, Responsive Design, ... Michael also plan to touch on subject such as Web Application testing with Selenium, etc.

Michael has decided to use “a more fair” publishing approach where the book has 2 prices: a minimum and a suggested price. Based on that, the potential buyer is free to decide how much he wants to pay. This approach gives the buyer the ability to decide how much s/he think the book is really worth but this also gives the author more financial rewards as there is no intermediary between the publisher and the author.

A great deal of the book has already been written (+240 pages) but Michael is planning to add extra content.  You can read a sample here. "Web Development with Java and JSF" is available in the usual eBook formats (PDF, Mobi, ePub) and once you've bought it, you are entitled to get the updated versions for free.

Monday Mar 16, 2015

Migrating a JSF Application from Spring to Java EE 7/CDI

One of the most important things to do at this stage of the life-cycle of Java EE is highlight successful adoption stories. We have been doing just that for a long time through our adoption stories blog as well as JavaOne. JavaOne 2014 was particularly good in this regard and JavaOne 2015 looks to be even better. Indeed we hope the folks with great adoption stories that submitted last year but did not get accepted will resubmit next year. We will continue to highlight some of those sessions from JavaOne 2014 in the next few months. In this vein I'd like to highlight a very interesting real world story of migrating a JSF based web application from Spring to Java EE 7 and CDI shared by Mario-Leander Reimer of QAware.

Mario's division is a small German based project consulting practice. He was tasked by a major German auto manufacturer to undertake this migration effort (it won't take most Germans much effort to figure out who this auto manufacturer might be since Mario shares that they are based in Munich). The reasons cited for the migration include streamlining/simplifying company-wide application architecture, reducing framework explosion/dependencies, standardization and reducing cost. In just about a month Mario was able to successfully migrate over the application that made extensive long-term use of Spring to CDI and Java EE 7! Mario also made use of great CDI ecosystem tools such as DeltaSpike and Arquillian (both projects have been Duke's Choice award winners, DeltaSpike being the more recent recipient). He also used PrimeFaces with JSF.

During his talk Mario highlighted his journey in learning CDI/Java EE 7 (he was previously a heavy Spring user), the parts of CDI and Java EE he really came to appreciate as well as the challenges he faced and successfully overcame. His talk highlights the ever careful balance struck between feature bloat and simplicity in a Java EE standard like CDI as well as the power of the CDI portable extensions API when you really need to break out of what CDI provides out-of-the-box. You can see Mario's awesome JavaOne 2014 presentation below (if you are having trouble seeing the embedded video it is available here).

If you have a similarly great Java EE adoption story to share, please do drop us a note (particularly migration stories from other technologies). In the spirit of Java EE centric vendor neutrality, what Java EE implementation or tool set you choose does not matter at all and neither does which part of the globe you are in.

Thursday Mar 05, 2015

JavaOne Replay: 'JSF 2.2'

Kito D. Mann is a well-known and active member in the JSF sphere. He is the editor-in-chief of JSF Central and co-host of the Enterprise Java Newscast. A few years ago, he has written the 'JavaServer Faces in Action' book for Manning. And now in addition to his day job as an enterprise application architecture consultant, Kito is also a member of several JCP Expert Groups (including JSF), a recognized conference speaker, etc. Needless to say that Kito lives and breathes JavaServer Faces!

During last JavaOne, Kito hosted several sessions including 2 sessions on JSF 2.2:  'JSF 2.2 In Action' and 'JSF 2.2 Deep Dive'. Both sessions cover the new features of JSF 2.2 (e.g. Faces Flow, Multi Templating, HTML 5 support, XSRF, etc.) but in a different format. The first session ('JSF 2.2 In Action') is a regular session, i.e. 60min, while the second session ('JSF 2.2 Deep Dive') is longer, almost 2.5 hours! This gave Kito more time to go deeper and in more details on JSF 2.2. So if you know JavaServer Faces but want to dig more about what JSF 2.2 brings, you should definitely watch one of those sessions, they’re both very informative and well illustrated with code and demos.



Monday Feb 23, 2015

Rakuten: Java EE Adoption in One of the World’s Largest Online Financial Systems

One of the most important things to do at this stage of the life-cycle of Java EE is highlight successful adoption stories. We have been doing just that for a long time through our adoption stories blog as well as JavaOne. JavaOne 2014 was particularly good in this regard and JavaOne 2015 looks to be even better. Indeed we hope the folks with great adoption stories that submitted last year but did not get accepted will resubmit next year. We will highlight some of those sessions from JavaOne 2014 in the next few months and the best place to start is the Java EE adoption story from Rakuten.

Rakuten is one of the largest online financial systems in the world. It is the number one e-commerce platform in Japan generating over 51 billion dollars of yearly revenue and growing on a global scale. It is easily one of the most technically adept companies in Japan and perhaps the world. They had a legacy system build around J2EE and a hodgepodge of various non-standard frameworks such as Spring, Apache Axis and iBatis. They chose to adopt Java EE over these technologies including alternatives such as .NET. They cited vendor neutrality, choice, simplicity, community, ease-of-learning, ease-of-use and productivity as great reasons for selecting Java EE for their next generation platform. They fully leverage Java EE including key APIs such as JSF, CDI, EJB, JPA, JTA and JMS. Along with Java EE they also chose WebLogic as well as Oracle DB/Exadata. They cited performance, scalability, reliability, productivity and support for choosing WebLogic, Oracle DB and Exadata. They also use best-of-breed tools such as NetBeans, Maven, Jenkins and the Atlassian suite of solutions. They achieved the astounding technical feat of completely overhauling their 24/7, extremely high volume online transactional system in just six months including training!

You can see Hirofumi Iwasaki and Arshal Ameen's awesome JavaOne 2014 presentation below (if you are having trouble seeing the embedded video it is available here).

The slide deck from the talk is posted below (if you are having trouble seeing the embedded slideshow it is available here).

Hirofumi Iwasaki and Arshal Ameen have been great advocates of Java EE, especially in Japan. We hope to continue to see great things from them and Rakuten. Rakuten is looking forward to learning and applying Java EE 7 in the real world as soon as possible.

If you have a great Java EE adoption story to share, please do drop us a note (particularly migration stories from other technologies). In the spirit of Java EE centric vendor neutrality, what Java EE implementation or tool set you choose does not matter at all and neither does which part of the globe you are in.

Wednesday Jan 28, 2015

Enterprise Java Newscast: A Good Resource to Stay Up-to-Date

There's so much going on in the Java EE ecosystem that it's very hard to stay up-to-date without getting overwhelmed. As one of the curators of this humble blog I know that all too well. For those very short of time one of the resources that can help you is the JSFCentral Enterprise Java Newscast. It is led by Kito Mann - well respected enterprise consultant, author, blogger and JSF community member. Kito has been a long time supporter of JSF with a long track record of contributing as a JCP standards group expert. The newscast is in fact part of the JSFCentral portal. In the newscast Kito and company discuss interesting recent releases, news items and upcoming events. They also tend to have fairly lively discussion on the newscast on hot topics.

Kito very kindly invited me to join the latest newscast (episode 24). We covered a wide variety of topics including Java EE 8 JSRs, Jersey, RichFaces, Infinispan, Hibernate OGM, WebLogic, Adopt-a-JSR, JavaOne videos and some of my upcoming conferences. The MP3 audio for the episode is available on the linked page. The following are some of the items I contributed (most from this blog):

Thursday Jan 08, 2015

Initial milestone of JSF 2.3

The JSF Expert Group has started to work actively on the next version of the JSF specification (JSF 2.3 - JSR 372) that is slated for inclusion in Java EE 8.  We are still far from the planned date for the finalisation of the specification but we can already see progress as they are being made.  The initial milestone of Mojarra (JSF Reference Implementation) has just been released (download it here).  The Release Notes describes the bugs fixed but also the new features introduced in this milestone.  And from that list, we can see that a lot of focus is put around improving the JSF/CDI integration.

So despite the fact that we are in the early days of JSF 2.3, it is already possible to test some of the new features.  And since Mojarra is open source, it is also possible to use, at any time, the current Mojarra snapshot.  Josh Juneau who is a JSF 2.3 EG member has written a post explaining how to build Mojarra directly from the sources.  So feel free to give JSF 2.3 a(n early) try and provide feedback, this is important for the evolution of the JSF specification. 

We have the usual fine print to conclude, we are still far from the finalization of JSF 2.3, a lot of things will evolve and this is clearly 'work in progress' but transparency is important!

Monday Nov 10, 2014

JavaOne Replay: eBay and JavaServer Faces

During JavaOne, Sushma Sharma and Ken Paulsen of eBay did a session on Gandalf: 'eBay, Connecting Buyers and Sellers Globally via JavaServer Faces'.

Gandalf is a 'Quick Listing tool'. Gandalf is JSF based tool that let non professional eBay users list their items in order to sell them. Since Gandalf targets non professional users, the tool and the its user interface has to be intuitive and simple. And as mentioned in during the session, that type of users represent the largest population of amongst the eBay sellers. Gandalf an application that is very demanding in terms or features and requirements. Security is obviously a top requirement but accessibility, responsiveness, ... are also very important.

And last but not least, Gandalf is widely used. On a typical day, Gandalf is used by around 200,000 sellers who are adding around 800,000 new listings (again, this is per day!). And that number can grow up to 2.5 millions listings on a peak day! So Gandalf is not really a typical enterprise application, it is more a large scale end-user facing web application.

During their session, Sushma and Ken have discussed JSF, how JSF can scale, ... they have also shared a few JSF tips. Despite the small technical issues (e.g. a few audio hiccups), this J1 session replay is particularly interesting as it clearly kills the 'JSF doesn't scale' myth as this session clearly demonstrate that well designed JSF applications can cope with very demanding requirements.

Friday Sep 26, 2014

Kito Mann's JSF Sessions at JavaOne 2014

For the Java EE track at JavaOne 2014 we are highlighting some key sessions and speakers to better inform you of what you can expect, right up until the start of the conference.

To this end we recently interviewed Kito Mann. Kito has long been a respected JSF consultant, popular speaker, author and JCP expert. He is the editor-in-chief of JSFCentral.com, co-host of the Enterprise Java Newscast, host of the JSF Podcast interview series, and the author of JavaServer Faces in Action from Manning publications (I met him a long time ago in the process of writing EJB 3 in Action).

Kito has one the highest number of talks from a single speaker in the Java EE track this year. We wanted to talk to him about his JSF sessions at JavaOne 2014, as well as JSF generally:

The following are the sessions we talked about:

  • JSF 2.2 Deep Dive: This tutorial is a two-hour deep dive into all the new features in JSF 2.2 and is probably one of the best bits of training you can have on the technology.
  • PrimeTime JSF with PrimeFaces 5: This session is a look into what is new in PrimeFaces 5, easily the most popular part of the JSF plugin ecosystem.
  • JavaServer Faces Antipatterns and Best Practices: This is an invaluable session if you are a JSF user. Kito shares his wealth of experience as a JSF consultant and navigates the best practices, patterns and anti-patterns for the technology.
  • Mobile JavaServer Faces: This is a deeply well researched session on the available resources for developing mobile applications using JSF. If you are a JSF user being asked to develop mobile functionality, this session is definitely for you.
  • JSF 2.2 in Action: In this one hour session, Kito will overview the features introduced in JSF 2.2 using demos and real life context.

Besides Kito's sessions, we have a very strong program for the Java EE track and JavaOne overall - just explore the content catalog. If you can't make it, you can be assured that we will make key content available after the conference just as we have always done.

Tuesday Aug 26, 2014

MVC 1.0 JSR

The Model–View–Controller (MVC) pattern has been used for several decades to implement user interfaces. And when it comes to MVC Web frameworks, those can be categorized as action-based or component-based. JavaServer Faces is a component-based MVC framework.

Through the survey, the community has expressed interest in an action-based MVC approach. Santiago Pericas-Geertsen has recently posted a draft proposal for a JSR ('MVC 1.0 JSR') that would define a MVC action-oriented framework for the Java EE platform. This MVC JSR is not intended to replace JSF (component-oriented) but offers, instead, a different approach to building Web applications on the Java EE Platform.

One of the goals of the MVC JSR is to leverage existing platform technologies where it makes sense (e.g. CDI and Bean Validation seems obvious candidates for the Model part).

The initial though was to define this (action-based) MVC framework in the JAX-RS specification but after initial feedback and discussions, the general consensus was that a separate JSR would be more appropriate. Technically, JAX-RS is still one of the option for the Controller part but everything is open and will have to be discussed in the EG. The outcome of those discussions might be that something else is needed for the Controller, or that there's a way to define a Controller independently of the underlying technology and JAX-RS would then be 'plugged' in, we will see... One thing is clear, defining a new template language is not in the scope of the MVC proposal!

We have strong team to lead the MVC JSR : Santiago Pericas-Geertsen (who is also the JAX-RS Specification co-lead) and Manfred Riem (who is also the JSF Specification co-lead). They will, for sure, get support from other community participants (e.g. Red Hat).

In terms of planning, Santiago is looking for supporters before he submits the proposal to the JCP. The JSR itself is aligned with the Java EE 8 planning.

Tuesday Jul 22, 2014

JavaServer Faces 2.3 (JSF 2.3)

Ed Burns (Specification Lead of JSF 2.2 - JSR 344) has just posted a draft JSR proposal for JavaServer Faces 2.3. Manfred Riem will help Ed to drive JSF forward. If you have been involved in the JSF community, you should know Manfred already as he is very active in that community!

The exact content of this JSR will discussed and agreed by the Expert Group but Ed is suggesting some initial ideas such as Multi-field validation, EL performance optimizations and cross-form Ajax clarifications.

As mentioned in the previous post, CDI is becoming increasingly important across the Java EE platform. @Inject FacesContext and ‘Ajax method invocation’ are two of the features that Ed is proposing to improve the CDI / JSF integration.  ‘Ajax method invocation’ is a feature that would allow invoking CDI managed bean methods directly from Ajax, allowing the response to be sent using JSON.

It should be noted that previous versions of JSF intentionally lagged one version behind the Java EE version in which it was bundled (e.g. JSF 2.2 is part of Java EE 7 but it also works on top of Java EE 6). This release plans to abandon this approach in favor of being able to leverage platform features from Java EE 8 and Java SE 8.

So if you have any feedback before the JSF 2.3 JSR proposal is submitted to the JCP, now is the time to raise your voice! 

Wednesday Jun 11, 2014

Why JSF Matters (to You)

      "Those who have knowledge, don’t predict. Those who predict, don’t have knowledge."

                                                                                                   – Lao Tzu

You may have noticed Thoughtworks recently crowned the likes of AngularJS, etc imminent successors to server-side web frameworks. They apparently also deemed it necessary to single out JSF for righteous scorn. I have to say as I was reading the analysis I couldn't help but remember they also promptly jumped on the Ruby, Rails, Clojure, etc bandwagon a good few years ago seemingly similarly crowning these dynamic languages imminent successors to Java. I remember thinking then as I do now whether the folks at Thoughtworks are really that much smarter than me or if they are simply more prone to the Hipster buzz of the day. I'll let you make the final call on that one. I also noticed mention of "J2EE" in the context of JSF and had to wonder how up-to-date or knowledgeable the person writing the analysis actually was given that the term was basically retired almost a decade ago. There's one thing that I am absolutely sure about though - as a long time pretty happy user of JSF, I had no choice but to speak up on what I believe JSF offers. If you feel the same way, I would encourage you to support the team behind JSF whose hard work you may have benefited from over the years.

True to his outspoken character PrimeFaces lead Cagatay Civici certainly did not mince words making the case for the JSF ecosystem - his excellent write-up is well worth a read. He specifically pointed out the practical problems in going whole hog with bare metal JavaScript, CSS, HTML for many development teams. I'll admit I had to smile when I read his closing sentence as well as the rather cheerful comments to the post from actual current JSF/PrimeFaces users that are apparently supposed to be on a gloomy death march. In a similar vein, OmniFaces developer Arjan Tijms did a great job pointing out the fact that despite the extremely competitive server-side Java Web UI space, JSF seems to manage to always consistently come out in either the number one or number two spot over many years and many data sources - do give his well-written message in the JAX-RS user forum a careful read. I don't think it's really reasonable to expect this to be the case for so many years if JSF was not at least a capable if not outstanding technology. If fact if you've ever wondered, Oracle itself is one of the largest JSF users on the planet. As Oracle's Shay Shmeltzer explains in a recent JSF Central interview, many of Oracle's strategic products such as ADF, ADF Mobile and Fusion Applications itself are built on JSF. There are well over 3,000 active developers working on these codebases. I don't think anyone can think of a more compelling reason to make sure that a technology is as effective as possible for practical development under real world conditions.

Standing on the shoulders of the above giants, I feel like I can be pretty brief in making my own case for JSF:

  • JSF is a powerful abstraction that brings the original Smalltalk MVC pattern to web development. This means cutting down boilerplate code to the bare minimum such that you really can think of just writing your view markup and then simply wire up some properties and event handlers on a POJO. The best way to see what this really means is to compare JSF code for a pretty small case to other approaches. You should then multiply the additional work for the typical enterprise project to try to understand what the productivity trade-offs are. This is reason alone for me to personally never take any other approach seriously as my primary web UI solution unless it can match the sheer productivity of JSF.
  • Thanks to JSF's focus on components from the ground-up JSF has an extremely strong ecosystem that includes projects like PrimeFaces, RichFaces, OmniFaces, ICEFaces and of course ADF Faces/Mobile. These component libraries taken together constitute perhaps the largest widget set ever developed and optimized for a single web UI technology. To begin to grasp what this really means, just briefly browse the excellent PrimeFaces showcase and think about the fact that you can readily use the widgets on that showcase by just using some simple markup and knowing near to nothing about AJAX, JavaScript or CSS.
  • JSF has the fair and legitimate advantage of being an open vendor neutral standard. This means that no single company, individual or insular clique controls JSF - openness, transparency, accountability, plurality, collaboration and inclusiveness is virtually guaranteed by the standards process itself. You have the option to choose between compatible implementations, escape any form of lock-in or even create your own compatible implementation! Open standards like JSF also tend to have strong out-of-the-box tools/IDE support.

As you might gather from the quote at the top of the post, I am not a fan of crystal ball gazing and certainly don't want to engage in it myself. Who knows? However far-fetched it may seem maybe AngularJS is the only future we all have after all. If that is the case, so be it. Unlike what you might have been told, Java EE is about choice at heart and it can certainly work extremely well as a back-end for AngularJS. Likewise, you are also most certainly not limited to just JSF for working with Java EE - you have a rich set of choices like Struts 2, Vaadin, Errai, VRaptor 4, Wicket or perhaps even the new action-oriented web framework being considered for Java EE 8 based on the work in Jersey MVC...

Please note that any views expressed here are my own only and certainly does not reflect the position of Oracle as a company.

Thursday May 08, 2014

PrimeFaces in the Enterprise

JavaServer Faces (JSR 344), one of the Java EE technology, is a server-side component framework for easily building Java based web applications. JSF offers many benefits but one of the great JSF advantage is that it is really simple to plug-in any compatible JSF components suite. PrimeFaces is one of those suite, it is a popular open source JSF component suite with various extensions and is recognised for the richness of its components. This week marks the release of PrimeFaces 5.0!

This OTN article (Build data-driven applications for the enterprise using the PrimeFaces JavaServer Faces UI framework) shows you how to build a Web application with a rich user-interfaces based on PrimesFaces. And for more information about JSF itself, the Java EE 7 Tutorial devotes several chapters on this technology.

Thursday Apr 10, 2014

JSF + AngularJS = AngularFaces?

In case you haven't noticed, there's a pretty big shakeup going on in the world of Web UIs. Powered by several factors, JavaScript/rich client frameworks like AngularJS appear to be presenting a serious challenge to the server-side stalwarts of JSF, Spring MVC and the like. What will happen in the long run is anybody's guess.

In the meanwhile we can expect great thought experiments like the one represented by the recent survey results on the future of the view layer in Java EE applications put together by none other than java.net editor Kevin Farnham. Anyone that understands the Gartner Hype Cycle will likely observe that the crest of inflated expectations are probably already in full swing for JavaScript frameworks. In fact I would say that the reactions of the java.net readers if anything was a bit muted in favor of server-side frameworks as were some of the more well thought out comments that Kevin highlights. Another very interesting data point is the surprisingly good support for adding a new action-based/MVC web framework to Java EE in our own Java EE 8 community survey results.

One of my most recent talks titled JavaScript/HTML5 Rich Clients Using Java EE 7 actually tackles some of these very questions. Based on my years of experience working with a wide variety of clients and feedback from some JavaScript rich client early adopters I know well, it looks to me that the near future is likely one of mutual coexistence. In fact I think a very common scenario in the very near term is probably islands of JavaScript/rich client functionality in otherwise server-centric UIs. The ever vibrant JSF ecosystem is actually already busy trying to figure out this interesting puzzle. One of the most interesting such pilot projects is AngularFaces. It combines JSF and AngularJS in a way that almost makes it look too easy. If this is an approach that interests you, it is definitely a project worth checking out, not to mention the blog entry linked.

Do you have an opinion or insight on this you'd like to share? Now is a great time to express it or at least start thinking about it.

Please note that any views expressed here are my own only and certainly does not reflect the position of Oracle as a company.

Thursday Dec 19, 2013

JSF 2.2 New Features in Context

"If the smaller characters are well-written, the whole world of the film becomes enriched. 
It's not the size of the thing, but the detail." 
(Brendan Gleeson)

A lot of airtime is spent on the APIs that were added to Java EE 7 (e.g. WebSocket) and APIs that went through a major revision (e.g. JMS 2.0 or JAX-RS 2.0). But let's not forget that a lot of others APIs have been revised in Java EE 7 and this sometime implies new features, new capabilities.

In this JavaOne session, Roger Kitain and Edward Burns who are both Specification Leads for JavaServer Faces, explains in details some of the important features that were added to JSF 2.2 (e.g. Faces Flow, HTML5-friendly markup, Resource library contracts). Those new features are explained in detail and demonstrated in the context of a self-contained sample application. Ed and Roger also shows that JSF is still relevant in today's enterprise software stack, they finally compares the benefits of upgrading to JSF 2.2 against opting for a totally new architecture.

Friday Jun 28, 2013

Servlet 3.1, Expression Language 3.0, Bean Validation 1.1, Admin Console Replay: Java EE 7 Launch Webinar Technical Breakouts on YouTube


As stated previously (here, here, here, and here), the On-Demand Replay of Java EE 7 Launch Webinar is already available. You can watch the entire Strategy and Technical Keynote there, and all other Technical Breakout sessions as well.

We are releasing the final set of Technical Breakout sessions on GlassFishVideos YouTube channel as well. In this series, we are releasing Servlet 3.1, Expression Language 3.0, Bean Validation 1.1, and Admin Console.

Here's the Servlet 3.1 session:



Here's the Expression Language 3.0 session:



Here's the Bean Validation 1.1 session:



And finally the Admin Console session:



Enjoy watching all of them together in a consolidated playlist:


And don't forget to download Java EE 7 SDK and try the numerous bundled samples.