 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
The Bakery: CakePHP's routing explained
by Chris Cornutt 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.
voice your opinion now!
cakephp framework routing tutorial
The Bakery: Writing an easy to use A/B test helper with CakePHP and jquery
by Chris Cornutt 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.
voice your opinion now!
ab test helper cakephp framework jquery
Debuggable Blog: How to Fetch the ENUM Options of a Field - The CakePHP Enumerable Behavior
by Chris Cornutt 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.
voice your opinion now!
cakephp framework enum option database
The Bakery: Clearing Up Some Confusion on the Release Versions of CakePHP
by Chris Cornutt 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.
voice your opinion now!
cakephp release version framework
Matt Curry's Blog: Adding Ajax Panels to the CakePHP Status Plugin
by Chris Cornutt 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.
voice your opinion now!
ajax panel cakephp status plugin
Matt Curry's Blog: Adding Custom Panels to the CakePHP Status Plugin
by Chris Cornutt 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.
voice your opinion now!
cakephp status plugin custom
|
Community Events
Don't see your event here? Let us know!
|