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

How to Practice Coding Online: Tools and Demos

  If you are learning to code, you need two things: Good Logic and Right Tools . Many people read tutorials but forget to practice. Today, I will share some amazing tools that will help you learn faster. 1. Practice SQL without Installing Software Usually, to learn SQL, you have to install heavy software. But now you can do it online. On thetechinfo.net , there is a Live SQL Playground . You can write queries like: SELECT * FROM users WHERE status = 'active'; It is a great tool for beginners who want to see a Live Demo of how databases work. 2. PHP and String Logic Tools When preparing for interviews, you must practice string problems. For example, checking a Palindrome or Reversing a String . Example: To reverse 'Hello', you can use a simple loop in PHP. Demo: You can find step-by-step logic and code examples on thetechinfo.net to solve these problems easily. 3. Real-World Project Roadmap If you know the basics, you should build a project. A Multi-User Task Mana...

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 ...

iPhone SE 5G launched with A15 Bionic chip

iPhone SE 5G launched with A15 Bionic chip: Here’s all you need to know Apple today announced the Apple iPhone SE 5G at the Apple Peak Performance Spring 2022 event. The new iPhone SE 5G edition succeeds the older iPhone SE 2020 and comes with some much-needed upgrades. Here’s all you need to know about the iPhone SE 5G, including price, specifications, new features and availability detail iPhone SE 5G: What’s new? The iPhone SE 5G comes with largely the same design elements from the older iPhone SE 2020. This includes a 4.7-inch Retina HD display with reinforced glass on the front and back, the same protective glass that is also found on the iPhone 13 series. The iPhone SE 5G is also powered by the Apple A15 Bionic chip, which is 5G enabled. The A15 Bionic chip is the same chipset that was used in the Apple iPhone 13 series. This brings a few new powerful additions to the SE series. This includes a 6-core CPU, a 4-core GPU and a 16-core Neural Engine that enables features like Live Te...