Flex and Oracle

Recently we have been working with Adobe Flex and Live Cycle Data Services, part from some little bugs the products seems great. The only thing that stops me from using more Flex is the fact that you need to have a license to use Adobe Live Cycle Data Services and not all customers are interested to make this investment.

So I was looking for a solution and came across this nice example of Mike Potter. He demonstrates how you can use flex with php in order to update a mySQL Database. This should also be possible in Oracle I thought, using mod pl/Sql. Let’s give it a try:

The first thing I wanted to accomplish was to display data from an Oracle database into my flex application. I will use xml to retrieve and display my data.

I started by making a new flex project with a custom component were I implemented a simple datagrid where I would display my retrieved data.

The next thing to do was to let Oracle display some xml so I could retrieve this back into my flex application. I will do this a simple as possible and just use the htp.p function in order to display some static xml:

I then called my procedure in my browser and checked of the xml is correctly generated:

This seemed correct, now I had to retrieve this data into my flex application. I will use the HTTPService tag in mxml to do this. As url property I gave the same location I typed in my browser to check the xml. Now complete your HTTPService with the right resulthandler, I used an Arraycollection to store my data and specified it as dataprovider in my datagrid. The result was what I hoped for:

This is the most simple example of course, but now I’m launched for some further research.


7 thoughts on “Flex and Oracle

  1. We are also working with Flex and Oracle 10g for +1 year now with great success. We have developed a PL/SQL framework to handle XML, exceptions, compression, authentication, session persistency and many things already. We use Oracle Application Server (via mod_plsql) and Oracle XML DB (via DBMS_EPS). Our approach is to let the database handle all business logic, security and data management while Flex cares about presentation. A successful combination based on various feedbacks we have.

  2. This is for Maurício.You said you have had great success using Flex and Oracle. My company is evaluating that option now. Do you mind sharing a bit more on your PL/SQL framework and your overall architecture? TIA.

  3. Agreed Oracle does support many paths to read/write/persist data but by far PL/SQL is great for quickly encapsulating complex business logic which can be later maintained, something most shops forget after the buzz has died down.We’ve also been enjoying/deploying PL/SQL and FLEX for sometime now and also integrated using above technique with Ext JS (http://extjs.com/) for a “best of both worlds” approach. I’ve coined the technique as PL/AJAX ( say : PlayJax ” ).I guess now that Adobe Flex and the Action Script Virtual machine has center stage this is an exciting time for those who are familiar with the power/complexity of Oracle’s technologies but can now engage the user and reveal this simply through the User Experience.Check out – http://articles.omnieffect.com/?page_id=13 – most of this work is circa 2005.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

About Olivier Dupont