News Feed
Jobs Feed
Sections

Recent Jobs

News Archive
feed this:

Debuggable Blog:
Testing Models in CakePHP - Now let's get rid of the unnecessary ModelTest classes!
July 31, 2008 @ 07:51:38

On the Debuggable blog today Tim Koschutzki looks at another testing topics for the CakePHP framework - a cleaner way for testing models.

Up until now there was always a need to create a so-called test model that extends your model-under-test in order to overwrite its $useDbConfig setting to be 'test_suite'. By that you ensured that your models run with the test_suite datasource when the tests are run. [...] Nate proposed ClassRegistry::config(), which allows you to tell the ClassRegistry class which datasource it shall use when ClassRegistry::init() is used the next time (and thereby a model is instantiated).

He includes an example of the new functionality - a test case ensuring that three articles are there and are marked as published. The registry makes it easier to automatically create the ArticleTest instance inside the test case rather than having to manually declare and define it.

0 comments voice your opinion now!
test case cakephp framework registry modeltest class



Debuggable Blog:
How to bend Cake's Modelfind() method to your needs
June 23, 2008 @ 12:08:32

New on the Debuggable blog, Tim Koschutzki has posted a method to get the fund() method in the CakePHP framework's models to bend to your will.

CakePHP allows you to use your own "find-types" for the Model::find() methodology. Those of your who are familiar with the find() method know that there are currently four types in the core: 'list', 'all', 'first' and 'count'. However, sometimes it is nice to specify your own type.

He shows an example of the end result - a find() call with a custom type that automagically gets translated correctly. His script overrides and enhances the usual find call in an extended object (extended from AppModel) that uses a switch/case statement to define the custom types and their find() search calls.

0 comments voice your opinion now!
cakephp framework find custom type model switch case


Sebastian Bergmann's Blog:
Support for the Cancel Case Workflow Pattern
January 25, 2008 @ 09:45:00

Sebastian Bergmann has a post about a new feature of the Workflow component in the eZ Components libraries - the Cancel Case Pattern.

Version 1.2 of the Workflow component that is part of the eZ Components adds support for the Cancel Case workflow pattern:

Once this Workflow pattern is called the complete Workflow instance is removed from the current execution (including any running nodes). You can find out more about the ezWorkflowNode in their documentation.

0 comments voice your opinion now!
cancel case workflow pattern ezcomponents


Mike Lively's Blog:
Adding Database Tests to Existing PHPUnit Test Cases
September 05, 2007 @ 10:50:30

Mike Lively has posted about functionality he's created to add database testing procedures to preexisting PHPUnit tests supplementing his other post n adding database support to PHPUnit.

When I was first creating the Database Extension for PHPUnit I realized that there was a very high likelihood that several people would have tests that were already written that they would like to add additional database tests too. To accomplish this I actually wrote the PHPUnit_Extensions_Database_DefaultTester class. In fact, if you were to look at the source of the database test case you will see that all of it's operations are actually forwarded to this class which does all of the work.

He includes his same example from before - the banking system - and shows how the tests can be appended on, adding a getDatabaseTester method that returns an object the rest of the tests can use.

1 comment voice your opinion now!
database test phpunit unittest existing case database test phpunit unittest existing case


Ben Ramsey's Blog:
Business Case for PHP
February 14, 2007 @ 11:16:00

With all of the recent talk about business cases for PHP, Ben Ramsey wanted to get some of his thoughts on the matter out and into his blog in a new post.

I don't believe anyone has ever published any white papers on PHP, giving it a business case, and while we have companies like Zend, OmniTI, and eZ Systems providing support for PHP, I haven't seen any documentation from them like this. So, last Thursday when Google Group for developing a business case for PHP, I took notice and joined.

Definitely good to hear encouraging words about a project that could ultimately help out the language as a whole break into an area where the growth has been the slowest.

0 comments voice your opinion now!
business case whitepaper googlegroup develop business case whitepaper googlegroup develop


Stuart Herbert's Blog:
What Does The Business Case For PHP Need To Cover?
February 09, 2007 @ 07:49:00

In a new post to his blog today, Stuart Herbert continues the theme he started in a previous post about a business case for PHP. In this new entry, he shares some things he's done to further the effort.

To turn this from an idea into reality, I've setup a Google group where anyone who is interested can join in, and help build this resource. Please come along with your ideas and concerns, and let's see what we can achieve together.

