Stefan Mischook's Blog: Object Oriented PHP Tutorial Updated - Steps 18 - 22
599910
Stefan Mischook has made another update to his OOP beginners tutorial:   I've update my beginners tutorial on object oriented PHP adding steps 18-22. Again, this is a code intensive article where I expect you to follow along with your PHP editors.   You can check out the full tutorial (well, up to step 22 of course) on the KillerPHP.com website to get started with working with objects, classes and related functionality.
738021
Manfred Weber points out a new blog post from Jan Kneschke concerning the creation of and the idea of typesafe objects in PHP via doc-comments and the Reflection API.   From Jan:   I always disliked the way PHP handles Objects. There is no way to assign a type to properties. Validators have to be glued against the fields externally and you can't just generate a Object-Description (like WSDL) from a object either.   Because of this he's looked into an alternate solution - the typesafe objects. Since, by defauly, PHP's addition of object properties is pretty freeform, making things typesafe is a little difficult. His suggestion, though, uses a combination of comments in the code (declaring what the type of the property should be) and the Reflection API built in to PHP to "look back" at the comments and ensure the type of the property is correct. He even includes examples - a simple one about throwing an error, generating XML this way, and making safe encoded SQL statements.
94499
Nefarious Designs continues their object-oriented PHP series with part four posted today, a look at some of the new features that PHP5 brings to the table.    After a welcome break, over the late summer public holiday here in England, here's the final part in my object-oriented PHP series. Sorry about the rather extended pause since "Part 3: Taking Relationships Further".   Having already looked at definition, relationships and taking those relationships further, I'm going to look at how PHP5's new Object Model introduces more advanced functionality.    In this latest part they look at clas constants, abstract classes, object interfaces, and magic methods (including overloading).
242013
Popular posts from PHPDeveloper.org for the past week:ProDevTips.com: Writing a CMS/Community with Smarty and the Zend Framework: Part 6Nessa's Blog: Using an .htaccess with PHP Compiled as CGIArnold Daniels' Blog: How I PHP: The Output Handler - ContinuedMartynas Jusevicius' Blog: PHP 5 features: Class autoloadingSean Coates' Blog: Actually Solving a Problem (believe it or not)The Northclick Blog: Message Queue Project: First working versionStefan Mischook's Blog: A Question about object properties in PHP ClassesJob Posting: G2 Technology Seeks PHP Developer (Memphis, TN)Rob Allen's Blog: Zend_View: Access the view from a view helperDavid Walsh's Blog: Using PHP Generic Objects To Organize Your Code
649335
Michael Kimsal has posted some more thoughts on what he calls the "sad state of PHP development" pointing out some of the practices of the PHP group surrounding the development of the language.   Every few months there's a release, whether large or small, which introduces new features and bug fixes. However, with every release also comes fears of tiny, sometimes undocumented, changes that break existing code, and often for no solid reason other than someone with commit access decided they liked the 'new' way better than the old way.   He points out a specific example, get_object_vars and how its return values were changed in an earlier release as well as the update to glob made recently to change its return types.    In his opinion:   No changes should be made to the PHP core without an issue being opened, either in the 'bug' tracker or some other issues tracker.   Be sure to check out the comments for other great opinions on the topic.
743840
Chris Shiflett has posted his own recap of the (just passed) php|works conference up in Toronto over on his blog.   I've been traveling non-stop since php|works, so I haven't had a chance to reflect on the conference, what I learned, who I met, and things like that. (Zak has been doing a good job of this lately, and I'd like to follow his lead.) I've probably forgotten more than I remember, but this is my recap.   Included in the things he mentions are:  The people he was able to meet (like Joshua Eichorn and Sebastian Bergmann) The talks he gave ("Truth about XSS" and "Agile PHP Testing") His interview with Cal Evans of the Zend Developer Zone The PHP 5 Certification and Wez Furlong's "Not PDO" talk
762394
Christopher Jones talkes about some updates that he's made to the default PDO functionality of PHP, adding in a few things like pre-fetching and methods to get the details of the database server you're using.   After PHP 5.2.4 shipped and a new release cycle began, I merged a couple of enhancements to PDO_OCI attribute handling.  Specifically I added $dbh->getAttribute() support for ATTR_SERVER_VERSION, ATTR_SERVER_INFO, ATTR_CLIENT_VERSION and. ATTR_AUTOCOMMIT.  At the moment these are only available in the PHP snapshots on http://snaps.php.net/. Let me know if there are any issues so they can be resolved before the next PHP release.   He gives examples of two things - the pre-fetching functionality, allowing for better optimization for a query, and the transaction management features, making it as simple as a try{} block to test the commit and rollback if needed.   He also mentions other properties/attributes included in the new release - ATTR_PERSISTENT, ATTR_TIMEOUT, ATTR_ORACLE_NULLS, ATTR_CASE and ATTR_ERRMODE, ATTR_SERVER_VERSION and ATTR_CLIENT_VERSION (the last two have examples).
496780
Lorenzo Alberton has posted some updates about the PEAR packages that he maintains to his blog today including MDB_QueryTool, Mail_Queue2, MDB2, and Translation2.   Even if lately I've been coding way more in C/C++ than in PHP, I still keep an eye on PEAR developement: I reckon in the last month I've closed a bug a day, on average. And after my last call for help about my PEAR packages, I'm also pleased to announce that someone did indeed offer a hand. I'm happy to welcome not one, but two new developers!   Each of the items has links to their PEAR homepage and a few quick words on where the package stands (including developers involved or wanting to get involved). He also reminds developers out there that they can help out too if they want to jump in and get into PEAR.
42444
PÃ¡draic Brady has a quick update today pertaining to the PHPSecInfo project - a new manual (currently in development).   I'll keep adding to it over the days, weeks and months ahead. The current form is going to be mainly a draft. When it's done, I'll go through it and do some serious editing. Next priority is getting in the material on actually using and implementing PHPSpec...   You can find the manual at http://dev.phpspec.org/manual/ with quite a bit of content already filled out. Topics currently covered include installation guides, your "first steps", testing the code and some examples of it in use.
616513
Popular posts from PHPDeveloper.org for the past week:Community News: Namespaces in PHP6Mike Potter's Blog: Sample Code From PHP / Flex e-SeminarThe Bakery: PremierMarinas.com, ScienceHack.com and an iPhone AppPHP F1: PHP Session TutorialCommunity News: GoPHP5 Official SiteCommunity News: jPOP Framework - Javascript & PHPTim Koschuetzki's Blog: Composing Methods: Remove Assignments to ParametersAlexey Zakhlestin's Blog: YAML: Syck for PHP is not read-only anymoreMatthew O'Phinney's Blog: File_Fortune refactoredSite News: Popular Posts for the Week of 07.06.2007
192641
DevShed has posted the second and last part of a series of two articles based around the Composite design pattern - using it to work with strings in PHP5.   Are you a PHP developer who wants to improve your skills in pattern-based programming in PHP? If the answer to this question is a emphatic yes, then you should begin reading this article now! Welcome to the final part of the series "Implementing the composite pattern with PHP 5." Comprised of two instructive tutorials, this series walks you through the basic concepts of this important design pattern, and shows you how to apply it with some educational examples.   They start by defining a simple StringProcessor class as an abstract interface to build from. From there, they create two other classes - the SingleStringProcessor and the MultipleStringProcessor. Each of these takes in either a single file or multiple filenames and spits back out the value of the string and the length of the string.
539271
Terry Chay, a popular speaker at many of the PHP conferences and photog to the geek chic crowd in San Francisco, will be speaking at the upcoming PHP Meetup for the SF PHP group. He'll be giving a talk titled "OOps! The PHP Fear and Loathing Guide to OO Design".   How does the PHP developer in the trenches create powerful object-orientation code? By doing what the PHP's architects did, of course: cherry picking the most pragmatic of OOP principles and patterns! This talk is targeted at the PHP developer who has basic knowledge of PHP OOP syntax but wants to find out where OOP principles can fit into a program.   If you'd like to attend, head over to the meetup page for the event and let them know you're coming. It'll be happening at the CNet Network offices February 7th @ 7pm.
73354
DevShed has posted part one of a new pair of articles that show how to use inheritance in your PHP applications.   In the two articles in this series I'm going to show you how to build a sample object-based web site from its bare bones structure, by using the encapsulated logic of some parent and child PHP 5 classes. In this way I'll demonstrate how inheritance can be used to tackle a concrete project, such as constructing dynamic web pages.   In part one, they build the foundation of their sample application - a web page builder - by defining the WebPage class and abstract methods for it like buildHeader, buildStyles and buildBody. Inheriting from this, they build a HomeWebPage class that defines the methods and values to create a simple page. They take it even a step further and build an AboutUsWebPage to show another implementation.
453155
Cal Evans of the Zend Developer Zone has posted a new book review of one of Packt Publishing's latest PHP-related offerings - "PHP Programming with PEAR".    For those who have been living under a virtual rock for a while now, PEAR is the "PHP Extension and Application Repository". In a nutshell, it is a collection of classes, it's a framework, and it's a distribution system. Most importantly though, it's an excellent place to find the classes you need so you don't have to re-invent the wheel. (Ok, beginner's time is over, I promise).   PHP Programming with PEAR, written by Stephen Schmidt, Carsten Lucke, Stoyan Stefanov and Aaron Wormus, takes a look at some important PEAR classes and how you can use them.     He mentions what the book covers (which packages) and highlights some of his favorite bits, including the chapter on web services.
547846
In a new post to his blog, Jacob Santos talks about why object oriented programming just "isn't easy" - including a few of his dislikes about OOP in PHP.   Functional developers have it easy. Damn straight and I wonder why so many developers choose to write functions, when they can opt for more beautiful classes instead. [...] It is easy to get functions right, all you have to do is prefix them and name them properly and you're done.   He notes that most people get OOP up to a certain point - that being the "has-a" and "is-a" relationships - where things start flying over their heads. He expresses his dislike of the way that Singletons are used (or not used) and places some of the blame on the tutorial and book authors out there trying to teach novice programmers with analogies that don't make sense in a codign situation.
766229
There are some PHP developers out there that see PHP as a sort of constant "work in progress" with issues all around - confusing function names, non-intuitive features, and more. So, a group has been formed to help clean things up a bit - the ogoproject.   The ogo project aims to clean up PHP, starting with fixing the inconsistent (and difficult to remember) function names. PHP needs clear naming conventions, and it needs to stick to them. We will offer a temporary fork until function name changes are agreed on, and sensible backwards and forwards compatibility is in place. Then we can get our changes merged into the main branch.   They've already posted some suggestions for a few things, including conventions they're looking to follow and a list of new function names changed according to these new conventions. There's also a downloads and forum section that will soon have content.   If you're interested in getting involved, stop by the #ogoproject channel on the Freenode IRC network and see what's going on.
638724
Latest PHPClasses.org Releases:pop3-streamUserActionMySQLWrapperPHP AjaxOutput Buffering handlerSite Map GeneratorRandom HTML GeneratorPaginationsGoogle GraphProcess ImagesgCurlRobots_txtProgressODBC-ABMNewsletter QueueProgress ODBC ABM