Skip to main content

How to start learn cake PHP framework



Here i will explain how to start learn cake framework. (version 2.0)
Cake php is open source web framework.It follows the model–view–controller approach and is written in PHP.
CONTROLLER: Controllers handle requests and help co-ordinate and prepare responses for the client. VIEW: Views are the presentation layer in CakePHP. They convert the data fetched from Models into the output format requested by the client. MODEL: Models are the heart of your application. They handle the validation, storage and retrieval of your data.









Important Points to be know before start work on cake framework.
  1. CakePHP Conventions -> Controller Conventions -> Model and Database Conventions -> View Conventions -> File and Class Name Conventions The Controller class KissesAndHugsController would be found in a file named KissesAndHugsController.php The Component class MyHandyComponent would be found in a file named MyHandyComponent.php The Model class OptionValue would be found in a file named OptionValue.php The Behavior class EspeciallyFunkableBehavior would be found in a file named EspeciallyFunkableBehavior.php The View class SuperSimpleView would be found in a file named SuperSimpleView.php The Helper class BestEverHelper would be found in a file named BestEverHelper.php
  2. Helpers ->Helpers are the component-like classes for the presentation layer of your application. CacheHelper, FlashHelper, FormHelper, HtmlHelper, JsHelper, NumberHelper, PaginatorHelper, RssHelper, SessionHelper, TextHelper, TimeHelper
  3. Elements Many applications have small blocks of presentation code that need to be repeated from page to page, sometimes in different places in the layout. CakePHP can help you repeat parts of your website that need to be reused. These reusable parts are called Elements. Ads, help boxes, navigational controls, extra menus, login forms, and callouts are often implemented in CakePHP as elements. An element is basically a mini-view that can be included in other views, in layouts, and even within other elements. Elements can be used to make a view more readable, placing the rendering of repeating elements in its own file. They can also help you re-use content fragments in your application.
  4. Scaffolding Application scaffolding is a technique that allows a developer to define and create a basic application that can create, retrieve, update and delete objects. Scaffolding in CakePHP also allows developers to define how objects are related to each other, and to create and break those links.
  5. Folder Struture.
1.bin folder => The bin folder holds the cake console executables. 2. The config folder holds the configuration files cakePHP uses. Database connection details, core configuration files. 3.The plugin folder is where the plugins your application uses are stored. 4.The logs folder normally contains your logs files, depending on your log configuration. 5.The src folder will be where your applications source files will be placed. 6.Test folder will be where you put the test cases for your application. 7.The tmp folder is where cakephp store temporary date. 8.The vendor folder is where cakphp and other application dependencies will be installed by composer. Editing these files is not advised,as composer will overwrite your changes next time you update. 9.webroot directory is the public document root of your application. it contains all the files you want to be publicly reachable.
The src folder cake php src folder is where you will do most of your application development.
closer at the folder inside src.
1.controller
  contains your application's controllers and their components
2.Locale
  Stores string files for internationalization.
3.Model 
  contains your applications tables, entities and behaviours.
4.Shell
  contains the console command and console tasks for your application. 
5.view
  Presentational classes are placed here: view, cells, helpers.
6.Template
  Presentational files are places here:
  elements, error page, layouts, and view template files

Comments

Popular posts from this blog

Google Ads

 Google Ads Google Ads is one of the most popular advertising platforms in the world. It's a pay-per-click advertising platform that allows businesses of all sizes to reach their target audience and generate leads and sales. In this blog, we will discuss what Google Ads is, how it works, and the benefits it offers to businesses. What is Google Ads? Google Ads is an online advertising platform that allows businesses to create and display ads on Google's search engine results pages (SERPs) and on other websites that are part of the Google Display Network. Advertisers can target specific audiences, locations, and keywords to ensure their ads are shown to the right people at the right time. How does Google Ads work? Google Ads works on a pay-per-click (PPC) model, which means that advertisers only pay when someone clicks on their ad. Advertisers bid on keywords and phrases that are relevant to their business, and Google uses a complex algorithm to determine which ads are shown and ...

Artificial Intelligence

Artificial Intelligence  Artificial Intelligence: The Future is Here Artificial Intelligence (AI) has been a buzzword in the tech industry for several years now, and for a good reason. It is a field of computer science that deals with the creation of intelligent machines that can think, learn, and act like humans. AI has the potential to revolutionize the way we live and work, and it is already making significant strides in several areas. In this article, we will explore what AI is, how it works, and its impact on various industries. What is Artificial Intelligence? Artificial Intelligence is the ability of machines to perform tasks that usually require human intelligence. It involves the creation of intelligent machines that can perceive their environment, reason, learn, and act accordingly. AI can be broadly classified into two categories: Narrow or Weak AI and General or Strong AI. Narrow or Weak AI refers to machines that are designed for a specific task, such as playing chess ...