WHAT IS CAKE & WHY? • Architecture for developing, maintaining, and deploying
applications. • Free & Open Source. • Rapid Development Frame Work Based Around MVC
Methodology. • Templating, Helpers, Components. In short reusable code! • Built in Email, Cookie, Security, Session & Request Handling
Components. • Caching.
CAKEPHP 3.4 RED VELVET
• CakePHP 3 is a web development framework running on PHP 7.1 (min. PHP 5.6.0).
BASIC FEATURES
• Model, View, Controller Architecture • Application Scaffolding • Code generation via Bake • Helpers for HTML, Forms, Pagination, AJAX,
Javascript, XML, RSS and more • Access Control Lists and Authentication • Simple yet extensive validation of model data
BASIC FEATURES CONT. • Router for mapping urls and handling extensions • Security, Session, and RequestHandler
Components • Utility classes for working with Files, Folders,
Arrays and more
MODLE VIEW CONTROLLER
• Model View Controller design patter is based upon separating your code into three sections. – The Model represents the application data. – The View renders a presentation of the model
data. – The Controller handles & routes requests
made by the client.
BASIC PRINCIPLES OF CAKEPHP
• Conventions • Extensions
– Controller Extensions - Components – View Extensions - Helpers – Model Extensions - Behaviors – CSS/HTML - Elements
REQUIREMENTS
• HTTP Server. For example: Apache. Having mod_rewrite is preferred, but by no means required.
• PHP 5.6.0 or greater (including PHP 7.1). • mbstring PHP extension • intl PHP extension
REQUIREMENTS CakePHP supports a variety of database storage engines: • MySQL (5.1.10 or greater) • PostgreSQL • Microsoft SQL Server (2008 or higher) • SQLite 3
INSTALLATION • CHECK PHP VERSION (php -v)(PHP 5.6 or
greater) • INSTALL COMPOSER / OVEN • CREATE PHP PROJECT (php composer.phar create-project --prefer-dist cakephp/app my_app_name) • PERMISSIONS
PERMISSIONS CakePHP uses the tmp directory for a number of different operations. Model descriptions, cached views, and session information are a few examples. The logs directory is used to write log files by the default FileLog engine. One common issue is that logs and tmp directories and subdirectories must be writable both by the web server and the command line user. (chmod –R 777)
FYI 99.9% of issues that you’ll come across will be related to file permissions
CREATE DATABASE CREATE TABLE users ( id INT AUTO_INCREMENT PRIMARY KEY,
email VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NULL, created DATETIME,
modified DATETIME
);
CONNECT WITH ME @balambi [email protected] urls: www.balambico.co www.wpbico.com