|
PHP
|
|
Bookmark and share this category:
|
News
| NETTUTS.com: Why you Should be using PHP's PDO for Database Access |
Rating: 0.00 (0 votes)
According to this latest tutorial from NETTUTS.com, you should be using PHP's PDO database access layer to interact with your database of choice.
Many PHP programmers learned how to access databases by using either the mysql or mysqli extensions. Since PHP 5.1, there's been a better way. PHP Data Objects (PDO) provide methods for prepared statements and working with objects that will make you far more productive!
The introduce what PDO is, what kind of databases it supports and, of course, some code to get you started in connecting your application to the backend. They show how to handle exceptions, how to use placeholders, and performing inserts and selects on your data.
|
|
|
|
 |
| PHPBuilder.com: Use PHPUnit to Implement Unit Testing in Your PHP Development |
Rating: 0.00 (0 votes)
On PHPBuilder.com today there's a new tutorial introducing PHPUnit, the popular unit testing framework (based off the ideas from JUnit). Jason shows how you can use it to make a more robust and easier to maintain application.
We are creating web applications, with one important difference between the two being that the latter are built using a rigorous process, and with that, a rigorous testing program. [...] The PHP community has long had a great testing utility at their disposal known as PHPUnit, and in this tutorial I offer a brief introduction to its benefits.
He shows how to get it installed (via PEAR), writing up a first unit test to check for the contents of a string (making HTML) and executing the test to verify the outcome. He aso mentions something interesting you can use when you need to send a lot of information over to a test - providers.
|
|
|
|
 |
| Brandon Savage's Blog: Revisiting: Why Every Developer Should Write Their Own Framework |
Rating: 0.00 (0 votes)
In a recent post to his blog Brandon Savage revisits one of his older posts taking about why he thinks every developer should write their own framework. In this more recent post that brings up another idea - people who write frameworks together are very smart.
I've always known that a group of very committed people could be much more effective at producing a good product than I could be on my own, and for a simple reason: the collective mind usually irons out ideas that work much more quickly than a solitary developer or thinker. [...] The point of this article is to encourage developers to experiment, but remind them that at the same time, there are already existing solutions that work exceptionally well for many if not most needs.
He still recommends developing a framework as a learning tool, but maybe not to use in production applications. There's bigger, more well-developed frameworks out there that can do the job and have the benefit of a "hive mind" of talented developers with perspectives you might not even think of.
|
|
|
|
 |
| Site News: Blast from the Past - One Year Ago in PHP |
Rating: 0.00 (0 votes)
Here's what was popular in the PHP community one year ago today:Ask About PHP Blog: Google Analytics API class for PHP
Symfony Blog: The new Getting Started tutorial
Matt Curry's Blog: Connecting CakePHP Plugins
ITNewb.com: PHP Encryption / Decryption Using the MCrypt Library (libmcrypt)
PHPClasses.org Blog: Book Review: Pro PHP: Patterns, Frameworks, Testing and More
Coders' View Blog: The Strategy Pattern Using PHP
Wenbert Del Rosario's Blog: Zend Framework: Making the Built-in Breadcrumb Helper Work
Adam Jensen's Blog: Distributing Zend Framework Modules
PHPFreaks.com: or die() must die
Stefan Mischook's Blog: PHP Video: the Zend Framework and Web 2.0
Community News: PHP.JS gets a new home (and compiler)
Learn.IIS.net: Build a High-Performance PHP Stack with Windows IIS and Zend Server
TheWebSqueeze.com: PHP5 Abstraction for the Rest of Us
NETTUTS.com: How to Set Up a Killer WordPress Testing Environment Locally
Community News: Guide to Date and Time Programming (php|architect)
|
|
|
|
 |
| Keith Casey's Blog: Event Driven Programming |
Rating: 0.00 (0 votes)
In a new post to his blog today Keith Casey talks about something that might be a bit foreign to some PHP developers out there event driven programming. He relate it to the Flex world where it's more commonly used.
When you initially dive into the world of Flex development, most PHP'ers will quickly notice something weird. We're out of the world of Request/Response that we know and understand and into an odd world of Events, Listeners, and Publishers/Subscribers where things just don't play well together.
He talks about the Observer design pattern and how it works to provide an interface to other objects who are listening in and waiting for events to happen (he uses an airline analogy). He also gives a more concrete illustration - uploading a file - and how the events would be used to handle each part of the process.
|
|
|
|
 |
