Professional Web 2.0 programming for real

I’have received my personal copies of our Web 2.0 book and they look really good.

I really like the kind foreword from Caterina Fake, co-founder of Flickr, especially when she says this book is very much about how, through technology, you can capture and delight your users. This should be the tagline of our book!

She goes on and adds: Web 2.0 is really a developer’s paradise! and that’s really what we’ve felt while we wrote the book.

I am also impressed by the ground we’ve covered while keeping the book relatively short. I wrote in the outline that I have sent to the publishers to sell my book idea that my goal wasn’t to write a Web 2.0 bible and I had set the prospective page count to 450. If you don’t take the index into account, we are very close to our target with our 492 pages.

The real challenge was to use this limited space to cover an incredibly large landscape: Web 2.0 is about using a dozen of different technologies together. Your reviews will tell but I think that we have been quite successful in selecting the most important things that you need to know to combine these technologies into successful Web 2.O applications.

I had the chance to give a talk about Web 2.0 at sparklingPoint yesterday evening and had a copy with me to circulate after my talk. The audience included several Web 2.0 developers and they spent more time that I had expected to glance through the book.

Their comments are positive and they appreciate in particular the fact that we have a full chapter about HTTP, a fundamental brick of the Web which is misunderstood by too many developers.

Now that the book is available, like Caterina Fake, I look forward to seeing the results the readers of this book will bring into being!

Qu’attendez-vous de XMLfr?

Après en avoir discuté avec l’équipe de rédaction, j’ai envoyé sur la liste xml-tech un long message intitulé Qu’attendez-vous de XMLfr?.

J’y décrit brièvement l’évolution du site depuis sa création début 2000 et mes projets pour redonner un peu plus de dynamisme au site.

N’hésitez pas à prendre part au débat et à me dire, que ce soit sur la liste, par un mail individuel ou en commentaire à ce billet, ce que vous attendez de XMLfr.

Next year at ATHENS

I gave my Web 2.0 tutorial for ATHENS 2006 yesterday afternoon and it was the first time I had the opportunity to teach to « real » students.

A few of them were really sleepy but the organizers had kindly warned me that their Parisian nights were pretty busy and that it was to be expected…

Most of the others looked on the contrary interested and the audience was much more friendly and participative than the typical audience of professional conferences.

They did ask a lot of questions and warmly applauded me at the end of my talk.

The content of the tutorial is really heavily technical with a lot of code snippets and HTTP traces. Its duration (three hours) is adequate and I think it has been well received even though there are at least two points that can be improved:

  • I was surprised to see that in slide show mode, OpenOffice Impress didn’t show any pointer (of course that wasn’t the case when I had rehearsed on my own PC). My presentation includes a lot of links and I was not able to click on these links since I couldn’t find out when they were selected! That has been quite disturbing and I had to switch into edit mode to get the pointer back each time I wanted to follow a link. During the break, I eventually discovered that there is a slide show option to make the mouse pointer visible and that made my life much easier during the second part. That’s something I need to remember for my next presentations!
  • I need to add some diagrams to visualize the exchanges between the browser and the server. There are many of them in my sample Web 2.0 application. Showing the HTTP traces is useful but some diagrams would help to understand the sequencing of actions and exchanges.

I have asked to the students to use my email address to send me their feedback and I hope they won’t hesitate to do so.

The organizers, Jacques Prévost and Didier Courtaud, seemed please enough to invite me to participate to the next edition and I should be involved in the ATHENS program again next year.

XML Power, a book powered by the XML Guild

We’ve sent the final editions of our chapters of XML Power to our editor and the book should be available fairly soon. But, did we need yet another book on XML?

XML Power should be different…

XML Power is the first book written by the XML Guild.

We have thought we needed a common project to work together and learn to know each other better. We also wanted to create a set of common high quality materials that we could reuse. And of course we would like to increase our visibility.

Many of us have already written books and we rapidly came to the conclusion that we would write a collective book.

Why should it be different?

