DevCity.NET - http://devcity.net
Book Review: Beginning ASP.Net 2.0
http://devcity.net/Articles/242/1/article.aspx
Ged Mead

Ged Mead (XTab) is a Microsoft Visual Basic MVP who has been working on computer software and design for more than 25 years. His journey has taken him through many different facets of IT. These include training as a Systems Analyst, working in a mainframe software development environment, creating financial management systems and a short time spent on military laptop systems in the days when it took two strong men to carry a 'mobile' system.

Based in an idyllic lochside location in the West of Scotland, he is currently involved in an ever-widening range of VB.NET, WPF and Silverlight development projects. Now working in a consultancy environment, his passion however still remains helping students and professional developers to take advantage of the ever increasing range of sophisticated tools available to them.

Ged is a regular contributor to forums on vbCity and authors articles for DevCity. He is a moderator on VBCity and the MSDN Tech Forums and spends a lot of time answering technical questions there and in several other VB forum sites. Senior Editor for DevCity.NET, vbCity Developer Community Leader and Admin, and DevCity.NET Newsletter Editor. He has written and continues to tutor a number of free online courses for VB.NET developers.

 
by Ged Mead
Published on 7/20/2006
 

  Wrox have published a wide range of ASP.NET 2.0 books for a variety of developer skill and knowledge levels.    This one is aimed at ASP.NET beginners.

  Ged Mead reviews this book.


