NYCPHP Meetup

NYPHP.org

[nycphp-talk] How many of you guys are "down" with Java/OO - like programming concepts?

felix zaslavskiy felix at students.poly.edu
Tue Feb 17 21:06:16 EST 2004


My background basically I been trained on c++ in college and I took
object oriented programming course and was encouraged to use OO in my
senior project. I now mainly rely on PHP. I had not done any OO myself
since school although I use PEAR which is OO itself.

There been alot of discussion of such things on www.sitepointforums.com 
Especially how OO can be done in PHP and weather MCV pattern is the
right way to do web application and such things. The answer basicaly is
yes and no.

You should focus on the requirements of the problem you are trying to
solve first and then decide which is the best techinique to apply to it.
For most simple web based stuff you will almost never need to code
objects yourself. Although it is almost always usefull to use objects
that others have created such as PEAR. If you are working on a large
scale project you may want to definatly look into OO.

Alot of this comes down to experience although it does not hurt to learn
about it from an academic point of view. Take a look at the book on the
subject "Design Patterns" by Gamma and others. 

On java in particular I rather not comment because I have not had to
much experience with it.

> I am now learning how to write PHP not necessarily as flat script but
> as an OO construct, that is, classes, "abstract" classes,
> "interfaces", Singleton Design Patterns, etc.  and it's really helping
> me out a lot toward understanding how to come close to implementing it
> in Java.
> 
> Except for one problem.  The various Java programming and online 
> resources (and offline books I have) basically all inform me that 
> understanding Java from a "scripter's perspective" is flat wrong, 
> because Java is pure OO and involves concepts such as Polymorphism, 
> Encapsulation, Inheritance, even things like Beans and Struts they
> claim you cannot know as a scripter but as a pure OO programmer.
> 
> So I'm asking the experts among me for advice: should I continue my 
> persuit of PHP from what little OO knowledge I have?  Also, do any of 
> you share a Java background along with PHP and see any symbiosis 
> possible between the two and if even possible that a scripter such as 
> myself could cross over into the OO Universe anytime?
> 
> Thanx
> Phil
> 
> _______________________________________________
> talk mailing list
> talk at lists.nyphp.org
> http://lists.nyphp.org/mailman/listinfo/talk
> 


-- 
felix[at]bebinary.com
http://www.zaslavskiy.net/




More information about the talk mailing list