Saturday, February 20, 2010

Integrating Google Maps in an APEX Application

Here is how you can integrate Google Maps in an APEX Application.This video was created using the PDF document available at URL http://www.oracle.com/technology/products/database/application_express/pdf/Integrating_Application_Express_with_Google_Maps.pdf . Some of the codes were changed to make it work in the demonstrated scenario. This Google map was integrated in "Add/Modify Customers" page of Sample Application.

Tip
1. Click on play and select '720p' from the toolbar to view the video in high resolution
2. Click on icon  to view the video in full screen



These are the steps involved in integrating Google Maps in your APEX Application

1. Embedding Google Maps is accomplished using JavaScript to invoke the Google Maps API. So the first step is sign up for the Google Maps API Key, which is required to use the API in your application. You can sign up for API Key at URL http://code.google.com/apis/maps/signup.html
2. Create substitution string in your APEX application for the API Key
3. Edit the page where you want to show Google Maps. Add 3 items to the page that will store the location co-ordinates.
4. Create a process "Call Google Geocode Service" to get the location co-ordinates based on customer's address

DECLARE
   l_address   VARCHAR2(4000);
   l_url       VARCHAR2(32000);
   l_response  VARCHAR2(3200);
BEGIN 
   l_address := :P7_CUST_STREET_ADDRESS1 ;
   IF :P7_CUST_CITY IS NOT NULL THEN
      l_address := l_address || ',' || :P7_CUST_CITY ;
   END IF;
   IF :P7_CUST_STATE IS NOT NULL THEN
      l_address := l_address || ',' || :P7_CUST_STATE ;
   END IF;
   IF :P7_CUST_POSTAL_CODE IS NOT NULL THEN
      l_address := l_address || ',' || :P7_CUST_POSTAL_CODE ;
   END IF;  
   l_address := REPLACE(l_address,' ','+');
   l_url := 'http://maps.google.com/maps/geo?q='||l_address||'&'||'output=csv'||'&'||'key='||:API_KEY;
   l_response := UTL_HTTP.REQUEST(l_url, APEX_APPLICATION.G_PROXY_SERVER);
   :P7_RESPONSE  := l_response;
   :P7_LATITUDE  := SUBSTR(l_response,INSTR(l_response,',',1,2)+1,(INSTR(l_response,',',1,3)-INSTR(l_response,',',1,2))-1);
   :P7_LONGTITUDE := SUBSTR(l_response,INSTR(l_response,',',1,3)+1);
END;

5. Create a process to get the location co-ordinates based on customer's address
6. Add a region to the page to display map. Set the region source to following

<div id="map" style="width: 600px; height: 400px"></div>

7. Add JavaScript to the HTML Header attribute of the page

<script src="http://maps.google.com/maps?file=api&v=2&key=&API_KEY." type="text/javascript"></script>
<script type="text/javascript">
//<![CDATA[
//globals
var bounds = new GLatLngBounds();
function initMap() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
var title = "&P7_CUST_STREET_ADDRESS1.";
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
var point = new GLatLng($v('P7_LATITUDE'),$v('P7_LONGTITUDE'));
bounds.extend(point);
map.setCenter(point);
map.setZoom(map.getBoundsZoomLevel(bounds)-4);
var marker = new GMarker(point);
map.addOverlay(marker);
}
}
//]]>
</script>

8. Add the following onload event HTML Body Attribute of the page.

onload="initMap()" onunload="GUnload()"




Monday, February 15, 2010

How to build online help in an APEX Application

Providing online help in your applications makes it user friendly. Here is how you can build online help in the applications built on Oracle Application Express.

Tip
1. Click on play and select '720p' from the toolbar to view the video in high resolution
2. Click on icon  to view the video in full screen





Thursday, December 31, 2009

Oracle Certification Program ( OCP ) now available for Oracle Application Express

Now there is a certification exam available for Oracle Application Express. Called "Oracle Application Express Developer Certified Expert". Currently available as a beta exam, the price for the exam is US$ 50.



As per details on Oracle's website "As an Oracle Application Express Developer Certified Expert, you should have the skills necessary to develop and deploy your application from beginning to end. The skills that you will gain through your experience and preparing for the exam will also allow you to manage database objects using SQL Workshop, utilize and manage shared components, manage authentication, authorization, and session state within your application, as well as administer Application Express Workspaces."

Beta Exam code is 1Z1-450 and the certification that will be awarded is "Oracle Application Express Developer Certified Expert"


