Suche senden
Hochladen
Phalcon
•
0 gefällt mir
•
91 views
J
Jyotisankar Pradhan
Folgen
Phalcon
Weniger lesen
Mehr lesen
Technologie
Melden
Teilen
Melden
Teilen
1 von 29
Jetzt herunterladen
Downloaden Sie, um offline zu lesen
Recomendados
Setting advanced PHP development environment
Setting advanced PHP development environment
Kapil Sharma
Php phalcon - Another approach to develop website - Techcamp Saigon 2014
Php phalcon - Another approach to develop website - Techcamp Saigon 2014
Minh Quang Trần
PHP Conference - Phalcon hands-on
PHP Conference - Phalcon hands-on
Jackson F. de A. Mafra
Php Conference Brazil - Phalcon Giant Killer
Php Conference Brazil - Phalcon Giant Killer
Jackson F. de A. Mafra
Phalcon - Giant Killer
Phalcon - Giant Killer
Jackson F. de A. Mafra
Phalcon 2 - PHP Brazil Conference
Phalcon 2 - PHP Brazil Conference
Jackson F. de A. Mafra
معرفی و ساخت یک فریمورک شخصی به کمک لاراول
معرفی و ساخت یک فریمورک شخصی به کمک لاراول
جشنوارهٔ روز آزادی نرمافزار تهران
Maven 3 New Features
Maven 3 New Features
Stefan Scheidt
Más contenido relacionado
Was ist angesagt?
Red5 Open Source Flash Server
Red5 Open Source Flash Server
Sunil Swain
Php framework at BarCampPP
Php framework at BarCampPP
psophy
LWC Local development
LWC Local development
Om Prakash
Howto: Install openQRM 5.1 on Debian Wheezy
Howto: Install openQRM 5.1 on Debian Wheezy
openQRM Enterprise GmbH
How to configure PHP with IIS or Apache on Windows
How to configure PHP with IIS or Apache on Windows
Rizban Ahmad
Implementing alfresco as a content platform with zaizi
Implementing alfresco as a content platform with zaizi
Alfresco Software
CodeShip
CodeShip
Bryan Reinbolt
Upgrading to php 5.6
Upgrading to php 5.6
Luka Skupnjak
Python Programming Essentials - M2 - Introduction to Python
Python Programming Essentials - M2 - Introduction to Python
P3 InfoTech Solutions Pvt. Ltd.
[Part 1] automation of home appliances using raspberry pi – software installa...
[Part 1] automation of home appliances using raspberry pi – software installa...
Azilen Technologies Pvt. Ltd.
Python Programming Essentials - M29 - Python Interpreter and Files
Python Programming Essentials - M29 - Python Interpreter and Files
P3 InfoTech Solutions Pvt. Ltd.
SimpleTestによるPHPのテスト
SimpleTestによるPHPのテスト
gutskun
Cenário atual do PHP e Introdução ao Laravel no Devinvale 2014
Cenário atual do PHP e Introdução ao Laravel no Devinvale 2014
Julio Bitencourt
.Net framework 4.5 on raspberry pi
.Net framework 4.5 on raspberry pi
Nguyen Huu Thien An
Simplifying RCP Update and Install
Simplifying RCP Update and Install
susanfmccourt
[Perforce] Perforce the Plentiful Platform
[Perforce] Perforce the Plentiful Platform
Perforce
Eclipse plug in mylyn & tasktop
Eclipse plug in mylyn & tasktop
Roger Xia
What's new in PHP 7.4
What's new in PHP 7.4
Andrea Maccis
Python Programming Essentials - M1 - Course Introduction
Python Programming Essentials - M1 - Course Introduction
P3 InfoTech Solutions Pvt. Ltd.
PHP Dependency Management with Composer
PHP Dependency Management with Composer
Adam Englander
Was ist angesagt?
(20)
Red5 Open Source Flash Server
Red5 Open Source Flash Server
Php framework at BarCampPP
Php framework at BarCampPP
LWC Local development
LWC Local development
Howto: Install openQRM 5.1 on Debian Wheezy
Howto: Install openQRM 5.1 on Debian Wheezy
How to configure PHP with IIS or Apache on Windows
How to configure PHP with IIS or Apache on Windows
Implementing alfresco as a content platform with zaizi
Implementing alfresco as a content platform with zaizi
CodeShip
CodeShip
Upgrading to php 5.6
Upgrading to php 5.6
Python Programming Essentials - M2 - Introduction to Python
Python Programming Essentials - M2 - Introduction to Python
[Part 1] automation of home appliances using raspberry pi – software installa...
[Part 1] automation of home appliances using raspberry pi – software installa...
Python Programming Essentials - M29 - Python Interpreter and Files
Python Programming Essentials - M29 - Python Interpreter and Files
SimpleTestによるPHPのテスト
SimpleTestによるPHPのテスト
Cenário atual do PHP e Introdução ao Laravel no Devinvale 2014
Cenário atual do PHP e Introdução ao Laravel no Devinvale 2014
.Net framework 4.5 on raspberry pi
.Net framework 4.5 on raspberry pi
Simplifying RCP Update and Install
Simplifying RCP Update and Install
[Perforce] Perforce the Plentiful Platform
[Perforce] Perforce the Plentiful Platform
Eclipse plug in mylyn & tasktop
Eclipse plug in mylyn & tasktop
What's new in PHP 7.4
What's new in PHP 7.4
Python Programming Essentials - M1 - Course Introduction
Python Programming Essentials - M1 - Course Introduction
PHP Dependency Management with Composer
PHP Dependency Management with Composer
Ähnlich wie Phalcon
Updating_PHP_on_OS_X_Server
Updating_PHP_on_OS_X_Server
tutorialsruby
Updating_PHP_on_OS_X_Server
Updating_PHP_on_OS_X_Server
tutorialsruby
<img src="../i/r_14.png" />
<img src="../i/r_14.png" />
tutorialsruby
PHP on Google App Engine
PHP on Google App Engine
tim4h0blyn
Laravel 4 package development
Laravel 4 package development
Tihomir Opačić
Perl
Perl
Raghu nath
Paragon New and Old Comparassion
Paragon New and Old Comparassion
Mark Flavin
Php ppt
Php ppt
Sanmuga Nathan
OpenFOAM 2.4.0 installation on CentOS-7
OpenFOAM 2.4.0 installation on CentOS-7
Guy Tel-Zur
Running Symfony
Running Symfony
Wildan Maulana
Dockerfish-Tutorial
Dockerfish-Tutorial
Brian Hood
Laravel intallation
Laravel intallation
sandhya kumari
Behavior & Specification Driven Development in PHP - #OpenWest
Behavior & Specification Driven Development in PHP - #OpenWest
Joshua Warren
LIGGGHTS installation-guide
LIGGGHTS installation-guide
Braj Bhushan Prasad
Phalcon / Zephir Introduction at PHPConfTW2013
Phalcon / Zephir Introduction at PHPConfTW2013
Rack Lin
Perlbrew
Perlbrew
Kang-min Liu
Installing Lamp Stack on Ubuntu Instance
Installing Lamp Stack on Ubuntu Instance
kamarul kawnayeen
Php through the eyes of a hoster confoo
Php through the eyes of a hoster confoo
Combell NV
Its3 Drupal
Its3 Drupal
guest954945a
All the Laravel things: up and running to making $$
All the Laravel things: up and running to making $$
Joe Ferguson
Ähnlich wie Phalcon
(20)
Updating_PHP_on_OS_X_Server
Updating_PHP_on_OS_X_Server
Updating_PHP_on_OS_X_Server
Updating_PHP_on_OS_X_Server
<img src="../i/r_14.png" />
<img src="../i/r_14.png" />
PHP on Google App Engine
PHP on Google App Engine
Laravel 4 package development
Laravel 4 package development
Perl
Perl
Paragon New and Old Comparassion
Paragon New and Old Comparassion
Php ppt
Php ppt
OpenFOAM 2.4.0 installation on CentOS-7
OpenFOAM 2.4.0 installation on CentOS-7
Running Symfony
Running Symfony
Dockerfish-Tutorial
Dockerfish-Tutorial
Laravel intallation
Laravel intallation
Behavior & Specification Driven Development in PHP - #OpenWest
Behavior & Specification Driven Development in PHP - #OpenWest
LIGGGHTS installation-guide
LIGGGHTS installation-guide
Phalcon / Zephir Introduction at PHPConfTW2013
Phalcon / Zephir Introduction at PHPConfTW2013
Perlbrew
Perlbrew
Installing Lamp Stack on Ubuntu Instance
Installing Lamp Stack on Ubuntu Instance
Php through the eyes of a hoster confoo
Php through the eyes of a hoster confoo
Its3 Drupal
Its3 Drupal
All the Laravel things: up and running to making $$
All the Laravel things: up and running to making $$
Último
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
xtailishbaloch
Patch notes explaining DISARM Version 1.4 update
Patch notes explaining DISARM Version 1.4 update
adam112203
SheDev 2024
SheDev 2024
GDSC PJATK
20140402 - Smart house demo kit
20140402 - Smart house demo kit
Jamie (Taka) Wang
Graphene Quantum Dots-Based Composites for Biomedical Applications
Graphene Quantum Dots-Based Composites for Biomedical Applications
nooralam814309
CyberSecurity - Computers In Libraries 2024
CyberSecurity - Computers In Libraries 2024
Brian Pichman
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
Tejal81
Introduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its application
Knoldus Inc.
UiPath Studio Web workshop series - Day 1
UiPath Studio Web workshop series - Day 1
DianaGray10
EMEA What is ThousandEyes? Webinar
EMEA What is ThousandEyes? Webinar
ThousandEyes
Stobox 4: Revolutionizing Investment in Real-World Assets Through Tokenization
Stobox 4: Revolutionizing Investment in Real-World Assets Through Tokenization
Stobox
3 Pitfalls Everyone Should Avoid with Cloud Data
3 Pitfalls Everyone Should Avoid with Cloud Data
Eric D. Schabell
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)
codyslingerland1
How to release an Open Source Dataweave Library
How to release an Open Source Dataweave Library
shyamraj55
.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptx
Hansamali Gamage
Emil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptx
Emil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptx
Neo4j
Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...
DianaGray10
Automation Ops Series: Session 2 - Governance for UiPath projects
Automation Ops Series: Session 2 - Governance for UiPath projects
DianaGray10
Planetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl
Último
(20)
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
SIM INFORMATION SYSTEM: REVOLUTIONIZING DATA MANAGEMENT
Patch notes explaining DISARM Version 1.4 update
Patch notes explaining DISARM Version 1.4 update
SheDev 2024
SheDev 2024
20140402 - Smart house demo kit
20140402 - Smart house demo kit
Graphene Quantum Dots-Based Composites for Biomedical Applications
Graphene Quantum Dots-Based Composites for Biomedical Applications
CyberSecurity - Computers In Libraries 2024
CyberSecurity - Computers In Libraries 2024
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
Q4 2023 Quarterly Investor Presentation - FINAL - v1.pdf
Introduction to RAG (Retrieval Augmented Generation) and its application
Introduction to RAG (Retrieval Augmented Generation) and its application
UiPath Studio Web workshop series - Day 1
UiPath Studio Web workshop series - Day 1
EMEA What is ThousandEyes? Webinar
EMEA What is ThousandEyes? Webinar
Stobox 4: Revolutionizing Investment in Real-World Assets Through Tokenization
Stobox 4: Revolutionizing Investment in Real-World Assets Through Tokenization
3 Pitfalls Everyone Should Avoid with Cloud Data
3 Pitfalls Everyone Should Avoid with Cloud Data
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
The New Cloud World Order Is FinOps (Slideshow)
The New Cloud World Order Is FinOps (Slideshow)
How to release an Open Source Dataweave Library
How to release an Open Source Dataweave Library
.NET 8 ChatBot with Azure OpenAI Services.pptx
.NET 8 ChatBot with Azure OpenAI Services.pptx
Emil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptx
Emil Eifrem at GraphSummit Copenhagen 2024 - The Art of the Possible.pptx
Explore the UiPath Community and ways you can benefit on your journey to auto...
Explore the UiPath Community and ways you can benefit on your journey to auto...
Automation Ops Series: Session 2 - Governance for UiPath projects
Automation Ops Series: Session 2 - Governance for UiPath projects
Planetek Italia Srl - Corporate Profile Brochure
Planetek Italia Srl - Corporate Profile Brochure
Phalcon
1.
What/Why Phalcon Phalcon is a PHP framework written as C extension. These days the use of framework is mandatory in professional development with PHP. Phalcon is not only famous for performance but also for robust ness and easy to use.
2.
Installation Official Website : http://phalconphp.com/en/download It is highly recommended to use PHP 5.3.6 or greater to use phalcon. Refer the steps below to install phalcon in ubuntu. sudo aptaddrepository ppa:phalcon/stable sudo aptget update sudo aptget install php5phalcon If you are missing aptaddrepository use : sudo aptget install pythonsoftware properties
3.
Compilation sudo aptget install php5dev php5mysql gcc libpcre3dev git clone depth=1 git://github.com/phalcon/cphalcon.git cd cphalcon/build sudo ./install Now its time to add extension in php.ini => extension=phalcon.so Now restart webserver
4.
Its all done, try to run “phalcon” in your terminal. If it works you are done, else you need to execute following commands to set the priority of phalcon. echo 'extension=phalcon.so' | sudo tee a /etc/php5/modsavailable/phalcon.ini sudo ln s T ../mods available/phalcon.ini /etc/php5/conf.d/20phalcon.ini
5.
Start karen?? phalcon createproject store Once you are done you can see a message in your terminal like the image shown below.
6.
Code structure
7.
Click the trigger All command you should run inside the root directory of your project. 1. create a controller => phalcon create controller name user 2. createa model (You should have a table called users) => phalcon model users 3. Scaffold (Quick way to create model, view and controller) a CRUD => phalcon scaffold tablename users
8.
Created files var/www/store/app/config/../../app/control lers/UsersController.php var/www/store/app/config/../../app/views// layouts/users.phtml var/www/store/app/config/../../app/views/u sers/index.phtml var/www/store/app/config/../../app/views/u sers/search.phtml var/www/store/app/config/../../app/views/u sers/new.phtml var/www/store/app/config/../../app/views/u
9.
urls 1. http://localhost/store/users/ 2. http://localhost/store/users/new 3. http://localhost/store/users/edit/2 Add/Edit/Search/Delete operation of users.
10.
Model Relationship Method Description hasMany Defines a 1n hasOne
Defines a 11 belongsTo Defines a n1 hasManyToMany Defines a nn
11.
Example CREATE TABLE `robots` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(70) NOT NULL, `type` varchar(32) NOT NULL, `year` int(11) NOT NULL, PRIMARY KEY (`id`) );
12.
CREATE TABLE `robots_parts` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `robots_id` int(10) NOT NULL, `parts_id` int(10) NOT NULL, `created_at` DATE NOT NULL, PRIMARY KEY (`id`), KEY `robots_id` (`robots_id`), KEY `parts_id` (`parts_id`) );
13.
CREATE TABLE `parts` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(70) NOT NULL, PRIMARY KEY (`id`) );
14.
The model Robots has many RobotsParts The model Parts has many RobotsParts The model RobotsParts belongs to both Robots and Parts models as a manytoone relation. The model Robots has a relation manyto many to Parts through RobotsParts
15.
class Robots extends PhalconMvcModel { public $id; public $name; public function initialize() { $this>hasMany("id", "RobotsParts", "robots_id"); }
16.
class Parts extends PhalconMvcModel { public $id; public $name; public function initialize() { $this>hasMany("id", "RobotsParts", "parts_id"); }
17.
class RobotsParts extends PhalconMvcModel { public $id; public $robots_id; public $parts_id; public function initialize() { $this>belongsTo("robots_id", "Robots", "id");
18.
What is the advantage of creating this models If we define the relationships between models, it is easy to find related records for a particular record. Example : $robot = Robots::findFirst(2); foreach ($robot>robotsParts as $robotPart) { echo $robotPart>parts>name, "n"; }
19.
Model Models can be implemented with properties of public scope, meaning that each property can be read/updated from any part of the code that has instantiated that model class without any restrictions:
20.
Model class Robots extends PhalconMvcModel { protected $id; protected $name; protected $price; public function getId() { return $this>id; }
21.
Model By using getters and setters you can control which properties are visible publicly perform various transformations to the data (which would be impossible otherwise) and also add validation rules to the data stored in the object
22.
Model (validation) use PhalconMvcModelValidatorEmail as Email; use PhalconMvcModelValidatorPresenceOf; use PhalconMvcModelValidatorUniqueness as Uniqueness; public function validation() { $this>validate(new Uniqueness(array( 'field' => 'email_id',
23.
Model (validation) $this>validate(new PresenceOf( array( 'field' => 'password',
'message' => 'Password is required.', 'required' => true, ) )); CancelOnFail – true (The first validator has the option ‘cancelOnFail’ with a
24.
Model BeforeValidation afterValidation BeforeSave – Password hashing AfterSave To perform additional checks, filters, cleanup, etc. If ‘beforeValidation’ method returns false the validation is automatically cancelled
25.
Views / Templating Main Layout – app/views/index.phtml This is main action it will be shown for every controller or action executed within the application. Controller Layout – app/views/layouts/posts.phtml This is the view related to the controller. It only will be shown for every action executed within the controller “posts”.
26.
Views / Templating Passing array or variable from controller to view : $this>view>result = 'abc'; Disable the view $this>view>disable(); Render different views : echo $this>view >render('posts/show');
27.
Performance The testing hardware environment is as follows: Operating System: Mac OS X Lion 10.7.4 Web Server: Apache httpd 2.2.22 PHP: 5.3.15 CPU: 2.04 Ghz Intel Core i5 Main Memory: 4GB 1333 MHz DDR3 Hard Drive: 500GB SATA Disk
28.
Something More ?? or Lets ...Stop :) 1. ACL (Access Control) 2. Hydration Modes 3. Events Manager 4. Avoiding SQL injections
29.
Performance
Jetzt herunterladen