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:
  #1  
Old December 10th, 2003, 06: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, 11: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: 25
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, 11: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: 3
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




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

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




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek