Design Patterns and You: The Decorator

So, I’ve been doing some work on my Framework for Package API-Based ADF BC (locking doesn’t work as-is, and it turns out the framework needs some pretty significant re-architecture to get it to), and between that and my regular work, I’ve been a little ADF’ed out. So for a couple of weeks or so, I’m going to do something I haven’t done a lot of in this blog, and post a bit about pure Java. This will, hopefully, contain techniques of interest to ADF developers, and I’m probably going to use some ADF-based examples, but I’m mostly going to be talking about “Java techniques that they don’t teach you in a 5-day Java class.”

While working on the new version of the Framework, I’ve run into some significant annoyances, by which I mean the sort of coding work that a monkey–or better yet, a tool–could do but is long and fiddly to do by hand. This isn’t something that will primarily bug your average ADF developer, but it’s a sufficiently common Java technique that it would be a useful add-on for any Java IDE, JDeveloper included. It’d be a neat project for my Copious Free Time, but for now I’m just going to throw it out there in case anyone’s interested: The automatic generation of a decorator. Even if you’re not interested in that, you might want to read this article, just to get a feel for an important design pattern.

Continue reading Design Patterns and You: The Decorator

ADF BC Tuning IX: Application Modules, Part 3

This is the last in a series of posts about tuning business components. The complete list:

The last post was about understanding application module pooling, so I’m going to assume you understand it now. And if you understand application module pooling, you can understand the pain points from a performance perspective, and you can gain some idea of how to balance out differing concerns. Here are the pain points, in decreasing order of importance.

Continue reading ADF BC Tuning IX: Application Modules, Part 3

Framework for Package-Based ADF BC, My ODTUG Schedule, and More

Like the poltergeists, I’m baaack. I’m back to my usual health, and while I’m still pretty horribly snowed under, I think that enough of the worst of it is over that I can generally commit to my “Updates Mondays” schedule again. This has been a *long* hiatus (over 6 motnths), and I’m very glad to be back among the lang of the living. I’ve missed this blog and the ADF community generally.

Although I plan to get back to the ADF BC Tuning series soon, I want to use this post to announce two things: The first piece of software I’m releasing on this site and my public (that is, not just as an audience member) at ODTUG Kaleidoscope, which will be next week in Monterey, CA.

First, the software. This is actually related to one of the talks I’ll be giving at ODTUG, and tangentially related to another. But even if you aren’t going to the conference, I hope you’ll find it useful. It’s an extension of the ADF BC framework that allows you to create the following 100% declaratively:

  • Entity object definitions (including support for optimistic or pessimistic locking and Refresh After… settings) that use Package APIs instead of DML
  • View object definitions (whether entity-based or not, and including support for query parameters) that use Package APIs instead of SELECT statements
  • Associations and view link definitions involving the above

You can get the framework here.

At ODTUG, I’ll  be participating in the following:

Hope to see you there!

ADF BC Tuning IV: View Objects, Part 2

Continuing on from the last post, we’re looking at ways to tune ADF view objects for optimal performance and resource management.

Forward-Only Mode

In most applications, the user needs to be able to scroll through data both forwards and backwards–to return to a previous row in addition to simply being able to scroll forward, or to find rows an earlier view row after finding a later one. Because of this, by default, once rows from a view object’s query result are read into the view cache, they stay there. If your JDBC fetch size is 18, then initially, only 18 rows will be in the view cache, but when request rows outside the first 18, that number goes up to 36, then 54, then 72, and so on.

Continue reading ADF BC Tuning IV: View Objects, Part 2

ADF BC Tuning III: View Objects, Part 1

Now that we’ve looked at tuning entity objects and associations, we’ll turn to talking about tuning your ADF view objects for good performance and memory management. There’s a lot to say about tuning view objects (more than for any other business component, in my opinion), so I’m going to break this topic up over two posts. This week, we’ll discover the reasons for and against basing read-only view objects on entity objects, learn how to control how much data is fetched into the middle tier at one time (and how to optimize this for your particular case), and talk about what passivation of view objects is and how to control whether and how much of it happens. Next week, we’ll talk about query-level range paging, forward-only mode, and the spill-to-disk feature for handling very large caches.

Continue reading ADF BC Tuning III: View Objects, Part 1