News Feed
Jobs Feed
Sections




Recent Jobs

News Archive
feed this:

The Bakery:
Simple way to memcache (almost) all database queries
January 13, 2010 @ 13:20:56

On The Bakery (the CakePHP resource) there's a recent post looking at a simple way you can integrate database query caching (using memcache) into your CakePHP application's models.

Most common way to access data is a database. Most common way to speed this up - Memcached. As a quite young CakePHP developer I had a bit of headache "how to cache queries effectively?". Now I know the way, so I share.

Rafal's method, as seen in this example using the caching methods included with CakePHP to serialize and store the database queries out to a cache.

0 comments voice your opinion now!
simple cakephp framework database query tutorial memcache



The Bakery:
CakePHP's routing explained
November 02, 2009 @ 08:28:59

New on The Bakery there's an article explaining some of the inner workings of the CakePHP framework - its routing system.

Routing in CakePHP is a very powerful feature and is used to make URLs look good. Experience in the #cakephp IRC support channel tells me it appears to be hard to grasp even though the book is quite complete. This article should change that a bit and discuss the main features of routing. Comments below asking for support will be ignored, to get support, there is the Google group and the #cakephp IRC channel.

They look at some of the default routes built into the framework, how to create custom routes with named elements (and passing parameters into the action for them) as well as tips on setting up match conditions and prefix routing. Code samples are included.

0 comments voice your opinion now!
cakephp framework routing tutorial


The Bakery:
Writing an easy to use A/B test helper with CakePHP and jquery
October 30, 2009 @ 11:57:14

In a recent post to The Bakery (the CakePHP resource) Jonathan Hendler has created a simple A/B test helper using the CakePHP framework and jQuery.

Knowing what is driving the user experience is key to the success of an application. Subtle changes in the interface can cause dramatic shifts in user behavior. Here, A/B tests display two (or more) language choices or color choices to a user (any HTML). Metrics are measured in two ways - 1) did the user click on the button at all and 2) how long did it take them to find it from the moment the page has started loading?

The helper tracks the user through the site and adds the results to a testing table (abtests). The code is included - model, component, controller, helper class and the jquery code to make it all work together. A few usage examples are also thrown in near the end.

0 comments voice your opinion now!
ab test helper cakephp framework jquery


The Bakery:
For Beginners Famous pitfalls with Cake development
September 29, 2009 @ 10:20:26

On The Bakery today there's a new post with a few things to watch out for when you're just getting started with the CakePHP framework.

Starting from scratch in cakephp is not always easy, especially when you are not used to MVC frameworks. I hope this will help other beginners to make their life easier.

Pitfalls listed include:

  • Incorrect filenames
  • Remember to use "echo" in views
  • Unexpected results in ajax calls
  • Put the query where it belongs

Check out the rest of the post for more handy tips.

0 comments voice your opinion now!
beginner pitfall common cakephp framework


Debuggable Blog:
How to Fetch the ENUM Options of a Field - The CakePHP Enumerable Behavior
September 08, 2009 @ 11:47:09

On the Debuggable blog, Tim Koschutzki has added a quick post looking at fetching ENUM options of a database's fields in a CakePHP application.

The field users.level is an enum type and can have the values 'guest', 'user', 'admin', 'superadmin' and 'root'. The problem is that it could be possible that new levels were added in the future. [...] So what I came up with is a very simple behavior that can extract the options for any ENUM field. It uses simple caching in order for the query to not be run all the time, so make sure to clear your cache as you update your enum field options in the db.

His code snippet creates an EnumerableBehavior for the model and grabs the column names from the given table to check the access level for each and write them out to a cache.

0 comments voice your opinion now!
cakephp framework enum option database


The Bakery:
Clearing Up Some Confusion on the Release Versions of CakePHP
September 03, 2009 @ 12:09:40

On CakePHP's Bakery blog Joel Perras has made a new post that, he hopes, will clear up some of the confusion around which versions of PHP will be supported in which CakePHP release.

There seems to be a bit of confusion as to what version of PHP will be supported in what CakePHP releases, and where to find which projects on http://code.cakephp.org/projects. Hopefully, this post will help answer any questions you may have. If you only read one line of this entire post, read this: CakePHP 1.3 != Cake3.

Basically, PHP 5.3 support is being worked into the 1.3 series of the framework but not the 1.2 versions. Currently, though, the 1.3 branch isn't considered stable. There's also a distinction made between the CakePHP 2.0 project and the CakePHP 3.0 project.

0 comments voice your opinion now!
cakephp release version framework


Matt Curry's Blog:
Adding Ajax Panels to the CakePHP Status Plugin
August 18, 2009 @ 07:50:29

Matt Curry has this recent post looking at the CakePHP Status plugin he's developed and how to add in a custom Ajax-powered panel.

Last time we made a simple panel that showed the last 10 users that signed up for you web app. [...] This time we'll do a panel that shows the number of sign ups based on a time frame. We'll add a drop down that let's you select day, week, month or year and it'll show a breakdown of new users for that period. The updates will use ajax.

He includes the code to create the element, set up the javascript to interface with the backend and the PHP to create the controller for it to interface with. His example grabs the most recent signups from his Users information.

0 comments voice your opinion now!
ajax panel cakephp status plugin


Matt Curry's Blog:
Adding Custom Panels to the CakePHP Status Plugin
August 10, 2009 @ 09:46:59

Matt Curry has a new post looking at adding additional functionality (custom panels) to his CakePHP status dashboard application.

There are two different ways to add a panel '" using requestAction or Ajax. The general rule is if the panel is pretty fast to load and content is static use requestAction. If the panel takes some time or you want to be able to interact with it then use Ajax. For example, the logs panel uses requestAction since it's pretty quick to grab the log entries and you really don't need to interact with them. The Google Analytics panel, on the other hand, takes a few seconds to query the API and has options to change the timeframe, so it uses Ajax.

New panels can either be made as a part of the application or as plugins and bundled for easy adding and removing. He shows how to write the controller and the element to interface with the CakePHP code. His example grabs the latest users created on his application.

0 comments voice your opinion now!
cakephp status plugin custom


Matt Curry's Blog:
6 More Questions With Nate Abele - Lead Developer of CakePHP
August 06, 2009 @ 12:49:06

Matt Curry has posted six more questions from his interview with Nate Abele, Lead Developer of the CakePHP project.

The questions this time cover:

  • relationships with the leads on other top PHP frameworks
  • how much of his work is done with CakePHP
  • what kind of applications he's made with the framework
  • what his favorite environment is for coding (music, beverage of choice, etc)

...and a few more. You can also check out the first part of the series here.

0 comments voice your opinion now!
nateabele cakephp interview


Matt Curry's Blog:
9 Questions With Nate Abele - Lead Developer of CakePHP
August 05, 2009 @ 07:55:39

Matt Curry has posted an interview (part one) he did with Nate Abele, lead developer of the CakePHP framework.

Yeah, yeah, I know. This has been done before. What can I say - I had questions, Nate had answers. This is part one and covers general Cake and Cake3 questions. Look for part two tomorrow, which has a bunch of random questions.

The questions cover topics like the confusion in CakePHP branches, active contributors, changes in return values and certain features (like unit testing integration and the filtering system).

0 comments voice your opinion now!
nateabele developer cakephp interview



Community Events









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


windows conference job drupal wordpress podcast sqlserver microsoft extension performance opinion developer release symfony zendframework codeigniter framework apache feature facebook

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