Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

how does the web page developer test templates?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
David
Smarty Rookie


Joined: 18 Apr 2003
Posts: 17
Location: New York, NY, USA

PostPosted: Mon Apr 21, 2003 8:44 pm    Post subject: how does the web page developer test templates? Reply with quote

I'm just wondering how the web page designer is expected to test these templates, especially if the templates have a lot of fancy presentation scripting in them.

Are they supposed to install PHP and Smarty on their development machines?

It's kind of like, we are gettng the HTML out of the PHP, but not quite vice-versa, if the page developer has to go through elaborate setup to find out how the pages will actually render.

(For now I'm a one-person show who makes the templates and the PHP, so it isn't a problem for me, I'm just curious.)
_________________
David Mintz
http://davidmintz.org/

"Anybody else got a problem with Webistics?" -- Sopranos 24:17
Back to top
View user's profile Send private message
messju
Administrator


Joined: 16 Apr 2003
Posts: 3336
Location: Oldenburg, Germany

PostPosted: Mon Apr 21, 2003 9:13 pm    Post subject: Re: how does the web page developer test templates? Reply with quote

David wrote:
I'm just wondering how the web page designer is expected to test these templates, especially if the templates have a lot of fancy presentation scripting in them.

Are they supposed to install PHP and Smarty on their development machines?


i think so. but they could kindly ask the programmer to help them
setting this up. Smile
maybe they don't need to set this up locally on their
desktop machine but use a development-webserver that exports the
htdocs-directories via samba. the designers can edit their templates
like local files and call the "remote"-url of the webserver to test them.

David wrote:

It's kind of like, we are gettng the HTML out of the PHP, but not quite vice-versa, if the page developer has to go through elaborate setup to find out how the pages will actually render.


one of the ideas behind smarty is to make the template (=display) logic as simple (=unfancy) as possible and do the compilcated stuff in php before.

nontheless the template has to be tested after each (even the slightest) change.
but this is the same for html-files and for php-files. so nothing new.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
David
Smarty Rookie


Joined: 18 Apr 2003
Posts: 17
Location: New York, NY, USA

PostPosted: Tue Apr 22, 2003 1:24 am    Post subject: Reply with quote

Interesting issue, isn't it.

I have followed a couple of other threads on other sites where people argued surprisingly passionately about whether Smarty (or other templating systems) were worth it. "The page designers will break the Smarty code in the templates" the naysayers cried. "The page designers won't learn yet another thing" they moaned. Well, how does this compare to the alternative of freely intermixing PHP with HTML? Favorably. As to the other point, it seems that people who are making those super high end cool-o web pages have mastered some complicated stuff, and few snips of smarty template code here and there won't kill them.

I know this isn't a rational argument but it bears pointing out: writing HTML-free PHP just feels so right. Cool
_________________
David Mintz
http://davidmintz.org/

"Anybody else got a problem with Webistics?" -- Sopranos 24:17
Back to top
View user's profile Send private message
dthought
Smarty Regular


Joined: 21 Apr 2003
Posts: 55
Location: Melbourne, Australia

PostPosted: Tue Apr 22, 2003 10:03 am    Post subject: Reply with quote

First, I find that having a dev server set up that you can FTP up stuff to, and then test in the web browser works very well. Depending on how you go about creating your Smarty templates, most visual tools such as Dreamweaver will be forgiving when designing interfaces that use Smarty.

Second, as long as you are able to educate the templaters about how Smarty works, then there shouldn't be any problems. Sure, they'll need to use a little bit of lateral thinking - remember, task versatility is key. Anyone who thinks they can just magically "use" Smarty as they do HTML is a bit naive, in my opinion. As with all things you need to learn its ways - and the benefits of separating code from interface are huge. It's really not that hard to put Smarty knowledge together with HTML knowledge.

Once the templaters have grasped the concept of variables (to many of us it is second nature, but the biggest area of understanding difficulty I've encountered when helping people is the concept of having a reference to some data, be it some text or numbers) it's quite easy. From there, understanding what an array does is also good.

And once you've taught the templater some of these basic concepts, mixed in with how to display them (simple code demonstrating how PHP talks to Smarty is great for teaching) they should easily be able to use Smarty.

People who go around with an attitude of "Only programmers will understand the true beauty of Smarty's logic and visual designers will never truly grasp complex templating logic" will only exacerbate the issue. Also, as long as the programmers keep to the PHP and can work closely with the templaters in how the data they provide will be viewed, things work very well indeed.

(-;
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP