News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Adrian Schneider's Blog:
Zend Framework Models - Part 1 Concepts
February 22, 2010 @ 11:24:02

Adrian Schneider has started up a new series of posts on his blog today with part of of his look at models in the Zend Framework.

The power in Zend Framework lies in its uncompromising flexibility. However, evidently, this also means its very difficult for new ZF users to pick up the framework and hit the ground running. The most common question I see is usually "where is the model?". The goal of this post is to show some examples and hopefully some new ideas on how to tackle models. There is no one-size-fits-all solution folks. Let's look at some options and some background...

He starts off with the concept behind models, explaining how they're just a place to get your data from whether it be in a database or other resource. Processing that happens to your application's data belongs in a model. He illustrates a database model that uses the Zend_Db_Table component to connect to a backend database. There's only a bit of introductory code in this first post, so expect that to come in the parts to follow.

0 comments voice your opinion now!
zendframework model concept tutorial


DevX.com:
Base Concepts of Internationalization in PHP
August 13, 2008 @ 09:37:12

The DevX website has recently posted this tutorial - a look at simple internationalization for your website.

If you develop Web applications that have an international target audience, then you have to take internationalization into account'"a process that includes avoiding date/time or currency confusions and delivering all text pertinent to the user interface in the user's preferred language. Applications that can grow international traffic and improve revenue must respect their clients' needs.

They use the I18N PEAR package to handle most of the hard work and include the howto on grabbing the package, the structure and how to use it to get a country name from a code, work with the translation of numbers, currency and changing up date/time strings.

0 comments voice your opinion now!
i18n internationalization tutorial concept currency datetime countrycode


Debuggable Blog:
Programming Psychology II Private methods
July 08, 2008 @ 08:44:58

According to Felix Geisendorfer's newest post on the Debuggable blog, he thinks that "private and protected methods and properties are one of the most stupid concepts of OOP."

This is a thought I first shared at CakeFest Orlando this year, but could not explain properly at the time.

He illustrates with an example of a protected "balance" variable in a BankAccount class. Sure, it's marked as private but less skilled programmers might not use it that way. He recommends a method without the getters/setters to help make the usage of the variable a bit simpler. He also suggests that using protected/private scoping helps to promote "crappy code" - using them to provide a sort of protection for code that you either don't want getting used or hiding it away so the API can't get at it.

1 comment voice your opinion now!
private method protected bad concept stupid getter setter


Foobr.co.uk:
Focus Cloud [concept]
June 27, 2007 @ 11:12:00

Jonathan Snook points out a new take on working with tags on a site - a focus cloud.

With this fairly broad classification I set about working out exactly what a Focus Cloud should show. To me the name could only suggest one thing. It shows the area which currently is receiving the most Focus! [...] So a Focus Cloud should show not what has been the most popular tags overall, but what is the most popular tags at present. What is your current focus.

The post not only includes the theory behind these focus clouds but also has some PHP code to back it up (using the del.icio.us interface and tags as the foundation of the cloud's contents). The full code for the cloud can be grabbed here.

0 comments voice your opinion now!
focus cloud concept tag delicious focus cloud concept tag delicious


YoungCoders.com:
The PHP Construct You've Never Used
September 19, 2006 @ 07:38:14

As pointed out by the Zend Developer Zone today, there's a useful forum post over on the YoungCoders.com website that talks about very useful feature that some PHP developers just don't use - ticks.

You've probably never used it, never saw it, or never found a practical use for ticks, a underused and powerful feature of PHP that allows you to implement exceptions in PHP4, do intensive debugging and profiling, check database connections, turn PHP into an event driven language, or harness complex control over your code.

The post talks about what ticks are, how to enable them, and a few examples of how to use them. Check out more about them in this page on the PHP Manual.

0 comments voice your opinion now!
ticks construct tutorial concept example declare ticks construct tutorial concept example declare



Community Events





Don't see your event here?
Let us know!


community opinion threedevsandamaybe introduction testing release series list framework install language podcast configure developer unittest wordpress laravel interview code refactor

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework