Presentation is loading. Please wait.

Presentation is loading. Please wait.

Developer 2000 CSE 4504/6504 Lab.

Similar presentations


Presentation on theme: "Developer 2000 CSE 4504/6504 Lab."— Presentation transcript:

1 Developer 2000 CSE 4504/6504 Lab

2 Developer 2000 A group of tools for developing Client/Server application. Two important tools: Form Builder -- For designing data entry forms. Report Builder -- For designing reports. Developer/2000 provides a common method of developing client/server and web-deployed applications using the same tools. Developer 2000 reduces overall development costs and make you develop the application more easily.

3 How to run the tools in ra?
Enter swsetup oradev to add the Oracle 8.0 developer 2000 design tools to your path f60desm to start the Form Builder f60runm to run the executable form file Use x-term to connect to ra. X-win32 O-net

4 What is Form Builder? Form is a window the user interacts with.
Form Builder is a tool that can do most of the development without a great deal of coding.

5 Main Components in Form Builder
Object Navigator Property palette Layout editor PL/SQL editor

6 Object Navigator In Developer 6.0, a form, report or graphic is generally referred to as a Module. This screen is called the Object Navigator and displays all of the form elements, data blocks, menu items, user defined code libraries, built in procedures and functions, and database objects (tables, views). The display is in the form of a collapsible tree. In general, clicking on a + will expand the current item to show its details. Clicking on a - will collapse the current list details. Forms - Contains form objects and all of their sub-objects such as data blocks, triggers, alerts, canvases, program units (procedures and functions), parameters and windows. More than one form can be open at a time. Menus - Contains menu objects and all of their sub-objects such as menu items, parameters and program units. More than one menu can be open at a time. PL/SQL Libraries - These are libraries of PL/SQL code (stored either in the database or in .plb files). Libraries can be shared among different forms and among different developers. Object Libraries - These are libraries containing a collection of objects (anything that can appear on a form). Built-in Packages - Lists all of the packages (PL/SQL procedures) available by default to all forms, reports, etc. Database Objects - Lists all of the database objects (Tables, Views, PL/SQL Libraries, and Stored Program Units) in the user's Oracle database schema.

7 Layout Editor To design the outlook of the interface.
The Layout editor is where you design the look and feel of your canvases or screens; this is what the client or user is going to interact with. If the layout of a canvas (screen) is pleasing to the eye, you are halfway there. While working with canvas views, you can control the application's color, size, font, data access, and style. The Layout editor is fully WYS/WYG. This is where you place all of the objects for the particular screen that is being developed.

8 Property Palette Click the control component and press mouse right key, then select the option ‘Property Palette’. the Property palette is used to set object attributes or characteristics. The nature of the characteristics you define using a Property palette depends on what type of object is being designed. You can set the property of objects and achieve a lot of different looks.

9 PL/SQL Editor PL/SQL Editor is where all PL/SQL code can be added, modified, removed, and compiled. The PL/SQL editor is where all PL/SQL code can be added, modified, removed, and compiled. This is where all of the form's triggers and procedures are edited and compiled. It is also where database procedures can be accessed, modified, and compiled. The PL/SQL editor is accessed by selecting the PL/SQL Editor menu option under the Program menu in the Form Builder console.

10 Log into Database Put your user name and password (same as sqlplus), and click connect.

11 Create a single block form
In general, a Data Block on a form corresponds to a table or a view in the database. This is called the Base Table for the data block. A canvas is the place to show the data in data block. Create a module named “orders”.

12 Step 1 create a data block for table department
1.In the Module you want to add a block, right click on the Data blocks, select Data Block wizard in the popup menu. 2.select a table from database and add all columns

13 Step 2 create Layout for data block department
1.In menu Tools click the Layout wizard 2.The layout for a data block may be placed on any existing canvas. In this case, there are no canvases so the only option available is to create a new canvas. 3.select the data block and add all columns 4.select style There are two main styles for forms. A Tabular layout arranges the field labels across the top of the form with a number of records below as in a spreadsheet. A Form layout places the field labels to the left of the fields. Generally only one record is displayed at a time. 5.select the title and the num of record showed at the same time.

14 Step 3 run the form In menu program click run form, a execution window will pop up. In the menu bar “Query”, click on “enter query”, then click on “execute query”, the data requested will be displayed in the blocks.

15 Step 4 Do a simple query on a condition
Change the property of data block ORDERS to do a simple query Right click on data block ORDERS Select property palette Change where property to ORDERDATE > ’01-AUG-2000’ Run the form again to see the changes

16 Smart Trigger “when-new-form-instance” In the PL/SQL editor:
execute_query; The query will be automatically executed when the form runs.

17 Create a Master-Detail Form
The Master-Detail relationship is a common relationship between entities. In an Entity-Relationship diagram, these are shown as "One to Many" relationships. In a physical database design, a single Master record references one or more detail records in another table. A record in the detail table will relate to exactly one master record in the master table. It is based on a single data block created before.

18 Create a Master-Detail Form (cont.)
Step1 create a master data block for ORDERS Create a single block form whose data block is associated with master table Step 2 create the layout for data block ORDERS Same as before

19 Create a Master-Detail Form (cont.)
Step 3 create a detail data block for ORDERS Use data block wizard to create the relationship De-select the Auto-join data blocks option Arrange the Detail Item (ORDERID) and Master Item (ORDERID) as that the join condition becomes: ORDER_ITEM.ORDERID =ORDER_.ORDERID

20 Create a Master-Detail Form (cont.)

21 Create a Master-Detail Form (cont.)
Step 4. create the layout for data block employee. Don’t create a new layout, select the layout for data block ORDERS. Others are the same.

22 Create a Menu Creating the menu module and menu items
Assigning commands to menu items Attaching a menu module to a form

23 Create a menu (cont.) Step 1 Creating a menu module and menu items Navigate down to the Menus subtree in the Object Navigator, pull down the Navigator menu and choose the Create “new menu” item Right click your module named as “MENU_TRY”, select menu editor, add three menu item: orders, customers, exit in the menu editor.

24 Create a menu (cont.) Step 2 Assigning commands to menu items
right click the menu item select PL/SQL editor Add in exit: EXIT_FORM; Add in orders: BEGIN run_product(forms,'orders',synchronous,runtime,filesystem,'',''); exit_form; END; Add in employee: run_product(forms,‘customer',synchronous,runtime,filesystem,'',''); Note : the module name (form file name) is case sensitive.

25 Create a menu (cont.) Step 3 Attach a menu module to a form
Before you use the menu, you must compile it. To compile the menu, highlight the module in file menu, select “administration” from menu “File” then select “compile file”. Menu module name is the file name of the menu. For example, MAIN_MENU.mmb In the property palette of the form “orders” (the form you want to attach the menu to), input your menu module name in menu_module property.

26 Summary Form Menu Source file .fmb .mmb Executable file .fmx .mmx


Download ppt "Developer 2000 CSE 4504/6504 Lab."

Similar presentations


Ads by Google