RE: [SMARTY] big site
| From: | Josh Johnson | Date: | Mon, 30 Sep 2002 15:54:48 +0000 |
| Subject: | RE: [SMARTY] big site | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-6050@lists.php.net to get a copy of this message | ||
My functions are very specific to the site I developed them for. They're
very basic, they take whatever parameters necessary via the standard
smarty api for plug-ins, then create a query, execute it, and assign the
results to a template variable (I used the "assign" idea from the smarty
plug-ins to allow dynamic assignment, it works great). I'd suggest
checking the docs and writing your own.
It's also hard for me to try to distribute the functions I wrote because
they rely on a global database object being instantiated before the
template file is displayed (I used the CDBAstract class for database
abstraction). It makes sense on the site I developed the functions for
(every templated page uses the database for authentication and other
things so the object was declared already anyway), but it might not be
the most efficient way to handle the database interface in a "standard"
site.
I'm sure I could write a set of plug-ins to handle database
access/management (and if I get enough interest I will...) and work
universally, but I'd have to wonder if a custom approach would be the
best for most sites. That way the return data can be structured and how
it's used once it's returned will depend on individual situations (and
the aptitude of your template designer).
-- Josh
-----Original Message-----
From: Ernesto Rodriguez [mailto:ernesto@solmeliacuba.net]
Sent: Monday, September 30, 2002 11:24 AM
To: Josh Johnson
Subject: Re: [SMARTY] big site
Hi:
Your plug-ins functions to retrieve data from database are available
for
download?
thanks.
----- Original Message -----
From: "Josh Johnson" <mailing_lists@allusiveimage.com>
To: "'Markku Niskanen'" <markku.niskanen@arctive.com>;
<smarty-general@lists.php.net>
Cc: "'Ernesto Rodriguez'" <ernesto@solmeliacuba.net>
Sent: Friday, September 27, 2002 12:40 PM
Subject: RE: [SMARTY] big site
> And smarty allows you to write custom plug-ins so you can even further
> minimize the amount of logical code that the designers will have to
deal
> with. I have plug-in functions that retrieve data from a database, and
> allow the designer access to that information without having to know
php
> or write a query. I have another function that generates an image link
> using the content-management system I built, so instead of needing to
> know the full query styntax to the scrip that serves up images (or if
it
> ever changes), the designer just needs to know how to use the smarty
> commands.
>
> -- Josh
>
> -----Original Message-----
> From: Markku Niskanen [mailto:markku.niskanen@arctive.com]
> Sent: Friday, September 27, 2002 3:30 PM
> To: smarty-general@lists.php.net
> Cc: Ernesto Rodriguez
> Subject: Re: [SMARTY] big site
>
> On Fri, 27 Sep 2002 07:58:24 -0700, you wrote:
>
> >Has Smarty the capacity to generate a site like this?
>
> I would rather say that it gives you more options to work on
> the field that you are good at. Becaus Smarty makes it possible
> to separate the layout and the logic, you can, for instnce do like
> I have done:
> - create the skeleton HTML layouts
> - ask your fellow graphics designer and/or HTML writer to make
> the site look good (and maybe tell him not to touch too much
> on the Smarty template stuff, at least in the beginning...).
>
> Now can continue developing the logic further and the artists can
> continue with the pretty layout. The result is a very fast and a very
> pretty site (assuming you are a good PHP programmer and your
> mates are good artists, of course).
>
> If your graphics guys know HTML it will take them about an hour
> to figure out what the few funny tags (like {section..}) mean and why
> you have used them.
>
> The bonus is that as Smarty generates good PHP based on the
> templates the sites seem to be really fast.
>
> As I have said earlier, Smarty is a godsend. Did I make myself
> understood ?-)
>
> Markku
> --
> Arctive Oy
> Markku Niskanen
> GSM 045 - 6733 543
>
> Arctive Oy, Länsikatu 15, 80110 JOENSUU
> http://www.arctive.com
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
> --
> Smarty General Mailing List (http://smarty.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>