You are browsing the archive for javafx.

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.

Devoxx, day 5

17 December 2008 in articles by Linda van der Pal

Today was a short day. I only visited two out of three sessions, as I didn’t see anything interesting in the third slot. The first presentation was on ActionScript for Java Developers by James Ward and Chet Haase, where they showed us how alike ActionScript was to Java and what the differences were. Very well done.

The second presentation was by Simon Ritter who had once again indulged in some woodworks to create a beautiful demo of a multi-touch screen with JavaFX. He easily filled up the entire hour by explaining the steps he had taken to create it, so we could all make one for ourselves.

And then it was time to get some chocolate and head for home again.

A one-line summary of all of Devoxx? If you haven’t been there yet: do so! You’ve really missed out on the wonderful presentations, both educating and entertaining, and also on the wonderful atmosphere.

Devoxx, day 3

11 December 2008 in articles by Linda van der Pal

Day 3, the first day of conference sessions. A schedule loaded with interesting presentations, offering lots of hard choices.

First of all there was the keynote. Since we were there early we managed to make it into the actual keynote room. Stephan once again proudly gave some stats about Devoxx, and rightly so, cause it really is something to be proud about. 3200 people, 6 conference rooms and 160 speakers. Then he introduced RoxorLoops who introduced us to beatboxing. I’d heard about it before of course, but I had never seen an actual beatboxing performance. And I was totally overwhelmed. I never believed that that guy from police academy could actually make all those sounds, but after seeing RoxorLoops perform, it’s suddenly a bit less hard to believe. I heard him actually make three different kinds of noises at the same time and he really, really sounded like a drumset with special effects mixed in.

Then came a keynote by Sun about the top ten of great on why JavaFX is great (presented by Danny Coward). And it really did look great. Flashy demos on films split into puzzle pieces with the individual pieces moving, a plugin for Adobe Illustrator and Photoshop to create animations that you can use in FX, a multi-media cloud that you could access from both a desktop and your mobile phone, and probably one or two that I can’t remember right now. (It’s past midnight, so I have an excuse other than my lousy memory.)

Third was a keynote by IBM on the RFID tags that they put on our entrance badges and how they were being used to track which sessions were popular and which sessions sent people running out again. And also to make our life easier at some of the booths by just scanning our tags instead of having us fill in forms. Of course there are still plenty of forms left to fill in, but still… (One of the presenters was Robin Mulkers)

After the break that followed I went to a presentation about Hippo CMS by Arjé Cahn. A cool content management system that I need to check out as well. Not only do they offer a CMS complete with front end admin tool and repository, they also offer a portal application. And they also have something called facets, where you can define search queries on certain aspects of your content. They compared it to the CNet site and how you can search their reviews on vendors and price and the like. (And where you can also see how many results are in each category.)

Next was a presentation about DataPower by Bill Hines from IBM. It was a hardware solution to security issues with XML. It’s a nice product, but basically a sales pitch. Even if it was given by a technical guy who claimed that it wasn’t. I understand that he loves the product, and there’s nothing wrong with a sales pitch, all presenters do it basically. (Even if they are ‘selling’ OpenSource.) But it just rubs me the wrong way when you claim that it’s not a sales pitch, just because you’re not a marketing guy.

The fourth of the parallel sessions I followed was about EasyB by John Ferguson Smart. Yet another cool tool that I really need to look into. I might be on the bench for the next few weeks, but I think I’m going to be a lot more busy than I would have been on an assigment! It’s a tool where you can specify your requirements in natural language and then implement them in Groovy.

My final session of the day was a presentation by Dmitry Jemerov and Ilya Sergey about IntelliJ Idea and how they had integrated support for Python, Scala, Groovy and Ruby. The demo’s were cool, though parts of the presentation were a bit hard to follow due to accent and the speed of talking. I can’t wait to play around with Idea. It’s already on my desktop, I just haven’t had a chance to play with it yet.

Then I met up with Clara to discuss the last bits of our presentation and to wait in line for the French fries. Unfortunately those were half an hour later than was in the program, but I was still in time for the Juglead BOF.

Which was in turn followed by our own BOF. It went pretty well. We even had at least 30 women in the room and also a couple of men. Clara’s part of the presentation had grown a bit since the last time we gave the presentation so we didn’t have much time left for discussion. Of course that was also due to the usual technical problems of hooking up a laptop to a beamer. In the end we borrowed Stephan’s laptop, because he did know how to hook that one up. So thank you Stephan, and also for having us! If you were there, please give us some feedback on what you thought of the presentation. We’re ever trying to improve it.