ASP.NET
  Home arrow ASP.NET arrow Using Objects in ASP.NET: Part 1/2
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Moblin 
JMSL Numerical Library 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ASP.NET

Using Objects in ASP.NET: Part 1/2
By: Wrox Team
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 32
    2003-02-25

    Table of Contents:
  • Using Objects in ASP.NET: Part 1/2
  • Some of the Grander OOP Features
  • Class Members
  • Class Accessibility
  • The Constructor
  • Conclusion

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Using Objects in ASP.NET: Part 1/2


    (Page 1 of 6 )

    Obects are a big part of .NET. In this 2 part article series, Craig shows us how to use objects with ASP.NET, focusing mainly on providing clear working examples.Objects and Object oriented programming have been around for a long time in mainstream desktop and client/server programming (since 1967 in fact.) Traditionally, web development has been dominated by procedural based scripting languages. It is only recently that OOP has begun to integrate into the web-programming world. Languages used to create dynamic websites such as Java, Perl, PHP and Coldfusion have begun to implement object-orientation into their feature sets or improve on the OOP features they already had. In ASP 3, objects could be manipulated or created through COM and VBScript. However, in ASP.NET, Microsoft has brought ASP to a new level of "object-orientedness" not previously seen in web programming languages.

    Perhaps you’ve been using ASP.NET for a while and you’re not sure if you’re doing everything right when it comes to this OOP stuff. Or perhaps you are still writing ASP.NET code primarily in a script fashion similar to ASP 3. With these two articles, Craig Bowes will discuss how to use OOP features in your ASP.NET web applications.

    Requirements
    To do the examples in this article, you’ll need the following software:
    • The .NET framework
    • IIS
    • The .NET SDK to compile your applications
    • Visual Studio .NET, Web Matrix or your favorite text editor.
    You should also be somewhat familiar with at web programming in one language, preferably VB 6 or VBScript. I’ll show code related to this article in VB.NET, but also have the examples downloadable in C# as well. You should also already know how to compile files using the SDK or VS.NET.

    Target Audience
    Chances are you are probably familiar with objects and object-oriented programming. In fact, this article assumes that you know enough to be able to compile a VB or C# file and use the basic event handling features in ASP.NET such as the Page_Load event handler. A complete study of OOP would be a topic that could easily fill many volumes and there are many articles, books and websites devoted to OO theory. Such a study is outside the scope of this article. However knowing what OOP is and does is different than knowing how use it in code. In this article, we’re going to look at the basic OOP features in the .NET framework and laying the ground work for using things like classes, constructors, methods, fields and properties in ASP.NET. In Part II, we’ll look at more advanced features and architecture in OOP. This will include inheritance, polymorphism, aggregates and interfaces.

    An outline of what we’ll cover is as follows:

    Part I: Using Objects

    Intro to Objects and OOP
    • Building a Class
    • Instantiating Objects & the New statement.
    • Constructors, Fields, Methods, Properties
    • Accessibility: Public, Protected, Private, Internal, Virtual
    Part II: Advanced Architecture

    Implementation Inheritance
    • Overriding Methods/Polymorphism
    • Abstract Classes
    • Aggregation/Composition
    • Interfaces
    Perhaps you’ve been using ASP.NET for a while and you’re not sure if you’re doing everything right when it comes to this OOP stuff. Or perhaps you are still writing ASP.NET code primarily in a script fashion similar to ASP 3. If you are already a strong "object architect" that has used object-oriented features such as aggregation, polymorphism and inheritance for years, then this article will probably seem a bit basic for you. Hard-core Java and C++ programmers will probably fall into this category. However, if you’ve been writing mostly procedural or non-OOP code in your classic ASP web applications using VBScript, then this article may help you get a handle on writing OOP style code with ASP.NET’s new features.

    More ASP.NET Articles
    More By Wrox Team


     

    ASP.NET ARTICLES

    - How Caching Means More Ca-ching, Part 2
    - How Caching Means More Ca-ching, Part 1
    - Reading a Delimited File Using ASP.Net and V...
    - What is .Net and Where is ASP.NET?
    - An Object Driven Interface with .Net
    - Create Your Own Guestbook In ASP.NET
    - HTTP File Download Without User Interaction ...
    - Dynamically Using Methods in ASP.NET
    - Changing the Page Size Interactively in a Da...
    - XML Serialization in ASP.NET
    - Using Objects in ASP.NET: Part 1/2
    - IE Web Controls in VB.NET
    - Class Frameworks in VB .NET
    - Cryptographic Objects in C#: Part 1
    - Sample Chapter: Pure ASP.Net







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway