Proyek

Google

Thursday, December 13, 2007

Introduce to Cakephp

Introduction

Welcome to Cake! You're probably checking out this tutorial because you want to learn more about how Cake works. Its our aim to increase productivity and make coding more enjoyable: we hope you'll see this as you dive into the code.

This tutorial will walk you through the creation of a simple blog application. We'll be getting and installing Cake, creating and configuring a database, and creating enough application logic to list, add, edit, and delete blog posts.

Here's what you'll need:

  1. A running web server. We're going to assume you're using Apache, though the instructions for using other servers should be very similar. We might have to play a little with the server configuration, but most folks can get Cake up and running without any configuration at all.

  2. A database server. We're going to be using mySQL in this tutorial. You'll need to know enough about SQL in order to create a database: Cake will be taking the reigns from there.

  3. Basic PHP knowledge. The more object-oriented programming you've done, the better: but fear not if you're a procedural fan.

  4. Finally, you'll need a basic knowledge of the MVC programming pattern. A quick overview can be found in Chapter "Basic Concepts", Section 2: The MVC Pattern. Don't worry: its only a half a page or so.

Let's get started!


Getting Cake

First, let's get a copy of fresh Cake code.

To get a fresh download, visit the CakePHP project at Cakeforge: http://cakeforge.org/projects/cakephp/ and download the stable release.

You can also checkout/export a fresh copy of our trunk code at: https://svn.cakephp.org/repo/trunk/cake/1.x.x.x/

Regardless of how you downloaded it, place the code inside of your DocumentRoot. Once finished, your directory setup should look something like the following:

/path_to_document_root
/app
/cake
/vendors
.htaccess
index.php
VERSION.txt

Now might be a good time to learn a bit about how Cake's directory structure works: check out Chapter "Basic Concepts"

From : http://cakephp.org

No comments: