PDA

View Full Version : Eclipse Laszlo IDE + Java Classes


eduz
11-25-2004, 02:27 AM
Hi, I am currently developing a test application on the new Eclipse Laszlo IDE and I have a problem: I can't create Java classes on Laszlo Projects, I need to use javarpc to integrate an existing app to a Laszlo interface i'm building. Any suggestions on how I can do this without creating two projects and copying files manually?

peller
11-29-2004, 07:34 AM
At the present time, Laszlo projects in Eclipse do not support Java code in the builder, nor can they deploy Java code to an appserver. (Base Eclipse at this time doesn't have any webapp support, although I think there are efforts underway to fix this) You may, of course, develop Java source code elsewhere in your Eclipse Workspace.

In the case where you're developing a separate Java entity for your Laszlo app to communicate with, whether via web services, URLs, etc., why not just build the Java code in a separate (Java) Project?

I'm not familiar with JavaRPC. What are the integration points with Laszlo, and what would be the benefits of incorporating LZX and Java code in the same project?


Adam Peller
IBM Emerging Internet Technologies

eduz
11-29-2004, 08:19 AM
We have many active projects using JSP/Servlets - Struts - POJOs - Hibernate. Our plan is to port some of this projects to Laszlo. We planned these projects with full MVC support, so we can replace the JSP/Servlet part to Laszlo LZX. These Laszlo scripts must call Struts Action methods.

I've tested the two projects startegy, but i can't test the javarpc call on the preview tab of the laszlo eclipse plugin, that's my problem :(

Oh, by the way... thanks for this really great plugin.

Eduardo Resende
TopCoders Tech.
www.topcoders.com.br

peller
11-29-2004, 01:02 PM
Glad you like the plugin!

It sounds like you need the ability to deploy Java code to a webapp server. Would there be a need to have the Java code packaged up in the same war as the Laszlo code?

There are a couple of commercial variants of Eclipse that can handle webapps, and I believe there is an open source effort to do this as well (the webtools project? http://www.eclipse.org/webtools/) I'm not sure what the status is of this project.

In the meantime, I'm afraid you'll have to manually package up your Java code and deploy it before using the preview tab or deploying your Laszlo application. Note that the preview tab does NOT use an actual LPS server, so many server-based operations won't work properly unless you actually deploy the application using "run" or "debug". Preview is primarily for getting layout right and testing simple client-based logic.

I'll be sure to note seamless integration with webapps, when available in Eclipse, as a feature request.

Regards,
Adam