current location: Home > Download > Learning resources > Web page production > In-depth understanding of Yii2-0
In-depth understanding of Yii2-0
In-depth understanding of Yii2-0
Classify: Learning materials / Web page production | Release time: 2018-02-02 | visits: 2896200 |
Download: 186 |
More>
Latest Downloads
Red Alert Online
The mobile game "Red Alert Online" is a strategy mobile game developed by Beijing Youai Interactive Entertainment Technology Co., Ltd. The game was officially launched for public beta on January 17, 2019.
"Red Alert Online" is the only authentically authorized Red Alert game in China. It is a new mobile game developed based on the classic PC game "Red Alert".
The game tells the story of Yuri, who attempts to launch a ghost invasion to control the hearts of humans around the world in order to carry out his revenge plan. Players can assume the role of a commander, build their own camp, recruit more subordinates, and work with other players to resist the invasion of ghosts. The game has combat training elements such as heroes, strategies, and chips, and also introduces PVP gameplay such as Tiberium Wars, joint military exercises, and sailing expeditions.
270
2024-11-28
Delta Force
"Delta Force" is a new generation of tactical shooting quality benchmark game developed and operated by Linlangtiantian team. PC and mobile versions will be officially launched in September! Will continue to log in to the host platform in the future. You will transform into a special operations operator, work closely with your teammates, flexibly formulate tactics, complete various seemingly impossible extreme tasks, and gain a rich and exciting combat experience.
796
2024-11-27
Pokémon UNITE
Pokémon UNITE is the first Pokémon series team strategy battle game jointly developed by Tencent Tianmei Studio Group and The Pokémon Company. It is available for Android, iOS and Nintendo Switch.
0
2024-11-26
Fantasy Aquarium
"Fantasy Aquarium" is a fantasy adventure game that allows players to explore the mysterious underwater world. In this imaginative aquarium, players will play the role of an aquarium manager and experience the fun of a fantasy world by managing and caring for various magical creatures. Game features: Diverse creatures: There are various fantasy creatures living in the aquarium, such as mysterious crystal fish, light mermaids, etc. Each creature has a unique appearance and characteristics. Interaction: Players can interact with the creatures in the aquarium, feed, play, and even perform tasks to make the creatures get closer to you. Decoration construction: You can decorate the aquarium according to your own preferences and customize it
0
2024-05-08
Girls Frontline
"Girls' Frontline" is a strategy role-playing game developed by SUNBORN Games. In this future world, humans and robot girls are fighting. You will play the role of a commander and lead a unique army of robot girls in a series of thrilling battles. Game features: A huge camp of robot girls: Collect and train robot girls with different styles and abilities to build your own strongest team. In-depth plot setting: Communicate with the robot girls and gain a deeper understanding of their story backgrounds, providing support and encouragement to them in battle. Exquisite battle graphics: Enjoy gorgeous battle scenes
0
2024-05-06
Wings of Stars
"Star Wings" is a 3D competitive game that perfectly combines mecha girl elements with classic GVG fighting gameplay. In the game, players will control a mecha girl with powerful combat power to engage in fierce 1V1 and 2V2 battles on the exciting battlefield, feeling the unparalleled charm of competition. The game uses high-precision 3D modeling technology to present gorgeous graphics. Each mecha is unique and delicately depicts the mechanical structure full of technology and the graceful figure of the girl, as if it is an animated blockbuster active in the palm of your hand. The beautiful girl pilots each have their own charms, and their different personality traits are revealed through their voices and actions.
521
2024-05-06
Little Flower Fairy Fairy Paradise
"Little Flower Fairy Fairy Paradise" is a casual game full of childlike fun and magic, bringing a wonderful gaming experience to the majority of players. In the game, you will play the role of a little flower fairy and enter the Elf Paradise with other players to embark on an adventure full of surprises. Game features: New magical adventure: Enjoy a new Elf Paradise adventure with more exquisite graphics. Exquisite game graphics: The game uses the latest 3D technology to create beautiful game graphics, giving players a brand new visual shock. Various activities: In the game, players can participate in various activities and obtain a large number of game rewards. rich
0
2024-05-06
Restaurant Cute Story
"Restaurant Cute Story" is a cute restaurant management simulation game. In this game, you will play the role of a young restaurant owner. By operating and managing the restaurant, you will welcome a group of cute customers and create a unique and busy restaurant. Game features: Cute animal customers: There are various cute animal characters as customers in the game. Each animal has its own preferences and needs. You need to provide the most suitable dishes according to their preferences. Customize your restaurant: From decoration to furniture, you can create a unique restaurant according to your own preferences and creativity to attract more customers. Diverse menu: in-game
574
2024-05-05
Shanhe Travel Exploration
"Shanhe Travel Detective" game introduction "Shanhe Travel Detective" is a fascinating storyline with a Chinese-style reasoning and investigation game. This game cleverly combines traditional Chinese cultural elements with classic reasoning and investigation gameplay, presenting players with a game world full of mystery and surprise. In the game, players will play the role of a talented young detective, traveling through mountains and rivers to explore various complicated and confusing cases. Each case is carefully designed and full of suspense and challenges. Players need to use wisdom and observation to collect clues and deduce the truth. The game has a unique graphic style, which adopts a beautiful Chinese style and combines ancient Chinese
946
2024-05-05
Love and Producer
"Love and Producer" is a female-oriented mobile game developed by Elex. It is a love development type game. In this game, you will play a producer and embark on a romantic journey with four distinctive male protagonists. Game features: Real-person dubbing, restoring the most realistic plot experience. The rich game plot and ups and downs of emotional stories make you immersed in the game. Perfectly restores the operation of AR games, allowing you to enjoy the game better. The unique gameplay allows you to understand the protagonist more deeply and experience a different kind of love. Earn props through tasks and activities, and use them to improve the hero's attributes.
519
2024-05-04
24 HoursReading Leaderboard
- 1 How Can I Style Individual Characters in Web Content Using CSS and JavaScript?
- 2 How Do I Fix Excessive Button Spacing in Firefox?
- 3 Why Are Constructors Not Inherited in Java?
- 4 How Do I Get Latitude and Longitude on Android?
- 5 How to fix Copilot error "It looks like you’ve been signed out" in Windows?
- 6 How to Get an Array of Object Keys in JavaScript?
- 7 How Do Synchronous and Asynchronous Programming Differ in Node.js?
- 8 How Can I Efficiently Extract Clean Text from HTML in Python?
- 9 What\'s the Most Comprehensive C Library for Generating Permutations and Combinations?
- 10 Why Does pytest Throw an ImportError, and How Can conftest.py Fix It?
- 11 How to Execute Dynamic Queries in MySQL?
- 12 How to Print C Enum Values as Text Without Using if/switch Statements?
- 13 What are the Key Differences Between `python -m` and `python ` for Executing Python Modules?
- 14 CSS Simplified: Mastering Positioning and Layouts
- 15 Why Am I Getting an \"Invariant Violation: Invalid Element Type\" Error in React?
More>
Latest Tutorials
-
- Go language practical GraphQL
- 2180 2024-04-19
-
- 550W fan master learns JavaScript from scratch step by step
- 3615 2024-04-18
-
- Getting Started with MySQL (Teacher mosh)
- 1907 2024-04-07
-
- Mock.js | Axios.js | Json | Ajax--Ten days of quality class
- 2710 2024-03-29
Download homepage / Learning resources / Web page production
What is Yii
Yii is a PHP framework used to develop various types of web applications. Yii officially defines it as a high-performance, component-based framework.
In terms of personal experience, Yii has the following characteristics:
Yii is more "trendy".
The Yii development team has always been paying attention to the latest technologies in web development in the industry, and pays great attention to absorbing the most popular technologies at the moment. It can be said that the most trendy technologies in web development in recent years can be seen more or less in Yii. For example, Yii had an obvious Ruby on Rails style when it first started; for example, the namespace and other PHP latest features just implemented in Yii2 were supported. Only a framework that keeps up with trends and trends will be attractive and vital, and will be interesting and meaningful to learn.
Yii is relatively "easy".
As its name sounds, Yii is a framework that is relatively easy to learn and use. The code quality is very high and there is a lot to learn. Clear comments and rich documentation make it easy to read the code. The community is active, the official forum has a Chinese section, the domestic forum is also quite popular, and it is easy to obtain knowledge. The architecture is relatively stable. Judging from the changes from Yii1.1 to Yii2, many of the original conventions and accumulated experience are still applicable.
Yii is more "complete".
As far as web development is concerned, no matter what type of application it is, no matter what stage of development the common problems are, Yii has mature, efficient, and reliable solutions. For typical web development, this is sufficient. For example, Yii provides programming frameworks for pseudo-static, internationalization, RESTful, etc. However, in terms of scale, Yii is not yet a large framework. My personal evaluation is that it is a medium-sized and light framework, which is definitely sufficient and sufficient for most application development.
Yii is relatively "fast".
Yii officially promotes operating efficiency as an important feature. Judging from actual use, among many PHP frameworks, it does have certain advantages in efficiency. But personally I think this is not the most important feature. For users of the framework, that is, developers, development efficiency is more important. Due to Yii's reasonable architecture, ideas and patterns commonly used in web development can be easily applied. For some detailed problems often encountered in web development, Yii also provides many ready-made solutions that can be used immediately, which are very efficient and convenient. High development efficiency is even more important for developers and development teams.
I would like to thank the Yii development team for their unremitting efforts in striving for excellence and creating such an excellent framework for the majority of web developers. I have been exposed to and used Yii since Yii1.1. Due to work and hobbies, I have also been exposed to some frameworks. Generally speaking, I am very satisfied with Yii so far. What I like most about Yii are two things: after learning Yii, I learned many of the most popular and mature things at the moment; it can be developed quickly and improved quickly.
Highlights of Yii2.0
Yii has two main versions: Yii1.1 and Yii2.0. Yii1.1 is an old version. At the time of writing this book, the latest version number is 1.1.15. Yii1.1 is no longer undergoing new development. The official is only performing maintenance and updating security vulnerabilities. No new features will be introduced. Yii2.0 is a framework that was completely overthrown and rewritten on the basis of Yii1.1. It absorbs many of the latest technologies and mainstream conventions in development, and is the representative of the latest generation of Web development frameworks. Appendix 1: Major improvements between Yii2.0 and Yii1.1 This section introduces the major improvements between Yii2.0 and Yii1.1. Below we briefly introduce some of the more prominent features of Yii2.0:
It uses new technologies and standards such as PHP namespace, Trait, PSR standard, Composer and Bower package manager.
Implemented new architecture and new patterns such as dependency injection, dependency injection container and service locator (Service Locator).
Yii2.0 attaches great importance to security and adopts a series of measures to effectively prevent SQL injection, XSS attacks, CSRF attacks, cookie tampering, etc.
It widely supports various SQL and NOSQL databases, efficiently implements database query and operation interfaces such as Active Record, and provides functions such as database migration, replication, and read-write separation.
A fully standards-compliant RESTful API can be implemented with a minimal amount of code.
Supports caching mechanisms of various granularities and media.
Provides a variety of authentication and authorization methods based on cookie and token-based authentication, RBAC and other permission control methods, and supports OpenID, OAuth1, OAuth2, etc.
Supports Bootstrap, jQuery UI, and provides a wealth of Widgets for use.
Complete international support, providing time, plural and other formatting tools that comply with ICU standards, as well as functions such as message translation and view translation.
In addition to supporting two mainstream PHP template engines, Twig and Smarty, developers can also write their own extensions to support other engines.
It provides efficient development tools such as Yii debugging toolbar, Gii code generator and document generator for hard-working coders.
Integrated with Codeception and Faker, and combined with DB Migration, it provides a fixture framework to facilitate test development.
It provides a simple application template and an advanced application template, which are suitable for different development scenarios and can help developers build their own applications as soon as possible.
For detailed Yii2.0 functional features, please view the official description.
background knowledge
Please note that although this book focuses on Yii2, it does not require readers to have development experience in Yii1.1. Although having this background knowledge can help you master Yii2 faster, during the explanation process, this book will help readers who have no relevant knowledge of Yii1.1 to supplement relevant concepts. As long as you have these concepts, readers do not need to learn Yii1.1 from scratch and can start using Yii2 directly.
Of course, as Yii is a PHP framework, it is best for readers to understand PHP. You do not need to be proficient in it. You only need to understand the code, be able to write simple code, and roughly know which functions to use when programming, which is basically enough. , learning while using it is also a learning method.
At the same time, Yii is also an object-oriented framework. This means that Yii embodies object-oriented thinking in terms of code organization and problem solving. To develop with Yii, it is best to follow this idea. Therefore, readers are advised to have some understanding of object-oriented programming. In fact, judging the level of a programmer is not just the proficiency of a certain language or a certain development framework. More importantly, it depends on its ideas and methods for solving problems. One major category of methods is object-oriented methods. From this point of view, learning and using Yii does not require advanced object-oriented methods. But as someone who has experienced it, I still hope that all readers can learn object-oriented development methods systematically and comprehensively. In particular, this book will also specifically explain the design patterns commonly used in web development when they are involved.
How to read this book
This is not a "quick start" or "mastery in a week" book. A very important purpose and starting point of this book is to analyze the principles of Yii2.0 so that readers know both what it is and why it is, which is doomed to be unpredictable. It might happen overnight. There is a lot of code in the book, which requires analyzing the data structure, tracing the call stack, and tracing the code flow. Although we strive to be vivid and concise, readers still need to be mentally prepared for "ancient Buddha green lantern", not to be impetuous or impatient, to concentrate on practicing internal skills, to have a solid foundation, and to practice unique skills as soon as possible.
In terms of content, this book points directly to the essence of Yii2.0 and strives for refinement rather than perfection. For related PHP, HTTP and many other knowledge, it only touches on it at the most, and it is only superficial and fails to introduce it. Therefore, for the related knowledge and background knowledge involved, we must make full use of search engines and other tools to conduct self-study and supplement.
In terms of chapter structure, the book generally arranges the content in a gradually in-depth pattern. At the same time, the content of each part remains relatively independent, and the content of each individual page can be made into an independent article as much as possible. Therefore, readers who are new to Yii2.0 are advised to read it step by step. Readers with a certain foundation can freely choose the entry point for learning based on their personal interests and hobbies. When they encounter a knowledge point in question, they can search for relevant pages by searching for the relevant pages.
In the Yii basics section, the most basic knowledge in Yii such as Properties, Events, and Behaviors are introduced in sequence, which are the most basic concepts for understanding the entire Yii framework.
In the Yii Conventions section, it mainly explains some routines and settings of Yii conventions. It solves the problem of Yii's default behavior when the developer does not specify anything, and is used to deepen the understanding of the actual use of Yii. This part mainly includes the directory structure and entry script of Yii application, alias (Alias), Yii's automatic class loading mechanism, environment and configuration files, configuration items (Configuration), etc.
In the Yii Patterns section, we analyze how Yii implements some of the most mainstream and mature design patterns in current web development. Learning these design patterns will help you deeply understand the mechanism of Yii, and even more rare is to improve the development and design level of readers. This part mainly talks about the three design patterns of MVC, dependency injection and dependency injection container, and service locator (Service Locator).
Yii is a PHP framework used to develop various types of web applications. Yii officially defines it as a high-performance, component-based framework.
In terms of personal experience, Yii has the following characteristics:
Yii is more "trendy".
The Yii development team has always been paying attention to the latest technologies in web development in the industry, and pays great attention to absorbing the most popular technologies at the moment. It can be said that the most trendy technologies in web development in recent years can be seen more or less in Yii. For example, Yii had an obvious Ruby on Rails style when it first started; for example, the namespace and other PHP latest features just implemented in Yii2 were supported. Only a framework that keeps up with trends and trends will be attractive and vital, and will be interesting and meaningful to learn.
Yii is relatively "easy".
As its name sounds, Yii is a framework that is relatively easy to learn and use. The code quality is very high and there is a lot to learn. Clear comments and rich documentation make it easy to read the code. The community is active, the official forum has a Chinese section, the domestic forum is also quite popular, and it is easy to obtain knowledge. The architecture is relatively stable. Judging from the changes from Yii1.1 to Yii2, many of the original conventions and accumulated experience are still applicable.
Yii is more "complete".
As far as web development is concerned, no matter what type of application it is, no matter what stage of development the common problems are, Yii has mature, efficient, and reliable solutions. For typical web development, this is sufficient. For example, Yii provides programming frameworks for pseudo-static, internationalization, RESTful, etc. However, in terms of scale, Yii is not yet a large framework. My personal evaluation is that it is a medium-sized and light framework, which is definitely sufficient and sufficient for most application development.
Yii is relatively "fast".
Yii officially promotes operating efficiency as an important feature. Judging from actual use, among many PHP frameworks, it does have certain advantages in efficiency. But personally I think this is not the most important feature. For users of the framework, that is, developers, development efficiency is more important. Due to Yii's reasonable architecture, ideas and patterns commonly used in web development can be easily applied. For some detailed problems often encountered in web development, Yii also provides many ready-made solutions that can be used immediately, which are very efficient and convenient. High development efficiency is even more important for developers and development teams.
I would like to thank the Yii development team for their unremitting efforts in striving for excellence and creating such an excellent framework for the majority of web developers. I have been exposed to and used Yii since Yii1.1. Due to work and hobbies, I have also been exposed to some frameworks. Generally speaking, I am very satisfied with Yii so far. What I like most about Yii are two things: after learning Yii, I learned many of the most popular and mature things at the moment; it can be developed quickly and improved quickly.
Highlights of Yii2.0
Yii has two main versions: Yii1.1 and Yii2.0. Yii1.1 is an old version. At the time of writing this book, the latest version number is 1.1.15. Yii1.1 is no longer undergoing new development. The official is only performing maintenance and updating security vulnerabilities. No new features will be introduced. Yii2.0 is a framework that was completely overthrown and rewritten on the basis of Yii1.1. It absorbs many of the latest technologies and mainstream conventions in development, and is the representative of the latest generation of Web development frameworks. Appendix 1: Major improvements between Yii2.0 and Yii1.1 This section introduces the major improvements between Yii2.0 and Yii1.1. Below we briefly introduce some of the more prominent features of Yii2.0:
It uses new technologies and standards such as PHP namespace, Trait, PSR standard, Composer and Bower package manager.
Implemented new architecture and new patterns such as dependency injection, dependency injection container and service locator (Service Locator).
Yii2.0 attaches great importance to security and adopts a series of measures to effectively prevent SQL injection, XSS attacks, CSRF attacks, cookie tampering, etc.
It widely supports various SQL and NOSQL databases, efficiently implements database query and operation interfaces such as Active Record, and provides functions such as database migration, replication, and read-write separation.
A fully standards-compliant RESTful API can be implemented with a minimal amount of code.
Supports caching mechanisms of various granularities and media.
Provides a variety of authentication and authorization methods based on cookie and token-based authentication, RBAC and other permission control methods, and supports OpenID, OAuth1, OAuth2, etc.
Supports Bootstrap, jQuery UI, and provides a wealth of Widgets for use.
Complete international support, providing time, plural and other formatting tools that comply with ICU standards, as well as functions such as message translation and view translation.
In addition to supporting two mainstream PHP template engines, Twig and Smarty, developers can also write their own extensions to support other engines.
It provides efficient development tools such as Yii debugging toolbar, Gii code generator and document generator for hard-working coders.
Integrated with Codeception and Faker, and combined with DB Migration, it provides a fixture framework to facilitate test development.
It provides a simple application template and an advanced application template, which are suitable for different development scenarios and can help developers build their own applications as soon as possible.
For detailed Yii2.0 functional features, please view the official description.
background knowledge
Please note that although this book focuses on Yii2, it does not require readers to have development experience in Yii1.1. Although having this background knowledge can help you master Yii2 faster, during the explanation process, this book will help readers who have no relevant knowledge of Yii1.1 to supplement relevant concepts. As long as you have these concepts, readers do not need to learn Yii1.1 from scratch and can start using Yii2 directly.
Of course, as Yii is a PHP framework, it is best for readers to understand PHP. You do not need to be proficient in it. You only need to understand the code, be able to write simple code, and roughly know which functions to use when programming, which is basically enough. , learning while using it is also a learning method.
At the same time, Yii is also an object-oriented framework. This means that Yii embodies object-oriented thinking in terms of code organization and problem solving. To develop with Yii, it is best to follow this idea. Therefore, readers are advised to have some understanding of object-oriented programming. In fact, judging the level of a programmer is not just the proficiency of a certain language or a certain development framework. More importantly, it depends on its ideas and methods for solving problems. One major category of methods is object-oriented methods. From this point of view, learning and using Yii does not require advanced object-oriented methods. But as someone who has experienced it, I still hope that all readers can learn object-oriented development methods systematically and comprehensively. In particular, this book will also specifically explain the design patterns commonly used in web development when they are involved.
How to read this book
This is not a "quick start" or "mastery in a week" book. A very important purpose and starting point of this book is to analyze the principles of Yii2.0 so that readers know both what it is and why it is, which is doomed to be unpredictable. It might happen overnight. There is a lot of code in the book, which requires analyzing the data structure, tracing the call stack, and tracing the code flow. Although we strive to be vivid and concise, readers still need to be mentally prepared for "ancient Buddha green lantern", not to be impetuous or impatient, to concentrate on practicing internal skills, to have a solid foundation, and to practice unique skills as soon as possible.
In terms of content, this book points directly to the essence of Yii2.0 and strives for refinement rather than perfection. For related PHP, HTTP and many other knowledge, it only touches on it at the most, and it is only superficial and fails to introduce it. Therefore, for the related knowledge and background knowledge involved, we must make full use of search engines and other tools to conduct self-study and supplement.
In terms of chapter structure, the book generally arranges the content in a gradually in-depth pattern. At the same time, the content of each part remains relatively independent, and the content of each individual page can be made into an independent article as much as possible. Therefore, readers who are new to Yii2.0 are advised to read it step by step. Readers with a certain foundation can freely choose the entry point for learning based on their personal interests and hobbies. When they encounter a knowledge point in question, they can search for relevant pages by searching for the relevant pages.
In the Yii basics section, the most basic knowledge in Yii such as Properties, Events, and Behaviors are introduced in sequence, which are the most basic concepts for understanding the entire Yii framework.
In the Yii Conventions section, it mainly explains some routines and settings of Yii conventions. It solves the problem of Yii's default behavior when the developer does not specify anything, and is used to deepen the understanding of the actual use of Yii. This part mainly includes the directory structure and entry script of Yii application, alias (Alias), Yii's automatic class loading mechanism, environment and configuration files, configuration items (Configuration), etc.
In the Yii Patterns section, we analyze how Yii implements some of the most mainstream and mature design patterns in current web development. Learning these design patterns will help you deeply understand the mechanism of Yii, and even more rare is to improve the development and design level of readers. This part mainly talks about the three design patterns of MVC, dependency injection and dependency injection container, and service locator (Service Locator).
Statement of this Website
All resources on this website are contributed and published by netizens, or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this website are for learning and reference only. Please do not use them for commercial purposes, otherwise you will be responsible for all consequences incurred! If there is any infringement, please contact us to delete and remove it. Contact information: admin@php.cn