"Don’t let 2.0 pass over you unnoticed," warns Dino Esposito. ASP.NET 2.0 was released this past November, following great anticipation from.NET developers. The Beta releases had really teased us all, and we were keen to get our hands on some of the new features promised in 2.0: Master Pages, Data Source Controls, Provider Model, and Session and cache enhancements.
Now that developers have had a chance to play with some of the tools, it’s a good time to get some feedback on the release from an expert in the field. Dino Esposito is a trainer and consultant based in Italy who specializes in ASP.NET and ADO.NET. He writes a column for the MSDN magazine, and is the author of numerous books — two of them on ASP.NET 2.0.
Migration to ASP.NET 2.0
Recently, I’ve been toying with the idea of upgrading some of my 1.1 applications to 2.0. Is this something you would recommend? My applications are working just fine in 1.1. What are the benefits to me upgrading?
Running 1.1 binaries in a 2.0 runtime environment can give you some performance benefits. For example, in ASP.NET, simply by switching the engine, you reduce the size of your view state by around 50%. However, rewriting and upgrading applications that work and don’t require new features makes no sense to me. My advice is just to wait, but upgrade your developers. Don’t let 2.0 pass over you unnoticed. The quantity of things that you’ll need to look at if you upgrade later might become hard to manage.
A lot of .NET developers got used to the idea of code-behind. Now with 2.0, we’re introduced to the code-beside model. Which is better? What about code-inside?
This is a case of "much ado about nothing". Having your code in a separate file makes it easier to manage. If you don’t have a tool like Visual Studio to insert auto-generated code in the source files, this feature is great. But all in all, there are other key improvements in ASP.NET that deserve more interest than this.
What do you think about the future of VB and classic ASP? Is there much chance of these languages lasting now that so many people are switching to .NET?
It’s progress. I understand the enormous base of installed applications, but .NET is a big step forward and it’s been around now for more than five years. Now, in a field like software development, which was born about 30 years ago, five years is a geological era. Planning a porting is the best thing to do. Like it or not — it’s purely business.
Scripting, Standards, and Services
AJAX seems to be taking the programming world by storm, and .NET programmers don’t want to be left out. With libraries like AJAX.NET and Atlas popping up, what is your opinion on the future of .NET and AJAX? It seems everyone is looking for a way to use AJAX in their application whether it’s needed or not. Will AJAX change the way we develop our applications?
As a matter of fact, we’re living a paradigm shift. The way in which web applications work is changing before our eyes. From applications that work by requesting and replacing pages, we’re moving towards applications that work by requesting data and updating the current page. This is the AJAX lifecycle. It’s curious that now everyone is saying that AJAX is going to revolutionize the Web, but the building blocks of AJAX date back seven or eight years. It’s still more amazing to note that heart of AJAX is a component — XMLHttpRequest — that was created for Outlook Web Access and incorporated first with IE 5.0 in 1999. It’s also notable that Mozilla browsers currently implement this component better than in IE6. (Things will change with IE7.) Science (and computer science is no exception) has an accumulative nature where everybody builds on top of what others have done previously. AJAX is definitely changing the way we develop applications, even though it may take a couple more years to be fully perceived by most developers. That’s the timeframe that’s needed to have Atlas take root and expand today’s ASP.NET model.
One of the biggest complaints about Visual Studio and ASP.NET is that the HTML it produces is awful. ASP.NET can produce quality HTML; how serious do you think Microsoft is about web standards?
I think they started taking it seriously with 2.0 — in particular, its support for XHTML. However, some limitations still persist due to existing code. There are portions of ASP.NET 2.0 that produce code that’s not compliant with XHTML, and can hardly be updated. As far as Visual Studio is concerned, the 2003 version rewrote developers’ markup; fortunately, this practice ended in the 2005 version.
You’ve written several articles on Web Services and .NET. How well were security and web services addressed in 2.0?
Web services and .NET are different entities. Web services have become so popular because of .NET and because the .NET Framework made it so simple to create web services. Yet web services have little to do with .NET — at least conceptually. So to address security for web services, we don’t have to look at the evolution of .NET: we need to look at industry standards and how companies develop software to implement them. In this perspective, I feel that Windows Communication Foundation (WCF, formerly known as Indigo) is a better target.
ADO.NET, XAML, and Open Source
You’re an ADO.NET and SQL guy. What are the improvements in ADO.NET 2.0?
There are not so many, compared to other parts of the platform, and the improvements that have been made are mostly invisible in the sense that most of them occurred to improve performance. DataSet and DataTable are the classes the team focused on most heavily. The DataTable class implements new interfaces that make it work with serialization and web services exactly like a DataSet. Most important of all, the serialization algorithm of both classes has been fixed to provide true binary (as opposed to XML) serialization. For large enterprise applications moving large quantities of data, this was a key problem. There are more improvements, but this is what catches my eye first and foremost.
What are your thoughts on the growing interest in Microsoft’s Extensible Application Markup Language (XAML)? What is its future?
I don’t know. Currently, my interest in WinFX is limited to workflow applications where a variation of XAML is used. Without entering into too many details, the model under XAML (markup + code-behind files) is a powerful model for modern applications.
What are your thoughts on the ASP.NET open source projects and more specifically, have you had much or any experience developing applications for Mono?
I’m not a big fan of pure open-source software. I prefer to have a robust and reliable platform designed for extensibility from the ground up, and for it to be fully documented to make writing extensions reasonably easy. I also like software to have a company behind it that’s attentive to what users are doing and have to say about it. This is more or less what Microsoft seems to have in mind for Office Live. It would be nice to see how this model will be received.
You’ve got a new book — Programming Microsoft ASP.NET 2.0 Applications: Advanced Topics — coming out in March. It gets into some of the advanced topics in the new framework — the compilation model, for example. What would you say is the best new feature(s) of ASP.NET 2.0? What could have been done better?
Actually, the book you mention is the second part of a larger project that started back in May. I figured out that writing a 1,500-page book would have been way too hard a task, and not just for me. It would be hard to handle for me, as the author, but also for editors and reviewers. Finally, it would be physically hard to handle for readers who could have a difficult time simply trying to flick through the pages.
So with the publisher, Microsoft Press, I decided to split the original table of contents in two books. The first volume, Programming Microsoft ASP.NET 2.0: Core Reference, came out in November alongside the official launch of the 2.0 framework. It covers core topics — the fundamentals. The second volume is the one you mentioned, which covers more advanced topics. I split the TOC into two parts by looking at the possible priority one might accord to each topic. The topics a developer would reasonably want or need to learn first found their way in the first book; all the rest is in the book that’s coming out in March. On the other hand, experienced developers as well as developers who made most of their way through ASP.NET 2.0 already (i.e., participating in beta programs and installing tons of early builds), might go straight to the second book that covers the details of the stuff that’s hard to find in the existing literature and documentation.
I particularly like the fact the ASP.NET has been deeply refactored internally to expose customizable features that were inaccessible earlier. The provider model is the general pattern on top of which many features (such as security, membership, user profiling, and session state) are built. But I see this model expanded to include the compilation mechanism, too. In a word, I love the level of extensibility and customization that ASP.NET 2.0 provides. It’s hard to find features that could be improved upon, even though ASP.NET 2.0 — like anything else in the world — is not perfect. I find the tracing capabilities to be below the level of the rest of the framework. Also, server controls should provide a richer set of scripting capabilities. But these are the improvements that are coming next, with Atlas.
In all of your articles and examples you use proper object oriented programming techniques. Have you always been an OO programmer or did you start out as more of a scripter?
Actually, C++ was my first language. I am among the few who first learned C++ and OOP, and then moved on to C and C-style programming. Having used C for so many years, and then script languages, I’ve lost most advanced OOP techniques, but with C# I’m trying to catch up.
I’ve always been a fan of Extreme Programming, but I’m flexible in terms of the methodology I use. Is there a programming methodology that you favor?
I like most aspects of Extreme Programming and agile development, but I don’t usually take methodologies as a sort of religion. When I first learned about agile principles, I thought, "Wow, I’ve always been agile — I just didn’t know it." There’s no methodology that I really favor, but everything that looks to me like it’s kind of smart is welcome and adopted.
Test-driven development has been around for a while, but it seems as though interest in it continues to grow. What is your opinion on this? Is there a testing framework for .NET that you use?
I don’t write much real-world code. But automated testing is key. Period.
Now that I’ve picked your brain a bit, I’d like to get to know you a little better. You’ve accomplished so much in your career already. What are some goals you’re still trying to reach?
Maintaining today’s level would be great. Looking ahead, I don’t do much consulting and would like to increase that — to be more on the frontline. I do have a dream, so to speak, that ÃŒ’d like to turn into a goal: a worldwide tour going to South America, South Africa, Australia, China, and the Far East.
Did your goatee get you chicks?
It was merely an attempt to refresh the look … perhaps with the secret and absolutely unconfessed hope to get, well, more chicks. But don’t tell that to my wife …
Speaking as a .NET developer myself, I’d have to say that you’re someone I admire and respect. Who do you look up to?
There are so many people, and I’m honored to say that most of them are friends. One name? Uhm … Jeff Richter, who’s a nice guy and a superb professional. I say Jeff because he indirectly proved to me that things that look like they’re impossible can sometimes happen. And he proved that more than once.
What do you do for fun? Do you hike, travel, write, play games, etc.? Give us the goods!
For too many years, I just worked, and worked, and worked even more. Then, last spring, I turned 40 and rediscovered the importance of fitness. There are days now that I could seriously say, "when not running or playing tennis, Dino does some good work with .NET." I do have a family, too, and two kids — Francesco and Michela. Several readers of my books know about them and saw them grow up in the classic picture of us in the back cover.
Is there anything else you’d like to share either from a personal or professional point of view?
Yes. It’s a simple rule that was made popular by one of the absolute geniuses of all times — Albert Einstein. When people ask me to sign books, I usually write that thought down. Keep it simple. It works mostly everywhere and makes you happier.
We thank Dino very much for taking the time to participate in this interview! He’s done a lot for the .NET community and, we know, will continue to do so. We wish him good luck in all his future endeavors and with his new book.