2020ok  Directory of FREE Online Books and FREE eBooks

Free eBooks > Computers & Internet > Web Development > Internet Commerce > Web Site Design > Maximizing ASP NET Real World Object Oriented Development

Maximizing ASP NET Real World Object Oriented Development

by Jeffrey Putz


Download Book

If you are the author or the publisher, and would like to link to your site here, please contact us.



About Book

Book Description

ASP.NET has been perhaps the most popular and widely used part ofMicrosoft's .NET Framework. Part of the reason for this is that ASP.NET'sobject-oriented basis provided a lot more power and flexibility for developers.Another contradictory reason is that Microsoft made ASP.NET in such a waythat people familar with previous versions of ASP didn't need to make thejump to object-oriented programming, the way that VB developers did to moveto VB.NET. As a result there are a whole lot of ASP.NET developers out therewho are only scratching the surface of its potential. In this book Jeffrey Putzexplains the architecture and underlying concepts of ASP.NET in a way thatencourages developers to make the leap to OOP. He also encouragesdevelopers to make some fairly radical changes from their old scripting ways,by showing how much easier and faster application development can be doneby using OOP. He does all this with a graceful style that advance reviewers areraving about. He puts ASP.NET into a context that moves the programmerbeyond the "how" and into the "why", not just explaining the concepts, butdemonstrating that they are the best way to solve real problems. Throughoutthe course of the book both ASP.NET 1.1 and ASP.NET 2.0 are covered.



From the Back Cover

Praise for Maximizing ASP.NET

"Whether you want to improve your existing ASP.NET skills or are looking for a book that will give you the grounding and support you need to get started in ASP.NET development, this is the book for you! Jeff's approach is simple—he explains new methods in a logical, no-nonsense way and includes real examples that demonstrate the .NET way to perform a traditional activity."

—John Timney, Microsoft MVP, ASP.NET Web Services Senior Consultant, British Telecom Consulting & Systems Integration

"I was excited about this book from the moment I first heard about it. I strongly believe ASP.NET developers will benefit greatly from understanding object-oriented fundamentals. Jeff has done a great job of introducing important object-oriented concepts clearly and concisely, enhancing the reader's understanding with some excellent real-life code examples."

—Gordon Barrs, Independent Developer and Technical Training Consultant

"This book covers a great spectrum of ASP.NET topics for those interested in discovering what ASP.NET has to offer. I particularly enjoyed the inclusion of ASP.NET 2.0, IIS 6.0, and Visual Studio 2005 information."

—Tad Anderson, Enterprise Architect, Corporate Systems & Solutions

"A great book for ASP developers wanting to learn an object-oriented methodology.

—Eric Landes, Microsoft MVP, ASP.NET, http://blogs.aspadvice.com/elandes

"This is an excellent resource for developers making the move from ASP to ASP.NET, as well as a good read for developers new to coding web pages on the IIS platform. I particularly appreciated the effort the author took to develop all the sample code in both C# and VB.NET."

—William "mac" McLuskie, Senior Solution Architect, Enterprise Consulting Services, Hewlett-Packard, Inc.

Using ASP.NET, you can build Web applications that deliver unprecedented power and performance. But to make the most of ASP.NET, Web developers need to think and work very differently from the ways they've programmed in the past. In Maximizing ASP.NET Jeffrey Putz helps you make the transition—and reap the rewards.

If you're a long-time scripter who's migrated from ASP, PHP, or other traditional platforms, Putz shows you how to use ASP.NET's object-oriented model to write code that's easier to deploy, manage, extend, and reuse. If you're already comfortable with the fundamentals of ASP.NET using C# or VB.NET, this book's platform-specific details and development best practices will make you dramatically more effective.

Coverage includes

  • Understanding the ASP.NET object model, classes, and n-tier application architecture

  • Designing classes for maximum performance and reusability, one step at a time

  • Mastering the nuts and bolts of ASP.NET IIS and Web applications

  • Using the ASP.NET event model to control the entire user request lifecycle

  • Creating special handlers for special requests

  • Building custom server controls: It's easier than you think

  • Creating Web services from existing code and using remote services just like local objects

  • Using ASP.NET 2.0's rich security and membership classes

  • Personalizing sites—without unnecessary complexity

  • Maximizing application performance and scalability

  • Implementing effective testing, code management, and metrics

  • Taking full advantage of ASP.NET 2.0 in the Visual Studio 2005 environment

  • Leveraging your Web development skills in other .NET projects

