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, 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: 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, 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: 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!
 
Create the Optimal Architecture for your Critical Applications
Warburton's the largest independently owned bakery in the UK faced a number of difficult challenges in providing the most robust yet efficient IT infrastructure for their organization's success. IBM's services combined with their xSeries servers created the perfect platform for their SAP environment with sufficient flexibility, and did so in very time effective fashion.

Request Your Free Technology Downloads!
 
Five Best Practices for Deploying a Successful Service-Oriented Architecture
This white paper describes the benefits you can expect with SOA, and how IBM can help take your business there.

Request Your Free Technology Downloads!
 
Gartner Magic Quadrant for Application Delivery Controllers
Gartner summarizes its view on Application Delivery Controllers, evaluates strengths and weaknesses of solutions, and provides Magic Quadrant reporting for a quick comparison across all vendors. Learn from Gartner how you can benefit from an all-in-one device like Citrix NetScaler that delivers the highest levels of availability, performance and security.

Request Your Free Technology Downloads!
 
Knowledge is Power
What you don't know can hurt you, and is likely costing you money and increasing your security risks during an era of scarce resources. This white paper proposes six key strategies that enterprise security managers can use to improve their network defense posture.

Request Your Free Technology Downloads!
 
Rationalizing the Multi-Tool Environment
The rationalized multi-tool approach is flexible, scalable and cost effective. It provides the necessary input to the IT service management business processes. It preserves prior investments in monitoring tools, empowers technologists to select the best tools with which to do their jobs, and enhances effective response to incidents.

Request Your Free Technology Downloads!
 

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




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