Tuesday, August 12, 2008

DD Tips and Techniques - 2 Displaying Shapes

When I said occasional in the last blog - I didn't specify the time interval - so here is a second post in as many minutes!

There are a number of ways to tidy a cluttered diagram. Sometimes you don't want to see all the columns/constraints in the table shape, or perhaps you only want to see some of the columns - the keys or the most important columns:

View As -> Compact
Select shapes in a diagram and use this context menu to completely remove any columns or constraints from the shape

Hide Selected Shapes
If you want to show only some of the members of your shape (for instance only the keys and major columns in a table) select members you want to hide and use this context menu. The members are cut from the diagram but are still available to you through the shape editor. To see all the members again use Show All Hidden Members

Tools -> Preferences -> Diagrams -> Database
Under this node you will find many different options for your database diagram - you can change font, shape colors for many different database shapes. For instance - select Table from the dropdown list and uncheck Show Constraints if you want to exclude them from the diagram. Note that changes made in this way only apply to new shapes added to a diagram. So it's good practice to check your preferences before you start work on a diagram



Database Diagramming Tips and Techniques - 1 Keyboard Accelerators

I'm working on a new database design and thought I'd pass on some of the tips that I use to aid my work. As always with my blog entries, this will be an occasional series.

Keyboard Accelerators - diagram cleaning aid

I often create new offline database tables using a database diagram. I can visualize and edit objects in-place easily and often. But having to resize the shapes and tidy up the relationship lines can be very frustrating! So I do the following:

First the setup -
Go into Tools -> Preferences -> Accelerators
Scroll down the Actions list and select Height and Width
Add a new accelerator (if none set) - I use Ctrl H
Scroll to Select All and check what accelerator is set - default is Ctrl A
Scroll to Straighten Lines and add an accelerator - say Ctrl L

Now, in my diagram whenever I can't see all the info in my table shapes I either select the specific tables and do Ctrl H or do Ctrl A + Ctrl H to resize all my shapes followed by Ctrl L to straighten the lines.

Easy Tip No1!

Monday, June 09, 2008

Checking who else has checked out?

A comment on an earlier post has prompted me to clarify the way that Subversion handles certain tasks. The commenter is using SQLDeveloper, that uses JDeveloper's SVN implementation, and wants-

1. Subversion navigator to indicate if others are working on the same code

Subversion uses the copy-modify-merge paradigm. This means that any user with the correct authorization can check out a copy of the code from the repository to a local file system. This local copy can be manipulated (using JDEV, Tortoise, command line etc) so that updates and commits can be carried out from it. However, the Subversion repository does not have any understanding of how many users are working on or have checked out the same code. Updates and Commits are instigated from the local copy. This also means that any local copy checked out from Subversion may never be checked back in.

2.When double clicking on a package in the database or in the versioning tree and have the option to load the local copy (linked to subversion).

With respect to the request to double click on the versioning tree this comes back to Subversion having no knowledge of the local copies. I think that he is asking that the local copy be updated through using the Subversion navigator - but updates are driven from the local copy, not the repository.

As for the database package, that would be another level of complexity. Presumably the single point of truth is the package definition held in the SVN repository. To ensure that the database holds the latest version the user would have to checkout a the latest version as a local copy from the repository and update the DB. I'm not sure that somehow automating this process would be desirable - it would need links from the DB to the tool to the correct local copy location and through this to the SVN repository - sounds error prone to me.

3. Be able to do a compile and see the log window

This is a SQL Developer question, rather than SVN oriented, so I'll leave that to my colleagues with SQLDeveloper to answer.

Friday, June 06, 2008

Going To New Orleans - ODTUG Kalaidoscope 2008

I've traveled and spoken on Oracle all around the world at many events but this year will be my first at ODTUG (June 15th-19th). I'm looking forward to both the technical and the non-technical aspects of the conference. New Orleans is somewhere that I haven't visited in 15 years and I'm happy to be one of the nearly-75 strong ODTUG Brigade volunteering for a day of community service work to give back to the city that has given so much to music lovers and so many others like me.

The conference is packed with keynotes and sessions, I'm going to be presenting two:
Who Moved My Code? - Team Development in Oracle JDeveloper on Wednesday 8.00-9.00am
Seven Secrets (and more) of Successful JDeveloper Database Designers on Wednesday 2.45-3.45pm

Both of these will be predominantly demo driven sessions. In the first Lynn Munsinger will be joining me so we can demo multi-developer tips and tricks using Subversion. The Seven Secrets will focus on existing and new features for database development and visualization for application developers. I'm hoping also to squeeze in a sneak preview of a project I'm working on around Application Lifecycle Management. Please join me if you are at ODTUG as I would welcome your feedback.

Our Usability Research Team is running some feedback sessions that Lynn, Grant Ronald and myself will be attending, be sure and sign up for one of those. Plus, if you want to talk to us about any aspect of JDeveloper we will be in the exhibit halls ready and willing to demo and discuss.

Finally, I hear there is a ODTUG Jam Session and I'm pretty sure I wont be able to resist!

New Best Practices Paper for Subversion and JDeveloper

I've finally got around to pulling together some of the information and best practices that I've blogged about into a document. You can view it here on Oracle Technology Network. Let me know what you think

Tuesday, April 22, 2008

ALM - help me help you!

Some of the areas that I've always been interested in - as a consultant, a teacher, a curriculum developer or as a Product Manager - are standards, methodology and development process: From Designer to JDEV, from CDM to Agile, from ClearCase to SVN, from IE to UML and so much more. Now we call that ALM - Application Lifecycle Management - the management of the lifecycle development practices (requirements, build, test, change control, defect mgmt etc) fused together through application of process, reporting, traceability and collaboration.

Here in JDeveloper land we are always looking at ways to improve both our tooling and the developer experience so I've put together a survey to find out what ALM tools you are using today. We're looking into adding better integration with ALM tools and the results of the survey will ensure that we move in the right direction.

So please, take a couple of minutes to complete this quick online survey and help me help you!

Friday, February 08, 2008

Evil Clones - The SCM nightmare that can stop you in your tracks

It can happen to anyone. First the feeling of disbelief, then the cold sweat; you try pinching yourself, hoping it's some bad dream and you'll wake up and they'll be gone . . .

There, that's my catchy first line of my first novel written, now just the other 150 pages to invent. But unfortunately it really can happen to you - if you are working with ClearCase you may have come across evil twins. But I want to talk about a different nightmare that can occur if you are using SVN or CVS.

Here's the scenario. You and a team member are both working on a file (let's call it MyClass1) checked out of SVN.







Your colleague, as part of her edits, renames MyClass1 to CloneClass1 and commits the working copy.







SVN uses copy/delete commands for a rename:
First MyClass1 is copied (so that the history is maintained) to CloneClass1.
Then MyClass1 is deleted from the repository.
The screenshot of the SVN repository (left) shows the new resulting file with CloneClass1.

CVS is not quite so clever is uses add/delete: It adds CloneClass1 and deletes MyClass1 - so none of the history of MyClass1 is copied to the new CloneClass1.

But back to the SVN example. You have edited the checked out MyClass1 and are oblivious to your team member's edits. Not a problem, you might think as an update from the repository would absorb the changes or at the very least show you a conflict over the rename. Unfortunately not!

Here is where the nightmare that I'm calling Evil Clones appears.

The repository rightly updates your working copy with CloneClass1. But wait, your class MyClass1 is not only still in your App Navigator, but is no longer under version control!







If you think about it, this is correct -
  • SVN has replaced MyClass1 with CloneClass1. It has no recollection of the object MyClass1 so there is no merge of MyClass1 and CloneClass1.
  • You wouldn't want to lose the additional changes you have made to MyClass1 in your working copy - and it is not under version control - well, it's not, because it doesn't exist in the SVN repository
  • You can easily recognize that MyClass1 has been replaced by CloneClass1 so it's a simple job to move your changes to CloneClass1 - or is it. . .