The primary motivation of this book is non commercial. We wrote it to share our enthusiasm for the technologies we use in our day to day work and to be a showcase of our activity. We have been lucky enough to find a publisher, Thomson, which have leaved us entirely free to determine the content of the book.

The book is not meant to be exhaustive. It’s not a new XML Bible and we don’t pretend that you will learn everything about XML. Instead it includes a series of points that each author has believed to be primordial in his or her domain.

You won’t be surprised to learn that I have written the chapter about XML schema languages. Instead of doing my usual introduction to each of the big three languages, I have decided to show what you can do when you reach a blocking point with W3C XML Schema.

The idea is that most users start by using W3C XML Schema and get rapidly blocked by a validation requirement that they can’t meet. This chapter is for them: it takes three examples increasingly difficult to solve to show a number of different solutions.

As I said, a purpose of this book is to produce reusable content and the contract that we have negotiated leaves us full rights over anything else than printed copies of the book in English. I have used this opportunity to derive a new tutorial from this chapter and will have the pleasure to deliver it at XML 2006 under the title XML schemas: breaking your chains.

The team involved in this book includes, by order of apparition in the book, Ken Holman, Evan Lenz, Zarella Rendon, Nikita Ogievetsky, Jeni Tennison, Benoît Marchal, Tony Coates, Michael Kay, Priscilla Walmsley, Ronald Bourret and Betty Harvey with the kind support of other guild members.

The book owes a lot to Zarella Rendon who has taken the burdens to act as a project manager and negotiate with publishers and it would probably have never been published nor even started without her contribution.

I probably don’t need to say that it has been fun to write: I have already said so of all my previous books (except XML Schema which has been a nightmare to write because the language is so horrible) and it probably just means that I enjoy writing books. Anyway; as you can imagine, working with such a dream team has been a nice experience.

I hope that this book will be as fun to read than it has been to write.

Newspapers 2.0

Ifra has published a new special edition of their magazine, newspaper techniques, dedicated to Web 2.0. Ifra present themselves as the world’s leading association for newspaper and media publishing and this special edition shows the level of interest from the newspaper industry for these new technologies.

I had the pleasure to contribute to this edition a paper giving some tips for transforming a 1.0 site into Web 2.0 and the table of content also includes an interview from Tim O’Reilly, a general and a more technical introduction, two case studies, a brainstorming with newspapers suppliers and a glossary.

This special edition is a good introduction to Web 2.0 which should be useful beyond the communities of newspaper and media publishing.

It can currently be downloaded free of charge as a Flash document on the Ifra newspaper techniques ePaper web site.

Teaching Professional Web 2.0 Programming

I’ll have the pleasure to give a training based on chapter 1 of our book this coming Thursday (23/11/2006) from 2:00 to 5:00 pm (CET) for the ATHENS program.

Although this training is not publicly accessible but reserved to students who have registered through their University or Institution, it will be publicly broadcast and archived on the Internet.

The training will include a short introduction of Web 2.0 along the lines of my blog entry on the subject followed by the detailed presentation of a simple yet complete Web 2.0 mashup application.

This application is « BuzzWatch », the same sample application that I have developed for chapter 1 our book « Professional Web 2.0 Programming« . Server side, BuzzWatch is written in PHP 5 and it takes advantage of easy XML, SQLite and Cache_Lite. Client side, it makes extensive use the Yahoo! User Interface (YUI) library.

This will be a tech heavy session which follows, like we do in the book, each action, tracing HTTP exchanges, scanning the web server log and digging into the JavaScript and PHP code to introduce the main technologies and issues you find while developing Web 2.0 applications.

BuzzWatch comes in four different versions:

  1. The first version exhibits the downsides of naive Web 2.0 applications: the pages have no URIs, the back button doesn’t work, …
  2. The second one fixes these issues at the price of code duplication between the client and the server
  3. The third version eliminates this code redundancy
  4. The fourth one makes BuzzWatch a good Web citizen with cool URIs

BuzzWatch can be downloaded and discussed on WROX site.

It’s been fun to develop and to write down first for the book and then for this training and I hope that it will be as fun to read and follow!

Web 2.0, professional… and Fun!

Phew! said Danny Ayers, relieved said Erik Bruchez. Our upcoming Web 2.0 book is written and it’s been both hard work but also fun.

This book is a long story, almost as long as my interest for Web 2.0…

A long time Web and XML expert, the marketing around Web 2.0 kept me away for a while and I didn’t bother to take a look at what is behind the smoke before December 2005 when the business networking initiative sparklingPoint Networking invited me to present my analysis of Web 2.0.

I have published my presentation both in English on my blog and in French on XMLfr. The French version has rapidly become the most read article on XMLfr and one of the reference definitions of Web 2.0 in French.

These documents go through the so called social and technical layers of Web 2.0 and note that yes, Web 2.0 is nothing but a new term to designate the Web as it was meant to be. Does that make the word pointless? I don’t think so. Nobody can deny that the web is changing and finding a word to name this new web is most useful.

One of the things that really stuck me was the number of technologies involved in Web 2.0 applications. Web 2.0 is anything but a coherent platform! There is nothing wrong in using a whole set of technologies except that you need to keep the vision of the big picture. This goes against another tendency which is to specialise people and resources.

Most of the technologies that constitute the Web 2.0 technology stack, from (X)HTML to databases through CSS, Javascript or HTTP, are getting more complex everyday and most of the books available focus on only one of these technologies. This does not only mean that you need to buy a full bookshelf if you want to cover the Web 2.0 stack, but also that most of these books hardly cover how these technologies can be used together.

Web 2.0 Professional Programming is born from this analysis and tries to give the big picture by presenting the whole Web 2.0 stack.

Erik kindly wrote that this book owes everything to Eric van der Vlist, who provided the vision, outline, and much more over those last few months. I’d rather say that I am the only responsible for the incoherences and misses that you might find in the outline and the writers (including me) are responsible for the good things that you’ll find in their chapters!

This book also owes a lot to the friends which have helped me to write the outline before I submitted it to publishers, to Jim Minatel our Senior Acquisitions Editor who believed in the project from the very beginning, to Sara Shlaer our editor and to Micah Dubinko our tech reviewer.

Both the book and the writing experience turned out to be quite different from what I had expected.

When I first submitted my outline to several publishers I had planed to write this book, like my previous books, alone and over a period of twelve to eighteen months. If Jim Minatel was quite happy with my original outline, he was less than appealed by my agenda! WROX has a lot of experience with multi-authored books and he gently convinced me to build a team to cut the delays.

The team has been constituted with a mix of authors that I knew and authors who were previous WROX authors and this has been a good decision: a more homogeneous team would probably not have been able to provide the diversity of points of view that you will find in this book.

The authors were spread between the Silicon Valley, UK, Italy, Switzerland and France and I had anticipated that communication could be an issue. To facilitate the writing, I have setup a bunch of internet based goodies including a mailing list, an IRC channel, a wiki, a subversion repository to share our prose and code samples and an external web site.

This has proven to work very efficiently and Jim wrote: What I really love about working with this gang of authors […] is how relentless they are about communicating and collaborating with each other.

The mailing list has been widely used all over the period and it has been critical to keep contact between the whole team. The wiki has been very helpful to finalize the outline. One of my regrets is that we’ve not used it to edit the whole book… My previous book (RELAX NG) has been edited on a wiki and transformed into DocBook before publication and I have found that very handy. I am pretty confident that we could have used the same method to edit this book but that was breaking too much of the WROX policies and we’ve not followed that way. The subversion repository has been used by most writers more like a backup than as a repository but here again it was not aligned on the WROX policies. We’ve used the IRC only once to solve a controversial issue on the outline.

The writing itself went very smoothly with everyone doing his best to be on schedule. Joe Fawcett wrote in his blog: One of the great things about writing is how much you learn. It’s easy to pick a passing knowledge of a subject but when have to write about it and provide working code examples then you really need to burrow down and learn. I couldn’t agree more with his statement and have been surprised again to see how much you learn by writing!

