Monday, July 23, 2012

Google DataStore with JPA and Spring

I like Google App Engine. It's fast, reliable and free. It also comes with Google DataStore, a NoSQL solution to store data. The only problem is that it isn't that easy to use with the technology you want. We, for instance, wanted to use JPA and Spring. We've been struggling for a little while, but in the end, we managed to get all the right libraries. To make our life easier, we poured all those libraries in a Maven POM file, and made an archetype out of it. That way, we can just generate a new project from that archetype, and we're good to go!

Follow these steps to get started (You need Maven 3 to sucessfully run the app!)
mvn archetype:generate -DarchetypeGroupId=be.c4j -DarchetypeArtifactId=gae-wicket-archetype -DarchetypeVersion=1.0 -DgroupId=be.c4j -DartifactId=gaeproject -DinteractiveMode=false
  • The parts in bold are what defines your projectname and default package
  • On the newly created project, do a mvn gae:unpack 
  • Now you can mvn gae:run your application
  • It's just a simple Wicket Hello World app, but it's a base to start from
This setup was made to prepare our Summer of Technology session. A lot of thanks go to Sebastian Van Sande for sorting out dependency issues and creating the archetype.






Wednesday, July 18, 2012

Cloud IDE

Today, I stumbled upon somtehing I've been searching for quite a while: an online IDE in the Cloud! No more need to install stuff on your PC, just develop anytime, anywhere you are. I discovered Cloud IDE, where you can sign up for a free account. Moments later, your personal domain has been created and you can start developing!

There are some very interesting options once you are logged in. You can link (a.o.) your Cloudbees and Google App Engine accounts. That way, you can easily create and deploy applications. There is a sample GWT project that you can import to Cloud IDE, and when your Google App Engine account has been linked, the new project is deployed within seconds. A lot of nice functionalities, all out of the box.

Of course, there are also drawbacks. You need a relatively fast internet connection, but I guess that's not really an issue anymore these days. Further, the IDE isn't nearly as extended as Eclipse or IntelliJ. The 'develop in the cloud' concept is obviously still in its childhood, but it looks promising. There's GIT support, you can use Maven, create applications directly in your Cloud platforms, ... You can even collaborate on the same project with up to 5 users in the same domain.

More features will be added, while gathering feedback from developers. I like the idea, but it's yet another IDE to get used to. I'm looking forward to playing around with it, and the ease of integration with PaaS providers is a big advantage for me. The Cloud is ever expanding!

Monday, July 16, 2012

ADF tip: RowIterator

An ADF tip I can give you is the following: if you need a RowIterator multiple times, store it into an object. We've had an issue with getting it 2 times. Our application didn't give an error, would would appear to be busy forever, while not returning any results.

This was our case:
SomeVORowImpl someRow= (SomeVORowImpl)baseRow.getSomeVO().createRow();
//Do something with row
baseRow.getSomeVO().insertRow(someRow);
It would execute correctly (without errors), but the application would then hang. We've replaced the duplicate call to baseRow.getSomeVO() and stored it into a RowIterator object:
RowIterator someVO = baseRow.getSomeVO();
SomeVORowImpl someRow = (SomeVORowImpl)someVO.createRow();
//Do something with row
someVO.insertRow(someRow);
This did the trick. We haven't dug to the bottom of why this happened, but if we can reproduce this in a small test application, we might file a bug.



Friday, July 13, 2012

ADF sessions at Oracle Open World

It's still more than 2 months away, but I'm already looking forward to Oracle Open World. I'm starting to look at the sessions that will be given, and I'm preparing my list. These sessions are must-see's for me!
My selection is based on both topic and speakers. For now, I've only looked into the ADF sessions. I'll look into other topics (Cloud, Java, ...) later on, and will continue to update this list.