News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
Robert Basic's Blog:
Login example with Zend_Auth
January 05, 2009 @ 22:14:39

Robert Basic has posted an example of the use of the Zend_Auth component of the Zend Framework inside of an example controller.

So, here's what I'm going to do: authenticate an user against a database table using Zend Framework's Zend_Auth component. It's really a piece of cake. You can see a working example here: http://robertbasic.com/dev/login/.

He sets up a registry instance, a database table for the logins and the sample controller with both login and logout functionality. Complete code (and links to Zend Framework documentation are included).

0 comments voice your opinion now!
zendframework login logout tutorial zendauth controller



Jani Hartikainen's Blog:
Decoupling models from the database Data Access Object pattern in PHP
January 05, 2009 @ 21:22:26

In this new post to his blog Jani Hartikainen looks at implementing the Data Access Object pattern in your PHP applications.

The advantage of this is that you can easily implement different methods to persist objects without having to rewrite parts of your code. I'm again going to use the programming language quiz game I wrote as an example. Since I initially wrote it to use Doctrine ORM directly, and both the old and new code are available, you can easily see how the code was improved.

He starts off with a look at the pattern itself (including a diagram of how an example would work with Doctrine) followed by the creation of the models for his Questions example. Add in the factory to create an instance and an exmaple of it in action and you're there.

0 comments voice your opinion now!
decouple model data access object designpattern tutorial doctrine


Community News:
Eli White is Zend's New "Community Guy"
January 05, 2009 @ 20:37:15

According to this new post on his blog, Eli White has taken over the post of "community guy" at Zend (a post previously held by Cal Evans).

I've been offered a position at Zend, and accepted it. The official (lengthy) job title is Zend Community Manager/Leader & DevZone Editor-In-Chief. The short form to many people would be: "The job formerly held by Cal Evans" I'm extremely excited about this opportunity to work with Zend and to have the focus of my daily job to be working with the PHP community which I dearly love. I know that any attempt to fill Cal's shoes will be met with failure, so I hope instead to come up with my own twist on the position and to give it my best.

He'll be acting as the liason between the PHP company and the rest of the community including writing articles, doing some podcasting and all around getting in the middle of whatever's going on in the PHP community. Congrats Eli!

0 comments voice your opinion now!
zend community eliwhite leader manager devzone editorinchief


eZ Components:
Version 2008.2 Released
January 05, 2009 @ 12:52:42

The eZ Components project has release their latest stable version - 2008.2 - for public consumption today:

The development team is happy to announce the release of the seventh major version of eZ Components: version 2008.2. The main new development of this release is focused on the MvcTools (and accompanying) components.

The MvcTools component implements the tools for a framework, providing a dispatcher, request parsers, routing, view support and a response writer. Examples of its use can be found in the subversion repository for the project. You can see the full Changlog for the release here and you can download the latest release here.

0 comments voice your opinion now!
version release download changelog mvctools framework


Derick Rethans' Blog:
Five reasons why the shut-op operator (@) should be avoided
January 05, 2009 @ 12:09:37

Derick Rethans has posted just a few of the reasons why the "shut-up operator" (the @ symbol) should be avoided at all costs in your PHP applications.

The @-operator is often used to silence errors in noisy PHP functions'"functions that generate warnings that can not be easily prevented. [...] In those cases, there is no way how to check up-front whether the function call will not issue a warning when being called.

There are side effects to using the operator, however, including hiding legitimate errors and making debugging that much more difficult. To back up his point, he includes four other reasons to avoid the operator's use (besides the debugging issues):

  • It's slow (part 1)
  • It's slow (part 2)
  • It's slow (part 3: It generates crappier code)
  • Apfelstrudels were harmed (related to the strudel_token in the C code for the operator)
0 comments voice your opinion now!
shutup operator atsign avoid reason slow debugging error hide


Michelangelo van Dam's Blog:
Mapping Seven Things
January 05, 2009 @ 11:17:14

