Welcome
About This Site
Purpose
A demonstration of building a cakephp application based on cakephp version 1.3, and a journal of some of the things I learned.
Don't expect much
I am just a a novice learning cakePHP. Programming is just an interesting pastime unrelated to my real life. So don't expect too much out of this code. I think my audience is people like me and not professional programmers! I hope my notes will be helpful for you to learn more about cakePHP. My goal was to write enough code to understand how all the pieces fit together, and to have reusable pieces that I can use in a completely different application when I become a little smarter.
Much of the this application is pieced together from existing resources shared on the net by the multitude of cakePHP bloggers and friendly sites sharing their ideas on the internet. Sometimes I don't understand what I found, but I use it anyway trying to learn and understand rather than reinvent or try it my own way.
Study all Available Resources
Don't forget to search the Google cakePHP group and absolutely read the manual for cakePHP version 1.3
Overview of the sample app
My sample application here is essentially like a blog, but many of the pieces are unfinished. So we have three main conetnt types: "Posts" , "Recipes", and "Files". Each of these content can have comments and tags. File Images can be used inside the Posts. There are user permissions so that only registered users can comment or add/edit content. And there is a site admin who is permitted to manage users, tags, and comments.
What I wanted to learn
So this is what I wanted to learn, and mostly achieved. Hopefully the rest of the journal will show you how I did that.
Have an application with multiple models and using cakePHP relationships.
- Learn enough about the Forms and CRUD for different types of relationships
- Recipes: START HERE!! This is the model I started the application with and then added Posts and Resources later. So why not read this first and start where I started my baking.
- Posts: Just a standard Post model. The page you are reading is a Post
- Resources: A model to manage uploaded files and store information for each upload. The resources should be available for use in the other parts of the application (Posts and Recipes).
- I wanted all models to be able to be TAGGED, so I have a TAG model
- I wanted all models to be able to have COMMENTS, so I have a comment model
- Of course I wanted a User System and have a standard USER model.
Have a User system based on cakephp AUTH
- Users Can Register and login
- Registration includes an email verification
- Method to reset a lost password
- Method to change your username or password or other details.
- Ability to control access to non-user and user and site admin
Learn how to properly do Admin Routing
- Implemented for users, comments, and tags
Learn how to Upload Files
- Found and used a BEHAVIOR to do this
Learn how to use basic JavaScript
- Screen Effects
- Syntax Code Highlighting
- Link Callbacks
Learn how to use jQuery and Ajax
- You can add tags using Ajax
- Pagination is done using Ajax
- Comment System uses Ajax
- Resources display in Modal Popups
Learn how to use PLUGINS
- TAGS are a Plugin
- USERS are a Plugin
- COMMENTS are a Plugin
- UPLOADS are a Plugin
Learn how to Make Components and Behaviors
- The plugins I used included both components and behaviors. I didn't write my own (not smart enough yet), but I got a good idea how to use them, and tweak them a little bit.
- Understand when to use component and when to use behavior

Learn to make a Helper for Content Creation.
- Use a helper to use phpMarkdown Syntax for all the posts.
- Include code syntax highlighting in a post
- Include images and file links in a post. This was the hardest part! I extended the vendor to include use of my Resource Model and some other syntax that I liked.
Learn how to use Request Action
- On the home page to show this post permanently
- In the comment System
- Still have to learn how to use cache
Learn about Layouts
- How to use view vars in the layouts
- Email Layouts
- Ajax Layouts
Learn how to make custom configurations for my application
- database config to switch between development and production
- Using the bootstrap
- Using the config class
Styles, CSS, Templates
To focus on the goals above, I didn't want to be distracted by the site styling, CSS, and themes. So what you see is basically the default cake CSS with very minor changes, and the typical default scaffolding views.
I think forceing myself to stick with the default views and CSS made me more organized and efficient at learning cakePHP.
Downloads
I don't git, svn, or other things yet. I have zipped up this whole application and the SQL export as well. It includes all these documentation posts and images and comments as you see on the site.
Latest Activity
Here should be the stream of latest activity
- New comment added to Joe Smith's video RickyBob Jumps BigRed.mpg
- Joe Smith created the album Jake Bike Jumping
- Joe Smith added the event Del Ferro Family Mass
- Judy Smith joined this group
- Jean Smith started the discussion Thanks John for doing all this
