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



although some people believe differently than i; i would argue
trying to learn how to design w/ the classes that php4 provides
is a waste of time. most books you will find regarding object oriented
design assume the language has the basic constructs. ppp mainly.
also, there are other important facilities php4 lacks like abstract classes
and interfaces, not to mention you have to explicitly assign objects by
reference in php4. (if you dont want a copy created).
unless you are bound to php4 by work or something
i suggest you start working w/ php5. also, if your looking for some design
techniques i recommend studying design patterns. the heads first book
is a great starting point.
actually if you want a solid reference thats free on the web look at
phpPatterns <http://www.phppatterns.com/docs/start>
the code is mostly php4 i believe.

-nathan


On 9/29/07, Jeff Cohan <jdcohan@xxxxxxxxxxxxx> 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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




Relevant Pages

  • Re: [PHP] Beginner Tutorials for using CLASSES in PHP4
    ... But I would appreciate advice about good beginner tutorials using ... classes in PHP4 based on your actual experiences. ... form control types and other ... PHP Architect's Guide to PHP Design Patterns, Jason E. Sweat, PHP ...
    (php.general)
  • 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
    ... in PHP 4 you can achieve exactly the same result by ... You DO NOT need interfaces to activate a class method. ... people may be able to design systems w/ php4 that are properly structured. ...
    (php.general)
  • Re: [PHP] Beginner Tutorials for using CLASSES in PHP4
    ... there is no way to create an abstract class in php4. ... people may be able to design systems w/ php4 that are properly structured. ... php4 and trying to learn oop will likely lead individuals into bad practices ... PHP General Mailing List ...
    (php.general)
  • Re: [PHP] Beginner Tutorials for using CLASSES in PHP4
    ... Nathan Nobbe wrote: ... design assume the language has the basic constructs. ... there are other important facilities php4 lacks like abstract classes ... actually if you want a solid reference thats free on the web look at ...
    (php.general)