Pages

Wednesday, May 14, 2008

Effective XML: 50 Specific Ways to Improve Your XML (Effective Software Development Series) by Elliotte Rusty Harold


Product Details
Amazon Sales Rank: #196943 in Books
Published on: 2003-10-02
Number of items: 1
Binding: Paperback
336 pages
Editorial Reviews

From the Back Cover
Praise for Effective XML

“This is an excellent collection of XML best practices: essential reading for any developer using XML. This book will help you avoid common pitfalls and ensure your XML applications remain practical and interoperable for as long as possible.”
—Edd Dumbill, Managing Editor, XML.com and Program Chair, XML Europe

“A collection of useful advice about XML and related technologies. Well worth reading both before, during, and after XML application development.”
—Sean McGrath, CTO, Propylon

“A book on many best practices for XML that we have been eagerly waiting for.”
—Akmal B. Chaudhri, Editor, IBM developerWorks

“The fifty easy-to-read items cover many aspects of XML, ranging from how to use markup effectively to what schema language is best for what task. Sometimes controversial, but always relevant, Elliotte Rusty Harold’s book provides best practices for working with XML that every user and implementer of XML should be aware of.”
—Michael Rys, Ph.D., Program Manager, SQL Server XML Technologies, Microsoft Corporation

“Effective XML is an excellent book with perfect timing. Finally, an XML book everyone needs to read! Effective XML is a fount of XML best practices and solid advice. Whether you read Effective XML cover to cover or randomly one section at a time, its clear writing and insightful recommendations enlighten, entertain, educate, and ultimately improve the effectiveness of even the most expert XML developer. I’ll tell you what I tell all my coworkers and customers: You need this book.”
—Michael Brundage, Technical Lead, XML Query Processing, Microsoft WebData XML Team

“This book provides great insight for all developers who write XML software, regardless of whether the software is a trivial application-specific XML processor or a fullblown W3C XML Schema Language validator. Mr. Harold covers everything from a very important high-level terminology discussion to details about parsed XML nodes. The well-researched comparisons of currently available XML-related software products, as well as the key criteria for selecting between XML technologies, exemplify the thoroughness of this book.”
—Cliff Binstock, Author, The XML Schema Complete Reference

If you want to become a more effective XML developer, you need this book. You will learn which tools to use when in order to write legible, extensible, maintainable and robust XML code.
Page 36: How do you write DTDs that are independent of namespace prefixes?
Page 82: What do parsers reliably report and what don't they?
Page 130: Which schema language is the right one for your job?
Page 178: Which API should you choose for maximum speed and minimum size?
Page 257: What can you do to ensure fast, reliable access to DTDs and schemas without making your document less portable?
Page 283: Is XML too verbose for your application?

Elliotte Rusty Harold provides you with 50 practical rules of thumb based on real-world examples and best practices. His engaging writing style is easy to understand and illustrates how you can save development time while improving your XML code. Learn to write XML that is easy to edit, simple to process, and is fully interoperable with other applications and code. Understand how to design and document XML vocabularies so they are both descriptive and extensible. After reading this book, you'll be ready to choose the best tools and APIs for both large-scale and small-scale processing jobs. Elliotte provides you with essential information on building services such as verification, compression, authentication, caching, and content management.

If you want to design, deploy, or build better systems that utilize XML—then buy this book and get going!



About the Author

