Re: [PHP Template] Template Discussion
[email protected] (Anne Holz) Wed, 22 Mar 2000 14:31:25 -0600
| Newsgroups | php.template |
|---|---|
| Organization | ispi |
| Message-ID | <[email protected]> |
Peter Kocks wrote: > > > > > Example 1: > > headline > > <br> > > tagline > > <br><br> > > body copy > > > > If the tagline is empty, the example above will > > print as shown below: > > Example: > > > > headline > > <br> > > <br><br> > > body copy > > > > Ok, so why not coordinate with the programmer and do > something like this: > > headline > <br> > $tagline > <br> > body copy. > > and tell the programmer that $tagline should have a <br> at > the end if the value is not empty. Sure, that's one way to do it. From experience, there's about 20 to 30 of these types of situations that occur in each application coded and, while testing the formatting, another 10 or so are discovered. If every week to two weeks, a new application is being worked on. Your talking about 150 or so possible changes a month that have to be first communicated by the designer to the programmer, then made by the programmer, then checked by the designer, then re-communicated to the programmer if it isn't to the designer's specs, then changed again by the programmer, then checked again by the designer. This adds time for both the designer and the programmer. It's not just a theory, it has been proven in practice. By adding just a few simple logic controls to templates, the overall development time is reduced from four weeks to two weeks. The logic added by a designer in the templates can be stripped away or added without affecting the core php code. It simply serves as a layout tool for the designer. We can not be expected to design without having control over how the content is presented and, we can't control it without the use of logic. Heavy dependency on the programmer is not the answer. Image, as a programmer, if instead of fixing a bug that was reported, you had to explain to the designer how to find the bug and have him/her fix it for you. That is exactly how the designer feels when they have to explain to the programmer how to find and take care of a design formatting/layout issue. > > > etc. All are dependent upon logic that accounts > > for all possibilities. > > > > Yes, and accounting for all the possibilities is turning you > into a programmer whether you want to be or not. The short > answer is that if you are using "if" statements, you are in > effect programming. > > The beauty of php is that it is both simple enough that > people not inclined to programming can still use it when > necessary, but powerful enough to be useful to programmers. > Imagine having to write a java servlet just to get your if > statement. > > > In the eyes of the designer, the proposed > > template specs are no > > different than learning a few new html tags. They > > will add tremendous > > value to the presentation of php. > > > > Yes, but the only difference is in syntax. Instead of > having to learn new tags, why not just use the existing > syntax. > > E.g. > <? if($x==$y) ?> <br><br> > > -- > PHP Template Engine Mailing List > Current engine specification can be found at: > http://va.php.net/~andrei/tpl-engine-spec.txt > To unsubscribe, e-mail: [email protected] -- Anne Holz | [email protected] art director | ispi | voice: +1.402.441.3295 http://www.ispi.net | fax: +1.402.483.5418