Since the Seven Things meme has been charging its way through the members of the PHP community (and some outside it), it's hard to keep track of who is tagging who and if those people have posted their "seven things" and tagged others. Michelangelo van Dam has tried to make things easier with his "Who Tagged Who" map mini-application that crawls through the posts looking for others who were tagged.

Trying to get a bit of overview of all people who have put up their "Seven Things" list, I created a little map that shows who tagged who with an overview of the most tagged persons.

You can also grab the XML source file if you'd like to manipulate it yourself.

0 comments voice your opinion now!
map seventhings blog tagged xml source dynamic


Ian Selby's Blog:
Dynamically Add Functions to PHP Classes
January 05, 2009 @ 10:26:50

Ian Selby has posted a new tutorial today looking at something that can be very handy in the right situations - dynamically adding new functions to an already defined PHP class.

I've gotten a lot of great suggestions for features [for PHP Thumbnailer], and have wanted to add them, but at the same time don't as I would prefer not to bloat the class with all sorts of functionality. So I started thinking about how I could provide certain functionality for people that want it, without either simply making it a part of the class (and making it more bloated as a result), or coming up with all sorts of extended classes to maintain and distribute.

His solution was to add functionality dynamically to the class as plugins. Each plugin is defined as its own class (to keep things standardized) and will be included/executed by a base controller class. He includes some sample code showing how to create a basic user object that can store the first and last names of the user in question.

0 comments voice your opinion now!
dynamic add function method class plugin tutorial user


Sameer Borate's Blog:
Refactoring 1 Consolidating Conditional Expressions
January 05, 2009 @ 09:31:08

Sameer has posted the first article in his "Refactoring" series today - a look at boiling down conditional expressions to only the logic that are really needed (and maybe replacing it all together).

Many times you see a group of conditionals where the returned values are the same. To make the code cleaner you can group the conditionals together using the '&&' or the '||' operators and then extract the code into a separate function. This also has the added benefit that you can reuse the extracted method in other places where the required conditional goes.

He shows how abstracting out a file upload permissions check to another function makes it easier to reuse and simpler to understand (an "if" versus multiple "return" statements).

0 comments voice your opinion now!
refactor code conditional consolidate series


Chris Hartjes' Blog:
CakePHP Mythbusters!
January 05, 2009 @ 08:47:16

In an effort to dispel some of the rumors and myths around the CakePHP framework (as presented most recently by a different blogger) Chris Hartjes has made a new "mythbuster" post to his blog today with a rebuttal to the points from the other article.

I ran across an article comparing CakePHP and Symfony and found that the writer had a number of preconceived ideas about CakePHP. These same ideas keep popping up everywhere, used by people looking to get their hate on about CakePHP. I sent a very well-reasoned email to the writer clearing up some of those misconceptions [...] So, in the interest of clarifying things about CakePHP I thought I would share that email, slightly rewritten for this blog posting, but the content is roughly the same.

The post/email covers a few different topics some might have misconceptions about concerning the framework:

  • Lack of Documentation
  • Scaffolding
  • Models are tied to controllers in a 1:1 relationship
  • Cake's Ajax and Javascript helpers do not support graceful degradation
  • Cake's HTML and Form helpers produces bad markup
  • Unit tests are an afterthought
  • CakePHP is not an "enterprise capable framework"
0 comments voice your opinion now!
cakephp framework mythbuster myth rumor unittest documentation scafffold


PHPImpact Blog:
Running PHP with Quercus in Jetty Web Server
January 05, 2009 @ 07:52:28

The PHP::Impact blog has a new post looking at how to run PHP on a Jetty (Java) web server using Quercus.

Tomcat and Jetty are very similar. Jetty can be invoked and installed as a stand alone application server. It has a flexible component based architecture that allows it to be easily deployed and integrated in a diverse range of instances. The project is supported by a growing community. The Jetty team has a history of being responsive to innovations and changing requirements.

They walk you through the "quick install" version of Jetty, getting it running, installing Quercus and configuring the Jetty web server to work with it.

0 comments voice your opinion now!
jetty java webserver quercus tutorial install configure



Community Events









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


mysql code book releases package security cakephp developer ajax job release PEAR PHP5 conference example zendframework application database framework zend

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