Upload
abhinaw-kumar
View
387
Download
2
Tags:
Embed Size (px)
Citation preview
(Oracle APEX)
Contents Module1: Introduction Oracle APEX
Introduction of Oracle APEX
Advantages
History Module2: Architecture
Oracle Application Express Architecture
Module 3: Browser Based application development APEX hierarchical menu structure Application Builder SQL Workshop
Team Development
Administrator Module 4: Benefits of Oracle APEX
Use Cases
Out of Box Advantages
Mobile Support Module 5: Demo Application
Database Design
ER Diagram
Contents
Module6: SQL Workshop Navigate to the Object Browser Defining the table and column
Defining the primary key
Constraint definition step
Review the create table
Module 7:Loading Data with the Data Workshop Utility Preparing to copy and paste the spreadsheet data and load it into
the existing TICKETS table Application Builder Creating a Lookup Table
Module 8: Application And Navigation Choosing the type of application
Naming the application
Selecting theme
Module 9: Forms and Reports: Basics Entering the schema and table name Specifying page region
Specifying buttons.
Complete first application
Introduction
Oracle Apex: Oracle Application Express is a rapid Web application development tool that lets you share data and create applications. Using only a Web browser and limited programming experience, you can develop and deploy applications that are fast and secure.
APEX is a 100% browser-based rapid application development (RAD) tool that helps you to create rich interactive interactive Oracle-based web applications very quickly and with relatively little programming effort.
Advantages of Oracle APEX
Fast growing technology Web-based Developers familiar with PL/SQL can use the same skill set when developing
Apex applications Easy to create mock-ups Easy to deploy (end user opens a URL to access an APEX application) Scalable (can be deployed to laptops, stand-alone servers, or Oracle RAC
installations) Server-side processing and validations Strong and supportive user community (especially Oracle APEX forum) Basic support for group development Free hosting of demo applications provided by Oracle Apex applications can run on the free Oracle Express Edition (XE) database Individual components of an application can be retrieved or identified using
SQL
HTML DB 1.5 First Release
HTML DB 1.6 Themes
2004 2007 2012
Application Express 2.1 Oracle XE
Application Express 2.2 Packaged Applications
Application Express 3.1 Interactive Reports
HTML DB 2.0 SQL Workshop
Application Express 3.0 Flash Charts
PDF Printing
Access Migration
Application Express 3.2 Oracle Forms to APEX
Conversion
Application Express 4.1 Data Upload
Error Handling
ROWID
2006 2009 201120082005
Application Express 4.2 Mobile
HTML5
Packaged Apps
Application Express 4.0 Websheets
Dynamic Actions
Plug-Ins
Team Development
2010
History
Architecture of Oracle APEX
Architecture Oracle Application Express consists of
--A metadata repository that stores the definitions of applications and--An engine (called the Application Express engine) that renders andprocesses pages.
It lives completely within your Oracle database.It is comprised of nothing more than data in tables and large amounts of PL/SQL code.The essence of Oracle Application Express is approximately 425 tables and 230 PL/SQL packages containing 425,000+ lines of code.
Browser Based application development
APEX hierarchical menu structure
Application Builder
The Application Builder is where you create and modify applications and pages, and it’s where you’ll probably spend most of your time.
Centerpiece of APEX Loaded with wizards Reports, forms and charts Connect pages using branches 75 pre-defined widgets Basic HTML, pop-up lists, calendars, etc. Full data entry validation
SQL Workshop
The SQL Workshop is where you deal directly with the underlying database objects and their related data. Think of it as a web-based version of SQL*PLUS with some GUI goodness thrown in to make things easier.
- Object Browser to review and maintain DB Objects
- SQL Commands to run SQL
- SQL Scripts to upload and execute script files
- Utilities include Query Builder, Data Workshop, Generate DDL, Schema Comparison and more
- RESTful Services to define Web Services using SQL and PL/SQL against the database
Team Development
Team Development is the section that lets you enter and track information related to the development of APEX applications.
Team Development allows development teams to better manage their APEX projects by defining milestones, features, to-dos and bugs
Features, to-dos and bugs can be associated with specific applications and pages as necessary
Developers can readily configure feedback to allow their end-users to provide comments on applications.
The feedback also captures relevant session state details and can be readily converted to a feature, to-do or bug.
Administrator
Workspace Administrators can administer their workspace and use the various reports to monitor activity
Manage Service allows them to request more space or access to another schema
Manage Users and Groups allows them to define developers and end-users
Benefits of Oracle APEX
Runs within Database Self Service Provisioning
Leverage SQL SkillsRapid Browser Based Development
Point your browser and start developing Build reports and charts using SQL
Out-of-the-box elastic private cloud serviceSimple to manage, highly scalable
Use Cases
Data-driven ApplicationsDevelop opportunistic and departmental productivity applications
Online ReportingBuild SQL-based reporting applications on existing database schemas
Access ReplacementConsolidate outgrown Access applications to the Oracle database with an APEX Web front end
Spreadsheet Web-ificationConvert spreadsheets to Web applications where they can be concurrently viewed and edited
Oracle Forms ModernizationLeverage SQL & PL/SQL declarative programming skills to move Forms applications to HTML / Web 2.0
Out of Box Development Features
Reports
Forms
Charts
Calendar
Templates
Navigation
Validations
Processes
Computations
Branches
Web Services
Email Services
Translation Services
Conditional Processing
Authentication
Authorization
Session State Management
Logging & Monitoring
Mobile Support
Declarative support for building mobile web applications
APEX Applications support multiple user interfaces: e.g. Desktop and Smartphone
Mobile pages use jQuery Mobile through jQuery Mobile based themes and templates
HTML5 charts and new HTML5 item types
By using APEX we can develop Web as well as
Hybrid Applications in Android , iOS and Windows .
Demo Application Scenario:
we want to make a web application of “Help Desk” using Oracle APEX.
Database Design
We have to make 2 tables:
1.Ticket
2. Ticket Details.
Database Design
SQL Workshop
Navigate to the Object Browser
1. Log into your APEX workspace. You’re presented with the workspace’s Home page.2. Using the tabbed navigation bar across the top of the Home page, pull down theSQL Workshop submenu by clicking the arrow on the right side of the tab.
Defining the tables and column
3. Click the Object Browser option.
4. In the Object Browser, click the Create button in the upper-right corner and select Table from the drop-down menu.
5.Enter the details for the TICKETS table. Then click Next.
Defining the table’s primary key
6. Select the Populated from a new sequence radio button. After the screen changes, select TICKET_ID (NUMBER) for the primary key. Click Next.
7. You’re not going to create any foreign keys in this table just yet, so leave the defaults and click Next.
The Constraints definition step
8. We’re not going to create any Unique or Check constraints here, so stick with the defaults and click Next.
Review the Create Table Wizard’s SQL
Review the text in the SQL region presented by the Create Table Wizard. Click Create Table to complete the wizard.
TICKET_DETAILS(only screenshots)
Now follow the same steps for TICKET_DETAILS table.
Loading Data with the Data Workshop Utility
1. Go to SQL Workshop->Utilities->Data Workshop
Preparing to copy and paste the spreadsheet data and load it into the existing TICKETS table
1.Locate the helpdesk_spreadsheet.xls file where you downloaded the supporting files forthis book, and open it with Microsoft Excel. Navigate to the TICKETS tab. Notice that youhave a row for each ticket and a header row that contains the column headings for each ofthe columns.2. Select all the data, including the column headings, and copy it to the clipboard. Becautious not to accidentally select any rows that don’t have data in them, because that maycause phantom rows or errors in the Data Load Wizard.3. Switch back to your web browser, and, using the pull-down menu on the SQL Workshoptab, select Data Workshop.4. In the Data Load region, click Spreadsheet Data. You should see the Load Data
dialogshown in Figure
Cont..5. In the wizard, select Existing table for Load To and Copy
and paste for Load From, and click Next.
6. Select your “parse as” Schema from the Schema select list. This is the same schema in which you created your tables in the Object Browser.
7. Select TICKETS for the Table Name, as shown in Figure, and click Next. This is the table into which you’ll load the TICKETS data.
Pasting the spreadsheet data into the Data text box8. Paste the data that you copied to the clipboard in step 2 into the
Data text area, and ensure that First row contains column names box is checked, as shown in Figure. Click Next.
9. When you’re sure all the mappings are correct, click the Load Data button to load the data into the TICKETS table.
Preparing to copy and paste the spreadsheet data and load it into the existing TICKETS table
Follow the previous steps and load data into TICKETS_DETAILS table..
Creating a Lookup Table1. Navigate to the Object Browser, and select the TICKETS
table in the Object List on the left side of the screen. You should see results similar to those shown in Figure
Clicking the Create Lookup Table button starts the Create Lookup Table Wizard
2. Make sure the Table tab is selected.
3. Below the tab bar is a set of button-like links. Click the Create Lookup Table button, as shown by the mouse arrow in Figure; it starts the Create Lookup Table Wizard.
Selecting the STATUS column as the source of your lookup table
4. Select STATUS as the column from which you want to create the lookup table, and
click Next.
5. On this screen you can name your lookup table and the sequence that is related to it. APEX
has chosen a reasonable name for the new table and sequence, so take the defaults and
click Next.
6. The final screen of the wizard provides you with information about the
choices made and the action that is about to be performed. It’s easy to miss the SQL syntax
link just below the wizard region. Click the SQL link to show the SQL.
Clicking the SQL syntax link shows the SQL about to be executed
6. The final screen of the wizard (Figure 4-18) provides you with information about the choices made and the action that is about to be performed. It’s easy to miss the SQL syntax link just below the wizard region. Click the SQL link to show the SQL.
Applications and Navigation
Application Builder
Choosing the type of application
Here we will deal with Database type of Application
Database Applications from Scratch
1. Navigate to the Application Builder, and click the Create button to initiate the Create
Application Wizard.
2. Select Database as the application type, and click Next.
Naming the Application
3. Enter Help Desk for the Name, make sure your Schema is set correctly, select Include Home Page for Create Options, set User Interface to Desktop, and then click Next
Multiple pages defined in the Create Application Wizard
4. An application home page has already been created. Accept the defaults on this page, and click Next.
The Attributes page of the Create Application Wizard
6. Set Authentication Scheme to Application Express, Tabs to One Level of Tabs, Language to English (en), and User Language Preference Derived From to Application Primary Language.
7. Choose DD-MON-YYYY for Date Format and DD-MON-YYYY HH:MI:SS for Date Time. Format, and leave the last two options blank.
8. Click Next.
Selecting a Theme
9. Select Standard Themes from the Show select list, and then choose Scarlet (Theme 21) as the theme for your application.
10. Click Next.
Completing the Create Application Wizard
11. Review the wizard’s summary page, and confirm the choices you’ve made by clicking
Create Application.
Completion of a Page
First Page completed….!!!
Run the Application
Forms and Reports—The Basics
Entering the schema and table name1. Run your Help Desk application.
2. Click Create in the Developer toolbar at the bottom of the screen.
3. Select New Page, and click Next.
4. Select Form, and click Next.
5. Select Form on a Table or View, and click Next.
6. Set Table/View Owner to your schema, and select TICKETS (table) for Table/View Name, as shown in Figure . Click Next.
Specifying page, region, and breadcrumb information
7. Enter 2 for Page Number, as shown in Figure. Enter Create a Ticket for both Page Name and Region Title. Set Breadcrumb to Breadcrumb. When the page refreshes, click Home (under Select Parent Entry) to set it as the Parent Entry, and click Next.
Specifying tab options
8. For Tab Options , select Use an existing tab set and reuse an existing tab within that tab set. When the page refreshes, set Tab Set to TS1 (Home), set Use Tab to T_HOME, and then click Next.
Selecting the columns to include
Which column to be included in application.
Specifying the buttons to display
12. Enter Cancel for Cancel Button Label and Create a Ticket for Create Button Label. Set Show Save Button and Show Delete Button to No, as shown in Figure, and click Next.
Specifying processing for submit and cancel
13. Set both After Page Submit and Processing Branch to Page and When Cancel Button Pressed Branch to This Page to 1, and click Next. See Figure
14. Click Create to complete the wizard.15. Run your application.
We’ve just created a fully operational form on the TICKETS table
Screen Shot of Application
Thank You