Difference between revisions of "EDT:Tutorial: RUI With DataBase Lesson 5"

From Eclipsepedia

Jump to: navigation, search
(Create a Service part)
Line 1: Line 1:
 +
[[EDT:Tutorial: Access a database with EGL Rich UI|Access a database with EGL Rich UI]]
 +
 +
 +
{| style="float: right"
 +
|[[EDT:Tutorial: RUI With DataBase Lesson 4|< Previous]] | [[EDT:Tutorial: RUI With DataBase Lesson 6|Next >]]
 +
|}
 +
= Lesson 5: Create the service =
 +
 +
Create a dedicated service to access the database.
 +
 +
In this lesson, you create an EGL Service part, which
 +
is a generatable part. You must place each generatable part in a separate
 +
source file, and the name of the part must be the same as the name
 +
of the file.
 +
  
 
[[EDT:Tutorial: Access a database with EGL Rich UI|Access a database with EGL Rich UI]]
 
[[EDT:Tutorial: Access a database with EGL Rich UI|Access a database with EGL Rich UI]]
Line 18: Line 33:
  
 
To create a Service part:
 
To create a Service part:
 
  
 
<ol><li>In the Project Explorer window, right-click '''PaymentService''',
 
<ol><li>In the Project Explorer window, right-click '''PaymentService''',
Line 26: Line 40:
  
 
<ol><li>In the '''EGL source file name''' field,
 
<ol><li>In the '''EGL source file name''' field,
enter the following name:
+
enter name '''SQLService'''.
 
+
SQLService
+
 
EGL
 
EGL
 
adds the .egl file extension automatically.
 
adds the .egl file extension automatically.
 
<li>In the '''Package''' field, enter the
 
<li>In the '''Package''' field, enter the
following name:
+
name '''services'''.
 
+
 
services
 
services
 
 
<li>Verify that
 
<li>Verify that
 
'''Create as web (REST) service''' are unchecked, and leave the '''Implements
 
'''Create as web (REST) service''' are unchecked, and leave the '''Implements
Interfaces''' field empty.<br />[[Image:EDT_Tutorial_edt_richui_sql04_new_service.jpg|The New EGL Service Part window shows the service name and package.]]
+
Interfaces''' field empty.<br />[[Image:EDT_Tutorial_edt_richui_sql04_new_sql_service.jpg|The New EGL Service Part window shows the service name and package.]]
  
 
</ol>
 
</ol>
Line 46: Line 56:
 
<li>Remove the code from the file, leaving only the following
 
<li>Remove the code from the file, leaving only the following
 
lines, and save the file, but do not close it.
 
lines, and save the file, but do not close it.
</ol><code>
+
</ol>
 
   package services;
 
   package services;
 
    
 
    
Line 52: Line 62:
 
    
 
    
 
   end
 
   end
<code/>
+
== Lesson checkpoint ==
 +
 
 +
You learned how to create an EGL Service part.
 +
 
 +
In
 +
the next lesson, you add code for the functions to '''SQLService'''.
 +
 
 +
 
 +
''' Related reference '''<br>
 +
 
 +
* Help topic:  Services: a top-level overview<br />
 +
 
 +
 
 +
{| style="float: right"
 +
|[[EDT:Tutorial: RUI With DataBase Lesson 4|&lt; Previous]] | [[EDT:Tutorial: RUI With DataBase Lesson 6|Next >]]
 +
|}
 +
 
 +
 
 +
[[Category:EDT]]
  
 
== Lesson checkpoint ==
 
== Lesson checkpoint ==

Revision as of 11:38, 1 December 2011

Access a database with EGL Rich UI


< Previous | Next >

Contents

Lesson 5: Create the service

Create a dedicated service to access the database.

In this lesson, you create an EGL Service part, which is a generatable part. You must place each generatable part in a separate source file, and the name of the part must be the same as the name of the file.


Access a database with EGL Rich UI


< Previous | Next >

Lesson 5: Create the service

Create a dedicated service to access the database.

In this lesson, you create an EGL Service part, which is a generatable part. You must place each generatable part in a separate source file, and the name of the part must be the same as the name of the file.

Create a Service part

To create a Service part:

  1. In the Project Explorer window, right-click PaymentService, and then click New > Service.
  2. In the New EGL Service Part window, enter the following information:
    1. In the EGL source file name field, enter name SQLService. EGL adds the .egl file extension automatically.
    2. In the Package field, enter the name services. services
    3. Verify that Create as web (REST) service are unchecked, and leave the Implements Interfaces field empty.
      The New EGL Service Part window shows the service name and package.
  3. Click Finish. EGL opens the new Service part in the editor.
  4. Remove the code from the file, leaving only the following lines, and save the file, but do not close it.
  package services;
  
  service SQLService
  
  end

Lesson checkpoint

You learned how to create an EGL Service part.

In the next lesson, you add code for the functions to SQLService.


Related reference

  • Help topic: Services: a top-level overview


< Previous | Next >

Lesson checkpoint

You learned how to create an EGL Service part.

In the next lesson, you add code for the functions to SQLService.


Related reference

[../../com.ibm.egl.pg.doc/topics/pegl_core_service_part_cpt.html Services: a top-level overview]


< Previous | Next >