Hour 18. Object Primer

 <  Day Day Up  >  

Hour 18. Object Primer

What You'll Learn in This Hour:

  • What Object Oriented Programming is all about

  • The basics of constructing a class and methods

  • How to design a class in Perl

In the late 1980s a trend started towards object-oriented programming (sometimes abbreviated as OOP). In this type of programming, instead of viewing a programming task as just variables , functions, and sequential program flow, the view was changed to classes, methods, and properties. The concepts of polymorphism, inheritance, and encapsulation became built into languages such as Smalltalk, C++, and later Java.

Thousands of books and research papers have been written on object-oriented programming. At one point, it was thought to be the mythical "silver bullet" of programming that would allow code to be reused indefinitely by many programmers, and all of programming would be reduced to simply re-arranging prebuilt components . Although it didn't quite live up to this hype, it has proven itself indispensable as a tool.

By the Way

Before beginning this hour, you will certainly want to review Hour 13, "References and Structures," and make sure that you have a good handle on references in Perl. This hour depends heavily on references.


Don't let all of the big words, books, and hype scare you. Enough object-oriented programming can easily be learned in an hour to make it a useful tool in your programming toolbox.

 <  Day Day Up  >  


SAMS Teach Yourself Perl in 24 Hours
Sams Teach Yourself Perl in 24 Hours (3rd Edition)
ISBN: 0672327937
EAN: 2147483647
Year: 2005
Pages: 241

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net