JDeveloper Comes of Age: Visual and Declarative J2EE Development in 10g

JDeveloper Comes of Age: Visual and Declarative J2EE Development in 10g

Editor’s Note: The authors are employees of Opitz Consulting, based in Germany. Opitz is an independent provider of consulting services for Oracle systems.

racle JDeveloper has gone through an amazing evolution over the past few years. While older versions were a little bumpy at times, Oracle JDeveloper 10g offers an integrated development environment with substantial features?including modeling, coding, debugging, optimization, and deployment?that address the full development lifecycle of J2EE applications and Web services. In addition, the Integrated Development Environment (IDE) supports more and more open source tools and frameworks. Of particular interest in this version is the visual and declarative development approach in combination with the Application Development Framework (ADF). Together, they offer experienced Java developers and beginners many ways to quickly reach productive results with a very capable integrated IDE.

Like many software vendors, Oracle aims to integrate all the tools you need for daily work in a single IDE. It has accomplished this with Oracle JDeveloper 10g. Several options offer less-experienced developers only the features they need, in order to keep them focused and prevent feature overload. Oracle lets you configure the IDE with regard to the available IDE components (keyword: MyJDeveloper), while Technology Scopes limit the choice of available technologies such as frameworks. Experienced developers can use the entire technology set, of course.

Figure 1. The Graphical Struts Editor: The image shows the graphical struts editor.

Most modern Java IDEs focus on the code-centric developer. Smart Editors, for example, automatically complete code blocks. Oracle JDeveloper 10g goes beyond Smart Editors, supporting a visual and declarative approach of development. For example, Oracle JDeveloper 10g adds such features as WYSIWYG editors for Swing UIs or JSP, graphical editors for Struts configuration data, and property sheets for configuring application components. This offers J2EE developers the convenience and productivity associated with classic 4GL tools, while increasing the experience of skilled developers and helping Java beginners get up to speed.

Oracle’s solution for the increasing complexity of the J2EE platform is the Application Development Framework (ADF), included in Oracle JDeveloper 10g. Based on the MVC architecture, ADF lets developers focus on application requirements while it handles the J2EE “plumbing.” Visual, declarative, and wizard-based development features are built-into the ADF development environment, so inexperienced developers can quickly become productive with this framework.

The Core IDE Features
Oracle JDeveloper 10g administers source code in workspaces and projects. A project bundles all sources to a special context; a workspace integrates projects, which belong to one application. For example, the breakdown of model- and view-parts of an application is done in separate projects but in the same workspace. Sticking to this breakdown and additionally to the JDeveloper mechanisms for using Ant Build scripts, a JDeveloper-workspace can be managed with another IDE without adoption costs. The Ant support in Oracle JDeveloper 10g goes as far as letting developers replace the standard build mechanisms with Ant target calls.

The Java Editor’s many amenities, such as code completion and code insight, make programming more enjoyable. Semantic errors are underscored during coding so you don’t need to compile to discover syntax errors. The Javadoc support is quite convenient, too; Javadoc tags are automatically generated for code areas. You can use a key combination to display the JDK help for a chosen component or a pop-up window with a Quick javadoc. Key combinations also let you summon frequently used code templates, and you can create and save your own templates as well.

In most cases, Oracle JDeveloper 10g eliminates the need to switch to another development tool, as it provides editors for additional languages and environments. These include an XML editor (with syntax highlighting and code-completion), a graphical XSD editor (similar to the one in XML Spy), a graphical HTML/JSP editor, a graphical editor for Struts, a UI editor for Swing components, and an editor for Oracle PL/SQL. One highlight of the visual editor is the Split view, which lets you see the code and WYSIWYG presentation at the same time. Modifications in either views are automatically synchronized in the other.

Figure 2. Audit Results: These are the results of an audit.

The code audit feature in Oracle JDeveloper 10g is also useful, revealing common errors like Equals without Hashcode, try-catch-blocks hiding exceptions, or unconventional or non-standard naming conventions. This is accomplished by diverse metrics that can be applied on chosen code areas, such as the depths of the inheritance tree (DIT); the branching complexity of a method; or the number of statements of a method, class, or project.

