Thursday, January 26, 2006

Developing Rich Internet Applications (RIA) with JDeveloper

If you're like me, you miss the days of developing client-server applications with thick clients where the user interfaces could interact better with the user. Those clients were feature rich and very intuitive. Then, along came the internet computing model. Maintainability is significantly easier with this model but user interfaces seemed to have taken a step backwards. Often times, as a consultant, I visit client sites where they complain about the dreaded refresh issue. The one where the entire page has to be refreshed. I currenly handle this issue myself using AJAX but I am constantly looking for other alternatives. I am now working with the rich internet technologies from Laszlo.

Installing this software is a snap. In about 10 minutes you should have the software downloaded, installed and you are up and running. Once this is completed all of the docs and examples are installed as well and assessible on the machine where you installed it. Laszlo by default will install using Tomcat.

As an application implementer, I am always writing applications that interact with a database. According to documentation on Laszlo's site, they state:

Laszlo was built from the ground up to facilitate the development of data-driven applications.

That statement alone has me intrigued, as that is exactly the type of apps I develop. The way Laszlo does interact with data is by using XML and XPATH.

Now, off to development using JDeveloper as my IDE. You can quickly create your first data-driven Laszlo application after you get your JDeveloper environment configured (see below for steps). Since Laszlo expects data to be in XML format, the two technologies I like to use are ADF and XSQL Servlet.

Following is a screenshot of a very basic Laszlo application. I modified one of the demos and changed from using a static XML dataset to using a dataset derived from an Oracle database. In this particular instance, I am using an XSQL Servlet to query the scott.emp table.

Clicking on the buttons with the names will automattically expand or collapse the contact information. (no refresh!)

I do feel there are some risks with using this technology. The biggest one is that this technology relies on Flash technology for the user interface. Now, you can use the built-in components for building UIs, but if you wanted to start adding your own custom components you are going to need a licensed version of Flash. The users of your applications will also need to have the Flash 6 plugin installed, although I have heard that 99% of all users already have this.

Steps to configuring JDeveloper to build Laszlo Applications:

1. Follow these Laszlo instructions and don't skip these.
2. Setup JDeveloper so that it recognizes the .LZX extension as an XML File
a. Tools > Preferences > File Types
b. Add a file type and associate it with XML Document.
3. Download a local copy of the lzx.dtd file. This will allow you to have code insight.
4. Add something similar to the following into your .lzx so that you can use code insight.
<!DOCTYPE canvas SYSTEM "lzx.dtd">

Tuesday, January 10, 2006

JDeveloper, Time for a Name Change?

I've been using JDeveloper for a long time, even since it's inception. If I remember correctly, Oracle developed it then started using Borland's JBuilder and then finally completely rewrote everything themselves. I wish I would have kept some of those first builds, it would be nice to go back and look at the changes.

I think the software has always been called JDeveloper. The name fit the first builds of this software as it was for Java Developers. As we all know, JDeveloper has evolved and now includes a large range of features. JDeveloper can now be productively used by developers, software architects, data architects, requirements specifiers and more. The tool can even be used for additional languages such as PL/SQL and PHP.

Since the name "JDeveloper" no longer fits, I personally think there should be a name change. There is another IDE out there named Eclipse. I'm not sure why it is called that, maybe because it is supposed to "eclipse" all other tools out there. I think it is called that because I was in complete darkness trying to get productive in the tool. There are also IDE's named Net Beans, JBuilder, and others.

All of the Oracle tools are generally named according to their functionality. Forms, for developing GUI forms applications. Reports, for writing reports. But JDeveloper one would think was only for Java Developers.

I'm not sure what the new name should be. The big word at Oracle right now is Fusion. Fusion means "An occurrence that involves the production of a union". Maybe Fusion is a better name as JDeveloper combines several technologies and makes you productive. At least this name isn't misleading like JDeveloper.

Friday, January 06, 2006

JDeveloper & UML Modeling in a Team

One of the tasks high on my todo list is figuring out how to best leverage JDeveloper modeling capapbilities within our team. Our team, like many, consists of members playing different roles within the application development projects. The primary members that will be using the modeling capapbilities are architects, data modelers, system analysts, and implementers. I believe I have so far came up with a fairly good approach although I still have a ways to go yet in getting all of the kinks worked out.

When using the modeling tool, I want the architect to be able to oversee everything. I want the data modeler to only care about the data model. I want the system analysts to only worry about the requirements they are gathering. Finally, the implementers are responsible for all of the implementation components they are going to build to realize the requirements.

In order to achieve this, I have been creating seperate projects for these different roles. I have been putting all of these projects in the same workspace although I never put the workspace in source control. I simply make sure all team members at a minimum have the basic directory structure the same.

The data modeling project, contains all of the database objects. This obviously includes tables, views, sequences, etc.

The analysis project, contains all of the use cases and activity diagrams as gathered by the analysts.

The design project, contains class, sequence and activity diagrams.

The architecture proejct, "sits" on top of all of these projects. You can accomplish this by adding the models of all of the before mentioned projects by editing the project properties. Once you add those models, all you need if you are the architect is to have one project and you'll be able to see everything.

Projects always start with the architecture project and include at minimum the logical view. This logical view is basically a package diagram laying out how the software will be organized (layered). In the future, as Oracle adds more diagrams, this project will include Network, Process, and Deployment views.

The architect can also use the Javadoc capabilities to stand on the project and create a majority of the documentation for the project.

I am hoping someday that software requirement specifications, design specifications and softare architecture documents can all be derived straight out of JDeveloper instead of creating seperate docs. Maybe someday...