> Hi Virgil,
>
> After your last post here, I looked at your site, then the Smarty site.
> That was what triggered this question. Templates are a black art to me.
> I don't even know where to begin to understand them. Every reference I
> have looked at so far assumes that I already understand the MVC pattern,
> which is also one of the dark arts.
>
> Let me put it simply. I can't grok OO. I tried to do OOP for several
> years, but it simply does not make any sense to me. As a direct result,
> I don't understand the concept nor application of patterns. So how do I
> figure out how to use templates without having to absorb those first?
> Can I learn enough this way to determine if a site can be converted from
> the current state (PHP and XHTML spaghetti) into templates and begin
> that transformation?
>
> Thank you,
>
> Bob McConnell
>

HI Bob,

Smarty templates are just html files with placholders or variables and
simple constructs.
This was made to allow web designers to work on a page without having
to know PHP programming.
Smarty is not an MVC.
It is just a class that provides all the necessary functions to
replace variables and execute constructs in html page.
You just create an instance, set necessary config, do your PHP stuff,
assign values to template variables, and finally display.
It's just a matter of understanding how its functions or methods work.
You don't have to learn OOP and it is not about OOP or MVC.
It is just a convenient placeholder of functions necessary to run
smarty templates.

Spaghetti style programming can be very hard and really time consuming
to follow and convert.
Just take one step at a time.

Maybe I could write a tutorial for this.
Just need to find some spaghetti code for the  example.

Regards,
Virgil
http://www.jampmark.com

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to