Wednesday, March 31, 2010

Programming XML Across Multiple Tiers

In the XML Feature Pack, we ship a sample that shows how to use XML centric programming in the middle tier. The sample shows how to unlock data in Web 2.0 ATOM XML encoded feeds using XQuery and present the data in a typical web application using XSLT. As an extension to this sample, we also have a sample that shows how to persist data from these feeds into an XML Database such as DB2 pureXML or Apache Derby. We included this example as we found, frequently, that people working with XML centric programming typically had large XML datastores in XML centric databases.

While the sample is there, with source code, in the XML Feature Pack, we don't explain why we coded the sample the way we did. In this new developerWorks article (Programming XML across the multiple tiers: Use XML in the middle tier for performance, fidelity, and development ease), we go into detail why for simplicity, performance, and flexibility reasons we coded the sample the way we did.

The article is worth a read. It will walk you through the new features in the XML Feature Pack and JDBC 4.0 that allow an end to end native XML programming model across the XML Feature Pack and an XML database. We hope to expand this article over time to cover more advanced concepts when working with XML databases.

Finally, here are two quick videos that show how to get the sample working with DB2 pureXML and Apache Derby.

DB2 pureXML (Part 1/2)
Direct Link (HD Version)

Apache Derby (Part 2/2)
Direct Link (HD Version)

Tuesday, March 30, 2010

XQuery as a replacement for VBScript?

I was discussing with a colleague the leaning of folks to use JavaScript to process data on the server. I have seen a few products recently move to JavaScript as a programming model aimed towards folks that aren't skilled in languages such as Java. I always wondered why. JavaScript doesn't seem like the right language for a server environment and isn't the best language for data navigation. The colleague told me that his belief was that JavaScript was much closer to VBScript that "business users" are used to using in Excel. After looking at a presentation on XQuery I did, my colleague believes that XQuery could have filled the same need as JavaScript (high level language, script like, etc.).

In this presentation, I showed how I replaced a process we had internally using Excel and VBScript with an online application using XQuery running on the XML Feature Pack. I also showed how others have done non-query based applications using XQuery (like the XQuery Ray Tracer) proving that XQuery is a full language.

I wonder if others out there also believe that XQuery is a good language to replace VBScript and "programs" currently locked in Excel documents?

Monday, March 29, 2010

IBM WebSphere Application Server V8.0 Alpha

The WebSphere Application Server team is proud to announce the availability of the IBM WebSphere Application Server V8.0 Alpha.

Building upon the capabilities of our previous releases, some of the Alpha features include:
  • Key portions of Java™ Enterprise Edition 6.0 specifications

  • Increased developer productivity

  • Simplified product install with integrated prerequisite and interdependency checking

  • Enhanced security and governance capabilities

  • JPA L2 cache and JPA L2 cache integration with DynaCache

  • High Performance Extensible Logging


Our architects, designers, engineers, testers, information developers, and user experience professionals are eager to participate with you in the Alpha forum, discussing what's new, learning about your experiences with all aspects of the product, and answering questions.

Also, the WebSphere Customer Experience Program (CEP) offers opportunities for interactive sessions with our development teams, including demos of potential new features and opportunities to provide feedback that we can use to drive improvements into each version of the product.

More details about the Alpha program, how to download the product, and the CEP program can be found here:

https://www14.software.ibm.com/iwm/web/cc/earlyprograms/websphere/wsasoa/index.shtml

And, here's a link to the Alpha forum:

http://www.ibm.com/developerworks/forums/forum.jspa?forumID=2180&start=0

We're looking forward to hearing from you about your experiences with the IBM WebSphere Application Server V8.0 Alpha.

Enjoy!

Wednesday, March 17, 2010

More OSGi goodness

There is a new feature in the Beta refresh of the OSGi feature pack which went out last week - a tool to inspect application bundles. Here are some brief instructions on how to use it.

First, install the feature pack (see here) and start the application server, then at the shell command line navigate to:

[AppServerHome]/feature_packs/aries/bin


There is a script in there called osgApplicationConsole.sh (or .bat), run it and you should get a "wsadmin>" prompt. Use the list() at the prompt and it will show you ... nothing. That's fine, you need to install and start an application before you can see anything.

Install and start the Blog Sample (as described here), then try list() again, you will see something this:




Two frameworks are listed, 'shared bundles' and the Blog application. Connect to the first like this:

wasadmin>connect(0)

Use the ss() command to look at what is in it:



You don't have to disconnect from a framework explicitly, so to look at framework 1 (the Blog application) just connect to it:

wsadmin> connect(1)

then ss() shows the blog sample bundles.




This may by now be looking slightly familiar to anyone used to the Equinox OSGi console. The difference is that WebSphere is partitioning the space into separate application frameworks which you can look at individually - nice feature if you have a lot of applications. By the way, if you forget which framework you are connected to, list() at the wsadmin> prompt will tell you.


Other console commands can be found in the documentation, or by using 'help()' at the wsadmin> prompt. Have fun!