We at AMIS work hard and with great fun at developing high quality applications. We like to use good tools and we like to push those tools to the limit. And if we don’t like the limitations – we sometimes sit down and push these themselves. For our Java/J2EE applications we often use Oracle’s BC4J or ADF Business Components as it is called with JDeveloper 10g. (By the way, we also use other frameworks such as Toplink and Hibernate). ADF Business Components allows us to very rapidly build up the Model layer that brings the relevant part of the database to the middle tier (and of course it works best if you carefully design or reuse the database and take it from there; ADF BC in our view is not a pure OO design framework – but why should it be?).
Working with ADF BC reminds us very much of the declarative, very visually oriented and strongly tool-backed way of working we know from Oracle Designer. However, there are some rough edges with the JDeveloper design time environment for ADF BC. Simple operations such as renaming or removing an Attribute, copying a ViewObject or deleting a ViewObject are horribly complicated. JDeveloper does not cascade such changes into all dependant objects, but instead coolly informs you that because of dependencies the operation is not allowed. You have to manually (yes, I said manually!) remove all dependencies before the renaming of delete operation can continue. For copying there is no support at all, you simply have to completely recreate the ViewObject.
Combining our drive for high-quality and high-productivity development, the drive to push boundaries if needs be and the limitations posed to us by ADF BC in the Design Time environment as well as some earlier experience with the Extensions SDK (JDeveloper Extension SDK on OTN) provided with JDeveloper – that allows any developer to develop plugins (as the term is with some other products) or extensions for JDeveloper-, we set ourselves the challenge of creating an extension that first of all allows ViewObject copy operations (in our work with Oracle’s JHeadstart framework a highly desirable feature) .
We completed this extension with a few days serious hard word and testing and are now ready to make it available to everyone who is interested:
Click here for a “live” demo of the AMIS ViewObject Copy Addin.
Note that we will publish a “Force Delete of ViewObject” shortly; this extension will remove a ViewObject, carefully removing all ApplicationModule references to the ViewObject and its ViewLinks; all ViewLinks in which the ViewObject participates are removed as well!
This ViewObject Copy Addin can copy a ViewObject, with a new given name and in the same or a different package. The user can indicate whether ViewLinks that refer to the ViewObject being copied should also be copied. An outgoing viewlink is a viewlink that has the ViewObject being copied as source (master in Foreign Key terminology). An incoming viewlink is a viewlink with the ViewObect being copied as destination (child in FK terms).
When the user has stipulated in the dialog how to perform the copy action, it is started with the OK button. The ViewObject Copy extension uses the BC4J Design Time API and several IDE facilities for file-manipulation to perform the operation. Results are logged in the IDE Messages window:
When you take a look in JDeveloper’s navigator window, you will notice how the ViewObject Copy operation created several objects: AlternativeBooksView, CopyOfBokBokFKLink , CopyOfBokPbrFkLink.
Download and install the AMIS ViewObject Copy Extension
Download ViewObject Copy Extension (version 0.1.3, 3rd November 2004). Install the extension by copying this Jar file to the JDEVELOPER_HOMEjdevlibext directory and (re)start JDeveloper. To verify whether the extension is active, you can select any ViewObject in any project and open its context (right mouse button) menu. You should see an option Copy ViewObject (with our logo).
If for whatever reason you want to de-install the extension, simply remove the jar-file. The next time you start JDeveloper, the option has disappeared from the ViewObject context menu.
We like to not only tell you we do interesting stuff and are good at what we do, we also like to show you this. As we share knowledge internally among AMIS-employees, we also work closely with our customers to not only do the application development tasks we are hired to do, but also transfer knowledge to staff in the organizations of our customers. We organize seminars and workshops, write articles and develop tools.
You are free to make use of this tool as you see fit. You are welcome to distribute it further. Of course we request that you do not attempt to remove our name from the tool: recognition for our work is all we ask for and we feel we deserve it. You probably will not be surprised by the following: the tool comes as is, no warranties etc. If you use it, you do so at your own risk. We do not provide support or assistance – for free. Of course we are interested to learn about your findings and we may use them to improve the tool – or create others like it – but we do not make promises. If you do not like it or do not trust it, do not use it.
You can of course acquire our services to help you with your ADF Business Components (or Java/J2EE) projects.
For a preview of the Force Delete extension, try out this link: demo of the AMIS Force Delete ViewObject Addin.