| PHP.net: TestFest 2010 |
Rating: 0.00 (0 votes)
A new announcement on the PHP.net site today talks about this year's TestFest, an even to help increase the code coverage of the tests on the PHP language itself.
During TestFest, PHP User Groups and individuals around the world organize local events where new tests are written and new contributors are introduced to PHP's testing suite. Last year was very successful with 887 tests submitted and a code coverage increase of 2.5%. This year we hope to do better.
The SVN repository and reporting tools are back again this year (a great improvement over years past) with the new additions of an automated test build environment and screencasts showing the tools in action. You can find out more about this year's event on the TestFest page of the PHP.net wiki (including finding an even near you to participate in).
|
|
|
|
 |
| Ole Markus' Blog: Gentoo Linux and PHP-FPM |
Rating: 0.00 (0 votes)
Because of a recent addition to the the Gentoo PHP package (FPM support) they're looking for people to test it out and report back the results. To help, Ole Markus has written up some instructions on how to get it up and working on your system with nginx.
PHP just added the FPM patch to their 5.3 branch, making it likely that PHP 5.3.3 will support the FPM SAPI. The FPM SAPI is an improved fcgi SAPI that allows for more advanced configuration than the original fcgi SAPI. One of the most useful features is process management, which makes it very useful for lightweight webservers, such as nginx, that does not handle process management of fcgi themselves.
There's only a few commands you'll need to get this new package installed and working with your local nginx install with the help of the emerge and layman tools. He also includes the configuration change you'll need to make to the nginx config file to get it working as a FastCGI module.
|
|
|
|
 |
| Gennady Feldman's Blog: Leveraging Oracle connection metadata functionality |
Rating: 0.00 (0 votes)
Gennady Feldman has a new post to his site looking at a feature of the Oracle connection functionality that comes with PHP's integration with the powerful database - metadata functionality.
Now with OEM finding what the query is is really easy (you might need to buy Oracle Performance pack to monitor vitals and performance information). So you know which query caused the spike. Do you know where that query is in your application code? [...] You already have a ton of applications written, having to go through every query to add this meta information is a ton of dev effort. What do you do?
He's found a way to help solve the problem - you can use a few handy functions to let you set some more information about the connection. These settings can give you more information about the client, a client identifier, module information and what action or function is performing the query. This information can then be queried in via the V$session variable on the server side.
|
|
|
|
 |
| Simon Jones' Blog: Understanding the stack index for Zend Framework Controller plugins |
Rating: 0.00 (0 votes) 
New on his blog today, Simon Jones has posted a handy guide for those using the Zend Framework out there to the stack index for plugins the framework uses.
Zend Framework Controller plugins are a powerful way to inject logic into your controller system at various points, such as before and after an action dispatch. Plugins are run in the order they are added, though it is possible to change the order by defining a custom stack index. ZF internal plugins such as Zend_Controller_Plugin_ErrorHandler, which displays a nice Error 404 page, has a stack index of 999 to ensure it runs at the end of any plugin cycle. However, it's not so obvious from the ZF manual how to set a custom stack index.
He shows how to use the second parameter of registering a plugin to define the stack level and how to get the listing of the current stack to see just where yours might need to be placed. He also includes code samples and an output example of the default Zend Framework stack.
|
|
|
|
 |
| NETTUTS.com: How to Create Blog Excerpts with PHP |
Rating: 0.00 (0 votes) 
On NETTUTS.com today there's a tutorial (a screencast) that'll show you how to create excerpts for the posts in your blog. Their method could be applied to just about any PHP-based blog software out there since it uses base PHP functions and MySQL features.
Ever visited a blog, and noticed that each posting's overview only contained a hundred characters or so, which is then followed by '?'?'?? Ever wondered how to do that yourself? It's not quite as easy as you might think. What if character number 100 occurs in the middle of a word? Do you want to display half of a word on the page? Of course not. In this video tutorial, I'll show you how to compensate for this, as well as a host of other neat little things, like working with MySQL's LEFT() function, using PHP's strrpos, and substr, creating the beginning's of an actual blog, and more.
They show you how to use the MySQL LEFT() function, strrpos and substr to make creating these summary blocks of text simple.
|
|
|
|
 |