Whatever your background, Maximizing ASP.NET will deepen your skills across all aspects of enterprise development: application design, test-driven development, modularization, optimization, and beyond. Packed with C# and VB.NET examples for both ASP.NET 2.0 and 1.1, this is no mere "cookbook"—it's a superbly well-written guide to both the "hows" and "whys" of serious ASP.NET development.

© Copyright Pearson Education. All rights reserved.



About the Author

Jeff Putz is the founder of POP World Media, LLC, a company formed originally to organize several hobby Web sites into a bona fide business. Jeff started programming in grade six on a TRS-80 and moved up through an Atari 600XL and Apple II+ later. After flirting with various jobs in the broadcast world, Jeff returned to computers and welcomed the Internet in 1998, working in various programming and management roles for several companies specializing in vertical market content.

Jeff's POP Forums application (http://www.popforums.com) has been downloaded tens of thousands of times and was featured in MSDN Magazine (Feb. 2004). His company is in the process of developing several products using ASP.NET and continues to operate CoasterBuzz (http://www.coasterbuzz.com), the world's most popular roller coaster enthusiast site.


© Copyright Pearson Education. All rights reserved.



Excerpt. © Reprinted by permission. All rights reserved.
Extreme Programming Installed

Preface

Microsoft has endowed Web developers with a gift. Since its introduction to the masses in beta form in 2001, the .NET Framework and its ASP.NET subset have changed the way we look at building Web applications. Indeed, before this time, many of us didn't even think in terms of "applications" but rather collections of loosely related scripts that together formed a Web site.

Making this transition required a serious leap of faith and a great deal of new learning for a lot of developers. Scripting languages such as ASP 3.0, ColdFusion, and PHP made it fairly easy for someone with little or no programming experience to quickly learn about the platform and start building dynamic Web sites. Years of experience as a developer or an academic background in computer science were not necessary.

That background still isn't necessary, but with ASP.NET, script developers need to make some fairly radical changes in their thinking to get the most out of this amazing platform. This book aims to help you with that transition, or to get you familiar with the platform's architecture if you're already well versed in object-oriented design.

Why Was This Book Written?

In watching the various message boards and newsgroups around the Internet, it became clear to me that a lot of very smart developers are having some problems making the transition to the object-oriented world of ASP.NET. As much as we praise Microsoft for delivering the platform to us, we can also curse them for making it so inviting and safe because it doesn't force you to follow the "best practices" they envisioned. You can do things in almost the same way you did when you were using a scripting platform.

It would be easy to create a straight book on techniques or a "cookbook" of sorts to help you along, but what I'm really after is a guide that helps you understand the underlying concepts and architecture to the platform so that you can apply the same concepts to your own applications. Indeed, I point out in the second chapter that the code you write isn't any different than the code that Microsoft wrote into the thousands of existing .NET base classes. A cookbook or overview wouldn't help you understand this.

This book is not meant to evangelize object-oriented techniques. The idea is to show you enough rationale behind the concepts to encourage you to use them. I want light bulbs to go off in your head that say, "Oh yeah, I get it!" Using OOP just for the sake of doing so is not good.

Who Is This Book For?

This book assumes that you've already taken the first steps in learning about ASP.NET and have a relatively basic grasp of either the C# or Visual Basic .NET languages. It is also assumed that you have some basic understanding of how to use Microsoft SQL Server and understand what a relational database is. You might be a developer who in a previous life was primarily a script developer and wants to "get" the platform and its strong object-oriented architecture. You might also be a more seasoned developer who just wants to get into some of the platform-specific details of ASP.NET that make things tick under the hood. These developers may choose to skip around a bit.

Regardless of the camp you might be in, this book is all about context. Developers are generally very smart people, and they don't learn by memorization, they learn by understanding. This book takes the basics of object-oriented programming and applies them to ASP.NET and Visual Studio to give the reader a more rounded skillset that includes application design, test-driven development, code reuse, modularization, and an eye on performance. The book puts Microsoft's platform into context by moving beyond the "how" and into the "why," not just explaining the concepts but also selling them as the best way to solve real problems. If you come from a scripting background or want to make your skills more applicable to other areas of .NET programming, this book is for you.

If you are totally new to ASP.NET, this book isn't for you—yet. You should start with one of the many ASP.NET books that have "beginner" or "introduction" in the title. When you've got the basics, come back to this book to round out and strengthen your knowledge. We won't cover basics such as master pages, user controls, connecting to a database, configuring FormsAuthentication, and so on.

I want to say up front that the term "best practice" is a bit of a misnomer. Some concepts and methodologies are certainly better than others, but this term implies that universal truths abound in the world of programming. Some might believe that the only real universal truths are death and taxes, so while you read about what I believe are best practices, keep in mind that there's plenty of room for interpretation based on your experience and the business problems you're trying to solve. As with anything else, use what works and adapt it to your needs.

Conventions

Whenever there is a bit of code to show you, it will look like this:

C#

public class ThisIsAGreatClass{  // lots of code here}

VB.NET

Public Class ThisIsAGreatClass  ' lots of code hereEnd Class

Special points, sidebars, important notes, and other tangents will be separated from the rest of the text like this:

This is something you should take into consideration.

Play-by-Play

The following is a brief outline of what you can expect to find in the rest of this book:

Part I: The Leap to Object-Oriented Programming

Chapter 1, "The Object Model." Object-oriented programming has been around for ages, but it's a new concept for developers with a scripting background. You'll learn that everything is an object in .NET, including your own code. We'll analogize the concept of object-oriented programming to the classic example of the structure and use of cars.

Chapter 2, "Classes: The Code Behind the Objects." After you see what an object is and how it contains some kind of functionality, we'll get into the nuts and bolts of writing a class. You'll learn about the instantiation of objects, inheritance, protection levels, static methods, enumerations, and interfaces.

Chapter 3, "Class Design." A class can serve many different purposes in an application. Your classes can execute a block of code, much as the familiar System.Web.UI.Page class does, and at times they can do nothing other than group data together. More useful classes can do all these things.

Chapter 4, "Application Architecture." Apart from ASP.NET, the n-tier approach to application development can make even the largest projects easier to build, deploy, and maintain. We'll take a look at this common design pattern and address when and when not to use it.

Chapter 5, "Object-Oriented Programming Applied: A Custom Data Class." This chapter presents you with a practical example of class design that manipulates database data and even caches it for better performance. This model shows you the payoff of object-oriented code, where you write it once and use it many times.

Part II: The ASP.NET Architecture

Chapter 6, "The Nuts and Bolts of IIS and Web Applications." Regardless of how you code your application, the files, folders, and assemblies need to be in the right places to make everything work.

Chapter 7, "The ASP.NET Event Model." Every request by users of your application has a fascinating life cycle. By understanding and following that life cycle, you can intervene or perform certain actions at just the right time to get the most out of your application. The execution of page, application, and control events is covered.

Chapter 8, "HttpHandlers and HttpModules." ASP.NET can do so much more than produce pages, and HttpHandlers and HttpModules are just the tools you'll need for special requests. I'll give you an example of a handler that will protect your images from being bandwidth leeched.

Chapter 9, "Server Controls." You might find that you use the same combination of controls frequently or that an existing control doesn't meet your needs. Building your own isn't that hard, and it's exactly the same process used by Microsoft to create many of the controls you already use.

Chapter 10, "Web Services as Objects." It's easy to create a Web service from your existing code, and it's easy to create a proxy class that consumes the service. What might not be as obvious is that Web services enable you to use that remote code as if it were an object local to your application.

Chapter 11, "Membership and Security." ASP.NET has a rich set of classes to help you control access to your site and verify who your users are. You can use little or no code to identify your users, or extend the system to make your own custom solution. You'll learn how to develop a custom Membership provider to connect the system to your own data.

Chapter 12, "Profiles, Themes, and Skins." Chances are you'll want to keep more than just a user's email and password, and again the ASP.NET team has made it possible to store this data with little effort on your part. You can also take the leap to extend the system with your own provider. Your users' preferences can be tied into an extensive skinning system so they don't have to live with your site's "look."

Chapter 13, "Declarative Programming." With all this talk of object-oriented code, what is declarative programming, and where does it fit? We'll cover some of the common controls and their uses available in ASP.NET.

Part III: Development Issues

Chapter 14, "Developing with Visual...

Comments

SEND A COMMENT

PLEASE READ: All comments must be approved before appearing in the thread; time and space constraints prevent all comments from appearing. We will only approve comments that are directly related to the article, use appropriate language and are not attacking the comments of others.

Message (please, no HTML tags. Web addresses will be hyperlinked):

Related Free eBooks

Related Tags

DIGG This story   Save To Google   Save To Windows Live   Save To Del.icio.us   diigo it   Save To blinklist
Save To Furl   Save To Yahoo! My Web 2.0   Save To Blogmarks   Save To Shadows   Save To stumbleupon   Save To Reddit