Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 354634

Summary: Support testing and debuging RUI apps (UI with EGL services) in the IDE w/o deploying to a server
Product: z_Archived Reporter: Will Smythe <smythew>
Component: EDTAssignee: Justin Spadea <jspadea>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: chenzhh, greer, huozz, jspadea, lasher, mheitz, smythew, tdramsey, tww
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Will Smythe CLA 2011-08-12 11:19:38 EDT
In both CE and RBD 8 we gave developers the powerful ability to fully develop, test, and debug a RUI app (i.e. RUI client side code calling EGL services in a dedicate way) from within the IDE, without deploying anything to a server. This was powerful because it did not require the developer to install/configure a server or deal with URLs/ports of where the services were getting deployed. It made the process of developing a self-contained client/server app very simple and straight-forward. This was useful for both new developers just "kicking the tires" and developers building advanced applications.

This capability is needed in the EDT IDE as well. But, we must address the significant delay (5+ seconds) on every service invocation (because in CE/RBD we launch a new JVM). For an app that calls lots of services, this delay makes it almost impossible to develop, test, and debug the app without deploying it to a server. Although deploying is not *terrible*, it makes the developer switch from dedicated services to either REST or SOAP, which means the developer either must switch the services back to dedicated on deploy (by changing code) or not getting to take advantage of the power of dedicated services to not require the developer to specify the URL for the services prior to deployment.

Also, from a first impression standpoint, the overall EDT IDE user experience is greatly enhanced if the developer can build and run a complete client/server app quickly.

Here is how I expect the flow to work:

1. Developer starts the EDT IDE

2. Developer creates a new EGL project, using the "Web client with services" template (see BugĀ 354426). A new project is created with the ability to generate JavaScript and Java.

3. Developer creates a simple "hello world" service in the new project. The service is coded with a function that return the string "Hello World".

4. Developer creates a simple RUI handler in the new project using the VE. The handler is coded to invokes the service (dedicated) on start and writes the resulting string ("hello world") using writestdout.

5. Developer switches from the Source tab to the Preview tab to run the application.

6. Preview shows "Hello World", demonstrating that the RUI was run, service invoked, and service returned.

Observations:
0 - "Hello World" appears almost instantaneously (~ 1 sec) (note: it's OK if the very first invocation is slow, but subsequent invocations of the same service or a different EGL service in the workspace should not be slow)
1 - developer did not install or launch a server
2 - developer did not explicitly deploy anything (to a separate project or the same project)
3 - if the developer had set a breakpoint in the service or RUI, launched the RUI preview in debug mode, both breakpoints in the RUI and in the service code would have triggered the Debug perspective to appear
Comment 1 Will Smythe CLA 2011-08-12 11:24:52 EDT
The flow for a RUI calling a service that accesses data from a data source (JDBC/SQL) should work the same way (as what is described below). Developer should not need to install a server or deploy to a server before testing in the IDE from the VE preview. Data service invocations from RUI should be "fast".
Comment 2 Justin Spadea CLA 2011-09-15 09:25:10 EDT
The majority of the work is done, and some remaining pieces will be tracked in other bugzillas (where the work is tied to multiple components like deployment, SQL...). For now we will always try to invoke a service on a test server, even if it doesn't exist in the workspace, and bug 357657 will provide a way to specify whether the test server should be used or not.
Comment 3 Will Smythe CLA 2011-11-02 00:29:56 EDT
Works like a champ. Very good stuff.