| Zend Developer Zone: Twice the Amount of Bugs and Twice the Amount of Winners! |
Rating: 0.00 (0 votes) 
On the Zend Developer Zone today Ralph Schindler has posted the results of the latest Zend Framework Bug Hunt Days (for July 2010).
Zend Framework has recently wrapped up it's July 2010 Bug Hunt with some fantastic results. Collectively, we closed 50 issues in 3 days. That's nearly twice what we have seen in recent months- a trend we hope continues into the coming months!
Top bug hunters this month were Dolf Schimmel and Ramon Henrique Ornelas tying with 14 bugs each with Michelangelo van Dam coming in third.
The fixes in this bug hunt that have been merged into the 1.10 release branch will see the light of day in our next scheduled mini release 1.10.7 during the week of July 26th.
|
|
|
|
 |
| php|architect: Ext4Yii, bridging PHP and JavaScript frameworks together |
Rating: 5.00 (2 votes)
On the php|architect blog today there's a new post about a framework that joins together two others (ExtJS and Yii) to make for an even more powerful combo - Ext4Yii.
Ext4Yii is essentially a bridge between these two projects, which aims to integrate Ext JS as an extension for Yii. Ext4Yii is implemented as a templating system, which consumes XML models where you define widget elements like buttons or handlers (in embedded JavaScript code which can take advantage of Ext-powered methods and objects).
This templating system integrates directly with the Yii framework's structure and gives you access to a lot of the ExtJS objects without the need for multiple calls to .js files. The tool also comes with a bundled plugin for Netbeans that can help you get started quickly (rather than having to work out the syntax by hand from the start).
|
|
|
|
 |
| Site News: Blast from the Past - One Year Ago in PHP |
Rating: 0.00 (0 votes)
Here's what was popular in the PHP community one year ago today:SitePoint PHP Blog: How to Use PHP Namespaces, Part 1: The Basics
NETTUTS.com: Create a Twitter-Like "Load More" Widget
Jim Plush's Blog: Followup on rethinking Zend Models with DDD - Framework code included
Jim Plush's Blog: Rethinking the Zend Models
Cal Evans' Blog: XAMPP, PHP 5.3, PEAR, and PHAR (what a mess)
NETTUTS.com: Online File Storage with PHP
Noupe.com: Ten Simple Rules for Choosing the Perfect CMS + Excellent Options
Paul Reinheimer's Blog: Storing Sessions in Memcache (how everything behaves)
Brandon Savage's Blog: Where Multiple Inheritance Will Kill You
PHP.net: Subversion Migration Complete
NETTUTS.com: CodeIgniter From Scratch: Day 1
Stefan Mischook's Blog: What happened to Ruby? And why PHP is KING of the Web.
Development Seed Blog: Aggregating Things in Drupal 7
Kae Verens' Blog: Mastering phpMyAdmin 3.1
PHP 10.0 Blog: More on PHP performance
|
|
|
|
 |
| dynaTrace Blog: Top 10 Performance Problems taken from Zappos, Monster, Thomson and Co |
Rating: 0.00 (0 votes)
On the dynaTrace blog there's a recent post with a few things they've learned about web application development from some of the major companies out there including Zappos and Monster.
For a recent edition of the Swiss Computerworld Magazine we listed our Top 10 Performance Problems as we have seen them over the years when working with our clients. I hope this list is enlightening '" and I've included follow-up links to the blogs to help better understand how to solve these problems.
Performance issues mentioned include:
Too Many Database Calls
Too chatty on the remoting channels
Wrong usage of O/R-Mappers
Wasteful handling of scarce resources
Bloated web frontends
|
|
|
|
 |
| IBM developerWorks: Build a web-based notification tool with XMPP |
Rating: 0.00 (0 votes) 
On the IBM developerWorks site there's a recent tutorial about using PHP and Javascript with the XMPP to create a small web-based notification tool (called Pingstream).
Real-time web applications are networked applications, with web-based user interfaces, that display Internet information as soon as it's published. Examples include social news aggregators and monitoring tools that continually update themselves with data from an external source. In this tutorial, you will create Pingstream, a small notification tool that uses PHP and JavaScript to communicate over the Extensible Messaging and Presence Protocol (XMPP), a set of XML technologies designed to support presence and real-time-communications functionality.
You'll need to already have the usual software installed - PHP, Apache and MySQL - as well as a few others: Openfire, jQuery, Strophe, XMPPHP and LastRSS. They introduce some of the concepts behind real-time messaging, the XAMPP protocol and, of course the code to show how to create their service.
|
|
|
|
 |
