Object-Oriented Philosophy
For my fellow students/programmers (and tutees):
One of the major philosophies behind object oriented programming is a separation of processing into re-usable bundles that handle anything and everything related to a particular entity, be it a cultural or natural category, but no more. Indeed, what is put into practice is often less and that is a good thing as it increases the likelihood of reusability and you can always add more later.
The above comes from the major philosophy of programming in general to copy or reuse code. This means not only to copy your own code and make your own code as reusable as possible, but to read any and all code you can find. Then copy what you need, getting permission when it's not open source. You'd be surprised how many people are willing to share their code when not held back by obligations to employers. Why?
It's really quite simple. Programming is done with programming languages. There's a reason they're called languages. They are entirely symbolic and are as deeply complex and intricate as any spoken tongue in the world. So every time you read code, you're learning how to become more fluent in the language. And if you ever get frustrated in not understanding why a computer isn't doing what you're "telling" it to do, just remember how long it took you to become fluent in your first language. Most people would say it was years or so of continuous use much of every day before they were comfortable with their first language. So be patient with yourself and the machine you're using. Mastery often requires more than time and patience, but never less.
So looking at programs from the paradigm of languages, each program a programmer writes is a "book" or even a "story" by loose interpretation. Ever known an author who didn't want people to read their "books" or "stories"?
With the above thought and philosophy in mind, we come to the logical next step in the Object-Oriented Model. The Object itself and how it is used for, in, and with the system and environment around it.
Ultimately, every program is a manipulation of data using abstract symbols to create a digital algorithm of 1s and 0s to be manifested in the physical realm via the on and off states of electromagnetic media. More simply, a program controls information (refined and formatted data).
Since every system used by us (humanity) needs to be able to interact with us, this means most programs and every collection of programs commonly called an application, needs a user interface or UI. A graphical user interface, a GUI, is the most common form of UI.
As information is the most important part of any program, most programs and every application requires a way to persist that information. Hence, data storage is needed and data access processes to interact with the data storage.
Finally, since every program is made to manipulate information, every program requires a controlling process or controller object in Object-Oriented programming.
Now most OO programmers would stop there with those three concepts: UI, data access and controller processes. However, I like to conceptualize the ideal model as having a fourth component even though most OO programmers consider it part of the controller concept.
The fourth concept I add to the three above is the abstract entity(ies) about and around which your program is built. After all, this is Object-oriented programming.
Since we need to use our programming language to tell the computer what to do, we need to be able to define new concepts to the computer in a way it will understand. Since Object-oriented programming is about objects, we need to be able to give the computer definitions of the objects we're trying to make it understand. Enter the concept of the class.
Classes are best described as literally being object definitions. As something is often described by its features, objects are said to have properties. As it also helps to describe the ways an object can act, objects also have methods.
To create a complete application then, using the Object-oriented philosphies and concepts, we need to have the following groups: The ones that do processing (UI, data access and control) are often called layers and the one that describes the entities we're manipulating is called a class library. So we have the following groups:
and all three pass between them the entities (objects) or parts of the entities (properties) described in the:
Next time: How these four groups constitute an application, why they not only make logical groupings, but adhere to the reusability philosophy, and how they interact to accomplish their purpose while maintaining their reusability.
One of the major philosophies behind object oriented programming is a separation of processing into re-usable bundles that handle anything and everything related to a particular entity, be it a cultural or natural category, but no more. Indeed, what is put into practice is often less and that is a good thing as it increases the likelihood of reusability and you can always add more later.
The above comes from the major philosophy of programming in general to copy or reuse code. This means not only to copy your own code and make your own code as reusable as possible, but to read any and all code you can find. Then copy what you need, getting permission when it's not open source. You'd be surprised how many people are willing to share their code when not held back by obligations to employers. Why?
It's really quite simple. Programming is done with programming languages. There's a reason they're called languages. They are entirely symbolic and are as deeply complex and intricate as any spoken tongue in the world. So every time you read code, you're learning how to become more fluent in the language. And if you ever get frustrated in not understanding why a computer isn't doing what you're "telling" it to do, just remember how long it took you to become fluent in your first language. Most people would say it was years or so of continuous use much of every day before they were comfortable with their first language. So be patient with yourself and the machine you're using. Mastery often requires more than time and patience, but never less.
So looking at programs from the paradigm of languages, each program a programmer writes is a "book" or even a "story" by loose interpretation. Ever known an author who didn't want people to read their "books" or "stories"?
With the above thought and philosophy in mind, we come to the logical next step in the Object-Oriented Model. The Object itself and how it is used for, in, and with the system and environment around it.
Ultimately, every program is a manipulation of data using abstract symbols to create a digital algorithm of 1s and 0s to be manifested in the physical realm via the on and off states of electromagnetic media. More simply, a program controls information (refined and formatted data).
Since every system used by us (humanity) needs to be able to interact with us, this means most programs and every collection of programs commonly called an application, needs a user interface or UI. A graphical user interface, a GUI, is the most common form of UI.
As information is the most important part of any program, most programs and every application requires a way to persist that information. Hence, data storage is needed and data access processes to interact with the data storage.
Finally, since every program is made to manipulate information, every program requires a controlling process or controller object in Object-Oriented programming.
Now most OO programmers would stop there with those three concepts: UI, data access and controller processes. However, I like to conceptualize the ideal model as having a fourth component even though most OO programmers consider it part of the controller concept.
The fourth concept I add to the three above is the abstract entity(ies) about and around which your program is built. After all, this is Object-oriented programming.
Since we need to use our programming language to tell the computer what to do, we need to be able to define new concepts to the computer in a way it will understand. Since Object-oriented programming is about objects, we need to be able to give the computer definitions of the objects we're trying to make it understand. Enter the concept of the class.
Classes are best described as literally being object definitions. As something is often described by its features, objects are said to have properties. As it also helps to describe the ways an object can act, objects also have methods.
To create a complete application then, using the Object-oriented philosphies and concepts, we need to have the following groups: The ones that do processing (UI, data access and control) are often called layers and the one that describes the entities we're manipulating is called a class library. So we have the following groups:
- User Interface Layer
- Controller Layer
- Data Access Layer
and all three pass between them the entities (objects) or parts of the entities (properties) described in the:
- Class Library
Next time: How these four groups constitute an application, why they not only make logical groupings, but adhere to the reusability philosophy, and how they interact to accomplish their purpose while maintaining their reusability.

0 Comments:
Post a Comment
<< Home