 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
PHPMaster.com: Localizing PHP Applications "The Right Way", Part 3
by Chris Cornutt November 14, 2011 @ 08:38:48
PHPMaster.com has posted its third part of its "Localizing PHP Applications 'The Right Way'" series. In this third part you'll learn more about locales and message domain switching.
In Part 2 you gained more insight into using the gettext library by learning the most important functions of the extension. In this part you'll learn how to best use a fallback locale, switch between locales, and override the currently selected message domain.
They show you how to set up the directory structure to handle a fallback locale, a choice to use when the system can't determine which to use. By using a default, you also avoid having the system translate from the default language to...the default language (like "English" to "English"). Included are also the code bits you'll need to switch between locales (just using a different domain) and using the dgettext function to specify a different domain than the selected one.
voice your opinion now!
localize application gettext domain locale series part3
DevShed: A Basic Monitoring Engine in PHP
by Chris Cornutt September 14, 2006 @ 13:44:19
Continuing on in their series of working with stand alone PHP scripts, DevShed has posted this third and last part looking at the creation of a basic script you can use to monitor your server (an excerpt from Advances PHP Programming by George Schlossnagle).
Last week, we continued our discussion of PHP standalone scripts with child processes and more. This week, we conclude our discussion and bring together what you've learned.
They start with the creation of a very basic daemon, including permission restrictions. They then modify this heavily to support the monitoring of processes through various parameters like frequency, status_time, and a description of the service. They then create the full example script and show the usage by checking to see if a URL passed in can be opened.
They also include, as a bonus, another more useful script that will email someone when the specified service goes down (still a HTTP check, though).
voice your opinion now!
part3 standalone script monitoring engine email http request part3 standalone script monitoring engine email http request
DevShed: Generating View from MySQL to Simulate the Model-View-Controller Schema in PHP
by Chris Cornutt August 21, 2006 @ 08:46:30
DevShed has posted part three in their "Simulating the Model-View-Controller Schema in PHP" series today, this time focusing on the last of the three, the View.
All right, after refreshing the topics covered previously, as well as clarifying some key concepts with reference to the concrete subject of this series, this journey will continue by constructing yet another practical example to expand your overall knowledge of object-based programming with PHP. In particular, it's designed to show you to use a MVC-driven relationship in another real-world situation.
If you're wondering to what other cases this relationship can be specifically applied, then I have good news for you. In this final article, I'll show you how to implement the MVC schema, in order to generate different outputs (or views) from a given MySQL data set.
They start over with their code, generating a new schema based around a MySQL processing class. The controller pulls its information from the database (our model) as to how the results should be displayed. Next they describe the model to help interface with the actual table and finishing it off with the output class, resulting in either XML or plain-text output of the user information.
voice your opinion now!
model view controller simulate mysql part3 schema tutorial model view controller simulate mysql part3 schema tutorial
DevShed: Using Visitor Objects with MySQL Data Sets in PHP 5
by Chris Cornutt August 16, 2006 @ 16:11:58
DevShed is continuing its series on using Visitor objects in PHP5 with this new tutorial today, a look at uisng them in relation to MySQL and sets of data inside.
So far, implementing visitor objects with PHP is indeed a educational process, which helps to extend even more the boundaries of the vast arena of pattern-based programming. Based on this premise, in the course of this last article, I'll expand the application of the visitor pattern by developing a slightly more realistic example. It will show you how to use visitors objects to establish a direct relationship between a MySQL processing class and a pagination mechanism.
They start by establishing an interaction between the visitors and the data in the MySQL database, providing the complete code for the class and the creation of the visitor objects. The wrap it up with a look at the creation of a pagination class, linking the display of a "page" of records to each of the visitors of the site.
voice your opinion now!
mysql php5 visitor object pagination tutorial part3 mysql php5 visitor object pagination tutorial part3
|
Community Events
Don't see your event here? Let us know!
|