Elliotte Rusty Harold is an adjunct professor of computer science at Polytechnic University in Brooklyn, New York, where he lectures on object-oriented programming and XML. His Cafe con Leche Web site has become one of the most popular sites for information on XML. In addition, he is the author and coauthor of numerous books, the most recent of which are The XML Bible (John Wiley & Sons, 2001) and XML in a Nutshell (O'Reilly, 2002).


0321150406AB08272003

Excerpt. © Reprinted by permission. All rights reserved.

Learning the fundamentals of XML might take a programmer a week. Learning how to use XML effectively might take a lifetime. While many books have been written that teach developers how to use the basic syntax of XML, this is the first one that really focuses on how to use XML well. This book is not a tutorial. It is not going to teach you what a tag is or how to write a DTD. I assume you know these things. Instead it's going to tell you when, why, where, and how to use such tools effectively (and perhaps equally importantly when not to use them). This book derives directly from my own experiences teaching and writing about XML. Over the last five years. I've written several books and taught numerous introductory courses about XML syntax, APIs, and tools. Increasingly I'm finding that audiences are already familiar with the basics of XML. They know what a tag is, how to validate a document against a DTD, and how to transform a document with an XSLT style sheet. The question of what XML is and why to use it has been sufficiently well evangelized. The essential syntax and rules are reasonably well understood. However, although most developers know what a CDATA section is, they are not sure what to use one for. Although programmers know how to add attribute and child nodes to elements, they are not certain which one to use when.

Since XML has become a fundamental underpinning of new software systems, it becomes important to begin asking new questions, not just what XML is, but how does one use it effectively? Which techniques work and which don't? Perhaps most importantly, which techniques appear to work at first but fail to scale as systems are further developed? When I teach programming at my university, one of the first things I tell my students is that it is not enough to write programs that compile and produce the expected results. It is as important (perhaps more important) to write code that is extensible, legible, and maintainable. XML can be used to produce robust, extensible, maintainable, comprehensible systems or it can be used to create masses of unmaintainable, illegible, fragile, closed code. In the immortal words of Eric Clapton, "It's in the way that you use it." XML is not a programming language. It is a markup language; but it is being successfully used by many programmers. There have been markup languages before, but in the developer community XML is far and away the most successful. However, the newness and unfamiliarity of markup languages have meant that many developers are using it less effectively than they could. Many programmers are hacking together systems that work, but are not as robust, extensible, or portable as XML promises. This is to be expected. Programmers working with XML are pioneers exploring new territory, opening up new vistas in software, and accomplishing things that could not easily be accomplished just a few years ago. However one definition of a pioneer is someone with an arrow in their back, and more than a few XML pioneers have returned from the frontier with arrows in their backs.

Five years after the initial release of XML into the world, certain patterns and antipatterns for the proper design of XML applications are becoming apparent. All of us in the XML community have made mistakes while exploring this new territory, the author of this book prominently among them. However, we've learned from those mistakes, and we're beginning to develop some principles that may help those who follow in our footsteps to avoid making the same mistakes we did. It is time to put up some caution signs in the road. We may not exactly say "Here there be dragons", but we can at least say, "That road is a lot rockier than it looks at first glance, and you might really want to take this slightly less obvious but much smoother path off to the left."

This book is divided into four parts beginning with the lowest layer of XML and gradually working up to the highest:
Part I covers XML syntax, those aspects of XML that don't really affect the information content of an XML document, but may have large impacts on how easy or hard those documents are to edit and process.
Part II looks at XML structures, the general organization and annotation of information in an XML document.
Part III discusses the various techniques and APIs that are available for processing XML with languages such as C++, C#, Java, Python, and Perl and thus local semantics to the labeled structures of XML.
Part IV explores effective techniques for systems built around XML documents, rather than looking at individual documents in isolation.

Although, this is how I've organized the book, you should be able to begin reading at essentially any chapter. This book makes an excellent bathroom reader. :-) You may wish to read the introduction first, which defines a number of key terms that are used throughout the book, and which are frequently misused or confused. However, after that feel free to pick and choose from the topics as your interest and needs dictate. I've made liberal use of cross-references to throughout to direct you along other paths through the book that may be of interest.

I hope that this book is a beginning, not an end. It's still early in the life of XML, and much remains to be discovered and invented. You may well develop best practices of your own that are not mentioned here. If you do I'd love to hear about them. You may also take issue with some of the principles stated here. I'd like to hear about that too. Discussion of many of the guidelines identified here has taken place on the xml-dev mailing list, and seems likely to continue in the future. If you're interested in further discussion of the issues raised in this book, I recommend you subscribe and participate there. Complete details can be found at http://lists.xml.org/. On the other hand, if you find out and out mistakes in this book (The ID attribute value on p. 87 is missing a closing quote. The word "Cat" is misspelled on p. 46.) you can write me directly at elharo@metalab.unc.edu. I maintain a web page listing known errata for this book, as well as any updates at http://www.cafeconleche.org/books/effectivexml/. I hope this book makes your use of XML both more effective and more enjoyable.

—Elliotte Rusty Harold
elharo@metalab.unc.edu
Brooklyn NY
April 22, 2003


0321150406P06062003
Customer Reviews

Excellent resource for both quality control and ideas
I bought this book quite a while ago and I absolutely the format. It's a great resource to just pick up and get great ideas, verify that you are on/off the right track and generally learn how to get to the next level with XML. Highly recommended

How to Effectively Use XML
Elliotte Rusty Harold states in the introduction of Effective XML that the book is neither an introductory book nor an XML tutorial. Rather, it is a distillation of the author's experience using and teaching XML and how to use it effectively. The book does a great job of explaining how to use XML and its related technologies.

The book is divided into four major sections: Syntax, Structure, Semantics, and Implementation. Each of the fifty Items packs a lot of information into a few pages. The Items span topics such as why you should Include an XML Declaration (Item 1), Make Structure Explicit through Markup (Item 11), Program to Standard APIs (Item 31), and Write in Unicode (Item 38). Even the Introduction is valuable because it sets the definitions for XML-related terms used in the rest of the book that the author has found to be used interchangeably or inconsistently.

Item 24, Choose the Right Schema Language for the Job, provides a typical example of the great information contained in Effective XML. This Item discusses the strengths and weaknesses of four schema languages: W3C XML Schema Language, DTDs, RELAX NG, and Schematron. The use of programming languages to handle situations that the schema languages can't handle is also discussed. The Item ends with a set of questions to think about when selecting the schema language to use.

I found the book very readable and like that the information is presented in digestible chunks. Effective XML isn't meant to hype XML but to identify what the actual capabilities of XML and its related technologies are and how best to use them. The book does an outstanding job at this task.

Full disclosure: I received a complimentary copy of the book for review.

I wish the XML Schema working group had a copy per member
This is not a book explaining XML. This is not a book that goes into any depth on XML APIs. It is not a book explaining any one XML format like XSLT, RSS, or XSD.

Instead it is a book on how to work with XML. How to design an XML application to take full advantage of the facilties of XML: schemas, processing instructions, XSL transforms, namespaces. It is all structured to slowly introduce you into the complexities, and deserves to sit up on the bookshelf with Effective C++, Java and Enterprise Java.

If you already know the basics of XML, it is actually quite a good way to learn about some of the more esoteric concepts -from the pragmatic perspective. Too many XML books rant about how wonderful some feature like XML schema's extension stuff is, why XML is the most universal format ever, SOAP and WS-* the best protocol for distributed systems ever, and XQuery everything you need for an XML database.

This book bursts the bubble of hype with rational analysis of what makes sense, and what doesn't. Item 28: Use only what you need, is my favourite: A review of the main XML specs and analysis of what really matters, which comes down to #35, navigate with XPath.

If you are designing an XML schema/system/application, you need this book. If you have to put up with architects telling you about WS-MetadataExchange, WS-Transfer and RDF, you need a copy to roll up and hit them over the head. And, if like me, you are involved in standards bodies that produce XML related things, you need to buy a copy for all the other participants, so that what you produce will actually work.

Remember that XML is a language designed for use by people and machines. The machines have the upper hand. But with this book, and some thinking, you can design XML applications that people can use.