views:

1986

answers:

5

If you have a Java based web application (J2EE webapp - never mind which other underlying frameworks are being used), and you wanted to introduce a Flash based front-end, would you use Laszlo or would you rather expose a ReST-like XML interface and build and deploy a Flash application that uses that?

On one hand, Laszlo is quite amazing - doing for Flash what JSP does for HTML. It is easy to work with. It fits in very well with the rest of the web application (which is JSP based).

On the other hand it might be better to develop a complete Flash app decoupled from the server and use an XML-over-HTTP mechanism to bind the two. This would have the added advantage of being able to use the same XML interface for an AJAX front end if needed.

What would you do, and why?

+3  A: 

I would create the contract-first services, deploy them separately, and then write the RIA client to access them.

Coming up with the schema first has the added benefit of completely decoupling the two during development. The RIA developer can create some synthetic XML streams to use for data while waiting for the services to come on-line.

duffymo
+2  A: 

I might have considered Laszlo in the past, but today, I'd stay within the Java stack and use JavaFX.

David
JavaFX seems a little immature. If not Laszlo, then Flash/Flex/AIR seems to be the right way to go
Vihung
Who -1'd me for providing an opinion?
David
I agree with David, I think JavaFX has a lot of potential. +1
Abdullah Jibaly
+3  A: 

Laszlo is the product that never made it, there isn't a big enough ecosystem of developers around it.

I'd use Adobe Flex for the front end. The same benefits of using a markup language for doing flash, but it has a much larger developer base and open source projects to draw upon. For the data communication, use either REST or if you want to get clever, use BlazeDS.

marstonstudio
BlazeDS is new to me. Would you know how it compares to, say, DWR?
Vihung
I believe BlazeDS uses a binary format (AMF) and is much better for pushing data from the server to the client than HTTP, especially things like streaming video.
Abdullah Jibaly
BlazeDS lets you handle the "native" object format that Flash uses, so if you're sending complex stuff it might be easier to use. But then you'd lose the benefit of the service being reusable by other types of clients.
Herms
A: 

OpenLaszlo is a complete RIA framework, so I'm pretty sure that you can 'compile' it to a completely standalone app that communicates with the server over HTTP. It's really very similar to Flex. The advantage Flex has is a much bigger community, a full-blown IDE, and more resources (Adobe), while OpenLaszlo is a little more innovative in that you can deploy to Flash or AJAX from one codebase.

Abdullah Jibaly
A: 

I've actually spent some time working on a implementation similar to what you're suggesting. I had a complied Open Laszlo front end embedded in a web page with a Django (a python MVC library) REST interface on the backend and no Open Laszlo server. It works reasonably well, but there are a couple of things to watch out for. Open Laszlo only supports calls to GET and POST, so you won't be able to easily use the DELETE and PUT methods in your REST API. The other is the lack of community around Laszlo (as mentioned elsewhere). I can sometimes be frustratingly difficult to answer some basic questions when using Laszlo, particularly around the XML HTTP API and XML replication features in the framework. I personally never really looked at the Laszlo back end server seriously as I wanted an open API that could be consumed easily by other clients.

All this being said, the implementation does work and can be effective if you're willing to work around the limitations mentioned above. Plus Open Laszlo is free, which can be a really big plus if your working on a budget.

Andrew Burke