|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
arne_anka Smarty Rookie
Joined: 26 Jun 2006 Posts: 6
|
Posted: Mon Jun 26, 2006 3:44 pm Post subject: application design |
|
|
hi,
i only just begun to dig into smarty and the question occured to me how to design a bigger smarty-based application.
having one big single php-script serving all requests and delivering different templates seems no really good idea. on the other hand even creating another smarty-object in every php-script/-class called seems not really best practice. the examples i found are very small and thus not really helpfull.
assume an application in the style of the old netscape-configuration-menu:
to the left a long menu with items and to the right depending on the item choosen one or more forms separated into tabs which are used to insert/change/maintain data of different kind and for different purposes which require several different php-classes.
how would one designt that application best to prevent unnecessary wasting of resources? |
|
Back to top |
|
shannera Administrator
Joined: 13 Feb 2006 Posts: 802 Location: Edertal, Germany
|
Posted: Tue Jun 27, 2006 7:47 am Post subject: |
|
|
I use one base script with smarty configuration, database initializing, etc. and one base template, and depending on a specific url variable (I use $_GET["content"]) I include scripts with the business logic and include templates for the content area of the page.
With this, you have all settings by hand, but have the business code splitted in script files. |
|
Back to top |
|
TGKnIght Smarty Junkie
Joined: 07 Sep 2005 Posts: 580 Location: Philadelphia, PA
|
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|