aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes Communications between OpenLaszlo application & server side resource Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Communications between OpenLaszlo application & server side resource" Watch "Communications between OpenLaszlo application & server side resource" New topic
Author

Communications between OpenLaszlo application & server side resource

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

Hi.
How an OpenLaszlo application communicate with back end code (EJBs, Servlets, Web services..)?
Does it employ HTTP or it has its own mediator/interceptor?
And for the server side resource, have they to be Java code? or any code (Python for example) could be called?
Thanks.
Norman Klein
author
Ranch Hand

Joined: Jan 22, 2008
Posts: 36
Laszlo only requires XML over HTTP, so it is completely compliant with the existing HTTP standards. The server only needs to change its content type to "text/xml" and output a valid XML document.

This is a capability supported by all web servers. Its even pretty easy to update most existing server side applications to support Laszlo, since only their JSP files need to be updated. So you'll have one set of JSP files for HTML and another for XML.
Norman Klein
author
Ranch Hand

Joined: Jan 22, 2008
Posts: 36
Laszlo only requires XML over HTTP, so it is completely compliant with the existing HTTP standards. The server only needs to change its content type to "text/xml" and output a valid XML document.

This is a capability supported by all web servers. Its even pretty easy to update most existing server side applications to support Laszlo, since only their JSP files need to be updated. So you'll have one set of JSP files to output HTML and another for XML.
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Are there plans to support different types of content? JSON, Some form of a remoting API? Anything other than XML?


GenRocket - Experts at Building Test Data
Norman Klein
author
Ranch Hand

Joined: Jan 22, 2008
Posts: 36
Since OpenLaszlo is open source software, it supports most standard compliant software either directly or through contributed libraries. So for instance, it supports JSON through the json.js library.

You can read more about Laszlo JSON support at http://www.theserverside.com/tt/articles/article.tss?l=LaszloWithoutXML

Laszlo also supports RPC. Further information is available in the Laszlo docs at http://www.openlaszlo.org/lps/docs/guide/rpc-javarpc.html
al greezlee
Greenhorn

Joined: Mar 10, 2003
Posts: 4
That looks interesting - also a section in the guide on server 'push' using the Connection class .. will these methods work in DHTML output?
Norman Klein
author
Ranch Hand

Joined: Jan 22, 2008
Posts: 36
The Laszlo architecture is designed to allow it to be easily ported to new web platforms. Each runtime consists of a kernel, which provides a clean abstraction between OpenLaszlo and runtime-specific details. Each kernel is a collection of classes in two major categories: sprite classes, and environment classes. Sprite classes handle the visual display of OpenLaszlo views, text and input text boxes. Environment classes provide supporting APIs for handling mouse and keyboard events, getting timing information, and loading data or code at runtime.

So when Laszlo was ported to the DHTML platform, it only required the creation of DHTML sprite classes, instead of a complete rewrite for that platform. This allows core Laszlo functionality to be available to each platform.
 
wood burning stoves
 
subject: Communications between OpenLaszlo application & server side resource