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 don't need a fax machine to get faxes. Get a fax-to-email fax number from CallWave. Try it free.
  #1  
Old June 4th, 2007, 09:45 AM
lilithian lilithian is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Paris,France
Posts: 20 lilithian User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 19 m 19 sec
Reputation Power: 0
Texts

Hi there,

I just wanted to have input on your take considering texts in a PHP application (or any web application for that matter).

I have a basic OO PHP application, where I have texts in:
- The php files that are presented.
- The methods contain texts
- Standard data originating from the database (such as country names, type information).

Now What I would like to do is to have all standard texts Data Driven. Although I am currently planning a system, your take on this would be quite welcome.

Best regards:

Lilithian

Reply With Quote
  #2  
Old June 4th, 2007, 08:42 PM
lig's Avatar
lig lig is offline
"Forum Nazi"
Codewalkers Demi-God (4500 - 4999 posts)
 
Join Date: Apr 2007
Location: Jacksonville, Fl
Posts: 4,719 lig User rank is Private First Class (20 - 50 Reputation Level)lig User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 4 m 29 sec
Reputation Power: 6
your use of "text" is unfamiliar to me - please clarify.
__________________
life is a game.... Have fun
-----------------------------
http://www.phpwomen.org
strength in unity

PHPCommunity IRC
#phpc on freenode

Reply With Quote
  #3  
Old June 5th, 2007, 02:16 AM
lilithian lilithian is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Paris,France
Posts: 20 lilithian User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 19 m 19 sec
Reputation Power: 0
tests

Quote:
Originally Posted by lig
your use of "text" is unfamiliar to me - please clarify.


All text that is presented to the user. Any linguistic information, such as sentences, words etc.

I am not sure that I can be more percise than this.

Reply With Quote
  #4  
Old June 5th, 2007, 10:21 PM
lig's Avatar
lig lig is offline
"Forum Nazi"
Codewalkers Demi-God (4500 - 4999 posts)
 
Join Date: Apr 2007
Location: Jacksonville, Fl
Posts: 4,719 lig User rank is Private First Class (20 - 50 Reputation Level)lig User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 4 m 29 sec
Reputation Power: 6
Ahh - strings. I personally do not like output scattered all through my code. to me it sloppier and doesn't lend the code to reuse so I use templates to help separate my business logic from my display logic.

There are a number of templating systems out there - smarty and savant for example - but I tend to just use PHP itself as my templating engine. Yes it requires me to be much more disciplined in my coding to keep things clean - but I hate having to code in one lang and then use another for the template.
Comments on this post
nawlej agrees: I agree. Use templates whenever possible....you will be better off in the long run, and you will
have less maintenence.

Reply With Quote
  #5  
Old June 7th, 2007, 03:37 AM
lilithian lilithian is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Paris,France
Posts: 20 lilithian User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 19 m 19 sec
Reputation Power: 0
Noted

I'll take a look at these things, but its not the presentation that is my problem, its the storage.

I want to put all texts in the database.

For example one method is to store a text_id (corresponding to a line in a dedicated database table ) everywhere where texts are to be presented. And every time you get to a page you make a select on the texts table in order to retrieve the texts you want to present.

Now I am looking for a more structured approach to text storage, and retrieval, than just storing text snippet identities in the code.

But thanks just the same

Reply With Quote
  #6  
Old June 7th, 2007, 11:52 AM
lig's Avatar
lig lig is offline
"Forum Nazi"
Codewalkers Demi-God (4500 - 4999 posts)
 
Join Date: Apr 2007
Location: Jacksonville, Fl
Posts: 4,719 lig User rank is Private First Class (20 - 50 Reputation Level)lig User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 4 m 29 sec
Reputation Power: 6
Is this for I18n purposes? have you looked at gettext?

Reply With Quote
  #7  
Old June 8th, 2007, 03:56 AM
lilithian lilithian is offline
Contributing User
Codewalkers Newbie (0 - 499 posts)
 
Join Date: Apr 2007
Location: Paris,France
Posts: 20 lilithian User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 7 h 19 m 19 sec
Reputation Power: 0
hmmm

Quote:
Originally Posted by lig
Is this for I18n purposes? have you looked at gettext?


I18n? Looked at it, and it sounds promising. Yes my application is intended to work independent of the location. I'll see how they propose storing the texts.

Reply With Quote
  #8  
Old June 10th, 2007, 05:41 PM
lig's Avatar
lig lig is offline
"Forum Nazi"
Codewalkers Demi-God (4500 - 4999 posts)
 
Join Date: Apr 2007
Location: Jacksonville, Fl
Posts: 4,719 lig User rank is Private First Class (20 - 50 Reputation Level)lig User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 4 m 29 sec
Reputation Power: 6
I18n == "Internationalization"

"I" - then 18 letters then an "n"

Reply With Quote
Reply

Viewing: Codewalkers ForumsOther TechnologiesProgramming Theory > Texts


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!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

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





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