In this post I will give an overview of the architecture that I've used to supply a connected thick (JavaFX) client application to a customer.
Here is the scenario: our company has an important customer who wishes to access and view some real-time data related to their business.
After some thought we've decided that the ideal platform for the client app is JavaFX (eye candy), the client deployment method is WebStart and we'll provide the data to the client via a SOAP Web Service. Easier said than done it turns out :)
There are a few issues with this set-up.
CLIENT:
The JavaFX client app can be written without major problems (see my previous posts about my beef with JavaFX tools) but I've found it best to create separate Java module to handle the WS communication. This is also useful since Maven doesn't seem to be able to build mixed source trees. Therefor the client app is composed of two separate JARs:
- Java library to handle WS client code generation and some utilities that are easier written in Java
- JavaFX GUI client that depends on the Java library
SERVER:
Simple enough Web Service deployed on GlassFish v2.1 JavaEE 5. Nothing special to note here.
DEPLOYMENT:
This was one of the trickiest parts. Since we have a number of servers (dev, test, stage, production, etc.) and we want a client which is downloaded from a specific server to connect to the WebService running on that same server. This we achieved by using a servlet to dynamically generate the JNLP file for the WebStart deployment. The servlet plugs the correct values into the JNLP for two things:
- where the client jars are located (i.e. codebase)
- a run-time property for the client specifying the WS location
The client (once launched) uses the WS location property to connect to the correct web service.
The servlet gets this information from system properties which can be easily set using the GlassFish web admin console. This means that we compile the code once and deploy it to any GlassFish server and all works well as long as we don't forget to add the two properties to the server.
Wednesday, September 16, 2009
JavaFX + WebStart + Web Services + GlassFish = One cool client app
Posted by
Zero Effort
at
Wednesday, September 16, 2009
1 comments
Monday, August 31, 2009
More JavaFX impressions
So I have been using JavaFX for about 2 weeks now. I am working on commercial application for a client and now that I am more familiar with both tools and language I think it's a good time to post an update.
Tools still suck - no surprise here :) but they suck even worse in Eclipse than in NetBeans so even though my workplace is an Eclipse shop we're using NetBeans for our JavaFX development. I've had a quick chat with David Kaspar, a friend of mine and one of the developers who are currently working on JavaFx tools at NetBeans and he told me that Sun is aware of the situation and it is about to improve, so FX support NetBeans 6.8 should be much better.
I really hope so because the language is awesome and despite everything I do enjoy working in it.
Posted by
Zero Effort
at
Monday, August 31, 2009
0
comments
Tuesday, August 04, 2009
First JavaFX impressions
In my job I've been playing around with some pretty cool and new technologies lately. This gave me the opportunity to write a a WPF based video player (with some very client specific functionality) in C# in just about a month. Coming from Java background with no prior .NET experience at all, it was quite an accomplishment. But it is not simply a credit to my genius but mostly to the tools that were available to me: Visual Studio with ReSharper. As occasional IntelliJ user I was soon very comfortable and pumping out code like nobodies business. As a SWING developer used to working with NetBeans forms editor I found the XAML editor fairly intuitive.
This brings me to my JavaFX experience. I've been assigned the task of evaluating technologies for a new UI project. I am currently down to either SWING or JavaFX, and while I would really love to use JavaFX there is a single major reason that is making me very hesitant:
Lack of Good Development Tools
While I love the demos that I downloaded for JavaFX I am sorely disappointed with the available tools. It's kind of sad really, since most of my old colleagues at Sun who used to work with me on Mobility support are working on JavaFX support now. I know many people on that team and they are some of the smartest most capable developers. Something must have gone very wrong along the way because at the time of writing this I personally find the JavaFX support in NetBeans to be an embarasement. The most basic features are missing from the editor which makes it a major pain to work with (source formatting, cut/paste imports, automatic imports while typing, auto-completion is of mark at times, etc. etc.). This makes it very difficult for me to be productive with the language from the start. Sun has been pushing JavaFX hard because it does enable some very cool UI magic but I wish they put as many resources into making it usable to developers thus speeding up adoption.
I will continue to play around with JavaFX and I hope that in the end I'll find that I can live with (and remain productive with) it's current tool set.
Posted by
Zero Effort
at
Tuesday, August 04, 2009
0
comments
Saturday, April 18, 2009
Cotopia: Over 1 Million games played
That's right folks - we've had over 1 million games played!! Isn't that awesome? It makes me very happy that we've been able to bring our community that much fun. I mean seriously, more than 1 million games, I can hardly believe it. It's been a good ride for us on the development team and I hope that we'll soon celebrate by releasing the long awaited mobile game of Go.
I'd like to send a big 'Thank you' to our community for making this happen.
Posted by
Zero Effort
at
Saturday, April 18, 2009
1 comments
Sunday, April 12, 2009
Economy and IT jobs in Sydney
I thought that I'd quickly comment on the state of affairs regarding IT / jobs / economy here in Sydney. I was affected by the economic downturn just like many others, as companies shed contractors to tighten their budgets. This was around 2 months ago. I has taken me 8 weeks to find work - half of that time spent looking while I was finishing off my previous contract at a great Sydney IT firm Object Consulting. 8 weeks is the longest it has taken me to find work since 2002. Usually I have a job withing 2-4 weeks.
I normally look for senior developer positions related to JavaME or Core Java / Swing, which is not where most of hiring happens - any Java developer will know that majority of advertised jobs resolve around web, databases, finances, or insurance (i.e. gather financial/insurance data on the web and stuff it into a DB - not my cup of tea). This definitely doesn't the job search any easier but it ensures that usually I find something at least somewhat interesting.
In addition to taking a few extra weeks to find a job I also have to say that the compensation packages on offer are not exactly what they used to be a year ago, but they aren't completely unacceptable either.
To sum up - I believe there is work to be found even for those of us that are a little more picky, even though it may take longer to find it and one may have to do with less money.
Posted by
Zero Effort
at
Sunday, April 12, 2009
0
comments
Saturday, February 28, 2009
Doing my bit for atheism :)
OK, so here is an idea for like-minded people.
At our local bookshop they have a "Religion" section with all sorts of books. Unsurprisingly, propaganda and early indoctrination literature (i.e. Children's bibles, Good News bibles, and other bibles) is on the eye-level top shelf. While some of my preferred reading such as "The God Delusion" or "God is not Great: How Religion Poisons Everything" sits on the very bottom shelf where it doesn't receive proper attention.
The thing that I like to do, when I browse in the store, is to rearrange the books to correct the unfortunate placement of my favorites. I do this about once every 2 weeks or so.
That's the whole idea. I am not sure how much it accomplishes but since there is no church of atheism where I could make donations it's one fun way I like to try and forward the cause.
Posted by
Zero Effort
at
Saturday, February 28, 2009
2
comments
Wednesday, February 11, 2009
Starship Sofa
Again with the Podcasts :)
I've recently discovered another excellent SciFi podcast at http://www.starshipsofa.com
I was completely blown away by it's first short story (by Michael Moorcock no less) called London Bone which in it's quality (writing and production) rivals to that of Variant Frequencies.
The thing about Starship Sofa is that they tend to put out stories by established authors rather than by new and upcoming ones. There have been a couple of stories I've skipped, I guess every 5th or so, whereas on Variant Frequencies I have yet to skip one. This, I guess, is because the Sofa tends to cover a broader range of stuff and some things are just not my cup of tea, however the stories that stick do so in a big way!
Give the Sofa a listen - I can pretty much quarantee you'll like it.
Posted by
Zero Effort
at
Wednesday, February 11, 2009
1 comments
Sunday, February 01, 2009
SF & christian indie music - wtf??
Off-topic rant warning.
I love sci-fi and sci-fi story podcasts - hence I love Escape Pod (I've donated about $200 to them so far) and I love Variant Frequencies - they don't ask for money so I didn't give them any yet.
My rant today is about Variant Frequencies, VF is a monthly podcast and in my opinion it's simply the best in terms of quality (both writing & production). The guys behind VF are simply amazing. Except... Except in the last episode called "Creature of God" (which admittedly has some religious themes as the name would imply) the featured an advertisement for indie christian rock music or some such non-sense.
To me the reasons for doing this may be that:
1. the guys at VF are religious and are actively trying to help spread the virus
2. or it may be that they are short of cash and thus in need advertisement dollars
If case 1. is true I am very disappointed, and I feel a bit tricked. It kind of reminds me of one beautiful day in my teens when 2 VERY pretty girls we smiling at me from across the food court in the mall. They then approached me (giggling), made small talk and were being extremely friendly, and then they asked me to come and meet them again in their church :) Wow, what a recruitment strategy, even the Army won't go that far.
Perhaps VF isn't doing exactly the same thing but I do feel baited in with some pretty awesome SF and then hit with a completely bullshit religious advertisement.
If case 2. is true (and I hope to .. err.. I mean I really hope so) I would suggest to VF to put up a paypal donations button on the front page, ask for money at the end of the show, ask for money at the start of the show, put some non-offensive adverts for headphones in, do whatever else but please stay away from pushing religion. I've bough Scott Sigler's books, I've given a fair amount of money to EscapePod (and the guy from there once mentioned he is religious - to my great surprise) so I will definitely support my favourite sci-fi podcast EVER by donating, and once "The last fix" comes out in Australia I buy the book.
If I missed case 3. I hope it's a good one that doesn't involve propagating the evil of religion on purpose.
Posted by
Zero Effort
at
Sunday, February 01, 2009
2
comments
Saturday, January 31, 2009
spring - hibernate - ejb3
I am looking for work since my contract at Object Consulting in Sydney is up in two weeks. There are some interesting jobs out there but very few. Australia, it seems, has been hit by the global crisis pretty hard. Given the current situation I am slowly giving up on finding myself something in the Mobile area and there are very few jobs for Swing/GUI developers as well.
So, as usual, we're left with crappy jobs for insurance companies and banks, chasing around and persisting the oh-so-important transactional business data. How exciting. But man's gotta do what man's gotta do. Looking at the market, EJB3 (with which I have some experience) is losing to Spring (in employer demand at least) and/or Hibernate. Pressed by reality I've decided to start with Spring and I've gone through a few tutorials. So far I am not too happy with the fact that Spring functionality seems to be configured by XML - I love XML for passing data around but pretty much hate it for everything else. Hopefully as I dig in deeper I'll find that EVERYTHING can be done through annotations :)
Posted by
Zero Effort
at
Saturday, January 31, 2009
0
comments
Tuesday, January 20, 2009
Talibanistan
It is not everyday that a country is born, but here is a new one that I have discovered only recently.
So it is with great pleasure that I welcome all the players from the new country of Talibanistan who play Cotopia games into our community. It is with hope that we can bring relaxation into their otherwise strictly disciplined lives.
Posted by
Zero Effort
at
Tuesday, January 20, 2009
1 comments