He also suggests some "first steps" to get the ball rolling, namely a list of topics the business case needs to cover.

0 comments voice your opinion now!
test case business coverage google group topics test case business coverage google group topics


Stuart Herbert's Blog:
Missing The Business Case For PHP
January 18, 2007 @ 08:40:00

In this new post to his blog today, Stuart Herbert suggests something that the PHP community really is in dire need of - a site/resource providing a place developers can point at to help refute some of the PHP rumors floating around and provide examples and test cases for one of the most stubborn PHP markets out there - business.

At work, we make and sell software written in a number of languages; our flagship product is written in PHP.

But one of the unfortunate side-effects of Stefan Esser's much-publicized departure from the PHP Security Team has been an increase in the number of IT staff we're coming across who "believe" both that open-source is inherently insecure, and that PHP in particular has incurable problems. These "beliefs" hurt ISVs trying to sell PHP-based applications into skeptical organizations.

He asks why there is no "Why PHP?" resource out there that clients/businesses in general can be referred to for better information. He also suggests one of the most logical fits for this kind of information and is surprised they don't really have something already - Zend. Check out the comments to see how much of the community is already behind the effort.

0 comments voice your opinion now!
business case whyphp insecure problems refute claim business case whyphp insecure problems refute claim


SitePoint PHP Blog:
Hot PHP UTF-8 tips
August 10, 2006 @ 14:50:03

Following up on some of his previous posts to the SitePoint PHP Blog, Harry Fuecks has posted this quick guide with some "hot UTF-8 tips" to share with the community.

As a result of all the noise about UTF-8, got an email from Marek Gayer with some very smart tips on handling UTF-8. What follows is a discussion illustrating what happens when you get obsessed with performance and optimizations (be warned - may be boring, depending on your perspective).

He talks mainly about using the native PHP functionality to avoid the mbstring issues that could arise by restricting locale behavior and using a fast case conversion function to handle strings correctly. The other tip involves delivery methods to those not able to recieve UTF-8 formatted content - checking their character set and responding accordingly.

0 comments voice your opinion now!
utf8 tips mbstring native php locale behavior case conversion character set utf8 tips mbstring native php locale behavior case conversion character set


Codewalkers.com:
Book Review - Pro PHP-GTK
June 27, 2006 @ 08:37:47

Codewalkers.com has posted a new book review today of the APress book (by Scott Mattocks) - Pro PHP-GTK.

PHP-GTK is a library allowing PHP developers to create graphical GTK applications. Pro PHP-GTK by Scott Mattocks aims to teach this tool to people of all skill levels from those who can read PHP fairly well to professionals. This might make it kind of disturbing for the more advanced coder, because the book teaches even the most basic things like "What is a GUI application?" and "What are they good for?"

Although the book is meant for beginning coders, too, it doesn't mean it should contain stuff that is aimed at people who know nothing about computers. Luckily, after a few chapters this problem seems to vanish.

He notes that once the basics are out of the way, the book really gets to the heart of the matter with a case study of a product information management system example. Lots of code is provided, and there's some talk about getting the needed packages installed to work with the examples in the book. He rates it well, with only a few issues (too simple to start?) to detract from it.

0 comments voice your opinion now!
book review pro php-gtk apress basics case study reference book review pro php-gtk apress basics case study reference


Daniel Krook's Blog:
NYPHP Conference & Expo 2006
June 20, 2006 @ 05:56:19

Daniel Krook attended the (just passed) New York PHP Conference & Expo up in Manhattan and has posted a few of his thoughts about some of the speakers and topics discussed.

There has been quite a bit of buzz about Rod Smith's keynote at last week's NYPHP Conference & Expo. Rod and his team provided a case study of a situational application built for the National Association of Broadcasters and performed a live demo of how to go about creating a five minute application.

It was pretty interesting stuff, but Rasmus Lerdorf followed with what I found to be an even more impressive mashup that the audience could better relate to. He showed a tool he built for internal use at Yahoo which serves as an corporate Craig's List of sorts, with hooks to Web services to provide posters with recommended price ranges and stock photos of the item they are selling.

He mentions that the real technology that made these two applications as "cool" as they are and really makes them possible is Ajax - both use it to pull the data from the Web services in.

0 comments voice your opinion now!
nyphpcon2006 keynote ajax case study live demo nyphpcon2006 keynote ajax case study live demo



Community Events











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


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

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