Re: [PHP] Best open source project/framework to support a php training course?



On Wednesday 27 September 2006 20:47, Ligaya A. Turmelle wrote:
There are a number of frameworks that you can use from PEAR (though many
argue over whether it is a framework), Solar, CakePHP, Symfony, Zend's,
and many many more. As for most OS projects - I don't know of a
particular project that uses a particular framework (someone feel free
to tell me otherwise). Many of the larger (aka well known) OS projects
tend to be hodged podged together from what I have been told (again
someone feel free to contradict me).

Varies widely with the project. OSCommerce is a great application to study as
an example of what NOT to do. It's horrid.

On the other hand, Drupal is a very good example of using PHP4-era code to its
fullest. Modular design, plugin architecture, separation of logic and
content and presentation, function-level polymorphism, all kinds of good
stuff. (Disclaimer: I am a Drupal contributor, so I am biased, but I'm a
Drupal contributor because of how good a system it is.) Of course, Drupal is
not a framework per se, but a CMS/framework. It's not for the first time PHP
developer.

Here's another idea: If they're just starting out, don't give them a
framework. Make them work without one, then write their own, realize how
hard it is, then they'll appreciate what separates good code from bad code
much better. :-) One should never use a WYSIWYG HTML editor until one is
fluent in HTML tags and CSS by hand. Similarly, using a super-high-level
framework before you understand how to write a decent function that
manipulates a nested associative array to control an SQL query means that you
will never learn how to properly manipulate a nested associative array (which
is, frankly, what makes PHP teh awesome).

Might I make a suggestion to you - no matter which framework/OS project
you use... Have it be in PHP5. Yeah it may restrict you in options, but
that is where PHP is going and to my mind that is what someone new to
PHP should be learning.

True, and Zend is certainly pushing that hard. On the other hand, there's
plenty to learn with PHP 4-era code (although that can certainly be done in
PHP 5) before introducing advanced topics like magic object callback
overrides. Plus, better than 50% of the shared hosts out there today still
run PHP 4 for a mixture of legit and stupid cop-out reasons.

You should also make sure to go over security in one of your classes -
the intro would be my preferred class since security is a mindset as
well as a way of coding. And it is easier to create habits then unlearn
and relearn them. Just my $0.02

The very very very first code they write after "Hello world" should be a
secure input wrapper. Go over ALL the issues with PHP user input *in
historical context* (register globals, magic quotes, $_REQUEST as evil, why
you should get out of the global namespace as soon as possible, etc.) and
have them write code to safely get input from the user regardless of the
server configuration. That right there is a good solid challenge, but it
makes them paranoid from day one, which is how they should be. It also is
code they can (and should) then use in all their later projects.

10 points off for every way you find to hack their code. :-)

--
Larry Garfield AIM: LOLG42
larry@xxxxxxxxxxxxxxxx ICQ: 6817012

"If nature has made any one thing less susceptible than all others of
exclusive property, it is the action of the thinking power called an idea,
which an individual may exclusively possess as long as he keeps it to
himself; but the moment it is divulged, it forces itself into the possession
of every one, and the receiver cannot dispossess himself of it." -- Thomas
Jefferson
.



Relevant Pages

  • Re: Traps and pitfalls when writing web apps?
    ... that most people writing PHP are using it just to pep up ... you probably need an application framework with a good metaphor behind it. ... It'd be even better if they have examples in PHP, ... It deals with database transactions, handles the back button, has a dynamic menu system, role based access control system, audit logging without database triggers, a data dictionary, and a workflow engine. ...
    (comp.lang.php)
  • Re: Traps and pitfalls when writing web apps?
    ... that most people writing PHP are using it just to pep up ... you probably need an application framework with a good metaphor behind it. ... It'd be even better if they have examples in PHP, ... It deals with database transactions, handles the back button, ...
    (comp.lang.php)
  • Re: Open Project
    ... A light generic framework for php developers, built API style with a public interface and a private interface. ... PDO/Doctrine + contrib to doctrine project as well OR custom ORM built on top of PDO. ... Object to XML and XML to Object support, aim to add __toXMLfor all classes. ...
    (php.general)
  • RE: [PHP] Re: Open Project
    ... opensource and in PHP. ... framework, orm, webservice or basically anything without an html ... ORM built on top of PDO. ... Generic XML Parser using DOM API ...
    (php.general)
  • Re: Competition is not ALWAYS good
    ... you see web framework as a must-use product. ... for example, consider PHP. ... their applications in bare PHP -- and be quite successful with this. ... Quality of the code is very often correlated with portability, ...
    (comp.lang.lisp)