|
|
YOUR FEEDBACK
SOA World Conference
Virtualization Conference $200 Savings Expire May 16, 2008... – Register Today! Did you read today's front page stories & breaking news?
SYS-CON.TV |
TODAY'S TOP SOA & WEBSERVICES LINKS Feature
Finding the Declarative Tipping Point; XQuery, XML, and the RDBMS
XQuery, XML, and the RDBMS
By: David Kershaw
Jun. 28, 2005 12:00 PM
Digg This!
Page 1 of 2
next page »
Moving information from a database into an application may be the most common challenge developers face. How many of us make it through life without meeting object/relational (O/R) mapping in some form? Certainly not too many. Lately it has become equally difficult to avoid XML/relational (X/R) mapping. Because XML, and especially XML Schema (XSD), are object-like paradigms, the mapping difficulty is approximately the same. However, under the ever-expanding influence of XML, the extract, transform, load process that gets data from a database into an application (and vice versa) may be about to get radically more simple and declarative.
In practice, binding DDL to XSD happens regularly. Most often this involves developers using tools such as Altova XMLSpy to generate the XSD from the database structure, and from there using JAXB, Microsoft's Xsd.exe, XMLSpy, or another means to tie the XML structure to objects. This route, however, does not get you away from the need to somehow query the database and iterate through the results, inserting individual values into objects. There are other tools that can automate these steps, but the requirement still exists. The second option of constructing the XSD first and then deriving both the classes and the DDL from it is very similar, at least in some ways. A main advantage of this approach over using the database as the primary structure is that you have a clearer single source for your data management and code structures, whereas if the database structure takes the lead, you typically have XSD or another type of model working as an intermediary to your classes. Moreover, XSD typically offers something very near to a superset of the typing capabilities of both the database and your programming language. This option is most often performed using XMLSpy to build the XSD and automatically convert it to a database structure, then optionally, using a visual data integration tool like Altova MapForce to map between individual fields, insert data processing rules, and generate customized data conversion code for use in your project. The third option utilizes XQuery. As you are probably aware, XQuery is still a work in progress, but XQuery has been fairly stable for about a year and it is very near to becoming a formal W3C recommendation, as a peer of XPath 2.0 and XSLT 2.0. Moreover, XMLSpy, and perhaps other tools, now can be used for writing, debugging, and interpreting these new standards, and MapForce can even generate XSLT 2.0 and XQuery code from XML Schemas. If you are an application developer, I suggest you do not wait. Grab an implementation and take a long look at these new standards because they may just complete the enterprise mainstream's shift to declarative development. What does all this mean? How will these new standards provide the missing link? Declarative development means not programming your application, but rather modeling and describing the processes and links between processes using XML technologies. XSLT and XSD are today's declarative entry points and are in wide use, but XSLT 1.0 has significant limitations as an application platform. XSLT 2.0 (along with XPath 2.0) was designed to address those limitations, however XSLT 2.0 is not intended as a query language. For a complete data access, transformation, delivery, and presentation solution, utilizing XSLT 2.0 (for visualization) plus XQuery (for data access) is the next logical step to take. Keep in mind that the custom-developed part of the typical business application is not algorithmically complex. Rather, that custom-developed core logic is really just a matter of modeling one or more complex processes that have complex data. The benefit of moving to declaring that core part of your application in XML, XQuery, and XSLT 2.0 is that more of the mundane code that still must exist somewhere becomes a commodity part of your application server infrastructure. The result is faster development, fewer quality issues, and greater long-term maintainability. This revolution has admittedly been a long time coming. The changes responsible for boosting developer productivity will:
Imagine a typical server-side, browser-based human resources application for a large firm built in the near future. In one component of the application an HR professional can browse, edit, create, or delete employee information. That information is stored in a database that is used by several other applications and holds other types of related information. Without getting into all of the requirements, let's say that this application has ten main screens, a good number of business rules, and must create, read, update, and delete data from the database. Suppose the architecture of this application is based on the J2EE frameworks (although the scenario is equally likely in the world of .NET). The presentation side of the equation will be constructed as XML from the standard JSP tags, XHTML, and CSS. Those JSPs will tend to be simple declarative pages that make calls against an EJB business API. The information returned will be in the form of XML. That XML will be transformed using XSLT 2.0 into XHTML. So far this is fairly typical, even for today. Page 1 of 2 next page »
XML JOURNAL LATEST STORIES . . .
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
|
SYS-CON FEATURED WHITEPAPERS MOST READ THIS WEEK BREAKING XML NEWS
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||