SunQuest
           Programming Theory
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Codewalkers ForumsOther TechnologiesProgramming Theory

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Codewalkers Forums Sponsor:
You eat, breathe and sleep innovation. Build your mobile intelligence with BlackBerry® experts this July. Register Today!
  #1  
Old December 10th, 2003, 05:11 AM
pmiller pmiller is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Los Angeles, CA, USA
Posts: 2 pmiller User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via Yahoo to pmiller
Templates or Includes or ??

I'm in a volunteer group that conducts events that members of a larger group attend. Tracking attendance, confirmations, calendars, who came, who helped, what resulted from the attendance, etc would have value to us.
This is a multi-user database application that I'd like to construct on the web so that other volunteers in far-flung places (like their den?) could log in and both produce and consume data.

Lot's of forms, tabular data, etc.

I've put together the database and the forms, now taming this stateless machine to do what I want is getting hard. Would it be easier if I used an application framework, or just a template library, or a package that encapsulated templates and sessions (like phplib) or smarty or ??

When I see this many solutions to something like this, I worry about hopping on the wrong horse. But I don't want to spend all my time tire kicking either.

Anybody have some experience with this kind of thing?

Reply With Quote
  #2  
Old December 16th, 2003, 10:47 PM
Anonymous Anonymous is offline
Registered User
Codewalkers God 35th Plane (22000 - 22499 posts)
 
Join Date: Apr 2007
Posts: 22,309 Anonymous User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 24
RE: Templates or Includes or ??

Hi,

I want to share that it's generally a good idea to keep the HTML outside of PHP. In other words, have HTML templates with embedded field/code designators that can be replaced (populated) by your PHP script. Smarty is very helpful in this regard.

I recommend using Object Oriented Programming (OOP) approach using classes. Some people think that PHP is not good for OOP, however, I’ve had no problems. Each Class can have it’s own file called something like ‘class.ClassName.php’. Use configuration files, so there is little hard coding in your code. For example, have a configuration file that contains all the error messages that maybe displayed. Each error message is assigned a name and that’s what you use in your code. The value of what that name represents is saved in the configuration file.

Try to make the database access more portable by using the PEAR library (http://www.pear.php.net). In the future, should you need to use your code on a different database architecture, this will make it easier.

You could override PHP’s session handling using session_set_save_handler() to write sessions into a database, which might make login/logouts easier to manage across multiple pages or applications.

I’m not sure if this is the kind of information you were seeking, but I hope I’ve at least given you ideas or things to think about.

Reply With Quote
  #3  
Old December 16th, 2003, 10:52 PM
toplay toplay is offline
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: California, USA
Posts: 112 toplay User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 2
RE: Templates or Includes or ??

The above post was from me. I was not logged-in at the time.

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesProgramming Theory > Templates or Includes or ??


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

IBM developerWorks




© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway