|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
David Smarty Rookie
Joined: 18 Apr 2003 Posts: 17 Location: New York, NY, USA
|
Posted: Mon Apr 21, 2003 8:44 pm Post subject: how does the web page developer test templates? |
|
|
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 |
|
messju Administrator
Joined: 16 Apr 2003 Posts: 3336 Location: Oldenburg, Germany
|
Posted: Mon Apr 21, 2003 9:13 pm Post subject: Re: how does the web page developer test templates? |
|
|
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.
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 |
|
David Smarty Rookie
Joined: 18 Apr 2003 Posts: 17 Location: New York, NY, USA
|
Posted: Tue Apr 22, 2003 1:24 am Post subject: |
|
|
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. _________________ David Mintz
http://davidmintz.org/
"Anybody else got a problem with Webistics?" -- Sopranos 24:17 |
|
Back to top |
|
dthought Smarty Regular
Joined: 21 Apr 2003 Posts: 55 Location: Melbourne, Australia
|
Posted: Tue Apr 22, 2003 10:03 am Post subject: |
|
|
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 |
|
|
|
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
|