DBCON's live online training on "Developing Applications with Oracle Application Express" covers the entire curriculum of this certification program and provides an unmatched value for money to help you become a certified expert in Oracle APEX as a developer.




Sunday, December 20, 2009

Oracle APEX Version 4.0 Early Adapter Release is available now !

Oracle has released the early adapter version of APEX 4.0. As per details on Oracle's website

  • This Early Adopter is not production ready and some new features may contain bugs or incomplete functionality. 
  • Websheets is not yet available in the Early Adopter. 
  • Internet Explorer is not currently supported with the hosted APEX 4.0 Early Adopter. The preferred browser for this evaluation is Mozilla Firefox. Internet Explorer will be fully supported at a later date (before Production).
  • Online Help has not yet been updated and does not include any new features. An application describing all the new features will be available shortly.

To try out the new version of APEX 4.0 request for a workspace at http://tryapexnow.com






Tuesday, June 16, 2009

Announcing the launch of Live Online Training in "Administering Oracle Application Express"

DBCON announces the launch of its new course "Administering Oracle Application Express". Starting right from understanding what is Oracle Application Express to installation, up gradation, configuration, monitoring and management - learn all the essential skills to manage Oracle Application Express Instance in the most effective and efficient way.

For this training, all participants will have their own dedicated linux server (accessible over Internet through secured shell like Putty) where they will practise to install, upgrade, configure, manage & administer Oracle Application Express Instance.

DBCON's Live Online Training - Probably the best and most convenient way to learn Oracle Application Express. Anyone from anywhere in the world can attend this live online training. All you need is a PC and Internet connection. Complete course details, batches and schedule available at http://www.dbcon.com/courses.html




Saturday, May 02, 2009

First Oracle Application Express Workshop in Singapore

On Monday, 27th April 2009, Oracle Corporation Singapore organized the first ever Oracle Application Express workshop at its office in Singapore. DBCON assisted Oracle in organizing this workshop.

Despite the fact that Oracle Application Express is not yet popular in this part of the world, the response and the turnout in this workshop was very impressive. Out of a total of 49 people who signed up for the workshop, 29 participants turned up. And that too when the workshop was organized on a weekday (Monday) and after office hours (6:30 - 9:30 PM).

Pizzas, sandwiches, tea & coffee set the right environment to start the workshop after day's work at office.

Blair Layton from Oracle started with 45 minutes presentation on Oracle Application Express in which he introduced Oracle Application Express, discussed the architecture and covered some of the security aspects. Blair also demonstrated how to create an application in Oracle APEX directly from a spreadsheet - without writing even a single line of code.

Oracle APEX Workshop in Singapore


This was followed by the two hands-on lab exercises from OBE (Oracle By Example) series so that participants could have a feel of creating applications in Oracle Application Express. In about an hour and a half, most of the participants had their first APEX application up and running. An impressive feat considering the fact that before the start of the workshop most of the participants had no idea about Oracle Application Express.

Oracle APEX Workshop in Singapore

Oracle APEX Workshop in Singapore

Oracle APEX Workshop in Singapore

Oracle APEX Workshop in Singapore

Oracle APEX Workshop in Singapore

Oracle APEX Workshop in Singapore

Oracle APEX Workshop in Singapore


Also for the very first time, the lab environment that was given to the participants was setup on Amazon AWS cloud. Oracle Application Express with Amazon AWS cloud is a deadly combination as you can have your application up and running literally in just a couple of hours which includes setting up hardware, operating system, database & creating a fully functional application.

The workshop ended with a quiz round where participants were asked questions from the workshop and got a chance to win T-shirts.

Oracle Application Express - Easy to develop, easy to deploy, easy to manage.

With Oracle APEX focus on what needs to be done, not how it should be done !




Friday, April 24, 2009

How to find out what all database objects have been used in an APEX application

As your APEX application gets bigger and complex sometimes you may want to know what are the different database objects like tables, functions, procedures, sequences etc. that is being used by the application. You may want to have this information handy if you want to transfer your application from one environment to another (typically when you want to deploy application from test envrionment to production environment) or you may also want to have this information so that you can do a housekeeping of your database and remove all the unused objects.

"Database Object Dependencies" report in Oracle Application Express gives you exactly that information. Checkout in this less than 2 minutes video to see how you can extract this information.

(Don't forget to turn the volume up to listen to some nice music as you watch this)



If you are using highspeed broadband connection, select "720p" option in the toolbar to view the video in high definition (option will be visible once you play the video). Then click on "Full Screen" to view the video in crystal clear format.