apex basics-for beginners

19
© 2012 FCS a TEKsystems Global Services® Division – Confidential APEX Defined Major Components Getting Started (Terminology and Details) Building applications with APEX APEX Security How to access EBS tables in APEX APEX Application Items. Few Sample Applications from my Project Informative Sites/Links.

Upload: hrakhra

Post on 02-Feb-2015

6.622 views

Category:

Business


0 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Apex basics-for Beginners

© 2012 FCS a TEKsystems Global Services® Division – Confidential

• APEX Defined• Major Components• Getting Started (Terminology and Details)• Building applications with APEX• APEX Security• How to access EBS tables in APEX• APEX Application Items.• Few Sample Applications from my Project• Informative Sites/Links.

Page 2: Apex basics-for Beginners

© 2012 FCS a TEKsystems Global Services® Division – Confidential

What is APEX?• Formerly called HTML-DB, a web-based RAD

tool which resides in Oracle database.• Using browser based user interface and

limited programming experience, you can build a complete data-centric web application in a very fast development cycle

• Leverages full Oracle d/b capabilities and existing SQL & PL/SQL skills.

• Fully supported, “no-cost” option with Oracle Database.

Easy to Develop…Easy to Deploy…Easy to Manage

Page 3: Apex basics-for Beginners

© 2012 FCS a TEKsystems Global Services® Division – Confidential

Major Components

• Administration

• SQL Workshop

• Application Builder

Page 4: Apex basics-for Beginners

© 2012 FCS a TEKsystems Global Services® Division – Confidential

Major Components

• SQL Workshop• Interact with your

database as with SQL*Plus, but visual

• Data dictionary and object browsing, query by example

• Administration• Manage users• Manage services• Monitor activity

• Application Builder• 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

Page 5: Apex basics-for Beginners

© 2012 FCS a TEKsystems Global Services® Division – Confidential

Getting Started

• Apply for a free account at apex.oracle.com• Obtain a workspace: A workspace is a logical

work area which is associated with one or more Oracle database schemas.

• Create Application: It is a collection of pages and branches connecting them.

• Pages: Each page definition represents an HTML page that will be displayed to the application’s users.

• Region: Content is displayed in regions, which are logical subsections of a page.

• Item: An item can be a text field, text area, password, select list, check box, and so on

Page 6: Apex basics-for Beginners

© 2012 FCS a TEKsystems Global Services® Division – Confidential

• ApplicationsA workspace can contain one or more Applications. An application is comprised of a set of pages and a number of shared components which may be used by one or more of the pages. These Applications are basically we call – APEX Forms.

• Pages The definition of a page comprises three main areas: • Page Rendering • Page Processing • Shared Components

Getting Started (Details)

Page 7: Apex basics-for Beginners

© 2012 FCS a TEKsystems Global Services® Division – Confidential

A page is the basic building block of an application. When you build an application in Application Builder, you create pages that contain user interface elements, such as tabs, lists, buttons, items, and regions.

Pages

Page 8: Apex basics-for Beginners

© 2012 FCS a TEKsystems Global Services® Division – Confidential

Regions

Content is displayed in regions, which are logical subsections of a page. Each page can have any number of regions of several different types. These types include: HTML text, SQL Queries, PL/SQL-generated HTML, and charts. Each region is rendered using a region template. Regions are positioned on the page using display points defined in the page template.

The region defines the location and appearance of items and buttons on the page. You can add a new region to an existing page.

Page 9: Apex basics-for Beginners

© 2012 FCS a TEKsystems Global Services® Division – Confidential

• Items are basic building blocks of a page. They are variety of item types to choose from such as check box, text box, radio button, display item, hidden item, etc.

• You can modify existing items, or create new items from the Page Rendering section of the Page Definition screen.

• Computations and Processes can have PL/SQL block for assigning values to items in the page. You can also specify at what point the logic should be executed like On Page Load, Before header. These are like triggers in Forms 6i.

• Page validations allow the contents of a page to be checked against a set of business rules before the page is submitted.

• Validation can be defined at page level, or can be associated with a particular item.

Items and Validations/Computations/Processes

Page 10: Apex basics-for Beginners

© 2012 FCS a TEKsystems Global Services® Division – Confidential

Gist of Discussion so far

Page 11: Apex basics-for Beginners

© 2012 FCS a TEKsystems Global Services® Division – Confidential

• Get started with the sample application provided with APEX.

• Create your own (basic) application.

Sample Applications

Page 12: Apex basics-for Beginners

© 2012 FCS a TEKsystems Global Services® Division – Confidential

• Websheet applications are interactive Web pages that combine text with data.

• Websheets can contain multiple pages. Many Websheets include dynamically generated navigation sections. Each navigation section includes a hierarchical tree that enables you to navigate between pages or page sections.

