Brophp is a free and open-source lightweight PHP framework (Learning Type) that allows you to open-source, publish, and sell commercial products for applications developed based on the brophp framework. The brophp framework fully adopts the object-oriented design concept and is a three-layer design model based on MVC. It has the advantages of simple deployment and application, high efficiency, and high speed, it has good scalability and maintainability and can be used stably for commercial and portal development. The brophp framework includes a single-entry file, MVC mode, directory structure, automatic class loading, powerful basic class, URL Processing, input processing, error processing, cache mechanism, and extended class. It is a "Learning PHP framework" specially designed for readers of PHP and all the students of lamp brothers ". Of course, any PHP application developer can benefit from the simple and fast features of the brophp framework. In addition, the application of the brophp framework not only makes web development simpler and faster, but also aims to enable PHP learners to understand and study the PHP framework by using this framework, finally, develop your own framework.
Brophp framework Overview
Brophp is a "Learning" ultra-Lightweight Framework (with very small files and extremely low CPU and memory consumption). The current version is brophp 1.0. Although there are not many features in the first version, a framework has all the functions that should be at least possible (including: MVC mode, directory structure, automatic class loading, base class, URL Processing, input processing, error processing, extension class, etc ). This framework achieves the best performance of a single server in terms of existing functions, regardless of the organizational structure, code quality, and running efficiency. The brophp framework is suitable for the development of small and medium-sized systems such as BBS, e-mall, SNS, CMS, blog, and enterprise portal. In addition, this framework is especially suitable for learning PHP, allowing you to understand the framework and analyze the inside story, so as to write your own framework, and through the brophp framework revision, directly used as the company's internal development framework.
System featuresThe coding structure of the brophp framework is as independent as possible for each module, and the knowledge points of each chapter in "Let's talk about PhP" are integrated. When you analyze the source code of the framework, you can refer to the previous sections of this book for the technical points of PHP, and organize the scattered PHP knowledge points you know together. Some features of the brophp framework are as follows. (1) During the first access, the user automatically creates all the directory structures required by the project, and the user no longer needs to worry about organizing the directory structure of the project. (2) This framework is implemented by using modules and operations. It is easy to use and has moderate functions. It is more in line with the development habits of web programmers in China. (3) projects compiled through this framework fully adopt the PHP Object-oriented thinking, which conforms to the human thinking model and is independent, universal, and flexible, and is conducive to project maintenance and debugging. (4) The MVC-based development model separates the view layer from the business layer to achieve rapid deployment. It has good maintainability, high reusability and applicability, and is particularly conducive to software engineering management. (5) the built-in rich SQL query mechanism provides flexible operations and is easy to use. (6) smarty, the most famous PHP template engine in the industry, has the advantage of Template Development for programmers familiar with smarty. (7) Use memcached to cache SQL and sessions, or use the smarty Cache Technology to perform static page operations to improve efficiency and reduce operation consumption. (8) This framework provides some common extension classes that can be used directly to complete some common functions. For example, file upload, image processing, paging implementation, and verification code. (9) This framework supports the use of custom extension class libraries and extension functions, and supports unlimited function expansion. (10) The user-friendly debugging mode can be used to understand the running process of the project, and quickly solve errors and exceptions encountered during project development. (11) The framework source code is simple and clear, which facilitates the transformation of the framework according to the requirements of the current project in the work. You can find the brophp framework source code in the book supporting CD, you can also go to the http://www.brophp.com or http://bbs.lamp brother.net (lamp brothers) website to download the latest brophp Framework version and the latest help documentation.
Environment requirements
Operating System:Supports Linux/Windows servers and cross-platform applications
Web Server:It can run in Apache, IIS, and nginx.
PHP environment:For php5.0 and later versions, you need to install XML, mysqli, PDO, GD library, and memcache extension modules. Note: For new PHP users, we recommend using the integrated development environment appserv or Wamp for local development and testing of brophp.
Directory structure of brophp framework source codeThe following example shows the system directory of the brophp framework. During project development, you can directly copy all files in the brophp directory and subdirectory to the project root directory without any modifications to the Framework source file. However, in Linux, you must note that you must grant the permission to the directory and sub-directory of the framework to the user who runs PHP to have the read permission.
| -- Brophp directory # brophp framework directory | -- bases directory # brophp framework basic class storage directory | -- classes directory # brophp framework extension class storage directory | -- commons directory # common functions and resources of brophp framework storage directory | -- libs directory # directory for storing the source files of the smarty template engine | -- brophp. PHP file # public portal file of the brophp framework |
This article is excerpted from PhP (version 2nd).
Published by lamp brothers