Every Java development project needs to use profiling tools from time to time. Oracle JDeveloper 10g offers basic built-in profiling tools. The Execution Profiler helps detect performance shortages by identifying runtime statistics of individual methods in a millisecond sector, directly locating the problem zone. The Event Profiler reports Java and custom events that were raised, which is quite difficult to achieve without the proper tool. The Memory Profiler helps detect storage leaks by listing the reserved storage of all current available objects.

Developers appreciate a good debugger and they’ll like the one integrated in Oracle JDeveloper 10g. It offers not only standard features but also permits the ex-post handling of variable contents; hot-swap debugging (recompiling during debugging); and remote debugging of servlets, JSPs, and EJBs. It can even debug PL/SQL in the Oracle database.

Figure 3. The PL/SQL-debugger: This image shows the PL/SQL-debugger.

Oracle JDeveloper 10g features an improved support for version control systems?a weak point in previous releases. You can configure a connection to a CVS Server with a few steps and check in and out any necessary modules. You can also use other popular connection types such as pserver or ssh. Sources under version control are indicated via an icon that shows their actual state (in-sync with the Repository, deleted, added, or edited). The history of each source is available, and a small diff tool is included. In addition to CVS, ClearCase and Oracle SCM are supported. Though the new CVS features are nice, there still needs to be some bugfixing for special kinds of files under version control, like UML metadata and bc4j configuration files.

Hardly any application works without a database, so Oracle JDeveloper 10g offers DB tooling within the IDE. It can connect to any database with a JDBC-driver. There are no restrictions to using Oracle databases?you can browse schemas, tables, views, triggers, synonyms, sequences, packages, functions, Java classes, and object types through these connections. You can use wizards to create, delete, or change database objects. For tables/views, the data can be shown in a table form?unfortunately lacking a direct edit function. SQL commands can be executed in the SQL worksheet. There is outstanding support for handling PL/SQL code with syntax highlighting and direct PL/SQL debugging in the IDE.

Modelling functionality has also been enhanced in Oracle JDeveloper 10g, with adequate editors for the most important UML diagrams (including class-, activity-, and use-case diagrams). In addition, Oracle JDeveloper 10g introduces the first Model Driven Architecture (MDA) aspects into the program: You can now transform UML class diagrams, which are implementation-neutral, into Java class diagrams. Further transformations will be in future versions. A two-way synchronization between Java class diagrams and code is implemented, as well. You can even graphically model EJBs, Web services, and database tables. However, Oracle JDeveloper 10g does not yet completely support UML.

Most of JDeveloper’s features are built as extensions, or plug-ins, in Oracle JDeveloper 10g, and can be configured via the extension manager. Turning off unnecessary extensions not only streamlines the IDE but also protects less-experienced developers from feature overload. This allows them to be slowly introduced to the entire complexity of J2EE in their daily work?a wise approach in the J2EE world. The extension mechanism corresponds to the accepted JSR #198, which currently has the status of Expert Group Formation.

J2EE and Web Services Support
Oracle JDeveloper 10g offers the features you’d expect from a good J2EE development IDE, but it also delivers many niceties not found in other tools.

For EJB development it offers a slew of wizards that help you easily accomplish common tasks. For example, Entity Beans can be created based on existing database tables. You can control all sorts of configurations in these wizards, such as CMP, BMP, relations between Entity Beans, EJB references, and EJB local references. Experienced developers will enjoy how quickly they can build these complex components, while newcomers to J2EE will appreciate the ease of use. Optionally, you can create EJBs with the corresponding UML profiles in the UML editor.

Oracle JDeveloper 10g also offers strong wizard support for Web application development. You can easily generate the trunks for HTML pages, CSS files, JavaScript files, servlets, servlet filters, servlet listener, JSPs, JSP tag libraries, and Struts controller page-flow (struts-config.xml). The program also includes WYSIWYG editors for HTML, JSP, and Struts, all of which help speed Web development.

Figure 4. The WYSIWYG JSP-Editor: The image shows the WYSIWYG JSP-Editor.

New Web services functionality in Oracle JDeveloper 10g is especially remarkable. It can generate almost every artifact used in Web services?even a standard Java class or a PL/SQL stored procedure can be converted to a Web service with just a few clicks.

