Re:RE: The problem with Smarty
| From: | Monte Ohrt | Date: | Sun, 17 Feb 2002 22:17:12 +0000 |
| Subject: | Re:RE: The problem with Smarty | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-2716@lists.php.net to get a copy of this message | ||
I could show some examples of extending the class, but normally I'd think
that this is outside the scope of Smarty. This is a fundamental programming
concept, functions are not the only thing modular and reusable, so are
classes. As a PHP developer you would want to extend ANY class libraries you
incorporate, not just Smarty!
What sucks is that I see a lot of poor programming practice in online
examples and even published PHP books, which only encourages the poor
programming practices of those that read them. :(
If someone had the time, they could create a Smarty "User Guide" which would
cover Smarty and all these programming concepts in conjuction with Smarty.
How to setup a working scalable development environment, how to port apps to
Smarty, etc.
Monte
> -----Original Message-----
> From: Robert Jackson [mailto:rob@robertjackson.ca]
> Sent: Sunday, February 17, 2002 2:20 PM
> To: smarty@lists.ispi.net
> Subject: [smarty] Re:RE: The problem with Smarty
>
>
> Just to add my thoughts...
>
> I struggled to get it working in my shared/virtual hosting
> environment where
> I didn't have full control of the server (part of the problem
> turned out to
> be that PEAR wasn't installed with PHP). Perhaps an example should be
> provided for shared hosting scenarios.
>
> Like others, I also found myself changing the paths directly in the the
> class files. Perhaps your recent examples of extending Smarty to
> specify the
> paths should be explained from the very beginning (or perhaps it
> alreay is -
> I'm a version or two behind). In my case, I have two sets of
> paths - one for
> my development Windows box and one for the Linux server with an if/else
> statement to switch between them.
>
> Rob
>
> Dr. Robert Jackson
> rob@robertjackson.ca
> robert.jackson@utoronto.ca
> www.robertjackson.ca
>
> ----- Original Message -----
> From: "Monte Ohrt" <monte@ispi.net>
> To: <smarty@lists.ispi.net>
> Sent: Sunday, February 17, 2002 3:02 PM
> Subject: [smarty] Re:RE: The problem with Smarty
>
>
> > The quickstart guide is meant to be detailed enough to make installation
> > easy. Is it not?
> >
> > > -----Original Message-----
> > > From: Brian E. Lozier [mailto:brian@massassi.net]
> > > Sent: Sunday, February 17, 2002 1:21 PM
> > > To: smarty@lists.ispi.net
> > > Subject: [smarty] Re:RE: The problem with Smarty
> > >
> > >
> > > If you make very detailed installation instructions that treat
> > > the user as if they have never chmodded or set
> > > a path before, they won't have problems. I had about the same
> > > number in a links script I wrote in perl a few
> > > years ago, and as long as I provided very detailed and
> > > easy-to-understand instructions, the users didn't have
> > > a problem. It's still rated in the top 3 over at cgi-resources
> > > and the comments all say "easy to install"
> > > even though you have to set paths and chmod files/folders :P
> > >
> > > Brian
> > > ------------------------------------
> > > "How should I know if it works? That's what beta testers are for.
> > > I only coded it." - Linus Torvalds
> > >
> > > ----- Original Message -----
> > > From: Peter Bowyer <reywob@f2s.com>
> > > To: smarty@lists.ispi.net
> > > Date: 2/17/02 1:33:36 AM
> > >
> > > >
> > > >At 03:18 AM 2/17/02 -0600, Monte Ohrt wrote:
> > > >>Two comments:
> > > >>1) Use the right tool for the job. Smarty may not be well
> > > suited for every
> > > >>application, use what is going to make the most sense. I doubt
> > > it will ever
> > > >>be the end-all be-all template language for every situation.
> > > I'm sure it is
> > > >>overkill for many simple applications that just don't require
> > > the breadth of
> > > >>functionality it brings.
> > > >
> > > >True, but I like the ease of using custom functions (such as
> > > {top_postcards
> > > >number=5}) which you don't get in other template engines :-)
> > > >For those who don't understand PHP it makes it much easier
> for them to
> > > >insert this kind of thing in the application's page and is more
> flexible
> > > >for those with more knowledge to modify than the equivalent
> > > written for phplib.
> > > >
> > > >>2) You should never have to edit the Smarty class files
> > > themselves. Always
> > > >>keep them as-is so to upgrade you simply drop the new files
> > > into place. Of
> > > >>course it is easier to have one central installation of the
> > > library files,
> > > >>just put them in your include_path. For each application, you
> > > create a new
> > > >>instance of the class. Something like this:
> > > >
> > > >I'm sure I tried it this way once, and got a fatal error about
> ./configs
> > > >path being invalid when I initialised the class. You are right
> though -
> > > >this is definitely the best way to do it, and I'll have to have
> > > another play.
> > > >
> > > >Regards,
> > > >Peter.
> > > >
> > > >Narrow Gauge on the web - photos, directory and forums!
> > > >http://www.narrow-gauge.co.uk
> > > >--oOo--
> > > >Glenbranter - Scottish narrow gauge in 009
> > > >http://glenbranter.narrow-gauge.co.uk
> > > >--oOo--
> > > >
> > > >
> > > >---
> > > >You are currently subscribed to smarty as: brian@massassi.net
> > > >To unsubscribe send a blank email to
> $subst('Email.Unsub')
> > > >Visit Smarty's homepage at
> > > >http://www.phpinsider.com/php/code/Smarty/
> > >
> > >
> > > ---
> > > You are currently subscribed to smarty as: monte@ispi.net
> > > To unsubscribe send a blank email to
> $subst('Email.Unsub')
> > > Visit Smarty's homepage at
> > > http://www.phpinsider.com/php/code/Smarty/
> >
> >
> > ---
> > You are currently subscribed to smarty as: rob@robertjackson.ca
> > To unsubscribe send a blank email to $subst('Email.Unsub')
> > Visit Smarty's homepage at
> > http://www.phpinsider.com/php/code/Smarty/
> >
>
>
> ---
> You are currently subscribed to smarty as: monte@ispi.net
> To unsubscribe send a blank email to $subst('Email.Unsub')
> Visit Smarty's homepage at
> http://www.phpinsider.com/php/code/Smarty/