When you think ASP, think...
Recent Articles
All Articles
ASP.NET Articles [1.x] [2.0]
ASPFAQs.com
Message Board
Related Web Technologies
User Tips!
Coding Tips
Search

Sections:
Book Reviews
Sample Chapters
Commonly Asked Message Board Questions
Headlines from ASPWire.com
JavaScript Tutorials
MSDN Communities Hub
Official Docs
Security
Stump the SQL Guru!
Web Hosts
XML Info
Information:
Advertise
Feedback
Author an Article
Technology Jobs

















internet.com
IT
Developer
Internet News
Small Business
Personal Technology
International

Search internet.com
Advertise
Corporate Info
Newsletters
Tech Jobs
E-mail Offers
ASP ASP.NET ASP FAQs Message Board Feedback ASP Jobs
Print this page.

Windows Systems Administrator
Jupitermedia
US-CT-Darien

Justtechjobs.com Post A Job | Post A Resume

Published: Monday, September 18, 2000

Using Object-Orientation in ASP.NET : Overview
By Ian Stallings


With all the excitement surrounding ASP.NET and what it can do for you, it's easy to miss the major change that slipped by - the change to a totally Object-Oriented paradigm. (To learn more about ASP.NET, be sure to read our ASP.NET Article Index!) Visual Basic 7 will fully embrace OO as will C#, Microsoft's newest language. Make no mistake. This is a direct shot at Sun's Java development environment. Java/JSP has always supported OO, making it more appealing to developers accustomed to working within the OO paradigm. This will all change with ASP.NET and it's built in support for VB7, and C#.

- continued -

This article is intended to show the power of OO and how it can be applied in ASP.NET to create reusable, robust, simpler, and flexible applications. This is a four part series, covering all the basics of OO, showing examples in C#. If you don't know C# don't worry, It's similar in syntax to JavaScript, and I have made the examples as simple and clear as possible. So you should be able to pick them up pretty easily. (To learn more about C#, be sure to check out our C# Article Index!)

What is Object-Orientation?
Object-Orientation is a paradigm for creating software systems using objects. Objects are tangible and conceptual things we find in the real world. Using OO, the code is broken into modular, reusable chunks called classes. Classes are the "blueprint" for creating instances of objects. These classes can be used throughout an application again and again. The entire concept of OO is beyond the scope of this article, so I would recommend reading up on OO at some of the links listed below for more information.

What Are The Benefits Of OO?
OO emphasizes creating reusable, robust software in a way that is easy to understand. By relating programming to the real world, it becomes much easier to use. Some of the characteristics of OO are:

  • Reusable - faster, modular development
  • Robust - increased quality
  • Simple - easy maintenance
  • Flexible - easy to modify

Concepts Overview
There are a lot of concepts involved with OO. But let's just cover the basics for now and maybe this will help you get a better understanding of OO:

  • Classes - A generic blueprint used to create similar objects. We can have a Human class for instance. All of these humans would breather air, have a head, etc. Specific instances of these objects may be different, having different heads, but they would all share the same characteristics. (To learn more about classes and using classes in old-school ASP with VBScript, be sure to read: Using Classes to Encapsulate Implementation Complexity!)

  • Encapsulation - Hides object data and implementation details. Protects the state of the object from other programs and other programs are protected from changes in implementation.

  • Inheritance - Allows code reuse by building on existing classes. Using inheritance you can create a base class Mammal and then build on this class, creating a subclass called Human that has all of the inherent properties of its base class.

  • Polymorphism - Allows objects to assume many forms. For instance, we might have two classes, a Human class and a Cheetah class. Both of these objects could use the run() behavior. When Human.run() is called the human would run using it's two legs. When Cheetah.run() is called the Cheetah would start running using it's four legs. They both have the run() behavior but it can assume many forms.

Links:

  • Using Classes to Encapsulate Implementation Complexity
  • Basic Object-Oriented Concepts
  • Object-Orientation FAQ

    *** Read The Second Part of this Four Part Series: Using Object-Orientation in ASP.NET : Encapsulation***

    Happy Programming!

  • By Ian Stallings


    Windows Internet Technology | ASP.NET [1.x] [2.0] | ASPMessageboard.com | ASPFAQs.com | Advertise | Feedback | Author an Article



  • JupiterOnlineMedia

    internet.comearthweb.comDevx.commediabistro.comGraphics.com

    Search:

    Jupitermedia Corporation has two divisions: Jupiterimages and JupiterOnlineMedia

    Jupitermedia Corporate Info


    Legal Notices, Licensing, Reprints, & Permissions, Privacy Policy.

    Advertise | Newsletters | Tech Jobs | Shopping | E-mail Offers

    Solutions
    Whitepapers and eBooks
    Microsoft Article: HyperV-The Killer Feature in WinServer ‘08
    Avaya Article: How to Feed Data into the Avaya Event Processor
    Microsoft Article: Install What You Need with Win Server ‘08
    HP eBook: Putting the Green into IT
    Whitepaper: HP Integrated Citrix XenServer for HP ProLiant Servers
    Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 1
    Intel Go Parallel Portal: Interview with C++ Guru Herb Sutter, Part 2--The Future of Concurrency
    Avaya Article: Setting Up a SIP A/S Development Environment
    IBM Article: How Cool Is Your Data Center?
    Microsoft Article: Managing Virtual Machines with Microsoft System Center
    HP eBook: Storage Networking , Part 1
    Microsoft Article: Solving Data Center Complexity with Microsoft System Center Configuration Manager 2007
    MORE WHITEPAPERS, EBOOKS, AND ARTICLES
    Webcasts
    Intel Video: Are Multi-core Processors Here to Stay?
    On-Demand Webcast: Five Virtualization Trends to Watch
    HP Video: Page Cost Calculator
    Intel Video: APIs for Parallel Programming
    HP Webcast: Storage Is Changing Fast - Be Ready or Be Left Behind
    Microsoft Silverlight Video: Creating Fading Controls with Expression Design and Expression Blend 2
    MORE WEBCASTS, PODCASTS, AND VIDEOS
    Downloads and eKits
    Sun Download: Solaris 8 Migration Assistant
    Sybase Download: SQL Anywhere Developer Edition
    Red Gate Download: SQL Backup Pro and free DBA Best Practices eBook
    Red Gate Download: SQL Compare Pro 6
    Iron Speed Designer Application Generator
    MORE DOWNLOADS, EKITS, AND FREE TRIALS
    Tutorials and Demos
    How-to-Article: Preparing for Hyper-Threading Technology and Dual Core Technology
    eTouch PDF: Conquering the Tyranny of E-Mail and Word Processors
    IBM Article: Collaborating in the High-Performance Workplace
    HP Demo: StorageWorks EVA4400
    Microsoft How-to Article: Get Going with Silverlight and Windows Live
    MORE TUTORIALS, DEMOS AND STEP-BY-STEP GUIDES