SlideShare a Scribd company logo
3
Most read
4
Most read
10
Most read
Yii2
Framework
For Beginners
Yii2
Intro
Yii (Yes, it is) is a fast, secure, and efficient PHP framework developed in 1st
January 2008 by Qiang Xue
Key benefits:
Used base on DRY(Don’t Repeat Yourself) principle
Object Oriented Framework
Component-base Framework
Build on PHP5
Clearly documented
Features of Yii – 1st part
• MVC
• Database Access Objects(DAO), Query Builder,Active Record
• Form Input and Validation
• Ajax – enabled widgets
• Authentication and Authorization
• Skinning and Theming
• Web Services
• Detailed documentation
Features of Yii – 2nd part
• Internalization (I18N) and localization(L10N)
• Layered caching scheme
• Error handling and logging
• Security
• Unit and Functional testing
• Automatic code generation
• Friendly with third-party code
• Extension Library
Why Yii2 Framework
Usage: Yii vs Laravel
Yii2
Model View Controller (MVC)
Model View Controller (MVC)
in Yii2
• is a tool that allows you query database table and manipulate data from a
database using an object paradigm (Object Oriented). ORM is library
which helps you in query the data using functions so that PHP developer
do not have to write database query manually.
ORM(Object-Relational Mapping)
Active Record
ActiveRecord is the base class for
classes representing relational data in
terms of objects.
Active Record(AR( is popular ORM
technique. Each AR class = to database
table.
Role-Based Access Control(RBAC) in Yii
Role-Based Access Control(RBAC) in Yii
Error Handling
Log Messages
• Recording log messages is as simple as calling one of the following
logging methods:
• Yii::debug(): record a message to trace how a piece of code runs. This is
mainly for development use.
• Yii::info(): record a message that conveys some useful information.
• Yii::warning(): record a warning message that indicates something
unexpected has happened.
• Yii::error(): record a fatal error that should be investigated as soon as
possible.
Caching
Redis + PHP
Design Patterns
• Abstract Factory, Factory Method, Builder, Adapter, Composite, Decorator,
Facade, Proxy, Flyweight, Chain of responsibility, Command, Iterator,
Observer, State, Strategy, Template method, Dependency Injection,
Repository,
Test Driven Development(TDD)
tests/app.php – file to run tests
tests/_bootstrap.php – possible move default logic from
app.php to this file
Resourses
• https://www.yiiframework.com/
• https://yiiframework.com.ua/uk/
• https://www.slideshare.net/ZakiehAlizadeh/presentati
on1-23704273
• https://www.nixsolutions.com/blog/comparative-
testing-php-frameworks/
• https://www.esparkinfo.com/laravel-vs-yii.html
• https://keyua.org/blog/laravel-vs-yii-comparison/
• https://geekflare.com/laravel-optimization/
• https://php.zone/oop-v-php-prodvinutyj-kurs/object-
relational-mapping-orm-v-php
• https://www.slideshare.net/naincygupta35574/introdu
ction-to-yii-framework
• https://gbksoft.com/blog/yii2-php-framework/
Core Source
Core Source
• https://www.youtube.com/watch?v=w
huIf33v2Ug
• https://www.freecodecamp.org/news/t
ag/yii2/
Presentation by
• Andrii Lagovskyi
• lagovskiy@gmail.com

More Related Content

PPTX
Virtual Memory Management
PDF
Operating system structures
PPTX
Operating system deign and implementation
PPT
Kernel mode vs user mode in linux
PDF
Chap 8. Optimization for training deep models
PPTX
Linux commands
PPTX
Physical symbol system
PPTX
Memory management ppt
Virtual Memory Management
Operating system structures
Operating system deign and implementation
Kernel mode vs user mode in linux
Chap 8. Optimization for training deep models
Linux commands
Physical symbol system
Memory management ppt

What's hot (20)

PDF
ITFT_File system interface in Operating System
PPT
Thrashing allocation frames.43
PPTX
Methods for handling deadlock
PPTX
Semophores and it's types
ODP
Memory management in Linux
PPTX
Case study operating systems
PPTX
Chapter 10 Operating Systems silberschatz
PDF
Course 102: Lecture 22: Package Management
PPTX
OS Migration
PPTX
Kernel module in linux os.
PPT
Peterson Critical Section Problem Solution
PPT
Chapter 12 - Mass Storage Systems
PPT
Heuristc Search Techniques
PPT
Unit 7
PPT
Heuristic Search Techniques {Artificial Intelligence}
PPTX
2. Distributed Systems Hardware & Software concepts
PPT
Load Balancing In Cloud Computing newppt
PDF
First Order Logic resolution
PPTX
Deadlock Detection Algorithm
PDF
Ai lab manual
ITFT_File system interface in Operating System
Thrashing allocation frames.43
Methods for handling deadlock
Semophores and it's types
Memory management in Linux
Case study operating systems
Chapter 10 Operating Systems silberschatz
Course 102: Lecture 22: Package Management
OS Migration
Kernel module in linux os.
Peterson Critical Section Problem Solution
Chapter 12 - Mass Storage Systems
Heuristc Search Techniques
Unit 7
Heuristic Search Techniques {Artificial Intelligence}
2. Distributed Systems Hardware & Software concepts
Load Balancing In Cloud Computing newppt
First Order Logic resolution
Deadlock Detection Algorithm
Ai lab manual
Ad

Similar to Yii2 (20)

PDF
Introduce Yii
PPTX
yii framework
ODP
Yii Framework - Do we really need another php framework?
PDF
Yii, frameworks and where PHP is heading to
PPTX
Yii framework
PPT
Yii framework
PPTX
Introduction to Yii & performance comparison with Drupal
PPTX
PPTX
PDF
Yii Framework Security
ZIP
Fwdtechseminars
PPTX
Yii Development
PPSX
Yii framework
PPTX
PHP framework difference
PPTX
P H P Framework
PDF
Yii vs codeigneiter
PPT
Introduction to YII framework
KEY
Yii Framework
PPTX
Php Web Frameworks
PPT
Yii php framework_honey
Introduce Yii
yii framework
Yii Framework - Do we really need another php framework?
Yii, frameworks and where PHP is heading to
Yii framework
Yii framework
Introduction to Yii & performance comparison with Drupal
Yii Framework Security
Fwdtechseminars
Yii Development
Yii framework
PHP framework difference
P H P Framework
Yii vs codeigneiter
Introduction to YII framework
Yii Framework
Php Web Frameworks
Yii php framework_honey
Ad

Recently uploaded (20)

PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
PPTX
Lesson notes of climatology university.
PDF
Trump Administration's workforce development strategy
PDF
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
PDF
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
PPTX
Orientation - ARALprogram of Deped to the Parents.pptx
PDF
Yogi Goddess Pres Conference Studio Updates
PPTX
History, Philosophy and sociology of education (1).pptx
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
UNIT III MENTAL HEALTH NURSING ASSESSMENT
PPTX
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
PDF
Paper A Mock Exam 9_ Attempt review.pdf.
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PPTX
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PDF
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
PDF
01-Introduction-to-Information-Management.pdf
PPTX
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx
Final Presentation General Medicine 03-08-2024.pptx
A GUIDE TO GENETICS FOR UNDERGRADUATE MEDICAL STUDENTS
Lesson notes of climatology university.
Trump Administration's workforce development strategy
RTP_AR_KS1_Tutor's Guide_English [FOR REPRODUCTION].pdf
ChatGPT for Dummies - Pam Baker Ccesa007.pdf
Orientation - ARALprogram of Deped to the Parents.pptx
Yogi Goddess Pres Conference Studio Updates
History, Philosophy and sociology of education (1).pptx
STATICS OF THE RIGID BODIES Hibbelers.pdf
Microbial disease of the cardiovascular and lymphatic systems
UNIT III MENTAL HEALTH NURSING ASSESSMENT
Introduction-to-Literarature-and-Literary-Studies-week-Prelim-coverage.pptx
Paper A Mock Exam 9_ Attempt review.pdf.
2.FourierTransform-ShortQuestionswithAnswers.pdf
Tissue processing ( HISTOPATHOLOGICAL TECHNIQUE
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
LNK 2025 (2).pdf MWEHEHEHEHEHEHEHEHEHEHE
01-Introduction-to-Information-Management.pdf
Radiologic_Anatomy_of_the_Brachial_plexus [final].pptx

Yii2

  • 3. Intro Yii (Yes, it is) is a fast, secure, and efficient PHP framework developed in 1st January 2008 by Qiang Xue Key benefits: Used base on DRY(Don’t Repeat Yourself) principle Object Oriented Framework Component-base Framework Build on PHP5 Clearly documented
  • 4. Features of Yii – 1st part • MVC • Database Access Objects(DAO), Query Builder,Active Record • Form Input and Validation • Ajax – enabled widgets • Authentication and Authorization • Skinning and Theming • Web Services • Detailed documentation
  • 5. Features of Yii – 2nd part • Internalization (I18N) and localization(L10N) • Layered caching scheme • Error handling and logging • Security • Unit and Functional testing • Automatic code generation • Friendly with third-party code • Extension Library
  • 7. Usage: Yii vs Laravel
  • 10. Model View Controller (MVC) in Yii2
  • 11. • is a tool that allows you query database table and manipulate data from a database using an object paradigm (Object Oriented). ORM is library which helps you in query the data using functions so that PHP developer do not have to write database query manually. ORM(Object-Relational Mapping)
  • 12. Active Record ActiveRecord is the base class for classes representing relational data in terms of objects. Active Record(AR( is popular ORM technique. Each AR class = to database table.
  • 16. Log Messages • Recording log messages is as simple as calling one of the following logging methods: • Yii::debug(): record a message to trace how a piece of code runs. This is mainly for development use. • Yii::info(): record a message that conveys some useful information. • Yii::warning(): record a warning message that indicates something unexpected has happened. • Yii::error(): record a fatal error that should be investigated as soon as possible.
  • 19. Design Patterns • Abstract Factory, Factory Method, Builder, Adapter, Composite, Decorator, Facade, Proxy, Flyweight, Chain of responsibility, Command, Iterator, Observer, State, Strategy, Template method, Dependency Injection, Repository,
  • 20. Test Driven Development(TDD) tests/app.php – file to run tests tests/_bootstrap.php – possible move default logic from app.php to this file
  • 21. Resourses • https://www.yiiframework.com/ • https://yiiframework.com.ua/uk/ • https://www.slideshare.net/ZakiehAlizadeh/presentati on1-23704273 • https://www.nixsolutions.com/blog/comparative- testing-php-frameworks/ • https://www.esparkinfo.com/laravel-vs-yii.html • https://keyua.org/blog/laravel-vs-yii-comparison/ • https://geekflare.com/laravel-optimization/ • https://php.zone/oop-v-php-prodvinutyj-kurs/object- relational-mapping-orm-v-php • https://www.slideshare.net/naincygupta35574/introdu ction-to-yii-framework • https://gbksoft.com/blog/yii2-php-framework/
  • 22. Core Source Core Source • https://www.youtube.com/watch?v=w huIf33v2Ug • https://www.freecodecamp.org/news/t ag/yii2/ Presentation by • Andrii Lagovskyi • [email protected]