How start with cakePHP
Hi,
I am new to cakePHP. I have configured cakePHP. I want to know how to start building website using it. One application that I saw that was in cook book, made me put my view file in app folder of chakePHP., Do I need to put my index page in that folder?? then I would be using URL rewriting, so that when a user types www.mydomainname.com then it would redirected to my index page.
Please help me out in this one.
regards
Sumit
Asked by Sumit, on 9/2/10
1 Answer
Best place to start is as you mentioned, the cookbook
http://book.cakephp.org/view/4/Beginning-With-CakePHP
Also you might want to check out pseudocoder's tutorials (> a year old but still good):
http://www.pseudocoder.com/archives/2008/02/10/cakephp-tutorials/'
To specifically answer your questions cakePHP uses the URL rewriting so that /app/webroot is now you root folder. So any images and css and javascript files can go there and be accessed from there. Thus, www.mydomain.com/ is actually going to be rewritten to point to www.mydomain.com/app/webroot/index.php - but the user will not see this.
CakePHP uses a design pattern called "Model View Controller" to separate your home page from the "glue" that connects the page to the actually data (Model). Thus you homepage is actually a page in app/views/pages/ called "home.ctp". This is handled through a "Route" which is a way of telling cakephp to point passedin URLs to specific actions.
It might be confusing at first but work through the tutorials, read the cookbook and you'll get the hang of it.
Answered by davidwuon 9/2/10
Your Answer
You can use Creole Wiki Syntax to format your text.
Tagged with
Rating
0
Viewed
348 times
Last Activity
on 9/2/10