This is expected behavior from Subversion and it seems that they recognize it as a bug . The example above is very simple. But what when you have 00s of different files in your working copy?

I'd be interested in how you work around this shortcoming in SVN. Here are some of my thoughts:
  • Don't rename, if you think you must, think again!
  • If you must, then refactoring or plain renaming of files (this is not specifically a Java problem, could be XML metadata, diagram or any other file type) should always be taken seriously in team development. In our JDeveloper development teams it's usual for the developer thinking about renames to email colleagues, check for dependencies and most definitely comment both the code, the check-in and the build notes to minimize the possible problems.
  • How renaming is handled in your team should be part of your defined development process. It should take account of your source code system, your build system and provide workarounds as necessary
  • If you are using JDeveloper and find that one of your objects appears to 'lose' its versioning status after an update - think rename!
  • Always ensure that you fully comment a rename on commit so that other users can use the log to find out where and why their object was deleted from the repository
In a forthcoming post I want to look more closely at how you detect and work to correct a rename problem. Specifically I want to use JDEV's offline database objects to do this. In the Java world developers may be more aware of the power of refactoring. But, as I said above, this is not a problem restricted to Java. I want to highlight the effect on XML and database objects.

At what level should I version my source code? - Alternate Takes

So now you know that I'm a Blues fan. One of Blues most revered artists was Robert Johnson. There are only a very few recordings of him - done between 1937 and '39 - just 29 different songs, but there are alternate takes bringing his total recordings to around 40 songs. Maybe he was striving for perfection, maybe different styles suited different audiences or even his moods, but these alternate takes add to the legacy left by him. Some blues fans have their own favorites but I love them all!

Recently I've been speaking with a number of JDeveloper/SVN users concerning the level at which they version their code. While I still maintain that the best way is to create a working copy at the Application level there are times and development process requirements when this isn't practical or possible.

Take this example: A team development with one Application split into many Projects. The Application is under source control using SVN. Their development process mandates commits are done per Project. There are a number of ways to achieve this, here are my suggestions for a team member to work on one or more projects and be selective about what is committed:

Alternate Take 1: Check-out each project as a separate working copy
  1. Create a new empty Application with no projects
  2. Use the SVN Navigator to select the root node of one of your projects in the repository
  3. Check this project out of the repository
  4. For the check-out destination, select the root folder of your newly created application
  5. You will get a warning on the Confirm Check Out dialog that you have selected a directory that is not empty - this is OK
  6. Continue to check out projects under your application root folder

  7. Now you can use JDeveloper's Commit Working Copy command on any node in a specific project and that project's changes will be committed.
Alternate Take 2: Filter the Outgoing Pending Changes Window

Using JDeveloper 11g you can filter the Pending Changes window by application or project. In the screen shot below I've filtered my outgoing changes to myProject1. I can select one or more of these files and with the context menu Commit Working Copy or Commit. I'd choose to select all the files and Commit if I had checked out my Application as the working copy. I'd choose Commit Working Copy if I had used Alternate Take1 to check out each project as a working copy. Unfortunately JDEV 10g doesn't have this filtering ability so this is an 11g only Alternate Take





I'm sure there are other Alternate Takes to both the level at which you version your code and how you manage checkin/out. I'd love to hear the good practices and the pitfalls.

Monday, January 14, 2008

I got tagged in the Oracle Blogsphere tag game by Shay Shmeltzer so here goes my entry of 8 things you didn't know about me.

1. In 1973 I was sent from Reading, UK to live on a cotton farm and attend high school in Arkansas, USA for a year by AFS Intercultural Scholarships. At the end of the year I was inducted as an Arkansas Traveler. Even now I drop into an Arkansas drawl the minute I reach the Delta - love it!

2. This started my love affair with Blues. It grew and developed after I met my husband, Scott, through his research for the original writers of songs recorded by such great guitarists as Rory Gallagher. In about 1986 during a blues festival holiday in Memphis (TN) we met some people who have become our great friends: David and Liz Berntson who, earlier in the year, had founded the Tulsa Blues Society. Also first met Paul Jones who was in Memphis to cover the festival for BBC Radio. As a result of these meetings we arrived home to find Paul had talked about our ideas on air and we started the British Blues Connection and the magazine Blueprint.

3. During over 10 years of the British Blues Connection and Blueprint, we became the first overseas Blues organization to be affiliated to the Blues Foundation and were Keeping The Blues Alive award winners in 1990. In the late 1990s we passed the UK blues gauntlet over to Blues In Britain

4. I love music, singing and dancing. From working the amateur chorus lines in productions like Lady Be Good in my 20s (when I was younger, thinner and more flexible!) to singing and dancing with blues men or my fab musical family or anyone who will let me. One of my special blues moments is dancing on stage with Willie Dixon when he presented us with our KBA Award in 1990. But it's not just about Blues, I love music - from Karaoke to Kraftwerk, Blues to Bartok and all the Kings (Elvis, Freddie, Albert, James, Frank, Bob ....)

5. I love to travel. I'm not sure I'll ever make the Traveler's Century Club (think I'm at about 35 currently) but I like to take every travel opportunity (whether work or leisure related!) Last year I added South Korea and China to my list and this year, as well as Europe and the USA, we will be in Rio to celebrate the wedding of our good friends: Blues man Alamo Leal and Mariza Lopez

6. My first personal computer was an Mac SE30 Bought this in 1989 when Blueprint became a magazine that could no longer be pasted and photocopied on my office copier but had to become more sophisticated as its readership grew. I learned how to use Adobe Pagemaker and spent many long, long nights waiting for the tiny screen to refresh as I moved across its 32 pages adding articles (Scott was the editor) and leaving space to paste in the photos. This was also the time of my introduction to 'programming'. I used spreadsheets and macros to maintain the subscription list and create mailing labels. At the time I thought I had designed a database!

7. Oracle is my second career. In my 20s I was a Financial Controller for a SME US company in the UK and started up subsidiaries in France and Germany for them. In my young, thrusting days I was even a finalist in the UK 'Young Career Woman of the Year' (can't remember which year - didn't get far). Later I took a Computer Science degree (for fun) and decided to try life at Oracle - the rest is history!

8. I have two favourite types of footwear! In the summer it's hard to imagine not being in flip-flops. I have many, many pairs - including High Havaianas that can make that awkward transition from shorts to cocktail dress ;-) In the winter I move into cowboy boots - the most comfortable footwear ever. But be sure to get a good brand. For me that has to be the Ariat.

So, if you see a flip-flop carrying, cowboy boot wearing, laptop hauling Oracle Product Manager demoing with blues-inspired examples - be sure to say "hi y'all"

I hate chain letters but who am I to deny you the opportunity to join the fun? So I tag Sue Harper, Kuassi Mensah, Doug Clarke, Eric Rajkovic, Brian Duff (sorry)

Monday, November 05, 2007

At what level should I version my source code?

This is a question that comes up regularly when I talk to development teams. And I believe that the answer should always be - at the top level.

If you are using JDeveloper this means at the application level. We adopt this in our own development here and it's my top tip for best practice. Some might want to argue that if their application is broken into a number of different projects then why not version those individually?

One problem with this approach could be cross- project dependencies in your application. Imagine that you work in one project on a day to day basic but there is a dependency on libraries held in another project (let's call it a 'library' project). You might checkout both projects at the beginning of the development cycle but assume that the 'library' project was complete and so you could just work and update your 'working' project. At some later stage, you could run into problems when you want to check in your 'working' project and realise that updates have been made to the 'library' project.

On a practical level, if you are using JDeveloper, you should not only follow my advice and version at the application level, but always ensure that your .jws configuration file is included in source control. This isn't a problem if you using JDeveloper's integrated SVN commands. When you select an application you automatically get the .jws file included.

But what if not all your development team are using JDeveloper? Perhaps you prefer to use Tortoise for your SVN interactions. Or perhaps you have some team members that use Eclipse or another IDE as well as JDeveloper? In this case it is important to ensure that you still place both your 'jws' and your 'jpr' files under source control.

Why? Because JDeveloper's SVN code looks at the state of those files to decide what menu options it makes available. For instance, say an initial import of an application to SVN had been done using Tortoise and the .jws file had not been included. I then check out this into a working copy in JDeveloper and make some changes. When I try to commit or update this working copy using JDeveloper I would expect to get the menu options 'Commit Working Copy' or 'Update Working Copy'. In fact, I would only see 'Import Files' as the .jws files would not be part of the versioned application and so JDeveloper offers you the option to place the application under version control.

I've come across this a few recently. The workaround is to go back to the repository and add the .jws file to version control. This brings the IDE back into kilter and allows you to continue using JDeveloper's integrated SVN support.

Wednesday, October 24, 2007

Connecting to CVS/SVN thru JDeveloper

Here is how simple it is to set up your CVS repository to work in JDeveloper 11g. The first step is to select your Versioning system. SVN and CVS are shipped with JDeveloper 11g. Other supported version control system can be downloaded via Check for Updates.
Now you can view the SVN or CVS Navigator from the View menu. Use the context menu of the parent node in the open navigator to create a new repository connection.
For CVS enter the details of your CVS repository in the wizard; including your access method and authentication style and user id (set by your CVS repository administrator). Test the connection and Finish the wizard. You are now able to browse the repository and Check Out a module using the context menu to begin work. To add a new application to the repository select Import Module from the Versioning menu.



For SVN enter the URL to the repository, user name and password, again Test the connection and click OK to complete the connection. As well as being able to browse the repository you can do other things such as create new remote directories from the context menu of the connection in the navigator.

To add a new application to the repository using either CVS or SVN, select Import Module from the Versioning menu.
By returning to the Versoning menu and selecting another version control system you can invoke the navigator for that system - without losing any of the connections you have to other systems.

Tuesday, October 23, 2007

SVN Branching in JDeveloper 11g

The latest Technology Preview of JDeveloper 11g is now available and contains some great new functionality to support Subversion 1.4.3.


We've added the Incoming Changes tab to the Pending Changes window - so valuable if you want a sneak preview of what changes others are making to files you have in Working Copies in JDeveloper.
Also, you can now filter Pending Changes at the application or project level.

But best of all, we've added support for Branch/Tag, Switch and Merge. I've created an online demo that you can play from OTN. If you haven't already, download the 11g preview and try it out - I'd love to have your feedback

Friday, June 22, 2007

Synchronizing with CVS in JDeveloper

Whatever your mechanism for working with CVS during development one of the things that we all like to avoid is unresolveable conflicts. But when working in a team environment it's an ever present evil.

Using the Incoming Changes tab of JDeveloper's Pending Changes window can help in pre-empting conflicts and managing them.

Here is a very simple example. I have an application under CVS source control that contains a number of classes. I'm working with a team who are also working on these files. In the Pending Changes window I can see that 2 of the files have been modified and checked in since I checked out my copy. This is shown in the Incoming Changes tab:









My local change is reflected in the Outgoing pane (I haven't bothered to insert an image of the outgoing pane here, but in this view I can quickly see that there is only outgoing change - and I know this is the only file I am working on).

Greeting.java has been updated and checked-in by someone else but doesn't cause a conflict with my version.

NewGreeting.java appears to have an unresolveable conflict. Double-clicking on the file in the Incoming Changes window returns me to the file in the code editor (or opens it), moves the focus to the History Tab, selects the Head revision to compare my local version of the file with and highlights the first change.













From here I have a number of options. Knowing that there is a conflict I could make changes to my code. Or perhaps I want to run Update and then use JDeveloper's Merge feature to resolve the conflict or perhaps I just carry on with my coding and choose to deal with the conflict at some later date, whilst keeping it in the back of my mind (and in my Incoming Changes window!) Whatever route I take, I'm able to keep my local copy and the repository synchronized and view/act on any conflicts as I choose.

I've kept my example very simple and have used JDeveloper 10.1.3.2. In a future post I'll give you a taste of enhancements we've made to Pending Changes for the JDeveloper 11g

From Seoul to Shanghai with ODC

I can hardly believe it's been 8 months since I last posted here. In that time I've taken up a new role within the JDeveloper Produce Management Group and have been focused on different areas of the product than my previous SOA focus. I now work very closely with our development groups coming up with requirements for JDeveloper and support development.

This doesn't mean I don't get to meet with users any more, an important part of requirements gathering is to listen to what our customers are saying! This year I've been very lucky to have been involved with the Oracle Develop Conferences. I've 'done' Seoul and if you're in London next Tuesday and Wednesday be sure to get over to the Excel Centre for the London run of this conference designed specifically for developers. I'll be there talking web services, ADF and Fusion and would also love to talk to you about your complete application development lifecycle experiences - the what, why and how of your approach. I have a special interest in Source Control systems - so come and tell me how JDeveloper stacks up.

And Shanghai? Well that's where this year's ODC run closes at Oracle OpenWorld in Shanghai - and I'll be there too, maybe I'll see you?

Wednesday, October 18, 2006

No Time For Post-Vacation Blues

I'm back from the Delta and in San Francisco preparing and looking forward to Oracle OpenWorld next week and in particular the Oracle Develop event.

If you are in the San Francisco area during Oracle OpenWorld Oct 22-26, you have the opportunity to see Rod Johnson and Brian Behlendorf speak! Rod Johnson is one of the world's leading authorities on Java and J2EE development. Brian Behlendorf is the CTO and founder of CollabNet - the main sponsor of the Subversion project. He also cofounded and contributed heavily to the Apache Web Server Project.

And don't miss all the other great sessions and hands-on labs that my colleagues and I are presenting

See you there, come and say hello

Tuesday, October 03, 2006

Down in the Delta with the Blues

I wont be posting or answering comments for the next week as I'm down by the banks of the Mississippi for the Arkansas Blues and Heritage Festival. Anyone else going? See y'all there (must be said with an English accent tinged with Arkansas).
Otherwise, hope to see some of you at Oracle OpenWorld later in the month

Wednesday, September 20, 2006

Dealing with Complex Input Params in ADF Web Service Data Controls

A comment on a recent post prompts me to clarify how Web Service complex input parameters can be used in an ADF application

If the inputs are simple types or a single complex object (not an array of objects) then when you create the ADF Data Control for the service the data control palette gives you the structure of the parameters, enabling you to drag them on to a page as a parameter form or an action of some kind.

To illustrate consider the following method definition:

public Quote processOrderQuote(String productName, String itenType, String partnum, String quantity, String price)

Published as a web service, the complexTypes as seen in the WSDL file look like this:



The ADF Data Control created from the WSDL file uses OrderQuote elements as the String parameters. It wouldn't be my choice to name my parameters param0 - param4, not best practice, but that's the way this WSDL has been created. Dragging the OrderQuote service call onto a page will give you a choice of data bindings - perhaps you need a parameter form so that the input can be recorded directly, or perhaps just a command button or link where the input parameters will be existing data in your application


What about the more complex situation where the input parameter is an array of objects?

To illustrate consider the following method definition:

public Quote processPOItemsQuote(Item[] items)

Published as a web service, the complexTypes in the WSDL file look like this:



And the Data Control looks like this:



In this case the input parameter - the array of objects - is not dealt with directly by the data control. I'm working with JSF so I need to use a managed bean to populate the input parameter, the principle is the same in other UIs too. In my scenario, I need a parameter form for a user to enter the itemId and quantity of the item they want to get a quote on. To keep my example simple, just one item is going to be quoted on - but an array is still needed to fulfill the service's input requirement.

1. I've created a JSF JSP page (getPOQuote.jsp) with a backing bean (GetPOQuote.java). First I want to add my input paramaters to the bean. I've added 2 new variables to the GetPOQuote.java and using JDeveloper I can automatically generate the accessors:



2. Next I need to create a method to populate the array that my service is expecting as a parameter. I added the getItems method:



3. I add two ADF Faces Core: InputText components onto my page and use the Property Inspector(PI) to give them the labels I want




4. Now I want to bind the value of these input fields to my new backing bean attributes. I select the Quantity field and in the PI Value property type #{ and hit enter. This tells the framework that I want to use the Expression Builder(EB) and I can open the EB by clicking the ellipses button.



5. Now I can browse to my backing_getPOQuote managed bean and double-click the quantity attribute to create the expression #{backing_getPOQuote.quantity}. This ensures that the user input to the quantity field is bound to the quantity attribute of the managed bean. I need to repeat this for the Item Id field and bind that to itemId



6. Finally, back in my page I can drag the POItemsQuote(Object) service from the DC palette onto the page as a ADF Command Button. In the Action Binding Editor I can use the ellipses to the right of the Value column to browse to the items attribute of my managed bean (remember in Step2 I created the getItems method in my managed bean) to pass the input object to the service



7. Back in my page, if I open the Page Definition File I can see that the POItemQuote methodAction is now correctly populated with backing_getPOQuote.items being passed in as param0



And that's it, add a page to show the result of the service, add a navigation case to it and run!

Friday, September 15, 2006

SOA and the Database - Heresy?

It comes up a lot at conferences and seminars: Where should my business logic reside - the database or the middle-tier? In the SOA world you might think that using the database was the wrong choice, but why not leverage your existing DB-level validation from your Business Services?

I recently had some correspondence with Kent Graziano of ODTUG fame on just this topic. He says, "essentially we generate the TAPI and the associated DB triggers on all tables. The developers then write simple insert, update, and delete SQL against the tables to pass the required data elements. The triggers fire the TAPI procedures and fill in the auto generated stuff (sequence ids, date created, user created, etc). And voila you get referential integrity without coding in the middle tier. One of our apps is even generating the journal records automatically for audit trail. In addition all these applications rely on Oracle views or materialized views (from our read-only ODS) as the source for all the drop down lists. Seems that may be an SOA-type approach as well since we have abstracted the data one layer above the actual database tables (and we reuse the same view definitions for multiple applications to insure one-source of truth across the apps)."

I don't see anything wrong with this approach. Of course, from an SOA point of view you must ensure that your services are just that, and not too fine-grained, but that can be dealt with in or above the DB level in whatever technology or framework you choose to develop business services in.

Moving forward, it might be that Kent's application developers will take advantage of the benefits of middle-tier business logic and rules - for instance using the ESB and Rules Engine of Oracle's SOA Suite - but that's another discussion! So, am I an SOA-heretic to use database logic and services in the same sentence?

Thursday, June 22, 2006

Developing J2EE1.3 and 1.4 Web Services in tandem

Alan Gibson, one of our engineering gurus here in JDeveloperland, gave me this tip recently for developing both J2EE 1.3 and 1.4 services in the same application.

1. Add your base Java implementation to project1
2. Create project2 for your J2EE1.3 Web service
3. In the Dependencies tab of the Project Settings for project2, check project1 as a dependency
4. Publish your J2EE1.3 service in this project
5. Repeat steps 2-4 for a J2EE1.4 service

There is a bug in the J2EE1.3 service creation that means the node for the web service will show up in project1, but the crucial thing is that the J2EE1.3 web.xml file will go into project2, so this solution does work properly when you deploy or run it.

This is a good example of the way you can use project dependencies to separate your base logic from the service artifacts - even if you only have one kind of service implementation.

Friday, June 09, 2006

Watch a demo using BPEL in an ADF application

I've just published a demo on OTN that runs through integrating a BPEL process in an Oracle ADF application. It's so easy, so 4GL! Check it out and let me know what you think.