In the spirit of the last post, I want to talk about another design pattern that’s useful in a wide range of Java development cases, and for which I think better tooling support (maybe in the form of a JDeveloper addin!) would be very useful: The bridge, also known as the driver. You’re probably familiar with the term “driver,” at least in the sense of device or JDBC drivers, and as we’ll see, there’s a reason why the driver pattern shares a name with them.
The stated purpose of this pattern is to “decouple an abstraction from its implementation so that the two can vary independently.” This may not make much sense at first, so we’ll start with a concrete example.
This week’s post will be the first of a five-week series about an important but little-discussed topic: Tuning your business components for maximum performance. A lot of projects put very little effort towards business components tuning (usually nothing more than improving the SQL of expert-mode VOs), and because of this, a lot of developers new to the framework come away with the (false) impression that business components perform poorly. Business components actually perform quite well, so long as they’re properly tuned.
This week, I’m going to talk about tuning entity objects. Over the next weeks, I’ll cover associations, view objects, view links, and application modules.
Continue reading ADF BC Tuning I: Entity Objects
Hey, did you know that, even if you create a “Programmatic View Object” (rows populated programmatically, not based on a query), you can set “bind variables” for it? Neither did I until very recently. You can’t do it in the Create View Object wizard (because the Query page never appears), but once you’ve got that VO, you can indeed add bind variables in the editor.
“Why on earth would you want to do that?” you ask (or, at least, I imagine you asking). “Bind variables are meant to allow the application or user to specify bind parameters for a query, and a programmatic VO doesn’t have a query.” Indeed, that’s what bind variables are usually for, but here, I’m going to show you, at least in outline, how to use this feature to make the ultimate 100% declaratively customizable framework classes (one view object class, one view definition class) for view object definitions based on REF cursors (i.e., whose instances will call a package function to retrieve their row set, rather than execute a query).
Continue reading The Power of Properties II: The View Object