Workshop Application (Source Code + Demo)
Posted on 10/9/08 by Felix Geisendörfer
Hey folks,
today is our last day in Raleigh and an lengthy article on the whole experience will show up here tomorrow. In the meantime those who did not participate can already look at the application we built for the workshop. Nate (acl) and Garrett (web services) have some yet uncommitted changes they will upload soon, but other than that the application should be in fairly good shape.
So here are the links:
If you are looking for a good piece of sample CakePHP code written by the core developers, then this app should certainly be worth a look. We are planning to continue working on it in future and possibly hosting it somewhere.
Questions, Comments and other Feedback is more than welcome!
-- Felix Geisendörfer
You can skip to the end and add a comment.
GreyCells: Well, unfortunately Sanitize wasn't used at all. :) However, if you want to see how it is supposed to be used, just ask away.
Hi Tim
Yes, I was hoping the promised updates would show me the way :)
Would love to know your views on when/where/if Sanitize should be used in a standard cake app. I tend to use Sanitize::escape() in the models (unless I know the value is clean) and Sanitize::clean(array(encode=>false)) in the controllers. But therein lies the rub - some models use sanitize, others don't. My lovely fat models tend to be called from a variety of sources, so sometimes I can guarantee the cleanliness of the supplied parameters, sometimes I can not. In that regard, it would seem logical to keep all Sanitize action in the controller, but that goes against the grain of encapsulating all pertinent logic in the model...
We saw that all of you guys were using Macs with Text Mate for the conference/workshop. What local server Apache/Mysql/PHP configuration did you use? Did you use a 3rd party all-in-one application like Mamp or did you install and configure each separately?
Just curious.
For MySQL I use the default distro provided for OSX 10.5, Apache was compiled automagically from MacPorts (http://macports.org/), and I run PHP 5.2.6 and 5.3alpha in parallel, both configured and compiled manually from source (5.2.6 source is the latest stable, 5.3 is a snapshot build). All PHP extensions were installed via Pecl, with the exception of XDebug, which was compiled from source using the latest dev version.
Is that exhaustive enough? ;-)
Felix,
In the workshop demo, how would you go about paginating the tag cloud? I'm running into problems trying to figure out the best way to incorporate custom queries and pagination, and the snippets example would provide a great example of what I'm trying to accomplish.
Basically if you define a custom find with a custom type, how would you paginate that type?
-Daniel
This post is too old. We do not allow comments here anymore in order to fight spam. If you have real feedback or questions for the post, please contact us.
Could this be another example app for the book in the making? It has very good provenance :) I'm especially interested to see if/where/how Sanitize gets used - I struggle sometimes to get a consistent approach (torn between model and controller).