Archive for Category ‘Oracle‘

Viewing Bit.ly metadata on a post

I just added a way to autmatically add url shortening to each post. It uses the bit.ly service and their nice widget which opens a small box into the page with the shortened url ready to be posted on twitter or other services, and shows a nice set of metadata for the post itself. Here is how it looks like:

Bit.ly metadata for a post

Bit.ly metadata for a post

To add it I modified the template adding this:

at the bottom of each post single-page template (single.php) and at the bottom of each post in the main index template (index.php)

Tips for Optimizing Rails on Oracle

My article Tips for Optimizing Rails on Oracle has been published on the Oracle Technology Network site! I can’t say how much i liked working on this.

I tried to synthesize in one place all that needs to be known to make the best from the two technologies and explained all of the tips in oracle-specific terms.

Rails on Oracle comes out as a good performer, but my only regret is that i did not have time to investigate (and maybe contribute back to the community) on adding proper bind variables support to ActiveRecord, which would have been the definitive optimization, but I see that the subject is being actively discussed on the core developers ML, so we may get there soon ;)

On the side, for those interested, I made “a Rails “version” of the HR schema that has been modified to directly comply with the common Rail conventions

I hope that what i wrote there makes sense and I’d love to hear what you think!

technorati tags:, , , ,

Rails Query Analyzer Plugin (now also on Oracle and Postgresql!)

A few days ago I discovered the query_analyzer plugin in a comment on the last article of The Rails Way series. It allows you to have the plans for the queries used in your application directly in the log file and this is invaluable when trying to to optimize the database for you shiny new rails application.

On the downside it was only for mysql and my oracle developer half though that it was what I needed, so here it is (with Postgresql support as well).

Use it but be warned that I don’t want to fork this plugin, so I haven’t prepared a proper svn access to it and I hope that my additions might be integrated by Bob Silva in his own codebase (I’ll post a comment in his blog since I can’t find any other way to contact him).

Download the modified plugin

Most Commonly Used Methods in ADF Business Components

ADF Business Components are part of a deep and wide framework which can be used to build database enabled java applications. It is very easy (also thanks to the Jdeleveloper IDE) to begin working with them and to build data driven applications. But as with any such big framework it is sometimes difficult to gain a good understanding of how to go past the common usage patterns.

What is needed is higher level knowledge of the way the various framework classes work together, and which are the interfaces and the API handles you could use to fulfill a specific application need.

This article form Steve Muench gives you:

a high-level description of the key ADF Business Components classes in the Oracle Application Development Framework, summarizing the methods that ADF developers write, call, and override most frequently.

When i began using bc4j in 2001 i spent quite some time to understand how the different pieces fit together, and some of the solutions i found were not so correct (aka hacks…) from the framework point of view. This document would have saved me more than some headaches!

Also highly recommended for anyone working with ADF is Steve’s weblog: Dive into BC4J and ADF