Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

application design

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General
View previous topic :: View next topic  
Author Message
arne_anka
Smarty Rookie


Joined: 26 Jun 2006
Posts: 6

PostPosted: Mon Jun 26, 2006 3:44 pm    Post subject: application design Reply with quote

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
View user's profile Send private message
shannera
Administrator


Joined: 13 Feb 2006
Posts: 802
Location: Edertal, Germany

PostPosted: Tue Jun 27, 2006 7:47 am    Post subject: Reply with quote

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
View user's profile Send private message
TGKnIght
Smarty Junkie


Joined: 07 Sep 2005
Posts: 580
Location: Philadelphia, PA

PostPosted: Tue Jun 27, 2006 1:34 pm    Post subject: Reply with quote

I have written a simple example of this, check the second link in my sig
_________________
Smarty site with one index.php controller file
Working with MySQL and Smarty
SmartyColumnSort
Custom Smarty Javascript Debug Template
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> General All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP