Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Scenario: Hello, world"

(Scenario:Hello, world with a database)
Line 123: Line 123:
 
|}
 
|}
  
<br>  
+
<br>
 
+
= Scenario:Hello, world with a database  =
+
 
+
[[|]]This variant of the scenario above augments the service results with information retrieved from database.
+

Revision as of 20:55, 20 July 2011

Scenario: Hello, world
Step
Description
Features
Create a project

User enters a project name, and a base package name.

System creates a new EGL project

  • [will's email here]
  • associated with Java & JavaScript Generators
  • Create EGL Project wizard
    • import widget libraries
    • Runtimes?
Create a new view
User enters name and package for a new RUIHandler.

System creates the EGL part and opens it in the Rich UI Editor (i.e., Visual Editor in the Design tab)
  • Create RUIHandler wizard
  • VE
  • IDE prefs for VE rendering (XULRunner, IE)
Create the UI consisting of a
textfield and a button

User drags a textfield from the VE Palette and drops it on the grid layout for their Handler;
repeat for the button.


Use Properties to edit the label of the button to be "Go" and then create a new handler for the button's onClick event.

  • VE
  • Widget Libraries
  • Palette
  • EGL Data View
  • Property View
Create a dialog box to display the results. Use the EGL editor to instantiate a Dialog whose children include a Box named "content".
  • EGL Editor
  • Organize Imports
  • Code completion
Create a simple service
User creates a new service, specifying package and part name.
Use the EGL editor to implement a function that returns a string by concatenating "Hello, " to whatever is passed in.

  • Create Service wizard
  • EGL Editor
Add logic to invoke the service when the button is clicked.

In the event handler function (created above), use code completion to instantiate the service.


Use EGL's call statement to invoke the service, specifying that it returns to a callback function that does not yet exist.


Use the EGL Editor's Quick Fix to automatically define the callback function. 


Implement the callback function to instantiate a textfield containing the service result and programmatically add it to the children of the dialog's UI (which again is a Box named "content").


  • EGL Editor
  • Code completion / Quick Fix
  • Call statement
Preview the application to ensure that it works.
User switches to the "Preview" pane to exercise a running instance of their UI. 
  • Preview
  • VE server
Debug the application by setting breakpoints in both the UI and the service

In the EGL Editor, the User sets breakpoints on both the service invocation as well as the function that implements the service.


From the preview pane, the user hits the Debug button to launch the UI in an external instance of their system browser.

  • EGL Editor
  • Breakpoints
Deploy the application.

User right clicks on their project and chooses "Deploy EGL Project".

System responds that there is no target (project), and prompts user to create one.  From the deployment descriptor, the user specifices the target project by creating a new Dynamic Web Project and chooses Tomcat 6.0 as their target runtime.

User clicks on the Deploy button in the descriptor to deploy the project to the target Dynamic Web Project.


Run the deployed app.

User right-clicks on the UI HTML file that was generated in the target project, and chooses Run as... Run on Server. 

System gives the user a choice of web servers on which to run, and then publishes to that server and launches the HTML in a browser.



Back to the top