eWebProgrammer
Distributednetworks GofPatterns
prev prev
  Course navigation
    The ASP object model
An outline of Object-Oriented Programming (OOP)
In procedural programming, you think about the algorithms and data structures that are used to model the problem and then divide the problem into a series of ever-smaller procedures.
In object-oriented programming, you think about the overall system you're modeling and how the elements in the system interact with each other. In procedural programs, procedures are the highest-level elements. They define what the program does. In object-oriented programs, classes are the highest level elements.
Classes correspond to real-world entities such as employees or automobiles. An object is one instance of a class, much as 3 is an instance of a number and hello is an instance of an English word. There are rules about how to add and subtract numbers, and they apply to all numbers. When you define a class, you are setting the rules for all the members (objects) of that class.
Objects combine data (also called attributes, variables, and state) with behavior (also called methods, functions, and operations). An object holds information, and can do things with that information on request.
The application of OOP to ASP objects is that each object we will encounter has properties and methods already defined. When you set a property (attribute) equal to a variable of the appropriate type and refer to one of the object's methods a known and consistent operation will occur on, or using, that property (or those properties).
  Course navigation