Oracle Team Productivity Center

akoelewijn | Jul 2, 2009 01:21 -0600

Yesterday Oracle released Oracle Fusion Middleware 11g, a SOA stack including WebLogic, BPEL, Rules, Metadata support, Oracle ADF, and improved declarative programming support in the new release of JDeveloper. If you google it, you’ll find plenty of blogs describing all the details of this new release.

One thing that surprised me is that Oracle now also has Application Lifecycle Management tooling including a server part and JDeveloper support. Oracle’s ALM tool is called Oracle Team Productivity Center. What sets it apart from alternatives like Eclipse Jazz/Rational Team Concert and Microsoft’s team system is Oracle’s support for different backend stores. You can use Jira for bugs/todo’s or you can use Rally Software ALM tooling, designed for Agile projects.

I think it’s a good thing that Oracle have finally released ALM tooling. In the past we’ve build our own ALM servers, mainly from opensource components like subversion, trac, and continuum. The fact that Oracle has released an ALM tool stresses the importance of good ALM facilities. Often, no budget at all was available on projects, so we mostly used free opensource solutions that we had to quickly throw together, as there was also limited time to install it.

Share and Enjoy: del.icio.us Google Bookmarks DZone SphereIt StumbleUpon Technorati LinkedIn TwitThis

Firefox 3.5 released

akoelewijn | Jun 30, 2009 12:06 -0600

Firefox 3.5 has been released. Not everybody is excited about this release, but most reviews are quite positive. In my opinion, the enhanced javascript performance is the most important improvement, but features like the html 5 video and audio tags, offline support, @font-face, geolocation support and cross site XHR are not to be underestimated.

As far as i’m concerned, Firefox 3.5 marks the moment when Microsofts fears have materialized: modern browsers are now really an alternative to desktop applications. No longer are they just for rendering pages (or slightly enhanced by some ajax scripting), but the complete view layer can be implemented using open browser technology. The server is no longer needed for the view layer. We’re back into client-server architecture. Some interesting examples that are enabled by modern browsers illustrate this: offline html5 gmail application for the iphone and Google Wave.

Share and Enjoy: del.icio.us Google Bookmarks DZone SphereIt StumbleUpon Technorati LinkedIn TwitThis

Using Twitter OAuth with Rails + sample

Paul | Jun 29, 2009 17:46 -0600
I've been using rails with the Twitter REST API of late, using the oauth gem as the base. It works well, but keeping up with the API changes can be a challenge!

In the recent update to OAuth 1.0a, there were two critical changes required:

Web-apps should specify the oauth_callback


Through trial-and-error, I found that if you don't explicitly specify the oauth_callback when going through the authorization process, twitter will halt at the PIN page (behaving as if you are using a client application). That's easily fixed..
request_token = consumer.get_request_token( :oauth_callback => TWOAUTH_CALLBACK )
session[:request_token] = request_token.token
session[:request_token_secret] = request_token.secret
# Send to twitter.com to authorize
redirect_to request_token.authorize_url

NB: the root cause is that oauth 0.3.5 sets "oob" as the oauth_callback if you don't explicitly set it. This triggers the twitter desktop PIN flow.

Include the oauth_verifier when exchanging the request token for an access token


Next, the major change in 1.0a was to add an oauth_verifier parameter. Twitter sends this back to you after the user has authorized access, and you need to include this parameter when exchanging the request token for an access token.
request_token = OAuth::RequestToken.new(consumer, session[:request_token], session[:request_token_secret])
access_token = request_token.get_access_token( :oauth_verifier => params[:oauth_verifier] )


An example application


I've created a minimalist application that demonstrates the twitter API with OAuth 1.0a in rails. I've set this up to run at heroku.

The source is at github for all to share: http://github.com/tardate/rails-twitter-oauth-sample/tree/master

And there's a running demo site at http://rails-twitter-oauth-sample.heroku.com.

Howto: Grails, REST, Google App Engine and JQuery

akoelewijn | Jun 26, 2009 13:00 -0600

Here’s a quick example how you can build a RESTfull Grails application and deploy it to Google App Engine. For this example you need Grails 1.1.1 and GAE SDK for Java version 1.2.1.

I’m going to create a small service which will return a wind forecast. The forecast data is hardcoded as this is just some sample data.

First create the grails application, remove the hibernate plugin, and install the app-engine plugin:

grails create-app windapp
cd windapp
grails uninstall-plugin hibernate
grails install-plugin app-engine

Make sure you’ve got your APPENGINE_HOME environment variable configured correctly. It should be something like:

export APPENGINE_HOME=/home/akoelewijn/programs/appengine-java-sdk-1.2.1

Next, I’ll create a controller which will implement a function to return the windforecast in JSON format:

grails create-controller Forecast

Edit the controller, and implement the method. The method just puts some dummy data into an array, which is returned as a JSON datastructure:

import grails.converters.*
class ForecastController {
    def show = {
    	def forecast = []
    	forecast << [ windspeed: 5, winddirection: 200 ]
    	render forecast as JSON
    }
}

Next, we need to edit the url mappings, calling the path /forecast will execute the method implemented above:

class UrlMappings {
    static mappings = {
        "/forecast"(controller:"forecast"){
            action = [GET:"show"]
        }
      "/"(view:"/index")
	  "500"(view:'/error')
	}
}

We have now implemented the service, which you can test, for example with curl. Test the application locally as follows:

grails app-engine run
curl http://localhost:8080/forecast

To test it on the google app engine, we first need to create an application. Log into Google app engine and create an application here: http://appengine.google.com/. For convenience, i’ve given it the same name as my grails application: windapp.

Now i can deploy the application:

grails set-version 1
grails app-engine package
$APPENGINE_HOME/bin/appcfg.sh update ./target/war

You should now have a running service. Again, we use curl to test it:

curl http://windapp.appspot.com/forecast

Now, using JQuery, i’ll create a simple html page to test the service. Create the webpage: web-app/index.html. To keep it simple, i’m using a google hosted version of jQuery, and i’m including all the javascript code in the page:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
  <head>
    <title>Forecast service test</title>
    <script type="text/javascript" src="http://www.google.com/jsapi"></script>
    <script type="text/javascript">
    	google.load("jquery", "1");
		google.setOnLoadCallback(function(){
			$("#getForecast").click(getForecast);
		});
		function getForecast(){
			$.ajax({
				type:"GET",
				url:"/forecast",
				success:function(json){
					$("#forecastResults").text("Wind speed: " + json[0]["windspeed"] +
                                        ", direction: " + json[0]["winddirection"]);
				},
			    dataType: "json",
			    contentType: "text/json"
			});
		}
    </script>
  </head>
  <body>
  	<h1>Forecast tester</h1>
  	<button id="getForecast">Get Forecast</button>
  	<div id="forecastResults"></div>
  </body>
</html>

Redeploy the application to app engine:

grails app-engine deploy

Here’s the resulting page: windapp. Just push the button to call the REST service.

Share and Enjoy: del.icio.us Google Bookmarks DZone SphereIt StumbleUpon Technorati LinkedIn TwitThis

Web Squared: Collecting data and turning it into information

akoelewijn | Jun 26, 2009 01:22 -0600

Must read follow-up on Web 2.0: Web Squared: Web 2.0 Five Years On.

One aspect stressed in this article is the importance of mobile phones. Not just as a means to use the internet while on the move, but more importantly, as a way to collect data.

Share and Enjoy: del.icio.us Google Bookmarks DZone SphereIt StumbleUpon Technorati LinkedIn TwitThis

EclipseLink in Galileo: Persistence at your fingertips

Doug | Jun 24, 2009 05:27 -0600

The Eclipse Galileo release signifies another important milestone for the EclipseLink project. The Galileo release makes EclipseLink 1.1.2 available and easier to use for the entire Eclipse community. Developers using the Java EE or Modeling Tools distributions of the Eclipse IDE will find EclipseLink included and available for use in Equinox OSGi, RCP, EMF, Java EE, and Java SE applications.

The EclipseLink 1.1.2 release includes a comprehensive set of persistence services:

  • EclipseLink JPA: Java Persistence API support for object-relational mapping with many advanced mapping, performance, and scalability features targeting Java EE, Java SE, and OSGi usage with Equinox specific extensions.
  • EclipseLink MOXy: Object-XML Binding (JAXB) support including advanced mappings, meet-in-the middle mapping without annotations, and pluggable parser support for optimal performance.
  • EclipseLink SDO: Service Data Objects 2.1.1 reference implementation including a Data Access solution for integrating JPA entities with SDO.
  • EclipseLink DBWS: Database Web Services solution enabling the generation of JAX-WS services based on relational metadata harnessing EclipseLink's JPA and MOXy capabilities.


EclipseLink for Java Developers


EclipseLink's inclusion in the Eclipse IDE for Java EE Developers combined with the extended support in WTP's Dali Java Persistence Tools project allows developers to start building JPA enabled applications quickly and easily. The Dali integration allows developers to optionally select EclipseLink as their JPA implementation and have it automatically added to their project classpath. This support along with Dali's rich validation and intelligent code assist provide a highly productive environment for developing, testing, packaging, and deploying JPA enabled applications.


EclipseLink for Modeling


The Eclipse Modeling Tools package of the Eclipse IDE includes the EclipseLink JPA feature and Teneo's EMF/EclipseLink integration. Teneo's EclipseLink support provides tools to generate JPA mappings from an EMF model or simply map their EMF models to a relational database. It also extends EclipseLink JPA with transparent runtime support for persisting EMF models. This out-of-the-box support for JPA persistence for EMF models will simplify the development of RCP and Equinox applications that leverage relational databases.

EclipseLink for RT


