View previous topic :: View next topic |
Author |
Message |
orbn Smarty n00b
Joined: 08 Jun 2003 Posts: 3
|
Posted: Sun Jun 08, 2003 9:03 am Post subject: transformation to smarty |
|
|
hi.
i'm not very fond of my current html code of my page (www.magiccards.info. i want to change everything to xhtml 1.0 strict. but then, i discovered smarty. could anybody who worked with smarty yet, tell me if its a lot of work? the site is built quite easy, the same system all over. it would be nice if i could just use 1 or 2 templates, that would it make possible to add a skin-system. and the site is mutlilingual. i dont want to waste too much time.....but.....a template system would bring some structure in the code. that's what i thougt. any ideas? help? because i dont have a clue about smarty....i just know it's a template engine ^^
orban |
|
Back to top |
|
Escariion Smarty Rookie
Joined: 14 May 2003 Posts: 7 Location: Berlin, Germany
|
Posted: Mon Jun 09, 2003 12:17 pm Post subject: |
|
|
smarty is very easy und you wont waste time using a template engine, it will safe you a lot of time
http://smarty.php.net/docs.php |
|
Back to top |
|
orbn Smarty n00b
Joined: 08 Jun 2003 Posts: 3
|
Posted: Mon Jun 09, 2003 12:21 pm Post subject: |
|
|
hmm, i read in the mailing lists....and: what about the speed? the site isn't that big, and i don't know if the time i gain when i use smarty is worth having 'bigger' loading times. maybe i could just invent my own template system, because i dont need 99% of the stuff smarty offers. hm. |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Mon Jun 09, 2003 1:12 pm Post subject: |
|
|
@orbin:
even if you don't need Smarty's features, there is probably little reward in developing your own template system. For one thing, there are other alternatives to Smarty that you may find suitable. It may not seem like a big job, but it is time you can be using for your main task
I suggest you give Smarty a whirl--based on what you are trying to do, it is a good fit.
Best of luck. |
|
Back to top |
|
orbn Smarty n00b
Joined: 08 Jun 2003 Posts: 3
|
Posted: Mon Jun 09, 2003 2:37 pm Post subject: |
|
|
my name is currently 'orban', but......a typo cause my name here 'orbn'.
Quote: | I suggest you give Smarty a whirl--based on what you are trying to do, it is a good fit. |
you mean? hmm. the main feature of the site is, that it's so fast. and i don't want to have a good template system and 'slow' pages. and i can't use cache either, because the site is multilingual and a searchable database, each user gets another page. hmmmm. |
|
Back to top |
|
boots Administrator
Joined: 16 Apr 2003 Posts: 5611 Location: Toronto, Canada
|
Posted: Mon Jun 09, 2003 8:25 pm Post subject: |
|
|
ok, hi orban!
You might be interested to know that Smarty compiles your templates into PHP code. Further, you can have multiple compilations (by compile_id) based on your needs (for example, one for each language). Next, the caching can be used incrementally, allowing you to cache the static portions of the page while still loading other portions dynamically. Again, you can have multiple caches (by cache_id) allowing you to support multiple users (and or caching scenarios) if need be.
If done with some care, Smarty can potentially offer significant speed benefits while at the same time provide many niceties (syntax, modifiers, template functions, plugins, resources, caching, compilation, security, api and more) which you can leverage to organize your code and enhance your project as a whole. The best part is that you can quickly start by implementing just the straight simple stuff and then add the more advanced features as you get more familiar with Smarty and all it has to offer.
Yes, it comes without a price--Smarty is a very general tool and it takes a bit of time to learn how to best mold it to fit your needs. Fortunately, there is a payback
There is a longer discussion in the Articles section concerning the benefits and uses of Smarty as well as some opposing views.
See: The Logic of Templates (massassi.com). |
|
Back to top |
|
Enquest Smarty Regular
Joined: 14 May 2003 Posts: 79
|
Posted: Tue Jun 10, 2003 1:44 pm Post subject: |
|
|
I started using smarty. And it speeds things up. Though you need to look look at the manual at first. Its a good manual. _________________ -----------------------
Learning my self by trying to help others |
|
Back to top |
|
|