Thursday, 8 May 2008

ADF Faces RC - the humble inputText control - it's all about the presentation baby!

On conception the JSF specification received lots of complaints for its simplistic component implementations. The original JSF controls such as <h:inputText> were no better than the vanilla HTML equivalents. Sun however didn't intend the core web component set to be used in JSF development, but rather as a showcase to vendors on how to create JSF components so they could write their own enhanced components.

Some years ago Oracle took this all on board when they developed their own JSF component set known as ADF Faces within JDeveloper 10.1.3, and created some pretty "whiz-bang" components. Yet in the contemporary world of web development the recent rage has been about AJAX-AJAX-AJAX, and more recently Rich Internet Applications (RIAs). When it comes down to it in-my-honest-opinion, both AJAX and RIA are about "s3x appeal", ah, I mean how "visually appealing" the web components are, or more specifically how "rich" they are

So Oracle (in their wisdom ;) took this all on board (again) and did some "sprucing" of their own JSF components. We now have ADF Faces Rich Components (commonly known as ADF Faces RC or I'll refer to as RC for short in this post).

So what's changed?

There are lots of new and exciting components, such as accordion controls, sliders, trees, graphs, pivot tables and more (no really, lots more). But what about the good ol' humble <af:inputText> control, has it changed? The answer is yes, but not in the way it functions which is mostly the same, but instead in the way it appears; it's presentation is much better. As the blog title says, it's all about the presentation baby!

Let's check out some of the presentation changes between ADF Faces and ADF Faces RC:

For required fields in both versions we would code the following tag:

<af:inputText value="#{myBean.someValue}" required="true"/>

In ADF Faces and ADF Faces RC they look similar with the label star implying the field is required. The ADF Faces component looked as follows:


And the RC component, which besides a font colour change really isn't that different (yawn):


However in RC if we clear down the field and move to another field, we get this extra red box on the original field highlighting that the field is required:


If we submit the form in ADF Faces while the required field is null we receive this pretty bland browser error box:


Yet in RC we get these sexy graphics:



What happens if in a date field we enter a date with the wrong format mask supplied through validation + converter sub-tags? ADF Faces:


Yuck, another horrible browser dialog box. And in RC:


What about in an inputText control with converters and validators based on a number datatype? In ADF Faces if we enter character data into the number field we get:


No change. Yet in RC we see the sexy format mask tooltip plus the error border:


How about errors raised from the Model layer. ADF Faces:


And errors in RC:


As you can see there are plenty of changes to this humble little component. I'd argue the changes are all subtle in functionality because essentially the component still does exactly the same thing. However the changes are not so subtle in their presentation.

You might ask why did I bother to focus on such a trivial thing? Sometimes in the avalanche of new features in a new release I feel a little overwhelmed. So I like to go back to the basics and see how they've subtly changed in the new release, because these are the features we're more likely to make use of regardless of the new whiz-bang in the later releases.

This article was written using JDev 10.1.3.3 and JDev 11g TP4. Your mileage may vary on later releases.

Tuesday, 6 May 2008

OOW08 sessions on the Mix

Recently Justin Kestelyn blogged that Oracle is giving us the opportunity on the Mix to submit and vote on proposed presentations for Oracle OpenWorld 2008. Neat! Now we can all vote on Larry doing the Chicken Dance during the keynote!

I've taken the opportunity to post 4 sessions around the theme "back to basics" to assist those new to JDeveloper and Web Services. I hope you'll take time out to vote for them on the Mix as well as other presentation ideas you like:

Monday, 5 May 2008

JDeveloper: team development and version control tug-of-merge-war

For those who have used JDeveloper in a team based environment developing with ADF BC & Faces, you'd be familiar that there are a few essential files that become problematic in the supported version control systems. As an example under JDev 10.1.3 the ADF BC project's .jpr file is continuously touched while developers are modifying ADF BC objects, resulting in a file version control tug-of-merge-war on the .jpr file as it is copied back and forth from the file version repository on each developer's machine.

Thanks to Timo and Brenden (and the Geelong crew) recently on the OTN JDev forums, there was an interesting chat on their experiences on other files that cause similar issues. I refer you to the post to assist your understanding in the issues, as well as to add your own experience and solutions.

Friday, 2 May 2008

Why neither Apex or JDeveloper are actually "free"

I've always had trouble with the word "free". Because the people who bandy it around are typically in marketing and sales (or consulting ;). And they wouldn't be in a job if they actually sold stuff for "free".

Recently PsyBlog had a well articulated blog entry describing this sales-speak: FREE! But at What Price?

This is why the marketing for Apex and JDeveloper as "free" doesn't sit well with me, and neither the zeal behind the Apex and JDev camps with the argument "but it's free!". To me free means 100% free. No conditions attached. Forever. Covers all cases for you and me and everyone else. There shouldn't be a "yeah-but" situation with free.

As such Apex strictly isn't free because the majority of users are running it on a purchased licensed Oracle database edition. Of course it's "free" if you use it on Oracle XE, but I've yet to find a single customer with a substantial Oracle install willing to downgrade to the Oracle-lite version. I'm not saying there aren't Oracle XE sites out there, but (from my subjective experience) in the scheme of things most Oracle customers aren't using Oracle XE for production purposes. The Oracle salesman already got'em.

In turn JDeveloper isn't strictly "free" either. Arguably the IDE is, but JDeveloper is coupled with ADF (not free), WebCenter (not free) and SOA (not free). If we specifically look at ADF it is "free" as long as you own an OAS license or pay a per user seat license.

A question arises though, why did Oracle bother to make these tools "free", or more specifically the marketing exercise of "free"?:

Arguably for JDeveloper it was the other competing Java IDEs, namely Eclipse and NetBeans are free, so Oracle needed to compete on the same playing field to entice those sarcastic and critical Java crowd. For Apex the reason is not so clear to me as I don't work in the Apex circles and maybe a reader can put their opinion forward. If Apex only runs on Oracle, why bother with the "free" marketing unless it's just a feel-good? Why not just say SQL and PL/SQL are also free with the database? Why did they pick Apex? To compete with JDev? I dunno.

So the next question arises, how could Oracle go about making these tools really "free" (be it a realistic dream or not)?:

For JDeveloper it's obvious. If you couple a component such as ADF with the IDE, then remove any of the OAS license caveats. Otherwise if you're going to include another part in the base download, either make it free or strip it out as a clear downloadable plug-in.

For Apex, if I use an Oracle non-XE edition (eg. SE, EE etc), and I use no features but those available to Oracle XE, and Apex, then make it free across the board, database included, regardless of edition.

Realistic: no?

Idle Friday musings?: yes.

Give you a good chuckle?: I hope so.

Oh, and I'm still waiting on Oracle to apply the same "free" marketing to Oracle Forms, be it "free" as long as you install to OAS ;)

BTW, take time to check out other articles on PsyBlog. My recent favourite: How Children Learn the Earth Isn't Flat.

4 things I read more recently (which language will make me filthy rich!)

People spend a lot of time arguing their language is best. A pointless exercise. They really should focus on which language is going to make them dirty rotten filthy rich!:
  • Java Jobs in Decline? Not So Fast! - James Sugrue on JavaLobby throws the idea in the air that Java isn't on a decline, it's the whole IT industry. Doom doom doom I say! Make sure to check out the comments
Okay, so that's 5 entries. Oops.