The main difficulty of this book is that since its goal is to give the « big picture », it needs to be coherent between chapters which is always difficult for multi-authored books. Also, since the agenda was very tight, we couldn’t afford to spend too much time building a very detailed outline. Keeping things coherent has been the job of Sara and Micah and they’ve done a good job checking the cross references, redundancies and other incoherences.

The other difficulty is that the target audience are « professional developers with no prior experience of Web 2.0 » and deciding what the prerequisites for this book are was quite subjective. On one hand, we would like this book to be a central place where people can find most of what they need to write Web 2.0 applications. On the other hand, we couldn’t afford to introduce each of the technologies from scratch. We’ve done our best to guess what most of you already know about web technologies at large, but the result may sometimes seem arbitrary. For instance, we’ve presented HTTP from scratch because we think that this is an area where there are still a lot of misconceptions, but we’ve assumed that our readers are already somewhat familiar with HTML. Your reviews will tell if we need to change this in future editions!

Even if I knew that Sara and Micah were carefully tracking inconsistencies, I was rather anxious to know what the book would like too as a whole and as soon as I got enough chapters written and some extra time, I started reviewing as a whole. I am rather happy with the result and think that this should be a useful resource for web developers. The only regret I have is about the number of programming languages we’ve covered.

Server side, there isn’t a programming language of choice to write Web 2.0 applications and my attempt was that the book should not only be as agnostic as possible but also provide examples using as many different programming languages as possible. I think that the book can be considered agnostic, but the examples are not using as many languages as I would have liked: Java, C# and PHP represent most of the examples and Python, Perl or Ruby users may feel frustrated.

Still, I really believe that they can easily understand the examples in this book. A great way to follow the explanations given in the book is of course to try the examples. A still healthier exercise is to translate these examples in your favorite programming language. If you do so, I strongly encourage you to post these translations on the forum dedicated to this book on the WROX web site.

Writing this book has ben fun and I hope that reading it will be an enjoyable experience too!

YUI and XHTML

Update: Good news, Matt Sweeney from Yahoo! answered that they are in the process of rolling in XHTML support. This issue should thus rapidly become an old story!
That’s probably well known but I have been surprised to see that the Yahoo! UI Library doesn’t support XHTML or rather that it supports only XHTML documents that pretend to be HTML!

If you use YUI with XHTML documents served as they should be served with a application/xhtml+xml media type, you’ll see strange errors pop up. This is because YUI uses the HTML DOM inner property to insert HTML elements which names are uppercase and HTML entities which are not built-in in XHTML.

It appears that the issue has already been mentioned in the ydn-javascript mailing list that supports the YUI and a fix has even been proposed in July by Laurens Holst.

For whatever reason, the YUI team which is usually pretty reactive on bug reports doesn’t seem to be interested by this issue and there has been no answer to this suggestion.

The only answer (so far) to my own post on the same subject came from another user and is interesting to read:

I think you’re confused. No versions of IE (even IE7) support this, for example. http://www.w3.org/People/mimasa/test/xhtml/media-types/results

In other words, I must be wrong if I care about a web standard that isn’t implemented in Internet Explorer!

I wouldn’t go as far as Karl Dubost who has decided to server all his pages with an application/xhtml+xml media type (link in French) without bothering upsetting Internet Explorer users to whom he kindly advises to use another browser, but it is quite easy to setup a web server so that XHTML pages are served with the right media type to compliant browsers and as text/html to other browsers…

Easy, except that YUI doesn’t work any longer and that you would have similar issues with other scripts such as those from Google Ads.

What I find most disappointing is that YUI seems to get pretty much everything right except for this « detail ». For instance, I like very much the way you can, with the YUI, produce clean XHTML code that will display correctly in any browser (including text based browsers) and animate this page for recent graphical browsers. This feature means that, with sufficient care, you can use the YUI to produce accessible applications which happens to be an issue for most Web 2.0 applications.

Let’s hope that the YUI team will change their mind and decide that, after all, being conform to the standard isn’t optional!