• You create a Websheet application by running the Create Application wizard. After you create a Websheet page, you add content either as text or data.

Websheet Applications

Page 13: Apex basics-for Beginners

© 2012 FCS a TEKsystems Global Services® Division – Confidential

How to access EBS Tables in APEX

Please note free APEX hosting site (apex.oracle.com) can not be used to connect to your servers. 

Is APEX installed on the same database server as Oracle EBS? Grant Privileges on the Table to APEX Schema

Is APEX installed on different database server say Reporting/Business Intelligence (BI) database which is clone of Oracle EBS database? Create a database link in APEX database to EBS database. Once database link is created, you can refer to a table or view on the other database by appending @dblink to the table or view name. CREATE PUBLIC DATABASE LINK <dblink Name> CONNECT TO < APEX Schema> IDENTIFIED BY <PWD> USING <EBS database server>; Once database link is created, you can refer to a table or view on the

other database by appending @dblink to the table or view name. Grant Privileges on the Table to APEX Schema

Page 14: Apex basics-for Beginners

© 2012 FCS a TEKsystems Global Services® Division – Confidential

APEX Application Security

Oracle Application Express (APEX) has many built in security features like Authentication, Authorization i.e. access level of

the user, session state protection etc.  APEX Authentication Schemes are created/managed in Shared

Components > Authenication Schemes APEX comes with Preconfigured authentication schemes. Either

you can use them OR you can create custom authentication scheme from scratch.

Page 15: Apex basics-for Beginners

© 2012 FCS a TEKsystems Global Services® Division – Confidential

Application Items

Page Items: Page items are placed on a page and have associated user interface properties, such as Display As, Label and Label Template.

Application Items: Application items are not associated with a page and therefore have no user interface properties. You can use an application item as a global variable.

Navigation: Application Id Shared Components Application Items

Page 16: Apex basics-for Beginners

© 2012 FCS a TEKsystems Global Services® Division – Confidential

Deploying APEX Application from one instance to another

Exporting an APEX Application Importing an APEX ApplicationDeploying of an APEX application could be done either through front end (APEX) or through SQL command line.

Page 17: Apex basics-for Beginners

© 2012 FCS a TEKsystems Global Services® Division – Confidential

Advanced Feature of APEX (Collections)

Collections enable you to temporarily capture one or more nonscalar values. You can use collections to store rows and columns currently in session state so they can be accessed, manipulated, or processed during a user's specific session. You can think of a collection as a bucket in which you temporarily store and name rows of information.

Every collection contains a named list of data elements (or members) which can have up to 50 character attributes (VARCHAR2(4000)), five number attributes, five date attributes, one XML Type attribute, one large binary attribute (BLOB), and one large character attribute (CLOB). You insert, update, and delete collection information using the PL/SQL API APEX_COLLECTION.

When you create a collection, you must give it a name that cannot exceed 255 characters. Note that collection names are not case-sensitive and will be converted to uppercase.

Once the collection is named, you can access the values in the collection by running a SQL query against the view APEX_COLLECTIONS.

Page 18: Apex basics-for Beginners

© 2012 FCS a TEKsystems Global Services® Division – Confidential

APEX Collections Contd…

Creating a Collection: The following methods could be used to create a collection

CREATE_COLLECTION: This method creates an empty collection with the provided name. An exception is raised if the named collection exists.

CREATE_OR_TRUNCATE_COLLECTION: If the provided named collection does not exist, this method creates an empty collection with the given name. If the named collection exists, this method truncates it. Truncating a collection empties it, but leaves it in place.

CREATE_COLLECTION_FROM_QUERY: This method creates a collection and then populates it with the results of a specified query. An exception is raised if the named collection exists. This method can be used with a query with up to 50 columns in the SELECT clause. These columns in the SELECT clause will populate the 50 character attributes of the collection (C001 through C050).

Accessing a Collection : You can access the members of a collection by querying the database view APEX_COLLECTIONS. The APEX_COLLECTIONS view has the following definition:

Page 19: Apex basics-for Beginners

© 2012 FCS a TEKsystems Global Services® Division – Confidential

APEX Collections Contd…

COLLECTION_NAME NOT NULL VARCHAR2(255)SEQ_ID NOT NULL NUMBER C001 VARCHAR2(4000)C002 VARCHAR2(4000)C003 VARCHAR2(4000) C004 VARCHAR2(4000) C005 VARCHAR2(4000) ...................C050 VARCHAR2(4000)N001 NUMBERN002 NUMBERN003 NUMBERN004 NUMBERN005 NUMBER CLOB001 CLOBBLOB001 BLOB XMLTYPE001 XMLTYPEMD5_ORIGINAL VARCHAR2(4000) ;

SELECT c001, c002, c003, n001, clob001 FROM APEX_collections WHERE collection_name = <Collection Name>