Introduction

     For many years Wrox produced books that were popular with developers.  Then, around 2004 or thereabouts, they pulled down the shutters and we all thought that Wrox was no more.  

    But Wrox has resurfaced under the Wiley umbrella and those book covers of group shots of smiling expert authors are back with us again.   Rather like the famous cry of "The King is dead.  Long live the King!", we can say "Wrox is dead. Long live Wrox!" perhaps. 

   Risen from the ashes and on the surface looking as though it's business as usual, there has been a steady output of Wrox titles over the past few months.   The Wrox trademark approach of employing multiple authors on one book has also been reinstituted.

   One of my complaints about this approach in the past was that in some of their books it was obvious that the authors weren't talking to each other much.   The areas of overlap were many and sometimes needless.  Of course, occasionally, there was a benefit to this; if you didn't totally follow the explanation of a topic by one of the authors, then you might pick it up from the duplicated but differently phrased explanation from one of the others.  

   Apart from that occasional plus though, generally I found that the books which were essentially sets of individual essays placed in a logical order were less useful than a traditional single author book.     So, has the Phoenix of Wrox fallen into the same bad old ways?   Well, based on this book the answer has to be a resounding "No!".   It certainly looks as though the coordination of the content of this book has been  excellent; quite an achievement considering that it has four co-authors all working in tandem (or should that be "quad-dem?).     I detected very little unecessary overlap and in fact in several places one author (or the editor) has pointed to further information written by one of the other authors elsewhere in the book. 

   The target audience for this book is given as :  "This book is for anyone new to web programming or who has a small amount of knowledge of web programming concepts.   Maybe you want to start a career as a web developer? Or perhaps you just want to learn how to use some cool server-side technology to put together some sites in your spare time?   In either case, this book teaches you what you need to know and gives you a good feel for how the technology works, how to use the Visual Web developer environment to speed up your development and to give you total control over the development process." 

    I think that's a fair summary of who will gain benefit from this book, but would underscore the inference that you should have some general background knowledge of developing.  It's certainly not pitched anywhere near as high as the level of the Developer-To-Developer series, but I think that complete newcomers may struggle at times, whereas those with the "small amount of knowledge" will find that this book is pitched perfectly for them.  

   The book uses a demonstration website which has been created by the team purely for tuition purposes.  This can be viewed here.  The home page of this demo site very usefully has a quick link to the downloadable book code. 

      The Wrox United site is used throughout the book for everything from basic site design to e-commerce and from themes and master pages to accessing and updating SQLServer databases.   There are occasional sideways moves into non-Wrox United areas to cover particular topics, but on the whole the thrust of this book is that each new topic learned will be incorporated in some way into the finished Wrox United site.

 

Book Content

Chapter 1  - Introduction
Chapter 2 - Site Design

  The first two chapters contain an introduction to ASP.NET 2.0 together with an overview of the Wrox United application that is used throughout the book to demonstrate techniques.  

  The second chapter contains clear explanations of the new Master and Content Pages facility available in ASP.NET 2.0, including some variations of the technique.   It also explains the roles of two important project files - Global.asax and Web.config. 

   To a degree, the style of these two chapters by John Kauffman will favour those who have at least a little previous programming experience.   However none of the material is at a very high level or technically difficult, so  beginners will be able to master the content , but it may just take a little perseverance.

Chapter 3 - Page Design

   This chapter includes an introduction to some server controls, ranging from basic textbox and image controls to the more complex SiteMapPath, Menu and Treeview controls, amongst others.   Although the author of this chapter does include some specially prepared demo versions of the Wrox United code,  I found it easier to create my own website projects from scratch.   I would then sometimes cut and paste  various code chunks from the the final version that they supply.  

   This worked well for me, partly because I had trouble getting some of the specially-prepared samples to run (although I'm happy to accept that the problem lay with me not with her code).  The second advantage of this approach is that I had to give much more thought to what each line of code actually *did* and I found that this analysis helped me to reinforce my understanding of the various techniques.

In fact - having done that while first reading through the chapter - I see that author Chris Hart does set a couple of recommended exercises along the same lines, .  As she says, the sample code is available if you want to copy and paste it,  but you will obviously gain more knowledge and understanding by trying out the exercises.

Chapter 4 - Membership and Identity

This chapter introduces the basics of the concepts of identity, authentication, authorization,, personalization and membership.

It begins with a succinct and clear overview of web site security basics and it then goes on to cover some sample exercises for setting and editing Uses Roles and Access, both by using the Web Admin Tool and by editing Web.config by hand.

  Even if you are an HTML  complete beginner you should have no problem following the  detailed explanations .

Chapter 5 - Styling With Themes

  This chapter introduces CSS and covers several of the various ways you can use it.   It also explains the new feature of Themes which you can apply to individual pages or to all pages in a site.   The subjects of usability and accessability are also given some coverage in this chapter.

Chapter 6 - Events and Code

   Chapter 6 deals with HTTP,  web server architecture and many variations of Events,  including  server side events, global events, page and data events.  It also explains in detail how the Page's IsPostBack property works and how you can use it.

Chapter 7 -Reading Data
Chapter8 - Writing Data

   The book now moves into an area that some people think is one of the main reasons for making the effort to use ASP.NET 2.0  - Data.   As the author puts it:  "The hallmark of dynamic web application pages is the capability to use information from a database.   No other capability so widely expands the horizons of functionality for the visitor."
  Coverage  includes an overview of the theory and terminology of databases,  data source controls, data bound controls, XML data.  As in the previous chapters, the Try It Out sections help to break this large subject down into manageable and understandable chunks.

Chapter 9 - Code

   In Chapter 9, Dave Sussman takes you back to basics.  The previous chapters have helped you to create the beginnings of quite a sophisticated web site;   this chapter is designed to make you pause and be sure you understand the ground level techniques of programming before moving on to more complex topics.     Areas covered in this chapter include such things as variables and data types, arrays, collections, as well as program flow decisions, loops and an introduction to generics.

Chapter 10 - Componentization

   The book next moves on to Componentization -  not a word that trips easily off the tongue, but is really all about the splitting up code into discrete, logical blocks and units.  As I'm sure you will know, this is done to avoid the creation of what would otherwise be spaghetti code.  It includes details of the Code Behind approach, the use of Partial Classes, data layers  and multi-tiered applications.   Finally, this chapter deals with the ObjecDataSource and User Controls.

Chapter 11 - Roles and Profiles

   After the fairly heavy theory in the previous two chapters, the book returns to the Wrox United demonstration website project.  Roles and User Profiles which were introduced earlier in the book, are now dealt with in much greater depth.

Chapter 12 - Web Services

  No self-respecting .NET book these days would be allowed out of the door without a chapter or a section on the much heralded topic of Web Services and this is the subject of Chapter 12.   Against the backdrop of the Wrox United site, the explanation and demonstration of the Fixtures web service gives the coverage quite an acceptable  ‘real world’ feel.   And in fact it goes a stage further and demonstrates the use of a second web service - the Results Service on the PocketPC platform; again a believable scenario under the Wrox United website umbrella.

 Chapter 13 - E-Commerce

   Chapter 13 takes sixty pages to cover several aspects of E-Commerce.  Once again, the Wrox United setting is realistically employed in this chapter as Chris Ullman demonstrates step by step how to create a product catalog, a shopping cart, plus a Checkout with credit card handling. 

Chapter 14 - Performance

   In this next chapter we once again come down from the exciting heights of creating a money making website and, as in Chapters 9 and 10, catch up on the realities of developing applications.   This time the emphasis  is on performance.  Many techniques are explained and analysed.  These range from quite  basic  ones, such as disposing of objects and devising optimum database connections, through to intermediate and advanced areas , such as using stored procedures, caching, tracing and stress testing.

Chapter 15 - Dealing with Errors

   This again is a mix of core techniques and Wrox United samples.  It does its best to start you off on the right path, that is to code defensively, try and anticipate what may go wrong and code to avoid it with bullet-proof code.   It deals with validation, Exception Handling techniques, debugging, and demonstrates how to create a user friendly Custom error page  (None of the ugly Error 404 on the Wrox United site!)

Chapter 16 - Deployment, Builds and Finishing Up

    In this final, relatively short, chapter of the main book, various deployment scenarios are described.  This is followed by Testing, maintenance and health monitoring of your deployed site.

Appendices

   There are five appendices to this book:

  • Exercise Answers for the conscientious reader (cheat sheet for the rest of us)
  • Setup.  Very useful for absolute beginners with lots of screenshots.  Step by Step guide to setting up Visual Web Developer Express.
  • A breakdown of the design of the Wrox United Database.
  • A beginner's guide to using the Database Explorer, again with many handy screenshots for clarification.
  • Quick reference for CSS and HTML.

 

 

 

 

 

 

 

Summary

    Overall, this is a well written, comprehensive and useful beginner's guide to ASP.NET 2.0.    The quartet of authors have melded well and the authoring joins between chapters are virtually seamless. 

  The use of the Wrox United site provides a very effective canvas for the authors to draw on and help the reader to follow and work with the examples.   Wherever possible they have demonstrated methods and approaches using this (almost) real world Wrox United scenario.    The underlying quiet humour in some of the Wrox United demo site material also helps to lighten what can be a bit of a slog at times - some level of brain pain being unavoidable for most of us with a major topic of this size.

    I have several Wrox books, some going back a while.  Some are much better than others when it comes to their readability and coordination.  This one is right up there with the best.   If you have some programming experience, but haven't attempted to delve into ASP yet, then you will find this book very useful to bring you up to speed with the latest incarnation of the language - ASP.NET 2.0