JavaOne 2007: Shay Shmeltzer on "What’s new in JDeveloper"

May 10, 2007

Shay Shmeltzer of Oracle (note the fast hands)


delivered a session today (Thursday) at JavaOne detailing what’s new in JDeveloper release 11, which was just released the other day as a technology preview. The session was attended by (my estimate) 150 people:


After talking about the overall purpose of JDeveloper (keep people in the Java fold by providing a productive alternative to .Net), Shay gave a brief overview of version 10.1.3.2 of JDev, and built a nice demo, which of course, did not run. Stupid oranls18.jar!

Then came the exciting stuff. Any omissions or errors in this section are my own… The focus areas for JDeveloper 11 include:

  • Improved IDE
  • J2EE 5 support
  • Taking JSF to the next level
  • Further ADF improvements
  • Metadata Management

In the area of the improved IDE:

  • Javascript editor/debugger
  • SQL Developer integration (try opening a .sql file in JDev 11 – you’ll get the SQL Developer window)
  • New profilers – it looks like the dependency on Oracle’s JVM (ojvm) is removed, and you can profile with a standard JVM.
  • JUnit 4 support

J2EE 5.0:

  • EJB 3 diagramming, dialogs for managing persistence.xml and orm.xml
  • JSF 1.2 support
  • Web services improvements (JAX-WS, WSDL editor, WS tester, JSF 181 property inspector).

For me, the exciting stuff was in the JSF arena:

  • The new AJAX/Rich Client Framework components (100+ of them)
  • Reusability (page templates, page fragments, task flows, declarative components)
  • Security
  • Graphs (rendered in flash!)
  • Dialog/pop-up framework. In my view, much improved over the 10g release – pop-ups are now rendered in the page itself, not in a new browser window – solves a lot of problems.
  • Navigation menus. I see JDev 11 has a wizard for creating trees of managed beans instead of forcing us to edit XML by hand – quite nice.
  • (not in the technology preview) an “active data framework,” described as a push technology for JSF.
  • Advanced data streaming – if you have 3 tables on the JSF page, they can populate in parallel – the page render can happen before the data is fully loaded.

The ADF Task flows were also quite interesting. They are an extension of the JSF page flow concept, but are modular and re-usable. In addition to pages, page fragments, and method calls, ADF Task flows can also include other task flows. They also have support for bookmarking, transaction management, exception handling, and (ta-daaa!) the dreaded browser back button. I had a hard time conceptualizing the task flows until the demo…

In the demo, one of the things Shay did was to create a simple task flow composed of two JSF page fragments. Just like the simple tutorial we’ve all done, he created two fragments (instead of pages) – one to list (in an af:table) some items, and another to edit a newly created item. Then, he simply dragged the page flow into one of the declared facets on the JSF page template that he was using. Now, whenever he ran his demo, the list -> edit record -> return to list was rendered in the area of the template, independently of the rest of the page content. This looked to me like it was using PPR, so it was quite responsive. I’m going to have to play with this myself…

Shay covered more detail (obviously) than I’ve included here, but this looks like a serious new release of JDev. As Lucas Jellema writes, the Rich Client Framework components are being donated to Apache – with such an amazing, high quality set of JSF components available for free, it’s going to put a lot of pressure on JSF component vendors.


And now, for something completely different

May 10, 2007

By far, my favorite musician is Pepe Kalle He passed away a few years back from heart problems.

He sings in a mixture of language, but mostly a language from Congo (fka Zaire) called “Lingala.” I like lingala music in general for it’s good harmonic singing and the styles of dancing that go along with it. There are a variety of different music/dance styles, including ndombolo, soukouss, kwassa-kwassa, etc. For a non-African like me (read “dance and rhythm-challenged white guy”), it’s still fun. Just don’t expect to see me dancing like this at JavaOne, unless his band, or perhaps Kanda Bongo Man shows up.

YouTube is great…


Thomas Kurian Keynote at JavaOne

May 9, 2007

Thomas Kurian

did the morning keynote today at JavaOne. He pretty much went over the entire Oracle Middleware stack (Java/BPEL/ESB/WebCenter/Identity Management). There were some really cool demos. Duncan Mills (gotta get his picture) did a demo of the new rich client framework JSF components that come with JDev 11. Let’s just say, “you gotta see it for yourself.”

It’s pretty amazing to see a very responsive, AJAX application with not a lot of coding needed – certainly no hand-written Javascript. I was expecially amazed by the drag-and-drop (drag an item from a list of products and drop it in the shopping cart). Was that really just a browser?


JavaOne first look

May 8, 2007

It’s mid-afternoon on the first day of JavaOne. Most of the buzz in the keynotes today is around a newly announced JavaFX platform. It’s not completely clear yet what it is, but it does have a component called JavaFX Script which looks like it will be pretty cool for creating rich-client type applications.

Oracle, as promised, has released a preview version of JDeveloper 11 on OTN. I’ve had a chance to look at it, and there’s some great stuff to be had, including a bunch of new ADF Faces components that made me sit up and say WOW. Watch this space tomorrow (Wednesday) for some screen shots.

I attended the Ruby-on-Rails session this morning. Ruby-on-rails is a web application framework written completely in the Ruby scripting language. After using Oracle ADF for the past year, I was pretty un-impressed by Ruby. Yes, ADF is Oracle proprietary, but for the ability to create database-centric, good-looking web applications quickly, ADF wins this battle hands-down.

more to come…


JavaOne and other musings

May 5, 2007

After a long hiatus (projects take a lot of time, don’t they…), I’m back in the blogging world again. I’ll be attending JavaOne next week, and am looking forward to posting lots of information about the new JDeveloper version 11 preview release. It looks to be a tiring conference (who ever heard of conference sessions going until 11:30 pm), but should be lots of good information.

It’s been a week of travel for me. Last week, I was in Kenya for the week, then back to London on an overnight flight, off to work for the day, then off to Chicago the next day. On Monday, I’ll be leaving for San Francisco, then back to London after the conference. I think I’ll need a lot of real world “Java” (aka coffee) to keep me going.

Check back here often next week (during the JavaOne conference) – I hope to be posting once or twice per day.


selectManyShuttle part One

April 24, 2006

ADF Faces selectManyShuttle Part One: the database

Well, I’m a day or two late with my promised weekend posting for this, but, as “they” say, better late than never. There’s been a question over on the JDeveloper discussion forum that comes up now and again that asks, “How do I create/use the af:selectManyShuttle component?” It comes up often enough that I thought I’d write a post about how I implemented one. I’ve decided to break it up into multiple parts in order to simplify the discussion.

The af:selectManyShuttle is a component that is used to pick multiple items from a list, and it’s rendered as a “shuttle” component that looks like this. It’s a nice, elegant component for doing things like assigning students to courses, for example, which is the example I have chosen to use.

In this first installment, I’ll be going over the database design, and describing a stored procedure that I built to simplify use of the selectManyShuttle. The example I am going to be using is quite simple; the database will contain a student table and a course table. It will also have an “intersection” table called “enrollment” that is used to resolve the many-to-many relationship between students and courses. It’s this table that lends itself quite well to using a selectManyShuttle in the user interface. For a given course, we’ll display a selectManyShuttle to allow the user to assign which students are enrolled in the given course.

Tables and Triggers

The tables I’m going to be using are quite simple. Here’s a simple view of the database layout:

For those who’d like to follow along, here are the DDL statements that you can execute to create the tables:

CREATE TABLE STUDENT(student_id NUMBER PRIMARY KEY,
first_name VARCHAR2(32),
last_name VARCHAR2(32));

CREATE TABLE COURSE(course_id NUMBER PRIMARY KEY,
course_name VARCHAR2(32),
start_date DATE,
end_date DATE);

CREATE TABLE ENROLLMENT(student_id NUMBER NOT NULL, course_id NUMBER NOT NULL);

ALTER TABLE ENROLLMENT ADD CONSTRAINT enrollment_pk PRIMARY KEY (student_id, course_id);

I’ve also created a sequence and some triggers to automatically populate the ID’s:

CREATE SEQUENCE my_seq;

CREATE OR REPLACE TRIGGER student_bir
BEFORE INSERT ON STUDENT
FOR EACH ROW
BEGIN

IF (:NEW.student_id IS NULL) THEN
SELECT my_seq.NEXTVAL
INTO :NEW.student_id
FROM DUAL;
END IF;

END;

/

CREATE OR REPLACE TRIGGER course_bir
BEFORE INSERT ON COURSE
FOR EACH ROW
BEGIN

IF (:NEW.course_id IS NULL) THEN
SELECT my_seq.NEXTVAL
INTO :NEW.course_id
FROM DUAL;
END IF;

END;

/

There is one last piece to the database that I’ll explain here, but first a little more about the shuttle component. When you use an af:selectManyShuttle, the list of selected items is returned to you in an array. It’s this array that we need to use to populate our enrollment table. Now, we could simply iterate over the array in some java code and send a bunch of statements to the database one at a time, but that is very inefficient due to the overhead of a bunch of JDBC calls. What I decided to do was to write a stored procedure that would accept an array of student id’s and a course id and populate the enrollment table all in one fell swoop.

In order to do that, I defined a SQL type that would map to an array of java.lang.Integers:

CREATE OR REPLACE TYPE NUM_ARRAY AS TABLE OF NUMBER;

Then, I coded a simple stored procedure that would populate the enrollments for a course, given the course id and an array of student id’s:

CREATE OR REPLACE PROCEDURE Assign_Students_To_Course(p_course_id IN NUMBER, p_students IN NUM_ARRAY) IS

BEGIN

— CLEAR out enrollment table and insert enrolled students

DELETE ENROLLMENT
WHERE COURSE_ID = p_course_ID;

INSERT INTO ENROLLMENT(COURSE_ID, STUDENT_ID)
SELECT p_course_id, column_value
FROM TABLE(p_students);

END;
/

Because my enrollment table doesn’t have any additional information other than the primary keys of the students and courses, it was more efficient to just delete the existing records and insert all of the students for the course at once. The only thing in this procedure that may be foreign to some of you is the TABLE operator, which lets us use an array as a table in SQL. The column “column_value” is what Oracle uses to expose the actual data element stored in the array.

Lastly, because I wish to focus on the selectManyShuttle component, and not other elements, I used simple INSERT statements to insert a bunch of data for students and courses. In the next installment, I’ll show how to create the JSF page using the selectManyShuttle component.


No, I’m not dead, I’m testing

April 2, 2006

I’ve been silent for a while on the blog – our application is nearing production rollout, so it’s been a hectic few weeks. I plan to post some more interesting stuff once we go production. This has been my first JSF project using JDeveloper, and I must say that it’s been quite a productive environment (JDeveloper, that is). We basically came in with a blank sheet of paper (no database, no application, nothing but an Excel prototype of what the main screens in the application should look like) and a handful of team members – and here we are 2 months later with a fully-baked, robust web application with > 80 screens and > 20 reports (done in Oracle reports). Kudos to the JDev team for creating something that gives that kind of productivity.