Jump to: navigation, search

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

(New page: Access a database with EGL Rich UI {| style="float: right" |< Previous | [[EDT:Tutor...)
 
(Create a Service type)
 
(9 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 
 
[[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 6: Line 5:
 
|[[EDT:Tutorial: RUI With DataBase Lesson 4|&lt; Previous]] | [[EDT:Tutorial: RUI With DataBase Lesson 6|Next >]]
 
|[[EDT:Tutorial: RUI With DataBase Lesson 4|&lt; Previous]] | [[EDT:Tutorial: RUI With DataBase Lesson 6|Next >]]
 
|}
 
|}
= Lesson 5: Create the service =
+
= Lesson 5: Create the service =
  
Create a dedicated service to access the database.
+
Create a dedicated service to access the database.  
  
In this lesson, you create an EGL Service part, which
+
In this lesson, you create an EGL Service type, which is a&nbsp;main type. You must place each&nbsp;main type in a separate source file, and the name of the type must be the same as the name of the file.  
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 ==
+
== Create a Service&nbsp;type  ==
  
To create a Service part:
+
To create a Service type:  
  
 +
#In the Project Explorer window, right-click '''PaymentService''', and then click '''New''' &gt; '''Service'''.
 +
#In the New EGL Service&nbsp;window, enter the following information:
 +
##In the '''EGL source file name''' field, enter name '''SQLService'''. EGL adds the .egl file extension automatically.
 +
##In the '''Package''' field, enter the name '''services'''. Click '''Next'''.
 +
##Verify that '''Create as web (EGL REST-RPC) service''' is unchecked, and leave the '''Interfaces to implement''' field empty.<br>[[Image:RUIAccessDB Lesson5 1.png]]
 +
#Click '''Finish'''. EGL opens the new Service&nbsp;type in the editor.
 +
#Remove the code from the file, leaving only the following lines, and save the file, but do not close it.
  
<ol><li>In the Project Explorer window, right-click '''PaymentService''',
+
  package services;
and then click '''New''' &gt; '''Service'''.
+
<li>In the New EGL Service Part window,
+
service SQLService
enter the following information:
+
 +
end
  
<ol><li>In the '''EGL source file name''' field,
+
== Lesson checkpoint  ==
enter the following name:
+
  
SQLService
+
You learned how to create an EGL Service type.  
EGL
+
adds the .egl file extension automatically.
+
<li>In the '''Package''' field, enter the
+
following name:
+
  
services
+
In the next lesson, you add code for the functions to '''SQLService'''.
  
<li>Verify that '''Create as web (SOAP) service''' and '''Create
+
<br>'''Related reference '''<br>
as web (REST) service''' are cleared, and leave the '''Implements
+
Interfaces''' field empty. [[Image:EDT_Tutorial_edt_richui_sql04_new_service.jpg|The New EGL Service Part window shows the service name and package.]]
+
  
</ol>
+
*Help topic: Services: a top-level overview<br>
  
<li>Click '''Finish'''. EGL
+
<br>
opens the new Service part in the editor.
+
<li>Remove the code from the file, leaving only the following
+
lines:
+
  
package services;
+
{| style="float: right" class="FCK__ShowTableBorders"
 
+
|-
service SQLService
+
| [[EDT:Tutorial: RUI With DataBase Lesson 4|&lt; Previous]] &#124; [[EDT:Tutorial: RUI With DataBase Lesson 6|Next &gt;]]
 
+
end
+
 
+
<li>Save the file, but do not close it.
+
</ol>
+
 
+
== Lesson checkpoint ==
+
 
+
You learned how to create an EGL Service part.
+
 
+
In
+
the next lesson, you add code for the functions to <tt>SQLService</tt>.
+
 
+
 
+
''' Related reference '''<br>
+
 
+
[../../com.ibm.egl.pg.doc/topics/pegl_core_service_part_cpt.html Services: a top-level overview]
+
 
+
 
+
{| style="float: right"
+
|[[EDT:Tutorial: RUI With DataBase Lesson 4|&lt; Previous]] | [[EDT:Tutorial: RUI With DataBase Lesson 6|Next >]]
+
 
|}
 
|}
 
  
 
[[Category:EDT]]
 
[[Category:EDT]]

Latest revision as of 02:32, 27 December 2012

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 type, which is a main type. You must place each main type in a separate source file, and the name of the type must be the same as the name of the file.

Create a Service type

To create a Service type:

  1. In the Project Explorer window, right-click PaymentService, and then click New > Service.
  2. In the New EGL Service 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. Click Next.
    3. Verify that Create as web (EGL REST-RPC) service is unchecked, and leave the Interfaces to implement field empty.
      RUIAccessDB Lesson5 1.png
  3. Click Finish. EGL opens the new Service type 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 type.

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


Related reference

  • Help topic: Services: a top-level overview


< Previous | Next >