The EclipseLink project is also available as part of the Galileo update site under the EclipseRT Target Platform Components allowing developers to leverage P2 for provisioning of their Equinox (OSGi) environments. The provisioning allows developers to select the persistence services they require; JPA for object-relational, MOXy for Object-XML binding, or SDO for Service Data Object usage and have the necessary bundles downloaded and setup in their target platform environment.



Please download Galileo and try out the new EclipseLink capabilities. Provide us feedback on your experiences through our newsgroup.

The EclipseLink Team

You can have your delimiter in any character, as long as it is comma

Andy Todd | Jun 23, 2009 21:09 -0600

On a recent project a number of interface files were defined as “ASCII encoded DOS files with CRLF (ASCII code 13 and 10 respectively) end of line markers and the field delimiter is | (Pipe character - ASCII code 124)” or in plain language, pipe separated values files.

Now the casual observer would think that these are the same as CSV files, but with a different delimiter. And you would almost be correct -as long as you aren’t relying on popular desktop productivity software to produce your files.

The reasons for this exact format are lost in the mists of time but these files are supposed to be easy to produce by anyone with a computer. The assumption was that most of the people producing these files would be running Microsoft Windows and Office.

This leads to the assumption that you can enter your tabulated data into Excel and save as a pipe delimited CSV right? Wrong. It is next to impossible to do this in Excel unless you change some system wide settings. To which my first response was WTF?

Luckily, Python came to my rescue and all I needed to do was this:

>>> import csv
>>> old_file = csv.reader(open('blah.csv'), dialect='excel')
>>> new_file = csv.writer(open('ANDY.csv', 'w'), delimiter='|')
>>> for record in old_file:
...     new_file.writerow(record)

Of course, this doesn’t help the average person in the street who doesn’t have my l33t Python skills. So I’ll be changing the interface format as soon as I get a chance.

Running Heroku on Windows

Paul | Jun 23, 2009 00:23 -0600
What! Do rails development on Windows?

I've raved about heroku before, and it still roasts my bacon.

In recent months, there's been a bit of a switcheroo - first the migration to herokugarden, which retains all the original online editing and hosting. The perfect solution for hobby projects or prototypes. Now I'm migrating back to heroku itself, which has become their solid production hosting facility for rails applications.

As Sarah Mei reported, the heroku gem (used to create and manage your heroku application instances) had problems running under Windows, due to gem dependencies that do some decidely un-Windows things.

There is now an updated heroku gem (1.0) that I just tested out, and am happy to say it is now working fine under Windows. There are some dependent gems and it can be required to make sure you get the version that specifically supports windows. That used to include json, but at the moment the main version-pegged gem I'm using is sqlite3-ruby (at 1.2.3 instead of the head at 1.2.4)

$ gem install sqlite3-ruby -v 1.2.3
$ gem install heroku
Successfully installed heroku-1.0
1 gem installed
Installing ri documentation for heroku-1.0...
Installing RDoc documentation for heroku-1.0...

Perfect! Testing it out..

$ rails myapp
$ cd myapp
$ git init
$ git add .
$ git commit -m "init"
$ heroku create myapp
Created http://myapp.heroku.com/ | git@heroku.com:myapp.git
Git remote heroku added
$ git push heroku master
Enter passphrase for key '/d/MyDocs/My Dropbox/Config/Security/ssh/id_rsa':
Counting objects: 65, done.
Compressing objects: 100% (58/58), done.
Writing objects: 100% (65/65), 80.48 KiB, done.
Total 65 (delta 14), reused 0 (delta 0)

-----> Heroku receiving push
-----> Rails app detected
Compiled slug size is 80K

-----> Launching...... done
App deployed to Heroku

To git@heroku.com:myapp.git
* [new branch] master -> master

Sarah gave the hint as to how to fix the older heroku gem (0.9.1), and has a forked version on github. A few people collaborated to fix up the code there so no longer any script editing required (basically to remove any dependency on taps for the gem build). Installing Sarah's version involved cloning the repository, building the gem and performing the local gem installation:

$ git clone git://github.com/sarahmei/heroku.git
$ cd heroku
$ gem build Rakefile
$ gem install heroku

DBJ - Ten Dials To Set

Sean Hull | Jun 12, 2009 05:00 -0600

This month in Database Journal we start a two part article on tuning the dials of your new MySQL database.  After you install and setup your first database, you’ll need to set various parameters in your my.cnf file.  These control memory, logfiles, temp table usage, sorting, joins, and a whole lot more.  We’ll review some of the more important wants and start you on your way to more nuanced tuning of your MySQL instance.

Read the article: Ten Dials To Set at DatabaseJournal.com

Open Insights 56 - Cui Bono - To Whose Benefit?

Sean Hull | Jun 9, 2009 12:44 -0600

Issue 56 - Cui Bono - To Whose Benefit?

Open Insights 55 - Preserving Optionality

Sean Hull | Jun 9, 2009 12:43 -0600

Issue 55 - Preserving Optionality