Tuesday, December 24, 2013

Oracle APEX - Oracle Application Express





Oracle APEX - Oracle Application Express


Oracle APEX: It is formerly called HTML-DB, a web-based Rapid Application Database tool which resides in Oracle database. We can develop web based browser interface application with very minimal programming skill set (PL/SQL, HTML, CSS and JavaScript) in a very fast development cycle with only a browser and access to an Oracle database running Application Express.

If you are running on oracle database and you want to build rich web application with reports, forms, charts, drill downs and dashboards with limited Java experienced developers in a short time frame, Oracle APEX is the most likely candidate for consideration.

APEX works with only Oracle databases.

APEX Architecture
APEX (v4.2) is installed on Oracle database (above 9.2), starting from Oracle 11g it comes pre-installed with the database. It is comprised of Meta data in tables, PL/SQL code and extensive JavaScript APIs.

The URL request from the browser is translated into appropriate APEX PL/SQL call by either Oracle HTTP Server (Apache) with mod_plsql plugin or Embedded PL/SQL Gateway. This varies by the type of APEX installation on oracle database. After the data is processed, results are relayed back to browser as HTML. This cycle happens each time user request or submits a page. The application session state is maintained in database tables.

APEX installation can be done in two ways. DBAs are more concerned about it than developers. But this determines how the URL is translated. APEX embeds business logic and presentation together in oracle database. APEX is fast growing platform for RAD. APEX doesn't replace OAF/ADF (as it’s not following MVC architecture for secured application), it's highly productive, wizard driven development and deployment and easy to use navigation cannot go unnoticed.











Advantages of APEX:


1. Builds smart web applications that are both fast and secure.
2. Runs on and resides in Oracle database. APEX framework and META data are stored in Oracle   tables.
3. It is FREE. No licensing required.
4. Fast learning curve for developers to build application.
5. Deployment of application is as simple as 'Export and Import' if hard coded references of values that change between environments are avoided.
6. Lot of scope for customization of application look and feel.
7. It can be configured to use Oracle SSO and EBS FND user repository.
 

Oracle HTTP Server: In this three-tier configuration, mod_plsql in Oracle HTTP Server acts in between client web browser and server database.

For each URL that is processed, mod_plsql either uses a database session from its connection pool, or creates a new session on the fly and pools it. For mod_plsql to invoke the appropriate database PL/SQL procedure in a URL-processing session, you must first configure a virtual path and associate that path with a Database Access Descriptor (DAD).

A DAD is a named set of configuration values that specify the information necessary to create a session for a specific database and a specific database user/password. This includes the database service name and the Globalization Support setting (for example, language) for the session.


Embedded PL/SQL Gateway: This is a classic client-server architecture where embedded PL/SQL gateway provides the Oracle database with a Web server and also the necessary infrastructure to create dynamic applications. The embedded PL/SQL gateway runs in the XML DB HTTP server in the Oracle database and includes the core features of mod_plsql, but does not require the Oracle HTTP Server powered by Apache. Inclusion of the embedded PL/SQL gateway simplifies the architecture and eliminates the middle tier entirely. Oracle HTTP Server is known and proven technology; it has been used for Self Service applications.


apex.oracle.com allows anyone to request for  free APEX account to build applications or run packaged applications. Follow the below steps for creating account in apex.oracle.com

Go to apex.oracle.com and click 'sign up for account' link below Login button.


1.Fill administrator information. This user will have all rights to create new users and manage their accounts.

2.Enter workspace name (For Ex: XX-APEX). Workspace is dedicated area where you develop applications. A workspace is attached to one or more database schemas. In a typical development environment, you might create a single workspace for all your developers to share.

3.Enter name of database schema and its space allocation.
4.Fill justification and complete by confirming the request.
5.You will receive an email once the request is approved. Oracle administrator do great job to approve your request as soon as they can. 
6.After clicking on approval link, you get another email with userid/password.
7.Then you are set on login on apex.oracle.com  and run sample application under Application Builder.

Creating a Form in APEX: 
Select the EMP and DEPT tables along with primary key and sequences.













Login to oracle apex


Select the database schema










Click the edit page button on above screen to get below screen for adding region.




Select master detail form in above screen and specify the master table I.e. DEPT in below screen.


Specify the detail table I.e.EMP in below screen.


Primary key details 











Click the edit in above master region then it will show below detail block.
It's easy to add/delete/update with APEX forms.



Creating a Report in APEX: 







Select the create page button in below screen.





Select the report in below screen.




Select the classic report in below screen.













Select the query builder button in above screen and select dept table and click run







  
Click return in above screen to get below screen.



Enter link label in below screen to get excel output.
I.e. DL to excel



 Click run page to run the report.






1 comment:

Unknown said...

Hi UMA garu. This is Nagamani, Hope you are doing well and good

When you are free, Can you please call me at 96142501. Thanks

Best Regards
Mani