You are here: Re: Is there a more efficient way to do this? « PHP Programming Language « IT news, forums, messages
Re: Is there a more efficient way to do this?

Posted by Chung Leong on 08/16/06 00:17

Rik wrote:
> Well, the template file can also be reused as easily :-). But this is just a
> sidetrack, I understand you want the same function to apply to different
> pages, even projects, and keep them alike. If one only plans on doing one
> project (someone only doing his own homepage, something like that), you CAN
> make your code as reusable as hell, but it probably isn't worth the hassle.

I didn't say the method doesn't work. I said it's hamfisted.

> Let's say I have an included file with all my functions. One blurts out a
> header, another one a footer, and another a tablecell, an anchor, you name
> it. I'd have a hell of a time to make an interface where people couldn't
> change the functions, but can change the HTML, and only the HTML.

That's a non-issue. If that becomes a requirement, then you can change
the function. And if that's a requirement from the start, doing an
include on the file is a crappy method as it basically allows the
end-user to blow away the server.

> So to sum it up: you have a point from a developers standpoint. For someone
> doing one page in his spare time it could well be overkill.

Writing a function is not an overkill--it's basic programming.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация