Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
Basic OO principles

Object Oriented Programming is often described as "data driven", but what does that mean?

For delegates who have been on my Object Oriented courses, I'm reproducing here is a diagram that I develop on the board during the course. And I'm reproducing it with some reluctance, as it's the very development of this diagram - the way the lines go in and it builds up - that help me describe the basic OO principles so powerfully and create "lightbulb moments" for many of our delegates.

Courses that include coverage of the principles of Object Oriented coding include:
Object Oriented Programming in PHP
Perl for larger Projects
Learning to program in Python and Python Programming
Ruby Programming and Learning to Program in Ruby
Java Bootcamp and Learning to program in Java
Lua Programming and Learning to program in Lua

Just a little about the diagram ...

When you're designing a program on OO principles, you think about the data first. Say (for example) you are writing a suite of programs to sell articles of clothing, then you'll think first about an article of clothing - what do you need to know / store about each garment, how do you set up a garment in your program, and what pieces of code do you need to set, manipulate and retrieve that information?

Thinking about the data and the accessors needed will lead you towards the specification of a group of pieces of code that work on that data, which you can discuss with your colleagues and work out what's needed now, and what may be needed in the future.

You can then write a program - a test harness - which will both help you validate your design, and will also allow you to test the code that deals with garments when you have written it.

Well thought through, these design methods allow you to come up with a clean, maintainable, extensible design which naturally offers the programmer who calls you code only facilities that will properly work on this type of data, and also offers a natural separation of the internals of how a garment is made and "works" from how it is used. That's the most natural thing in the world - after all, have you ever thought about how those shoes that you're wearing while reading this article were made?

The OO world has its own language - words like "class", "object", "method", "instance" and "constructor" to describe elements of the principles I have described above. Such single word descriptions are both a blessing and a curse - they're very helpful in discussing code with people who know what they mean, but the tend to obscure the OO principles and just how effective they are from newcomers. Some of these words are on the diagram above in a reddish colour ... and you'll see fully how they fit in place when I welcome you on one of the courses listed above ... or on our C / C++ courses which also cover it in the C++ element, but which I forgot to list earlier.
(written 2009-05-11, updated 2009-05-12)

Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
Q906 - Object Orientation and General technical topics - Object Orientation: Individual Objects
  [227] Bellringing and Programming and Objects and Perl - (2005-02-25)
  [507] Introduction to Object Oriented Programming - (2005-11-27)
  [1543] Learning Object Oriented Principles (and perhaps Java) - (2008-02-17)
  [1864] Object Oriented Perl - First Steps - (2008-11-01)
  [1925] Introduction to Object Oriented Programming - (2008-12-06)
  [2171] Cleaning up redundant objects - (2009-05-11)
  [2393] A first demonstration of OO, including polymorphism - (2009-09-04)
  [2651] Calculation within objects - early, last minute, or cached? - (2010-02-26)
  [3436] Moving from scripting to Object Orientation in Python - (2011-09-13)
  [3721] Naming blocks of code, structures and Object Orientation - efficient coding in manageable chunks - (2012-05-06)
  [4021] Spike solution, refactored and reusable, Python - Example - (2013-02-28)
  [4448] What is the difference between a function and a method? - (2015-03-04)
  [4591] From single block to structure and object oriented programming - (2015-12-02)
  [4650] Why populate object with values as you construct them? - (2016-02-18)

Back to
PHP4 v PHP5 - Object Model Difference
Previous and next
Horse's mouth home
Forward to
Application design in PHP - multiple step processes
Some other Articles
Preventing forum spam - checks at sign up
Balloon Journey in Wiltshire
Melksham in pictures
Application design in PHP - multiple step processes
Basic OO principles
PHP4 v PHP5 - Object Model Difference
Designing a heirarcy of classes - getting inheritance right
When should I use OO techniques?
In honour of the photograph, I present ... a walk from Reybridge to Lacock
4759 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 at 50 posts per page

This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2024: 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.net/mouth/2173_Bas ... iples.html • PAGE BUILT: Sun Oct 11 16:07:41 2020 • BUILD SYSTEM: JelliaJamb