Review JFall 2011
12 December 2011 in events by Linda van der Pal
Opening – Bert Ertman
The flashy opening movie was abruptly cut off for the entrance of Bert. He gave a brief intro about the conference magazine, the lunch and coffee, and the location, before handing the mike over to Stephan Janssen. Stephan gave a brief talk about Parleys and then Bert explained that 17 of the JFall sessions would be filmed and added to Parleys. Bert then took over again and explained why there was no wifi. The opening was closed with a short movie clip by Oracle called “We code hard in these cubicles”.
(Dutch) Things I would have liked to put up on Twitter if I’d had the chance:
Het sneeuwt op het scherm. #jfall11
Stephan Janssen – The feel of Scala moet je ook wel een paar keer bekijken voordat je het begrijpt #jfall11
Keynote – Tomas Nilsson
The opening was followed by a keynote from Oracle by product manager Tomas Nilsson. He started by telling us about his career and how OO was the Cloud of the 90′s. To him C++ was merely C with OO added on top of it. Java was C++ with garbage collection on top of it. Back in the 90′s you had to have your own framework and your own process team. But Oracle doesn’t have a process team as they don’t have a standard process. Every product uses it’s own process, as it’s hard to come up with a uniform process for such diverse products. If you let marketing decide, you’ll get unmanagable spaghetti. If you let the developers decide, it won’t ship (it will be very pretty, but outdated). You need a product manager to balance these forces, which is where Tomas comes in. Part of his job is to decide which rules you need to follow and which rules you can misinterpret or forget. Then came 2010, Oracle took over Java from Sun. Everything was doom and gloom, and nobody trusted Oracle. Oracle has very strict press rules. They’re just not allowed to talk about future products, which didn’t help in building trust. They’re also not allowed to talk about court cases. The fight between Sun and Apache meant Java7 didn’t get shipped. One of the things Oracle got done, was to break the stalemate, so they could finally ship Java7. JavaOne 2010 was very last minute and therefor a mess, which also didn’t help in building trust. The content was good, but logistics was confusing. JavaOne 2011 was already a lot better. Finally one bit of advice for the future from Tomas was that Oracle has invested 100.000 man years in Java. So if nothing else, trust that Oracle will be greedy (and invest in Java in their own interest). Oracle doesn’t say a lot about what they will do, but what they say, they ship.
A tweet I would have put up if I’d had a proper internet connection on my phone:
Sun: Java wasn’t slow (in the 90s), it merely looked like it was. – Tomas Nilsson #jfall11
Java EE7 Platform: Developing for the Cloud – Arun Gupta
After Tomas’ keynote, I went to Arun’s talk about Java EE7. He told us that today’s cloud offerings are vendor-specific, you have to write your application to their API. Likewise the Java EE6 platform provides services, but the Java EE7 platform on the other hand IS a service. The new acronym therefor is PaaS, Platform as a Service. The new features of Java EE7 include new roles, new metadata that can be added to services, new API’s (JSON, caching API, etc), add multitenancy support in existing API’s.
Looking at the model of Java EE6, we see that we have to provision and initialize each and every service before deploying the application. In the model of Java EE7 on the other hand, you can just take a war file and give it to the cloud admistration service, which will look at metadata (or even derive metadata from the war file), this service will then provision and initialize the necessary services and then deploys the app for you. Java EE7 can even extract metadata from existing annotations (like ConnectorService, JMS, Datasource).
Another great feature is that Java EE7 will automatically scale up or down based upon usage.
To give a bit of an idea about how EE7 works here’s a little scenario: the developer writes an application, the customer signs up as a customer, the submitter submits the application, extra services discovers the application, sign up for it, and then customize and deploy the application, the administrator then provisions the application, the end users access the application, and the administrator administers the application.
Arun then gave us a bit of a demo, where he also told us that Glassfish has two different modes to run EE7 in: native mode which runs on a local machine and virtualization mode which runs in the cloud.
After the demo he explained about the four strategies for multitenancy: dedicated application and dedicated database, shared application and dedicated database, dedicated application and shared database, shared application and shared database. And finally he mentioned a few more things that were improved in EE7: alignment of managedbeans, simplification for ease-of-development, pruning some APIs.
Introduction to JavaFX 2.0 – Michael Heinrichs
The session started explosively, so everyone was sure to be awake. But then the mike didn’t work. But Michael Heinrichs had a voice that was loud enough to reach the entire room, so it wasn’t much of a problem. The first announcement he did was that JavaFX script will be dropped in favor of true Java code. So you no longer have to learn another scripting language to work with JavaFX2. After that he gave an overview of how JavaFX works and about all the cool things it can do.
First of all there is the SceneGraph. This is the most basic datastructure, which allows you to group graphical elements in a tree structure. A SceneGraph contains Leaf nodes, which can be shapes (cirkel, vierkant, zelf-gedefinieerd), images, text, WebView (embed any kind of web content), media, controls (knoppen, sliders, etc.), or even charts. It also contains Parent nodes, which can be a group (not visible), a region (similar to a group, only visible), or layouts (VBox, HBox, border layout, grid layout). The parent takes care of rendering the children. So if you move, rotate or scale the parent, the children are moved, rotated or scaled as well.
Second, there is the Animation API, which contains Predefined transitions (translate, rotate, scale, path transitions), Sequence transitions, a Timeline (which contains keyframes on which you can give properties certain values, and which allows tangent interpolation).
Thirdly, there is the Media API, which contains Media classes (media [data], media player [controls], media view [scenegraph node], and Video effects (drop shadow, reflection, sepia, blur, change colors).
Then there are the UI Controls, which contains buttons, text controls, TableView, complex views, panes, and many others. The UI Controls will be Open Sourced first (other parts of FX will likely follow). The controls have support for CSS, so you can style them (which makes working with a designer a lot easier, as they know CSS, but not Java).
And finally there are the Properties & Bindings. There are many Java FX Properties like the DoubleProperty. Each of these properties has getters and setters [for example double get(), void set(double value), Double getValue(), void setValue(Number value)]. Then there are Listeners, Unidirectional Binds (size ← a + b, so if a changes, size changes too), Bidirectional Binds (size ↔ slider.value, so if size changes, the slider value changes too, and vice versa) and a Fluent API. You can also create your own bindings.
The presentation ended with some examples of bindings:
– size.bind(a.add(b)); // size = a+b
– a.add(b).subtract(c); // a + b – c
– size.asString(“%.2f”); // String.format(“%.2f”, size)
– when(cond).then(a).otherwise(b) // cond? a:b (when one property changes, the whole thing is re-evaluated)
All in all, it seemed very promising, and I can’t wait to try it all out.
Hands-on Lab: JavaFX 2.0 – A Java Developer’s guide – Stephen Chin
So I was very happy to find that there was a handson on JavaFX. So I went to a double session to try my hand at a bit of JavaFX. Stephen helped us install JavaFX and NetBeans and let us create a very simple web browser with a text field, a submit button and a webview that showed the content. Due to there being no wifi, we simply pointed our little app at some files we had on our laptops. The webview component is just as flexible as a real web browser, so it happily showed me html, sql and text files. It was a nice little taste of what you could do, but it would have benefitted from some handouts to guide you, instead of an explanation to the whole group. The explanation was good of course, but it didn’t really allow for your own pace. But I’m looking forward to reading a book about JavaFX 2.0 as soon as it’s written.
Hands-on Lab: What’s that smell? – Refactor away that nasty odor – Marc Evers, Willem van den Ende, Rob Westgeest
For my last session of the day, I went to another hands-on. Marc, Willem and Rob gave a session on refactoring. They handed out some handy little reference cards containing some common smells and some common refactoring patterns to get rid of the smells. We had to install a little project they had prepared to be as dirty as it could be, while still allowing you to do some quick refactoring on it. One of the main points to note here is that with refactoring they mean tiny little steps you can pretty much do automatically. Anything larger would be called redesign by them.
The first step of the workshop (after setting up the project) was to look at the code (in a pair of course!) and to identify some of the smells. Then you had to look at the possible patterns to apply to the code to refactor it. The third step was to tell everybody else which patterns you would apply to get rid of which smells and why you would start there. Then we actually set to work and got rid of some smells. Sadly neither my own laptop, nor Elise’s would cooperate and we didn’t actually get any work done. And since there was only one hour in total, we didn’t have any time left to see if we could fix them. But we did get to take home the cards. Still despite the disappointment of not actually playing with the code, it was an enjoyable session.
Duchess is a global network for connecting women in Java technology. Its mission is to promote women in this sector and to provide a platform through which women can connect with each other and get involved in the greater Java community.