Jump to: navigation, search

Scenario: Hello, world

This is a draft and is a work-in-progress.


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

  • associated with Java & JavaScript Generators
  • and a directory structure as follows
    • [base package name].client      (configured for JavaScript gen)
    • [base package name].server     (configured for Java gen)
    • [base package name].common (configured for both JavaScript and Java gen)
  • 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.

  • Widget Libraries
  • VE
    • 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.