6

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?

Vihung
  • 12,947
  • 16
  • 64
  • 90

5 Answers5

4

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
  • 305,152
  • 44
  • 369
  • 561
4

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

David Koelle
  • 20,726
  • 23
  • 93
  • 130
4

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
  • 395
  • 3
  • 9
  • BlazeDS is new to me. Would you know how it compares to, say, DWR? – Vihung Dec 30 '08 at 15:08
  • 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 Dec 30 '08 at 16:23
  • 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 Jan 21 '09 at 16:57
1

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
  • 53,220
  • 42
  • 124
  • 197
  • 1
    As programmer who has developed in OpenLaszlo since 2006 I can confirm that you can compile your OpenLaszlo client application to a completely standalone app (either as a Flash SWF file or a DHTML/HTML5 (HTML+JavaScript) and communicate with any server-side scripts in any language that can accept HTTP POSTS and return XML text. It is true that Flex has a larger community and a full-blown IDE (which OpenLaszlo does not have). However, due to Flash being dropped from iPad and Android Phones I would recommend Java or another platform over both Flex and OpenLaszlo at this time. – Kmeixner Aug 22 '12 at 16:20
1

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
  • 93
  • 1
  • 7
  • Many of the expert OpenLaszlo developers recently decided to start using stack overflow instead of the Official OpenLaszlo forums to ask and answer questions. They are tagged under the OpenLaszlo tag and LZX will soon be added as a tag too when one of our members has enough rep to add the tag. LZX is the name of the XML+JavaScript language you create OpenLaszlo applications in. LZX will be used in the future to describe the platform if the community decides to create a fork of OpenLaszlo. – Kmeixner Aug 22 '12 at 16:25