[Sussex] Simple OOP tutorial

Nicholas Butler nik at reducedhackers.com
Fri Aug 27 11:38:30 UTC 2004


See... EVENTS .. you can tell I was a VB programmer... and they are the 
worst of all programmers... !

Events wre useful though in a Distributed Component mechanism... to 
enable Notification of updates of central objects hosted at remote 
locations by enabling support for event driven actions. e.g.

a Object called TillMonitor uses the tillServerObject with events.
a Object called CashDrawer uses the tillServerObject with Events.
a Object called Register uses the tillServerObect and Posts Events.

Now when Data is entered into the register, the register uses various 
objects to validate data entry it then updates TillServer. Since 
TillServers has received a update it creates a TransactionUpdate event 
which TillMonitor sees .

TillMonitor uses the update Event notified through TillServer to updte 
its own internal structure and display the new entry.

its all even driven using properties to handle values and 
functions/subroutines internally.


I agree many ( and I mean Many ) internal objects get given events when 
they dont need them... .but id like to have a dbUpdate, dbAdd and 
dbDelete event registered ... however when you realise that PHP and ASP 
and the rest are scripting languages you can see why you can use EVENTS 
as much as youd wish to ....


Of course im viewing this from the point of view of a professional pain 
in the arse who writes code to get jobs done for customers... which is 
very different from writting code to deliver whole applications and 
products.


PHP however does support inheritance better than VB does, since its not 
easy to explain to a VB Class that it inherits, and exposes the features 
of its parents... without recoding for them .. this I suppose made sense 
to the development team at the time !


>One thing I have always disliked about PHP is the terseness of it's
>syntax for a language that really is very simple. That's a matter of
>taste of course.  
>  
>
PHP Terse... Helloo has any one checked stdio and include lately <grin 
duck and run like fskc from the Language flame ware about to begin ! >


Nik






More information about the Sussex mailing list