Daily del.icio.us for Feb 19, 2007

These are my links for Feb 19, 2007:

Daily del.icio.us for Feb 17, 2007 through Feb 19, 2007

These are my links for Feb 17, 2007 through Feb 19, 2007:

Daily del.icio.us for Aug 30, 2006

BEA Workshop Studio and Ubuntu

I have been following BEA’s acquisition of M7 to see what happens to the NitroX product. We are a big WebLogic shop and so I was curious to see what BEA is going to bake in the new release of NitroX renamed Workshop Studio. The new Workshop Suite is based on the Callisto (Eclipse 3.2 and WTP 1.5) release and is chalk-full of goodies including EJB 3.0 (JPA), Kodo, Spring, JSF (yuck), Struts, JSTL, Hibernate support among other specs/frameworks. Another cool thing in Workshop Studio is the ORM tool that is built-in that allows developers to access databases and build an object relational entity layer to model the data using persistence engine providers that implement the EJB3, JPA, Kodo and Hibernate. Workshop also supports Tomcat, Resin, Jetty, JBoss, and WebSphere in addition to WebLogic.

I am a die-hard IntelliJ IDEA fan and IDEA is still the BEST IDE in the market. IDEA has the best refactoring, smart-type auto completion, code analyzer capabilities and it is really the best IDE for writing code. However, it is missing many of the bells-n-whistles that Eclipse and now NetBeans have. In the last few months, I found myself looking at the NetBeans 5.5 betas and Eclipse 3.2 betas and wondering why IDEA was missing a lot of that functionality. Sun has really turned around NetBeans and the latest 5.5 betas have really rocked. The combination of the Profiler with NetBeans makes it a compelling offering and the price is right.

Guess I am getting off-topic here – So I’ve been playing with the latest release of Workshop Studio and my first impressions are very positive. I am hoping to use it exclusively for a month and then blog about my experiences. I recently upgraded my Linux box to Ubuntu (Dapper Drake) and I’ve been running more than SVN, MySQL, Apache, Tomcat and WebLogic on it. I try to install all of my development tools on my XP and Linux box for consistency and so I was able to install Workshop Studio on my Ubuntu Linux box without any problems. Out of the box, Workshop Studio doesn’t support Ubuntu but the installer does allow you to continue installation and use Workshop Studio. Here are the steps I used to install Workshop Studio:

I’m assuming you already have the 1.5 JDK installed on your box. If you don’t, you can use apt-get to get and install the latest SDK. This article at the Javalobby has a lot more details but here’s all I did for my installation:

sudo apt-get install sun-java5-jdk
sudo update-alternatives—config java
export JAVA_HOME=/usr/lib/jvm/java-1.5.0-sun-1.5.0.06/
sudo ./WorkshopInstaller.bin

The installer clears the launcher icons in the directory of your choice and you should be all set to use Workshop Studio. On his blog, Bill Roth discusses his experiences of installing Workshop on his Ubuntu box using JRockit. In addition to being a fellow Marquette alum and an all around great guy, Bill is also the vice president of the BEA Workshop Business Unit at BEA Systems. Bill asks the question in his blog entry about BEA officially support Ubuntu in their products and I would have to say a resounding yes to that. Most enterprises use RedHat on their servers but Ubuntu is fast catching up on the desktop side and so BEA should support RedHat and Ubuntu. Cannot wait for the day when I get type in apt-get jrockit, workshop and weblogic.

Daily del.icio.us for Jun 01, 2006

Daily Del.icio.us for Feb 27, 2006

Life is beautiful with XMLBeans and XStream

XML creation, parsing and processing with Java has gotten so much easier with tools like XMLBeans, XStream and many other such tools. I personally love XMLBeans and XStream and I try to use them for all of my XML processing needs. While they both consume XML, they solve different problems. XMLBeans allows you to process XML by binding it to Java types using XML schema that has been compiled to generate Java types that represent schema types. XStream on the other hand allows you to serialize objects to XML and back again using special reflective secret sauce.

I’ve been using these tools for many years now and so you tend to forget just how useful and powerful they are and how productive they make you. Case in point – A friend of mine came to me for help. He was building an application that would allow him to resale items from Amazon on his site and he wanted to use the Amazon eCommerce Web Services to search for products programmatically and update a local database that housed his content. Having played with Amazon E-Commerce Service (ECS) before, I offered to write up a simple application that would make the Web Services call, process the results and present them back to you.

Amazon’s ECS is an API that allows you to access Amazon data and functionality through a Web site or Web-enabled application. ECS follows the standard Web services model: users of the service request data through XML over HTTP (REST) or SOAP and data is returned by the service as an XML-formatted stream of text. In addition to the WSDL, ECS also provides XML schemas for validating the XML output of REST requests. So I decide to use XMLBeans to create my type system using the XML Schema provided by Amazon. XMLBeans provides you with a utility (scomp) to compile your schema into Java XMLBeans classes and metadata. To generate the Java code, use the following command:

scomp –jar amznws.jar AWSECommerceService.xsd

This generates a jar file named amznws.jar, which will contain all of the code needed to bind an XML instance to the Java types representing your schema. In my application, I use HttpClient to make my REST request and then use the XMLBeans generated jar file to process the result. Here’s a snippet of code from my sample class:

https://gist.github.com/311527.js

As you can tell, HttpClient makes the REST call a snap and XMLBeans makes processing the results easy as well. In total, I spent 3-4 hours getting the application working and a lot of the time was spent figuring out the data set returned from Amazon and trying to come up with a meaningful example. Here is a zip file with the IDEA project that has all the stuff needed to make this work including a simple JSP and a JUnit test class.

Links of Interest:

BEA looks to open-source part of WebLogic Workshop

Just saw this article on eWeek. The article states that BEA is slated to announce plans to open-source portions of its WebLogic Workshop tool at the upcoming eWorld conference. BEA has a pretty good record of supporting open-source software and the XMLBeans project is a good example of that. I think the support of AspectWerkz is another example.

If BEA does open-source some of the features of Workshop, this could really help the Eclipse Webtools platform project. I am not a Workshop power user by any stretch of the imagination, but it still does have some pretty cool features. It would be nice to incorporate things like page flow and some of the other cool features into the Eclipse webtools product – Give IntelliJ’s Fabrique a run for the money.