| Site News: Blast from the Past - One Year Ago in PHP |
Rating: 0.00 (0 votes) 
Here's what was popular in the PHP community one year ago today:Server-Side Magazine: Creating a PHP 5.3 Virtual Development Environment
NETTUTS.com: Organize Your Next PHP Project the Right Way
Cal Evans' Blog: Lessons in Phar
Manuel Pichler's Blog: Why I love PHP
Pablo Viquez's Blog: JSON, ISO 8859-1 and UTF-8 - Part
WebReference.com: XML and PHP Simplified - XML,PHP and the Database
Techfounder.net: What makes a good programmer?
NETTUTS.com: 3 Ways to Speed up Your Site with PHP
Brandon Savage's Blog: Making Life Better With The SPL Autoloader
Clay Loveless' Blog: New PHP-focused Yum Repository
Debuggable Blog: Cake 3 interview with Nate Abele
Brian Moon's Blog: Forking PHP!
Jason Houle's Blog: Zend Framework: The Dijit Editor
PHPro.org: Dynamically Create Menu With PHP DOM
Zend Developer Zone: PHP Abstract Podcast Episode 43: Future of PHP and Standards
|
|
|
|
 |
| Eric Adams' Blog: Implementing the Observer Pattern with SplObserver and SplSubject |
Rating: 0.00 (0 votes)
In a recent post from Eric Adams, he shows how to use the SplObserver and SplSubject components of the Standard PHP Library (SPL) to make an implementation of the observer pattern for more reusable code.
As PHP applications grow into complex object-oriented systems, developers look to create centralized components to execute repetitive tasks. These include logging, emailing, redirects, and more. The Observer pattern is a commonly used design pattern to hook such components into an application during runtime, thereby making them reusable. Since PHP 5.1, there are two interfaces built into the Standard PHP Library (SPL) that can be implemented to use the Observer pattern in your application. They are SplSubject, and SplObserver.
He shows how to use them in an example of a custom error handler class that extends the SplSubject with its attach, detach and notify methods as well as logger and mailer classes that will use it to handle their exceptions.
|
|
|
|
 |
| Developer.com: PHP Development Tools Improve in Eclipse Helios Update |
Rating: 0.00 (0 votes)
On Developer.com today there's a new article talking about some of the PHP-related improvements in the latest version of the PHP Development Tools (PDT) extension for Eclipse including template assistance and improved debugging.
Among the 39 projects included in Eclipse Helios is the PDT (PHP Developer Tools) 2.2 release. The PHP Eclipse project was first announced back in 2005, with version 1.0 coming in 2007. With the PDT 2.2 release, the project has continued to evolve with new features as the project's popularity has grown.
New features include a template content assist feature that will help make it easier for developers to get an application up and running quickly and better debugging support via a new inspection tool to help evaluate PHP expressions. The post also includes some quotes from Andi Gutmans of Zend on the progress PDT has made and some thoughts on one of its competitors, Netbeans.
|
|
|
|
 |
| Godaddyhostingreview Blog: How to move Magento from Production to Live Server |
Rating: 0.00 (0 votes)
Setting up and using the Magento e-commerce application can be a difficult process in itself, but when you start moving things around from server to server, things can get even more complex. In this new post from the Godaddyhostingreview blog they talk about moving a Magento instance from your local install out to a live site.
This is the method I used to move my local copy of magento store from WAMP on windows to a shared hosting account. In my case am using magento1.3.x.
The instructions are detailed right down to which configuration values to change, how to update your database for the move, what will need to be removed before you and push everything over. There's even a bit of instruction on what to change if your database structure is slightly different.
|
|
|
|
 |
| Project: MongoSession - A PHP MongoDB Session Handler |
Rating: 0.00 (0 votes)
Corey Ballou has posted a MongoDB-based session handler to his site with a new update back on July 1st.
MongoSession is a PHP implementation of a MongoDB session wrapper. This class was built as a drop-in for easily switching to handling sessions using Mongo. It's a great replacement to memcache(d) for VPS servers where you risk memory being reshuffled in the pool and taking performance hits.
You can grab the latest version of the source from the github repository for the project or just copy and paste the source directly from this page on his site. A usage example is also included.
|
|
|
|
 |
|
Top Tags |
|
|
|
 |
Top Rated Links |
|
|
|
 |
Popular Links |
|
|
|
 |
Top Rated Videos |
|
|
|
 |
Popular Videos |
|
|
|
 |
Top Rated News |
|
|
|
 |
Popular News |
|
|
|
 |
Top Rated Articles |
|
|
|
 |
Popular Articles |
|
|
|
 |
In The News |
|
|
|
 |
|