Another highlight is the integrated J2EE container. Usually, a servlet, an EJB, or an entire Web application must be first packed and deployed into a Web server or application before you can test it; Oracle JDeveloper 10g lets you simply click “RUN” on such a component. Internally, the embedded Oracle J2EE container is configured so that the current project is started as a Web application. For example, once started, the servlet waits for an incoming request. With Oracle JDeveloper 10g, you don’t even have to start a browser; the program does it for you, automatically calling the correct URL to talk to the servlet. This feature significantly shortens development cycles and creates much more fluid working procedures.

Once you complete your application, it must be deployed into a production container: Oracle JDeveloper 10g supports this task with handy wizards that, once configured, let you deploy with one click. One-click deployment is supported for Oracle Application Server, JBoss, BEA WebLogic, and Tomcat.

Oracle Application Development Framework (ADF)
Since the first release of Oracle JDeveloper, Oracle has integrated its J2EE frameworks into the IDE. The new Oracle Application Development Framework (Oracle ADF), in Oracle JDeveloper 10g, is an end-to-end J2EE framework designed to increase developer’s productivity while keeping the technology choices open.

You can easily mix Oracle technologies with open source or third-party technologies through a thin binding layer, which decouples the view/controller layer from the business service layer. Binding a UI to data is now easier, offering a similar development experience as when building swing and Web UIs. (The underlying architecture has been submitted as JSR #227 to become a standard.)

Some of the ADF features are an evolution and consolidation of features available in previous releases of JDeveloper like ADF Business Components, ADF UIX, and ADF JClient. But the framework also integrate Struts, Toplink , EJBs, and Web services now.

The most interesting features of ADF are:

  1. UML tools for modelling and generating business logic.
  2. Visual editors for designing user interfaces (rich client and thin client).
  3. Page-flow modelling of Web pages (using the Struts visual modeller).
  4. Drag-and-drop data binding for user interfaces.

Let’s look at the frameworks that together with Struts create the most declarative technology stack combination in Oracle Jdeveloper 10g.

ADF Business Components: The ADF Business Components framework is a pure J2EE framework, relying on Java and XML technologies. It takes the task of object-relational mapping and encapsulates the business logic for an application. It’s built in several tiers: the lowest level is the Entity Objects, which maps 1:1 to tables or views in the database. On the base of the entity objects you build View Objects, which encapsulate the SQL statements and can create Entity Objects from returning the result set. View Objects can be linked to each other via View Links and are grouped in Application Modules on a use-case basis.

One of the strengths of this framework lies within the delivery of completely implemented complex J2EE design patterns, which are implicitly used by ADF Business Components without developer input. Click here for further details.

Oracle ADF has built-in support for using TopLink, EJBs, Web services, or Javabeans as a persistence solution, in addition or instead of the ADF Business Components.

UIX (User Interface XML): UIX is an extensible J2EE framework for developing Web UIs for enterprise applications. Based on the MVC design pattern, it provides a flexible development platform for not only classic HTML UIs, but also for modern clients like PDAs and smart phones.

UIX is used to generate dynamic HTML content, but it can also control page flow. UIX doesn’t restrict you to use BC4J as a persistence framework; you can use any other middle-tier framework such as EJBs or Hibernate. One advantage of UIX is that it provides a very large number of beans, which can present data from a business service in different and complex ways with layout managers (known from Swing programming).

JClient: The JClient framework, which is used for Swing clients, offers a comfortable solution for coupling the model of a swing component to a BC4J View Object. This works from within the visual UI editor, which makes it easy to develop simple forms with data binding.

Something For Everyone
Oracle JDeveloper 10g offers an extremely capable Java development environment which does not have to hide behind other modern IDEs. In addition to the typical features found in modern Java IDEs, it supports J2EE beginners with wizards wherever possible, a 4GL way of developing applications, and ready-to-use frameworks. Experienced developers will enjoy a wide variety of one-click code artefacts, comfortable editors, embedded tools, and robust J2EE frameworks, all of which can greatly boost productivity. If you already have an Oracle database in the backend, Oracle JDeveloper 10g surely should get on the top of your shortlist. But also for applications in a non-Oracle environment, Oracle Jdeveloper 10g is an interesting contestant.


About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist