David Giammona, whose blog has somehow escaped my notice until today, has written an excellent whitepaper on best pratices for sharing data and intitating navigation within regions. You can read about it here
Not really on-topic to my usual ADF postings, but I read a news article today about a new search engine (www.cuil.com) that was supposed to be a challenger to Google. I did a search or two, and really liked the layout of the search results. Then I did what everyone does with a search engine (search for his or her own name) and searched on “John Stegeman Jdeveloper” – that’s when I started to dislike the engine.
Here’s a few of the pictures that were included next to various results:
who is that guy?
this one shows up next to a blurb about one of my blog posts on Steve M’s blog.. Steve has more hair than that!
I’m not Don Burleson!
I’ve got a few years on him…
Another one next to a Steve M blog post…
I guess I don’t like cuil that much after all
Well, I’m back to the blog after a long hiatus. Much like Tom Kyte, I seem to be getting much grouchier lately. No, it isn’t age, the weather, or the fact that <insert name of sports team here> didn’t win the <insert name of major sporting event here>, it’s the fact that quality of the questions over on the JDeveloper Forum seem to be going downhill lately. Yes, there are some people who still take their time to post well thought-out questions that include versions, a description of what they are trying to do, what they have tried, what they found when googling, etc.; however, there seems to be a growing number who:
- Obviously haven’t or are too lazy to click the “search” button or use Google to find the solution.
- Clearly think their time is too valuable to waste over posting more than one sentence plus the obligatory “PLZZZ its URGENT.”
- Post to the wrong forum. The OA Framework people seem to be pretty notorious for this.
- Don’t want to try to solve the problem themselves. Sometimes, I’ll drop a hint for such questioners, but it’s usually firmly ignored.
- (had to come back and update this post about this one) Post their question as a reply to another question from 3 years ago asking the original poster (who often hasn’t posted anything in the intervening 3 years) “did you solve this?”
Now, I know we all don’t have scads of free time, but it seems to me just common courtesy to invest at least some time in researching and debugging on your own before posting a question and similarly investing some time in phrasing a proper question with details, use case, etc? The people who are answering questions on the forum are usually doing so on their own time and really do want to help, but I am finding that I’m less and less motivated to answer questions when I see more and more people commiting blunders like this. I’m guessing that I’m starting to sound like an old f*rt on the forums now. Sure, it’s fun posting sarcastic replies (depending upon my mood at the time), but I really do start to notice my blood pressure going up nowadays.
Is it just me?
It’s been a while since I’ve posted here – working on client projects and attending/presenting at a conference here or there takes up a bit of time.
Now that things have cooled off a bit for the holidays, I took the opportunity to attempt migrating a JDeveloper 10.1.3.3 ADF BC/ADF Faces application to the 11g TP2 release of JDeveloper. The migration was, for the most part, pretty smooth… that is, until I tried to run the application. The application uses a custom Login Module to handle authentication; I tried setting up JDeveloper 11g the same way I set up 10.1.3.3 only to (eventually) discover that JDev 11g doesn’t use JAAS, but uses something new called “JPS;” of course, there’s no documentation yet.
I tried my usual best effort of munging about with the jps-config.xml file with no success. Then, out of frustration more than anything, I stumbled upon the “ADF Security Wizard” lurking up there in the “Tools” menu. The nice thing about this wizard is that it (on step 6 of 9) provides a nice dialog box for configuring login modules for the application. Furthermore, it creates an application-specific jps-config.xml in your application directory, and does not modify the global one in the oc4j config directory. Whoo hoo! No more manually editing system-jazn-data.xml every time I need to switch to a different application with a differing login strategy
Happy Christmas to all!
String sqlStmt = “select x from y where username='” + userName + “‘”;
stmt = new PreparedStatement(sqlStmt, 0);
Now, anyone who reads Ask Tom is already falling out of their chair. The real problem is in the first line of code; first of all, imagine what happens if someone puts this string into userName: x’ or ‘1’ = ‘1
Can you say “SQL Injection?” The second problem with this approach is that for each value of userName, this generates a unique SQL statement, which Oracle has never seen before, and must hard parse. Hard parsing in Oracle, well in most any database, really, is an operation that takes lots of CPU and inherently limits scalability. If you run this query a lot with different values of userName, you’ll bring the system to it’s knees. What the query should do is use binds, like this:
String sqlStmt = “select x from y where username= :1”;
stmt = new PreparedStatement(sqlStmt, 0);
Now, no matter what that pesky user puts in userName, this code does not expose the security risks as the first one. Additionally, the SQL is the same from call to call (it never changes) – therefore you don’t have the hard parsing problem, either. Now to make the code even better, we could cache the prepared statement and bind/execute on subsequent calls, but I’ll leave that one to you.
In addition to all of the cool toys (robots and helicopters) shown at the Java Toy Show (general session of JavaOne 2007 on Friday morning), a NetBeans guy from Sun got up and did a demo of Netbeans 6.0 and JRuby on Rails (a scripting-languaged based web application framework). He created a Ruby on Rails application, created persistence classes from a database using a wizard, created a simple web page showing the database information, and ran it all from within the IDE. Judging by the audience reaction, people were impressed. My reaction, on the other hand, was, as we used to say as kids, “big whoop.” Haven’t we been doing this in JDeveloper for, I dunno, 8 years or something?
There’s more to JavaOne than listening to presentations. You could…
View a 3D world:
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:
- 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
- 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)
- 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.
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…
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.”