Thursday Apr 16, 2015

JSON-P 1.1 (JSR 374) update: JSON Pointer & JSON Patch

'Java API for JSON Processing 1.0' also known as JSON-P (JSR 353) is the standard JSON Processing API that was added in Java EE 7.  JSON-P will be updated and that update (JSON-P 1.1 - JSR 374) should be included in Java EE 8. One of the goals of that revision is to add support for 2 JSON standards namely JSON Patch and JSON Pointer.

By nature JSON is simple and most of the standards in that space are simple as well. JSON Pointer and JSON Patch are 2 IETF RFCs that are closely related. JSON Pointer defines string syntax for identifying a specific value within a JSON document while JSON Patch defines a set (one or more) of operations to apply to a target JSON document. JSON Patch is leveraging JSON Pointer to specify where operation(s) need to be performed in the target JSON document. And a JSON Patch is in itself a JSON document. The most common pattern will be to apply a JSON Patch to transform a JSON document but it will also be possible to obtain a JSON Patch by comparing 2 JSON documents, the returned JSON Patch will then be a 'diff' between the 2 JSON documents.

It is the early day of JSR 374 but the EG is certainly making progress. At this stage, it is already possible to test, amongst other new features, JSON Pointer and JSON Patch as the early build of the JSR 374 RI already support those. Those tests would be a good place to look to understand how the API works. Note that at time of writing, the 'diff' method isn't yet implemented in the early JSR 374 RI build.

Getting feedback early on is really important for the various EGs!  Make sure to look and test the various APIs that will, at some point, be part of Java EE 8.

If you want to know more about the JSON-P 1.1, watch this JavaOne session where Kinman Chung (JSR 374 Specification Lead) explains the plans for JSON-P 1.1. In addition, the Java API for JSON Processing project page, the JSR 374 Users mailing list and Issue Tracker are useful resources to check.

Tuesday Apr 14, 2015

Java EE Security API (JSR 375) Update

"If you don't vote you can't complain. Get involved." (David Blevins)

From the current set of Java EE 8 JSRs, 'Java EE Security API' (JSR 375) is the latest one as it was only approved in December last year. It was started later than the other JSRs. Nevertheless, the EG is now very active (+200 messages just for last month!). 

Obviously, this effort need a strong focus as 'Security' can mean a lot of things. And depending on whom you ask, you will high likely have different views. So to EG is currently busy filtering and consolidating ideas. In addition, one thing that is clear is that having a common ground for discussions is really needed. So the EG is also working on defining a security API terminology; i.e. a common vocabulary to enable concise and accurate communication amongst the EG and the community (see here). This may sounds obvious but it's not; e.g. what's the difference between a user store and a user realm?

During JavaLand, some EG members have presented a few ideas that will be tackled in this JSR. Alex Kosowski (JSR375 Specification Lead) also presented, during Devoxx France, the plans for JSR 375. Alex's session recording will be made available in the coming weeks. In the meantime, you can check the slides.

Since there are potentially a lot of things that could be addressed in this JSR, the EG needs to make sure they address the right features, in the right order and in the right form. So the goal of those different sessions is really to expose the EG current plans and ideas but more importantly to get your feedback!

To know more, you should check this playground has it contains prototype ideas for possible inclusions in this JSR; lurk in the JSR 375 users mailing list and voice any relevant feedback!

Monday Apr 13, 2015

A Preview of Java EE @ GIDS 2015

The Great Indian Developer Summit (GIDS) 2015 will be held on April 21-24 in Bangalore, with a follow-on GIDS.Mini to be held on April 25 in Hyderabad. GIDS is very easily the largest and most significant developer event in South Asia. Perhaps reflecting global demographic shifts in software development, GIDS may also now have become one of the largest developer conferences in the world. It is truly a privilege to be able to speak at the event and I am even more fortunate to have a number of Java EE sessions there. While in India I am very happy to say I will also be speaking at a couple of entirely community driven JUG events at the Madras JUG (Chennai) and the Hyderabad Java user group before and after GIDS.

Below are a preview of my talks at GIDS:

  • Using JavaScript/HTML5 Rich Clients with Java EE 7: This is my thus far extremely popular and well-received talk on using Java EE 7 as an effective back-end for JavaScript/HTML5 rich clients. If this is a development model that interests you, the talk should give you some valuable tools to get started. Although I use AngularJS for my examples, the basic participles from a Java EE 7 perspective apply to any JavaScript/HTML5 or native/hybrid mobile client. The slides for the talk are on SlideShare while the demo code is on GitHub. Besides Bangalore, I will be repeating this talk in Hyderabad for GIDS.Mini.
  • Reactive Java EE - Let Me Count the Ways!: This is one of my newest and thus far also extremely popular and well-received talks. It explores how Java EE 7 APIs like JMS, MDB, EJB @Asynchronous, JAX-RS/Servlet/WebSocket async, CDI events and Java EE concurrency utilities along with Java SE 8 features such as lambdas and Completable Futures work to align the platform with the reactive movement. The slides for the talk are here.
  • Applied Domain-Driven Design Blue Prints for Java EE: This talk essentially introduces the Cargo Tracker project. In the talk I cover the very basics of DDD, discuss how DDD constructs apply to Java EE and show how the mapping can be done using Cargo Tracker. The slides for the talk are here.

  • I am very honored that the Madras JUG and Hyderabad JUG invited me to speak to their members while in India for GIDS and very proud that I was able to accept. The GIDS organizers were very gracious in extending their goodwill to support the community. Both the JUGS in Madras and Hyderabad have arranged all day events in slightly different formats, which is awesome.

    The Madras JUG will host multiple talks on the same day. I will be delivering the opening keynote as well as a technical session. For the keynote I will be delivering my thus far very well-received talk titled Why Open Standards and Java/EE Matter. In the talk I will discuss the basic value proposition of open standards like Java and Java EE in maintaining a healthy, competitive, multi-vendor ecosystem. The slides for the talk are here. For the technical talk, I'll be delivering the latest update on Java EE 8. Besides covering the current state of Java EE 8 I also cover how you can get involved in the process including through highly inclusive programs like Adopt-a-JSR. The slides for the Java EE 8 talk are also on SlideShare. The Madras JUG event will be held before GIDS and the details for the event are here.

    The Hyderabad JUG is hosting the Java EE 7 Hands-on-Lab as a full day workshop. This is essentially our flagship lab/workshop at the moment covering Java EE 7. It has always proven popular so far and it is a great way to get some hands-on experience with Java EE 7. The Hyderabad JUG event will take place after GIDS.Mini and the details are here.

    Hope to see you in India soon during at least one of these events? As always never hesitate to reach out to me if there is something I can help with or if you have a question. I'll bring along some Java/Java EE goodies you are welcome to :-).

    Thursday Apr 02, 2015

    MVC 1.0 (JSR 371) Early Draft Review period has started!

    MVC 1.0 (JSR 371) formally known as the 'Model-View-Controller Specification' has just entered the Early Draft Review period. This is significant because it is the first Java EE 8 specification to enter this phase. Kudos to the JSR 371 Expert Group! JSR 371 is ‘just’ a piece of the Java EE 8 story but this step shows that, slowly but surely, Java EE 8 is starting to take shape.

    You are strongly encouraged to review the early draft of the specification, test it using Ozark, the open source JSR 371 Reference Implementation and obviously provide comments and feedback!

    The MVC specification is really easy to grasp for anybody familiar with JAX-RS, the samples bundled with Ozark will also help to understand the specification. You can also check Ozark's sources and the presentation I gave a few days ago at JavaLand. 

    To test the first Ozark milestone build, you need a recent GlassFish build (post 4.1 build, see here for details). Another and simple solution to test JSR 371 and Ozark is to use this script to create a Docker image with GF, Ozark and the JSR 371 samples pre-deployed.

    The Early Draft Review period will end of April 30th. For specification related feedback, you can use the JSR 371 users mailing list or the JSR 371 issue tracker. For Ozark related feedback, please use the Ozark users mailing list or the Ozark issue tracker.

    So what do you think of JSR 371? Also, should we use this Docker based approach to help you test other upcoming Java EE 8 specifications?

    Wednesday Apr 01, 2015

    Java EE @ ConFoo Canada 2015

    ConFoo 2015 took place 16-20 February in Montreal, Canada. To my knowledge it is the largest developer conference north of the border. The conference has roots in PHP, but has been making an effort to better attract a Java audience hence it was important for me to support the conference. If you are a Canadian Java developer, I would consider adding ConFoo to your radar as a more convenient (and possibly cheaper) event to go to in order to stay up-to-date. Thanks to a number of community speakers such as Ryan Cuprak, Hanneli Tavante and Rodrigo Candido da Silva the Java EE presence was very strong this year. There were Java EE centric talks on JAX-RS, OAuth, cloud, Java EE 7 and Java EE 8.

    I personally delivered two sessions on JMS 2 and testing Java EE applications with Arquillian in addition to a couple of lighting talks on Java EE 8/Adopt-a-JSR as well as Domain-Driven Design (DDD)/Cargo Tracker. More details on the sessions and ConFoo, including slide decks, videos and code, posted on my personal blog.

    Monday Mar 23, 2015

    Java EE 8/Adopt-a-JSR Updates: Morocco JUG!

    It is truly heartwarming to see Adopt-a-JSR moving forward! Although it is still the early days a number of JUGs worldwide have already adopted Java EE 8 JSRs. The Morocco JUG had been at the forefront of Adopt-a-JSR from the very start. In fact the JUG was awarded as an "Outstanding Adopt-a-JSR Participant" for their contributions to Java EE 7. It should be no surprise the JUG is committed to helping Java EE 8 move forward through Adopt-a-JSR as well. In JUG leader Badr El Houari's own words - "Our goal is helping to shape the best Java enterprise platform ever!".

    With that ambitious goal in mind the Morocco JUG started their year with a meeting on Adopt-a-JSR and Java EE 8. Held at the IBM Innovation Center in Casablanca the meeting was a full house with over ninety developers participating. Badr explained the Adopt-a-JSR program to JUG members and shared what JSRs he was hoping to support:

    • CDI 2
    • MVC
    • JMS 2.1
    • JSF 2.3
    • JAX-RS 2.1
    • JSON-B

    Details on the meeting are blogged on the Morocco JUG website. The Morocco JUG also has a very helpful guide for JUG members that would like to start contributing to Java EE 8 JSRs right now.

    We are sure to see great things from the Morocco JUG on Adopt-a-JSR and Java EE 8. Is your JUG adopting a Java EE 8 JSR yet :-)?

    Wednesday Mar 18, 2015

    Java EE Management API 2.0 (JSR 373) Spins Up

    As most of you know the initial wave of Java EE 8 JSRs have been underway for a little while now, including the platform JSR itself, CDI 2, JSON-B, JMS 2.1, Servlet 4, JAX-RS 2.1, MVC and JSF 2.3. Three more Java EE 8 JSRs have been more recent additions - Java EE Security, JSON-P 1.1 and Java EE Management 2. The Java EE Management API 2 (JSR 373) had been the last of these to truly spin up and I am happy to report that it too has now gone fully into high gear under the leadership of specification lead Martin Mares. Though the initial expert group has already formed, you should still feel free to join as an expert if you want - just go to the JSR page linked above to nominate yourself.

    Although it does not seem to get as much press thus far, this JSR is actually potentially one of the most interesting and useful parts of Java EE 8. For those familiar, it is essentially a modernization of the very dated "J2EE Management" (JSR 77) API. The intention of the old API was to allow for managing all kinds of resources on an application server - JMS resources, JDBC resources, JCA resources, JavaMail resources, drivers, deployment artifacts, EJBs, Servlets, servers, domains and so on. For various reasons the JSR saw limited success - some have argued that the API was overly complex, abstract and cumbersome. It certainly seems dated today as it is largely centered on EJB remote interfaces.

    The new management API is a great chance to take a fresh look at the problem domain using an updated tool-set. Unlike JSR 77, the new API will make use of REST, SSE and potentially WebSocket. For those familiar with the popular GlassFish REST management interface, we can reasonably expect to see something similar. From an industry standpoint, this means being able to work with all Java EE 8 application servers using a uniform, predictable cross-platform API from all kinds of tools from simple HTTP command-line clients to Chef and Puppet, whether on the cloud or on premise. Though not strictly part of JSR 77, the new management API is also slated to handle deploying artifacts instead of simply managing/monitoring them, which is also extremely useful (for the curious, this was the domain of another very dated relatively obscure API -  "J2EE Deployment" or JSR 88).

    Note that you can always participate in a JSR without officially being part of the expert group by simply subscribing to the JSR user alias. In case of Java EE Management API 2.0 that alias is users at javaee-mgmt dot java dot net - go to the Java EE Management API 2.0 java.net project page to subscribe. Also remember that you can always contribute on an even more lightweight format through Adopt-a-JSR.

    Thursday Mar 12, 2015

    Templating in the MVC JSR

    One of the underlying requirements of the JSR 371 was to not re-invent any VDL (View Declaration/Definition Language) because the Java EE Platform already provides that capability in 2 different forms, i.e. JSP and Facelets. In addition, the templating solution space is already very mature (and very crowded too!), it would be a complete waste to re-invent anything around that!

    So instead of spending energy in re-inventing the (template) wheel, it makes more sense to spend energy in allowing to cleaning use, from the MVC API, the existing templating solutions provided by the platform: JSP & Facelets (see the javax.mvc.engine.ViewEngine interface). 

    One additional benefit of that approach is that the MVC API is not limited to just JSP and Facelets. It will also be possible to cherry pick and easily plug-in your preferred templating solution to any MVC JSR implementation.

    Next to JSP and Facelets, Ozark (JSR 371 Reference Implementation) already support some additional templating solutions: FreeMarkerVelocityMustacheHandlebars and soon Thymeleaf. Some of those were contributed by Rodrigo Turini and Rahman Usta.

    Do you see any templating solution missing?

    If so, it's probably just one contribution away!

    Disclamier: it's early days, expect things to evolve!

    Tuesday Mar 10, 2015

    Java EE Security API (JSR 375) Update

    It took a bit longer than expected but the JSR 375 Expert Group is now formed! The EG is led by Alex Kosowski (Oracle) and is composed of the following members (companies representatives and individuals) : 

    Adam Bien David Blevins (Tomitribe)
    Rudy De Busscher Ivar Grimstad
    Les Hazlewood (Stormpath, Inc.) Will Hopkins (Oracle)
    Werner Keil Matt Konda (Jemurai)
    Darran Lofthouse (RedHat) Jean-Louis Monteiro (Tomitribe)
    Pedro Igor Silva (RedHat) Arjan Tijms (ZEEF) 

    At that at this stage, IBM’s participation is not yet confirmed but this should be, hopefully, resolved quickly.

    Now that the EG is formed, the technical discussions can take place. So make sure to watch the discussions as they happen over the JSR 375 user mailing list. The JSR 375 Issue Tracker is also a good resource to keep track of.

    It is also worth to mention that this topic will be discussed during the upcoming weeks in 2 conferences. David Blevins and Jean-Louis Monteiro, both from Tomitribe and both EG members will present “Java EE Security: Let's Make Something Useful” during JavaLand (Germany).  In addition, Alex Kosowski (JSR 375 Spec Lead) will give, at Devoxx France, a session on JSR 375. So if you happen to attend one of those conferences, make sure to add those sessions to your schedule. 

    Wednesday Mar 04, 2015

    MVC JSR SNAPSHOT builds

    The MVC JSR (JSR 371) is progressing nicely. A key architectural decision was taken a few weeks ago: the MVC JSR will be based on JAX-RS. And since then, the Experts Group has started to publish SNAPSHOT builds :

    If you want to lean more about the MVC JSR, make sure to bookmark this page where Manfred Riem (MVC co-spec lead) is tracking all relevant MVC information and resources.

    It's still early but you now have everything on hand to start initial testing of this new API. As always, community feedback is a critical factor for the long-term success of this JSR!

    Monday Mar 02, 2015

    Java EE 8/Adopt-a-JSR Updates: Chicago JUG and JSF 2.3

    It is truly heartwarming to see Adopt-a-JSR moving forward! Although it is still the early days a number of JUGs worldwide have already adopted Java EE 8 JSRs. One of the most active of these groups in the Chicago JUG. The JUG is hosting periodic meetups to work on contributing towards various Java EE 8 JSRs. Their first meetup in this vein was focused JSF 2.3. The meetup had two tracks - one for beginners and one for advanced users. Both were well received.

    Bob Paulin, Chicago JUG President, led the beginners track through a tutorial that focused on building a simple JSF application using NetBeans 8, JSF 2, EJB 3, JPA 2 and the rest of the Java EE stack. The advanced track was led by key Java EE advocate Josh Juneau. Led by Josh, attendees checked out, setup (in an IDE), built and debugged the latest JSF 2.3/Mojarra code. Josh blogged the details on the meetup, including some great resources.

    We can expect to see great things from the Chicago JUG on Adopt-a-JSR and Java EE 8! One of the earliest Adopt-a-JSR groups, the Morocco JUG also had a similar meetup recently that we will highlight next very soon.

    Is your JUG adopting a Java EE 8 JSR yet :-)?

    Friday Feb 20, 2015

    Java EE @ CodeMash 2015

    CodeMash 2015 took place 6-9 January in Sandusky, Ohio at the exotic Kalahari Waterpark Resort. With another sold-out year, CodeMash is quickly becoming one of the larger developer conferences state-side. It has it's roots in .NET, but is making a concerted effort to better attract a Java audience. Topics covered included .NET, methodology, JavaScript/HTML, mobile, cloud, DevOps, Hadoop, NoSQL, Docker, Java SE and Java EE.

    I delived sessions on aligning Java EE 7 with the JavaScript/HTML5 rich client landscape, reactive programming support in Java EE and what's coming in Java EE 8. More details on the sessions and CodeMash, including the slide decks and code, posted on my personal blog.

    Wednesday Feb 11, 2015

    Java EE @ Java2Days 2014

    Java2Days 2014 was held on November 17-19 in Sofia, Bulgaria. It is far and away the largest Java conference in the Balkans region and now perhaps one of the most important conferences in Europe as a whole. This was another great year for this rapidly growing, vibrant event. It attracted a host of international and local speakers including Arun Gupta, Geertjan Wielenga, Roberto Cortez, Ivan St. Ivanov, Andy Gumbrecht and Andrew Lombardi. Topics included Java SE, Java EE, HTML5/JavaScript, mobile, OSGi, IoT and the cloud. I am extremely grateful that the organizers invited me again this year and very glad that I was able to accept.

    Java EE had a strong showing this year:

    • What's Coming in Java EE 8 - me
    • Nuts and Bolts of WebSocket - Arun
    • Java EE 7 Hands-on Lab - Arun, Ivan and me
    • Apache Tomcat to Apache TomEE in 1-n Steps - Andy Gumbrecht
    • Java EE 7 Batch Processing in the Real World - Roberto and Ivan
    • Coding for Desktop and Mobile with HTML5 and Java EE 7 - Geertjan
    • JavaScript/HTML5 Rich Clients Using Java EE 7 - me, Ivan
    • Forge and Arquillian Hands-on Lab - Ivan, me
    • Why Open Standards and Java/EE Matter (to You) - me

    More details on the sessions and Java2Days, including the slide decks, video and code, posted on my personal blog.

    Friday Feb 06, 2015

    Java EE @ JDK.IO 2014

    JDK.IO 2014 was held in Denmark on January 19-20 at the IT University of Copenhagen. It is the yearly conference of 'JavaGruppen', the Danish JUG. The conference sessions covered a variety of Java topics ranging from core Java, Java EE, and JavaFX. Speakers included my colleague David Delabassee, Simon Ritter, Adam Bien, Heinz M. Kabutz, Bert Ertman, Ryan Cuprak, Simon Maple and Markus Eisele.

    David covered the Java EE portion of the keynote. He also presented a talk on Java EE 8. His slides from SlideShare are embedded below:

    My friend, fellow co-author of EJB 3 in Action, Connecticut JUG leader and JavaOne Rock Star Ryan Cuprak presented a couple of very cool sessions. The first one, titled Hybrid Mobile Development with Apache Cordova and Java EE 7 demonstrates how Java EE can be used as a very effective mobile development back-end using APIs like JAX-RS, WebSocket and JSON-P. The talk was delivered at JavaOne 2014 as a tutorial and includes an excellent end-to-end demo. Video from the JavaOne talk is embedded below:

    Ryan also presented another popular talk from JavaOne 2014 - 50 EJB 3 Best Practices in 50 Minutes. At JavaOne he had co-presented the talk with my other co-author Michael Remijan. The video from that talk is embedded below:

    Ryan wrote up a very nice trip report of JDK.IO on his personal blog that you should check out. Other Java EE related talks included one by Markus Eisele on Java EE 7 and Apache Camel.

    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):