473,414 Members | 1,667 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Smarty and template alternatives

I like Smarty but I may have to design something similar myself, bc I'm
having trouble getting it installed on my Shared WebHost.

There are good examples out there. One on CodeWalkers
http://codewalkers.com/tutorials/58/1.html

I read a great book once, Enterprise Java, by Jeff Genender, that had
an advance template system, with caching, etc. built into it.

I'm giving another try to do a Smarty installation. After that, are
there any good alternatives ?

Dec 2 '05 #1
5 2876
I have heard good reports about http://www.tinybutstrong.com/.

Dec 2 '05 #2
"webguynow" <in*****@rcn.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
I'm giving another try to do a Smarty installation. After that, are
there any good alternatives ?


Hi,

I am obviouslly biased, but you could try TemplateTamer. It is comming
together with development enviroment to make your template porgramming
easier, allows you to have your html and programming logic separated in
completely different files, it encourages OO approach, it has provisouns
that allow you to implement advanced and flexible cacheing, and it does not
need installation on server.

If you would need any help with it, just e-mail me.

rush
--
http://www.templatetamer.com/
http://www.folderscavenger.com/
Dec 5 '05 #3
webguynow (in*****@rcn.com) wrote:
: I like Smarty but I may have to design something similar myself, bc I'm
: having trouble getting it installed on my Shared WebHost.

: There are good examples out there. One on CodeWalkers
: http://codewalkers.com/tutorials/58/1.html

: I read a great book once, Enterprise Java, by Jeff Genender, that had
: an advance template system, with caching, etc. built into it.

: I'm giving another try to do a Smarty installation. After that, are
: there any good alternatives ?
Since this is mine, I shan't say if it is "good" or not, but it's free to
use if you wish

http://nisoftware.com/tnt/ (Stands for "TiNy Template").

It doesn't need an "install" as such, it is just a php file that you can
include with an app and "require" as needed. It is tested in php 4 on
Linux, and uses the basic xml parser that comes with php 4. It generates
php code that can be cached (or not as you wish) by specifying a
(writable) cache directory, or you can generate the compiled template
ahead of time so it can be used without even including the template
modules with the application.

Dec 5 '05 #4
I'm a little wary of XML based solutions, because it sometimes seems
slow. That being said I've written a few great reports using XML /
XSL. Still evaluating, but requirements are:

-should be fast
-should support looping and blocks
-caching is preferred, for performance.

While there are nearly 100 template systems for PHP that have been
introduced, its a little time consuming evaluating them, and it would
be nice to know which are current.
I found an interesting list on sitepoint
http://www.sitepoint.com/forums/show...hreadid=123769

Dec 21 '05 #5
So I've been evaluating templates and architectures:
-T. Marston variant -
methodolgy is sound, wish I had 3 semesters to learn it, I gave up
after 200 pgs
- phpWACT
also like this, appreciate the comprehensive approach and XML, but
XML parse may slow this down
- Smarty, well known, Pros: easy to use; Cons: Heavy weight, less
portable due to Pear installation issues on webhosts
- TinyButStrong (TBS) Pros: small and flexible; Cons: non-standard
API is detailed
- PHP alone -

Obviously, comparison at a glance, is like apples and oranges.
Marston / WACT solutions extend beyond templates, use Design Pattern
solutions.

I really don't want any specific template code in my php; Makes me wish
for a layer.

As far as analysis or roll-your-own solution, How hard could this be ?
The code I've seen reads a template, and creates an array of
static/placeholder, ....
Then cycles through and does replacements to create the output.

caching ? Date check and then possible reload ?
compiling ? What exactly is this ? some sort of compression
Ways to stress test ? performance evaluations ?

In terms of efficiency, I've also considered ways to keep things in
memory, static?, like PHP's "Persistent Database Connections" (PDC).
If PDC is effectively implemented through Apache, multiprocess Srv,
parent/child,
where parent keeps the Conn open, and hands it off to a child, ...
What about template code and template objects ? Should they be
loaded/discarded on every PHP request ? ( Mine will be a medium usage
site 200-500 hits / hour )
Does Apache cache any of this ?

Re: FC Front Controller
I've heard the raging debates, and most dev's are against the FC model.
I've always thought they would be good, only if you needed to modify
the request.
I suppose that any PHP objects would only be retained in memory if the
script was running in an endless loop - but that's Apache's job to
listen and take requests.

Any suggestions, I'll be glad to hear them. TIA

Dec 23 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Brian | last post by:
Hello, I am trying to work out how to have smarty use a string's contents as the display-> template.. ie: $smarty->display($buffer); obviously $buffer isn't a filename, but a smarty template...
2
by: Brian | last post by:
I have an application that uses an array of values as a "lookup" table and smarty as a template engine. $lookup = "label"; $lookup = "label2"; $lookup = "label"; $lookup = "label2"; In my...
2
by: Daan | last post by:
Hello all, I'm having a little problem with Smarty. Getting it to work in a simple case went fine, but now I have the following situation: / /smarty /templates template.tpl /templates_c
1
by: Richard | last post by:
I need help. I have a smarty based program that I am modifying. I have a smarty template file that consists of smarty and HTML. I need to integrate some PHP database calls into it. My problem...
0
by: Martin Meng | last post by:
Is Smarty really secure enough to open up the template source to members from the general public (albeit registered user, screened, identity verified)? My application calls for customiszble...
0
by: Conrad | last post by:
Hi, I'm very new to Smarty Template Engine and I'm using PHP 5.0.4 on the Windows XP Professional platform and I have the following question: When I change the 7th line of the script to use a...
7
by: Man-wai Chang | last post by:
1. How could concatenate two values into a string in the template? {section name=j start=0 loop=10 step=1} {section name=k start=0 loop=10 step=1} {assign var=xx...
2
by: Gene | last post by:
i'm newcomer in using smarty and i have problem like this: i want to have one template file (e.g. index.tpl) in this file section which use variable {$content}. and two files *.php which are using...
0
by: grezlik | last post by:
Hi! I have major problems with cakephp & smarty, (cake ver is 1.2 and smarty 2.6.18 ) there is a code (from cake/libs/view/view.php class SmartyView { .. .. ..
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.