Re: [PHP] Beginner Tutorials for using CLASSES in PHP4



Jeff Cohan wrote:
Yes, I know how to Google, and I've been Googling...

But I would appreciate advice about good beginner tutorials using
classes in PHP4 based on your actual experiences. I.e., have some of
you found tutorials that really unlocked the doors for you?

Ideally, such tutorials would have somewhat realistic examples. (I
already know how to output "Hello, World" using a class, and I tend
to find examples like those unhelpful. Maybe it's just me.)

My main challenge is modularizing yer basic BREAD/CRUD operations
with MySQL databases.

I've made some strides in creating increasingly modular functions to
present browse lists, edit forms and add forms; to perform
field-level and form-level validations; and to perform inserts,
updates and deletes. My approach is to utilize multidimensional
arrays which define the column names, column labels (for forms),
form control types (input, select, checkbox, etc.) and other
attributes of the form controls. I've got a "library" of validation
routines with error messages that appear on the form under the
culprit form control.

But I think taking the next step to use classes is going to make my
life much easier.

TIA for any guidance you might be able to offer.

Jeff



Jeff:

The following books really helped me get my head around basic OOP and
design patterns in PHP, especially the first one which directly
addresses both PHP4 and PHP5:

1. PHP Architect's Guide to PHP Design Patterns, Jason E. Sweat, PHP
Architect Nanobooks, 2005
2. PHP 5 Objects, Patterns and Practice, Matt Zandstra, Apress, 2004

It also seems like you might be wanting some direction on things like
ORM and database abstraction. Have you looked into what some of the
PHP-based frameworks are doing in this regard? I know they're PHP5-only
but studying projects like Symfony and the new Zend Framework have
really helped my understanding quite a bit.

Of course, the usual disclaimers apply.

HTH,

GM


--

Greg Maruszeczka
Websage Solutions
http://websage.ca
skype: websage.ca
.



Relevant Pages

  • Re: [PHP] Beginner Tutorials for using CLASSES in PHP4
    ... in PHP 5 is just window dressing. ... design assume the language has the basic constructs. ... there are other important facilities php4 lacks like abstract ... form control types and other ...
    (php.general)
  • Re: [PHP] Beginner Tutorials for using CLASSES in PHP4
    ... design assume the language has the basic constructs. ... there are other important facilities php4 lacks like abstract classes ... But I would appreciate advice about good beginner tutorials using ... form control types and other ...
    (php.general)
  • Re: Query string before parsing
    ... That package is generating post data which PHP ... PHP has no way of knowing what type of form control sent name/value ... The HTML recommendation enforces no ...
    (comp.lang.php)
  • Re: PHP Tutorials
    ... >> PHP from the ground up. ... I am a newbie to PHP, I've been messing around for a month with it, but the ... tutorials I want won't necessarily be the same as what you want. ... looking at previous posts to PHP newsgroups I'm well on the way to ...
    (comp.lang.php)
  • Re: opening different includes within the same div
    ... It would also have some php code which would read in the GET ... Because it was about 3 years ago, the site i built was for my college ... a google search enough of a hint as to where to get answers. ... me about tutorials for this when you can type ...
    (comp.lang.php)