NYCPHP Meetup

NYPHP.org

[nycphp-talk] Should PHP5 be used for this?

Jon Baer jonbaer at jonbaer.com
Tue Jul 17 12:34:07 EDT 2007


I think the announcement of end of life for PHP4 should be enough to  
move on to PHP5.

As per why OO is beneficial I think it would be best to @ least look  
at one of the major frameworks out there, either CakePHP, Symfony,  
Joolma, etc and see how they are built since it is a good case of how  
code reuse and not just using OO but extending OO is extremely time  
saving.  Personally it sounds like you would benefit from learning  
MVC and just running with it.  Also most of today's frameworks  
already have structures in place for where to place items like models  
(Article, CodeSnippet, etc) and other content, another benefit I think.

Another good part ... people are sharing much of what they write w/  
them (http://bakery.cakephp.org).  I also think PHP5 is better for  
test driven and behavior driven development which I think will become  
another must have.

- Jon

On Jul 17, 2007, at 12:06 PM, Brian O'Connor wrote:

> My apologies, the web browser decided to send prematurely on that one.
>
> Hello all,
>
> I've been on this list for a few years now reading, and attribute  
> much of my
> knowledge of PHP to users on this list (in one way or another).
>
> I am currently rebuilding my homepage from scratch, which means I  
> have to
> redo all the server side code.  Now, traditionally I've built all  
> my web
> sites using php4, but I've looked a lot into php5 and its new OOP  
> support.
> As a little background, I'm currently a computer science student in  
> college,
> and have studied oop to a great deal.
>
> Here's my problem : I don't see how using php5 and oop would really  
> benefit
> me in building websites.  I understand objects, code reusability  
> and all
> that.  So I'm going to put the areas of my site here, and see how  
> you guys
> would build objects for them.
>
> I have these sections:
> News
> Portfolio
> Code (samples of code that I've written, for resume-type purposes)
> Tutorials
> Contact
> About Me
>
> At first glance, I thought to object-ify the portfolio section,  
> where each
> "project" would be an object.  But other than that, I don't see  
> anywhere on
> the site to use objects, and I could easily do that without objects.
>
> I'd like to expand my resume by being able to say that I have done  
> OOP in
> php5, as I see on the jobs list that that is what employers are  
> looking for
> (at least quite a few are).
>
> In addition, I was wondering what your suggestions are for php5 and  
> oop, I
> don't need an oop introduction or anything like that, I'd just like  
> some
> examples of how using objects would make the site better and how to
> structure them.
>
> Thanks in advance,
>
> -- 
> Brian O'Connor
> _______________________________________________
> 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




More information about the talk mailing list