|
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]
|