>  Where ever you can, write a function.

I always debate about whether to use what I call "micro libraries".
When I write them, I find them handy.  When someone else writes them,
I cannot stand them.  I assume other people feel the same way, so I
avoid using them beacuse I assume people will hate my micro libraries.
   I have also found that if you have n php developers, you will have
n micro libraries.

If the code is pure php, you can always just type
php.net/function_name, and get the docs.  If a script starts with a
dozen includes, and you come across a function that is not in the
manual and is not a class method, there is no immediate way to figure
out what is does.

What are other peoples' thoughts about 1-2 liners vs global functions?
 If you do use micro libraries, do you wrap them in an static class?
Have you ever worked on an existing code base and thought, "wow these
little helper functions are great"?

-John Campbell
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to