Page 1 of 1

zend tutorial - comments?

Posted: Wed Jun 15, 2005 5:10 am
by Ree
while searching the web on the topic i'm mostly interested in atm, i've found this tutorial @zend.

http://www.zend.com/zend/tut/tutorial-Darrell.php

i have noticed that quite a lot of the comments on it were rather negative, although for me it looked like a pretyy good way. i would very much like to recieve your opinions/comments/corrections on the same since i'm not sure if it's a good and acceptable way to separate presentation and business logic (I'm very much a beginner atm :) ). anything you have to say is very welcome :D

Posted: Wed Jun 15, 2005 5:15 am
by malcolmboston
looks pretty good to me, tbh i do not see the big fuss over templating systems, ive done what these templating systems have done from day 1 of learning PHP without even realising it, ok its not as flexible but its a damn lot easier to use.

the bad comments are probably 12 year old kids who think its cool to criticise someones work to make them look better

Posted: Wed Jun 15, 2005 9:12 am
by Buddha443556
IMHO, just use the right tool for the job. Don't limit yourself to one or the other. There are benefits, tradeoffs and drawbacks to just about any programming decision. Experience is what makes those dicision easier and you don't get experience by never trying something new or different or making mistakes. The tutorial showed you one way of doing something, there are other ways of doing the same thing. Knowing which way is best for the job at hand is where your experience pays off.

Re: zend tutorial - comments?

Posted: Wed Jun 15, 2005 8:55 pm
by Roja
Ree wrote: i have noticed that quite a lot of the comments on it were rather negative, although for me it looked like a pretyy good way.
Templating is a bit of a holy-war topic in PHP (right up there with indention style, brackets-on-their-own-lines, and which editor to use).

That article also happens to be written in a fairly hostile tone, so people with a different point of view may feel attacked by it. (A vi user reading an article that says "Anyone that lives on a planet where vi is useful can get back to me" might spur similar responses).

The arguments on both sides are fairly strong, and accurate. PHP can be its own templating engine, and in fact (depending on your interpretation) began as one. It can allow a fairly strong seperation of content, and accomplish most of what a template engine can.

On the flip side, there is a reason that sites like Yahoo use template engines like Smarty - because they work. They also allow strong seperation of content, and do it with a fairly reasonable overhead.

It all comes down to what goals you have. Right now, the simplistic "Should I use template engines or not" may boil down to what you feel like doing. Someday, however, it may be a matter of whether the 100+ developers you work with can learn, support, and maintain an app written to {use|not use} template engines.

Its very relative.

(But vi just plain sucks)

Re: zend tutorial - comments?

Posted: Wed Jun 15, 2005 10:07 pm
by Buddha443556
Roja wrote:(But vi just plain sucks)
ROFLMAO :lol: