DevX Skillbuilding for IBM DeveloperWorks
DevX Skillbuilding for IBM DeveloperWorks
DevX Skillbuilding for IBM DeveloperWorks
Get regular email alerts when we publish new features!
DevX Update for IBM developerWorks

More Newsletters
Removing the Barriers to Software as a Service with DB2 Express-C (cont'd)

Express-C and XML
Express-C's XML features could've been listed as yet another SaaS-friendly feature, but they're so extensive, they deserve a section of their own.

As mentioned, Rich Internet Applications make extensive use of XML. Your primary code will require "application/xml"-type content streams for use with responseXml objects. This can include the expected functions, such as data storage, fast lookups, and dynamic navigation. But as new XML standards emerge, your database will begin storing graphics (XAML, SVG), productivity documents (OpenXML), and other content types as well.

Express-C and pureXML
It makes sense to start using an XML-ready database now. And this is where Express-C really shines. It includes native XML data types as well as extensive built-in XML functionality. IBM's marketing folks have branded all of this "pureXML". But on a practical level, this means that the database can store XML documents just as they are within a relational database. No parsing. No storing in relational fields and then trying to reconstruct the XML doc later. And no big CLOBs that let you dump XML into the database without giving you the means to access it.

Express-C has genuine XML data types. You can load XML documents into the database, then query them using XQuery. You can also expose the data more easily for use with JavaScript. In fact, the Visual Studio Add-in includes some great tools for making this happen. (See "XML Everywhere Part 1" and "Part 2" for a detailed walkthrough of how to do this.)

As an example, you can use Express-C to repurpose Office 2007 documents, which use the Ecma Office Open XML format. Use XQuery to consume an OpenXML document and transform it through XSLT. Store the result in an XML field and make it available to your SaaS in XML format with or without the extra markup.

XML Schema Validation
Here's a classic database problem: you structured your EMPLOYEE table to include work phone and home phone. But now cell phones are standard fare. Employees may even have multiple cells, one for personal use and one issued by the company. In a typical relational database, adding the extra field means refactoring the code. That's a big deal.

In a desktop app, a schema change like that could warrant a version upgrade. Of course, that could be a good thing if your company charges for upgrades. But customers subscribe to your SaaS so they don't have to deal with that. Your SaaS needs to be nimble. You should be able to roll out new features and new versions on an ongoing basis.

When you're using XML documents, you can do just that. With schema validation, just add the new element. You don't need to debug the entire app, just add the element and update the XSD you're using to validate the document. See "XML data validation using IBM DB2 Visual Studio 2005 .Net Add-in" for more on this.

Check out the DB2 Developer Workbench v9.5 Open Beta (and check back after Aug. 7 for an important refresh).

Developer Workbench
By October, 2007, you should be able to download the new DB2 Developer Workbench. This will give you all new ways to create Web services quickly for use with your SaaS. You'll be able to target a particular platform, like Tomcat or WebSphere. Then, using simple point and click, you'll be able to drag a table into the "Web Services" folder and publish your XML data in either SOAP or REST format without coding.

WebTools Starter Toolkit
Also coming soon, look for the WebTools Starter Toolkit, a PHP-based Web site that lets you point and click on your tables to create Web services, as well as automatically generate the JavaScript code to consume them. Do the same to create Atom feeds and stored procedures from your database. The stored procedure tool will even generate browseable HTML tables for displaying and navigating through the data.

IBM SaaS Partner Program
With its robust architecture, rich tooling, and native XML support, Express-C gives new SaaS developers the perfect platform for prototyping and launching highly responsive Web apps. Even the free license for Express-C offers all the functionality necessary for building a solid foundation. With the Express-C Support Plan, developers gain a logical migration path that takes them into the next tier of feature sets as they scale up their SaaS application.

To further demonstrate its support for the Software as a Service model, IBM has also launched a partner program specifically for SaaS ISVs. Through IBM PartnerWorld, ISVs can get help with managed hosting services for their new SaaS product. IBM also offers global marketing and sales support.

For software companies looking to expand into the lucrative SaaS field, the low barrier to entry just got lower. And the timing has never been better.

Additional Resources
To learn more about Express-C and its capabilities, check out the following resources:

Previous Page: What Is DB2 Express-C?  
Justin Whitney is a regular contributor to DevX.com and Jupitermedia. He currently lives in San Francisco, where he consults for leading high-tech firms and writes about emerging technologies.
Page 1: Building a SaaS ArchitecturePage 3: Express-C and XML
Page 2: What Is DB2 Express-C?