JavaFX + Oracle

A while ago the javaposse opened up a system where we could post questions. A couple of episodes ago they started going through these items. Unfortunately my question didn’t get raised. Reason being that my question got more negative votes then positive votes.

If I look back now, it actually deserved this. My question went something like : “Why did Sun created JavaFX, Flex already plays nicely with Java, why not invent a Java to ActionScript compiler.” (somewhat like gwt but then ActionScript output). Now that Sun got bought by Oracle I’m pretty sure, JavaFX will succeed. At least if Oracle will put their money where their mought is. (Larry Ellison publicly announced his support for JavaFX). Why do I think this will have a big impact on the success of JavaFX. Well pretty simple, take a look at JSF. Oracle was one of the driving forces behind this. There still is room for improvement (isn’t there always). But it’s already a nice framework for building data centric applications.
If you now take a look at the new version ADF 11 and their JSF comonents. Well I haven’t seen many JFS components that are better. I have to admit, I myself am more in favor of none component based frameworks (they tend to be more flexible).
To come back to JavaFX. Currently we still don’t have a DataGrid or something. This is still a big issue, I feel somewhat like when Microsoft first released Silverlight 1. It was nice but not yet usefull. However in the near future I foresee that Oracle will finalize the basic JavaFX components and publish a nice basic DataGrid that will be on par with the Flex Grid(s).

And if all goes well, we should finally see a real Java(FX) component market happening. That’s something I still don’t understand. Flex was way ahead of Silverlight with their framework and wigdets. I recently wanted to compare them again. What struck me was the component market for Silverlight. I already have big players providing very datacentric and rich gui widgets for sale. For Flex I only found Ilog as big player there. I’m still looking for a DataGrid with very powerfull sorting,grouping,… basic stuff. In Silverlight these are already in production (have a look at http://silverlight.componentart.com/#Welcome) For Flex I’m still searching.

As Java is a much more programming driven environment I think these components will show up much faster and probably also in the opensource world. This in my opinion is the big problem of Flex. The framework and language is good enough to do this, but the most guys who know Actionscript have a design background and not a background in enterprise/component development. I really hope Oracle/Sun will release there version 2 really soon so we can see this happening. I’m actually really looking forward to the next couple of years in the Java eco system. We already have a wealth of opensource tools for doing enterprise development (starting from IDE’s,building systems,continuous integaration,testing environmonts,…) if we then would also get a good framework for doing rich gui’s that work perfectly on all platforms (even Linux, still my prefered one) … What does a developer want more?

laptop with serial port

I recently bought a remote power bar. To configure it you need to connect to it with a serial connection. However I checked all my laptops and it seems no laptop has a serial connection. I also tried looking for one online, but I can’t find one. Does anybody knows a vendor that still includes this port? If I’m not mistaken there still are a lot of routers and other hardware that still have to be configured over a serial connection. Luckily I still have a computer who has a serial port.

Grails XFire + Flex (flex xfire Error #2032: Streamfout.)

I’m building a small application for myself. It will manage my orders and invoices. Reason I’m doing this is mainly to try out new stuff. I thought I’ld try out a Grails soap backend with a Flex frontend. Doesn’t sound to difficult, right? Well I ran into a problem and it took me some time before I found a solution.

I had created a simple webservice that would return all my orders. Something like this piece of code

class PurchaseOrderWebService {

boolean transactional = true
static expose=[‘xfire’]

PurchaseOrder findById(Long id){
return PurchaseOrder.get(id)
}

PurchaseOrder[] findAll(){
println(‘listing all’)
return PurchaseOrder.list() as PurchaseOrder[]
}

PurchaseOrder save(PurchaseOrder order){
return order.save()
}
}

Pretty simple don’t ya think. This is now accessable as a soap webservice. In Flex I used the generator to generate all my stubs. The Flex code would look something like this

public function loadData():void
{
Alert.show(“test5”);
var service:generated.webservices.PurchaseOrderWeb = new generated.webservices.PurchaseOrderWeb();
service.addEventListener(FaultEvent.FAULT,errorHandler);
service.addfindAllEventListener(findAllListener);
service.findAll();
}

public function findAllListener(e:generated.webservices.FindAllResultEvent):void
{
this.orderDG.dataProvider = e.result;
}

Here I show the alert so I’m sure I’m not using a cached version of the SWF. However doing this returns a Error #2032. Why? Well I don’t know. I tried using the soap service from another programming language (c#) and it worked fine. After much googling I finally found the answer. For some reason Flex doesn’t like it when you don’t supply an argument to the soap call. The piece of code that finally did the trick looks like this

Grails

class PurchaseOrderWebService {

boolean transactional = true
static expose=[‘xfire’]

PurchaseOrder findById(Long id){
return PurchaseOrder.get(id)
}

PurchaseOrder[] findAll(String dummy){
println(‘listing all’)
return PurchaseOrder.list() as PurchaseOrder[]
}

PurchaseOrder save(PurchaseOrder order){
return order.save()
}

}

Flex

public function loadData():void
{
Alert.show(“test6”);
var service:generated.webservices.PurchaseOrderWeb = new generated.webservices.PurchaseOrderWeb();
service.addEventListener(FaultEvent.FAULT,errorHandler);
service.addfindAllEventListener(findAllListener);
service.findAll(“test”);
}

public function findAllListener(e:generated.webservices.FindAllResultEvent):void
{
this.orderDG.dataProvider = e.result;
}

Strange bug if you ask me. I hope this get’s indexed and it will help other people facing this problem.

mount within gnome access it using terminal?

I sometimes have to connect to a windows share from my linux box. I do this using samba (ff course). However when I start a gnome terminal and I want to go on that mounted share, I don’t see it. If I use the commandline smbmount I can access it. Does anybody know how you can achieve this? I find it strange that I have to mount it twice, once from inside gnome and once from inside my gnome terminal. Should be a solution no?