View Full Version : Basic questions
jacobi
03-03-2009, 06:25 PM
Just found out about the OpenLaszlo and am fascinated by it. I have gone through the tutorials already and read the introductory PDF. I have a few basic questions to see if I am on the right track:
We have an in-house web server written in C, and would like to keep using it. Is this possible? Do I need to have J2EE or another servlet engine? Do I need Apache?
Can someone explain (step by step) how one develops an interface for an application that exists in the back-end (web server)? Write a .lzx file, then what?
Is the code compiled or is it visible to the user?
Any good tutorials or books?
ramesh
03-04-2009, 04:44 AM
Jacobi,
You can refer the book 'Laszlo in Action' (Simply the Best) for all of your questions!
Thanks and Regards,
Ramesh G.
pugmaster
03-04-2009, 05:40 AM
* We have an in-house web server written in C, and would like to keep using it. Is this possible? Do I need to have J2EE or another servlet engine? Do I need Apache?
You will need a servlet engine to compile your Laszlo applications. Your application can then be compiled into a SOLO web application. This SOLO web application can then be served by any web server.
* Can someone explain (step by step) how one develops an interface for an application that exists in the back-end (web server)? Write a .lzx file, then what?
1. install Apache Tomcat with the Laszlo server war file or the complete Laszlo package
2. Go to $TOMCAT_HOME/webapps/lps-4.x/ and create your working directory
3. Use a text editor to create your .lzx file
4. Invoke your Laszlo application by its URL: http://localhost:8080/lps-4.2/myapp/myfile.lzx?debug=true
5. Fix your bugs (go back to step 3)
6. Add the proxied="false" attribute to your canvas
7. Transfer the SOLO file to your web server
* Is the code compiled or is it visible to the user?
Depending on the "lzr" parameter, it is either compiled into a SWF8, SWF9 or DHTML executable.
* Any good tutorials or books?
Start by reading the Laszlo docs at http://www.openlaszlo.org/lps4.2/docs/developers/
This provides a good introduction to the basics, but it doesn't provide an overview on how to create a complete application. For that you need to pick up a copy of Laszlo in Action.
- Norman Klein
Author: Laszlo in Action
kmeixner
03-04-2009, 09:33 AM
Just found out about the OpenLaszlo and am fascinated by it. I have gone through the tutorials already and read the introductory PDF. I have a few basic questions to see if I am on the right track:
We have an in-house web server written in C, and would like to keep using it. Is this possible? Do I need to have J2EE or another servlet engine? Do I need Apache?
Can someone explain (step by step) how one develops an interface for an application that exists in the back-end (web server)? Write a .lzx file, then what?
Is the code compiled or is it visible to the user?
Any good tutorials or books?
If your web server application supports HTTP POSTS and can return XML via URLs then I would suggest you create a stand-alone (SOLO-mode) OpenLaszlo application to work with it, that way your application (once compiled to SOLO-mode) would be independent of the OpenLaszlo server.
I suggest you create a simple OpenLaszlo test program that makes an HTTP post through an OpenLaszlo dataset.doRequest() to the URL of your server-side app (assuming it can accept an HTTP POST) and have your server-side app return data in XML format to the dataset. This will give you a feel for how your client-server communication will work.
Kevin
jacobi
03-05-2009, 05:09 AM
Thank you very much for your detailed reply. It is exactly what I was looking for. I am ordering the book today and will start to use it in a few weeks. You will hear more from me then.
jacobi
03-05-2009, 05:13 AM
I suggest you create a simple OpenLaszlo test program that makes an HTTP post through an OpenLaszlo dataset.doRequest() to the URL of your server-side app (assuming it can accept an HTTP POST) and have your server-side app return data in XML format to the dataset. This will give you a feel for how your client-server communication will work.
Kevin
Thanks, Kevin. I think I will start with this approach and add XML returning methods one by one. This looks like the way to go for a learner.
kmeixner
03-05-2009, 10:54 AM
Thanks, Kevin. I think I will start with this approach and add XML returning methods one by one. This looks like the way to go for a learner.
No problem. A couple of tips about XML returned to Open Laszlo (for OL 3.4.0 version anyway), it must have only one root node and OpenLaszlo does not support name spaces or the XML version tag (eg: <?xml version="1.0" encoding="ISO-8859-1"?>)
Good:
<myrootnode>
<node1 />
<node2 />
...
<nodeN />
</myrootnode>
Bad:
<?xml version="1.0" encoding="ISO-8859-1"?>
<myrootnode>
<node1 />
<node2 />
...
<nodeN />
</myrootnode>
Bad:
<myrootnode1>
<node1 />
<node2 />
...
<nodeN />
</myrootnode1>
<myrootnode2>
<node1 />
<node2 />
...
<nodeN />
</myrootnode2>
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.