微窗php,MicroPHP

软件简介

MicroPHP是一个免费、开源、敏捷的MVC模式的PHP开发框架。它易拓展而不失灵活,可以轻松对应大中小型项目。MicroPHP没有大而全的功能,只给你最需要的底层功能,但是给你无限的灵活拓展能力。其它框架都有的基本特性这里就不一一罗列。

说一下MicroPHP的特性:

1. 整个框架核心就一个文件MicroPHP.php(压缩后的文件MicroPHP.min.php,140KB左右)。

2. HMVC支持。

3.

入口文件index.php也是整个项目的配置文件,一个入口文件就是一个项目的入口,可以自定义多个入口文件达到不同项目共存的目的,项目之间随意共享类库、帮助文件等目录,框架核心文件采用零侵入式编写,整个框架的运行不依赖任何外部变量,初始化的时候只要通过MpRouter::setConfig($system)注入配置,然后MpRouter::loadClass()执行即可。

4.

独特的插件模式:这是MicroPHP的一大特色,插件模式就是可以把框架嵌入到任何现有的程序代码到中,只要在使用前包含plugin.php(要保证plugin.php和MicroPHP.min.php在一个目录)即可,然后按着MicroPHP框架的各种特性写代码,插件模式和正常模式唯一不同的就是插件模式下MicroPHP的路由功能不再使用,其它特性完全保留。

5. 项目控制器、模型、视图、类库等各种文件夹完全自定义,用到什么就建立什么文件夹,彻底摆脱一堆无用的一大堆文件夹的困扰。

6. 类库采用懒加载模式,只要按着规定命名规则,然后把你的类库文件扔到类库文件夹,在控制器或者模型中直接new

类库名()即可,系统会自动加载相应的类库文件。

7.

没有视图就不能指定视图数据?文件可以include共享那么视图为什么不能共享数据呢?在MicroPHP里面你不再有这个困挠,MicroPHP可以在$this->view_vars数组里面存放你的任何想在视图里面使用的全局数据。

特别是网站头部导航用户数据全站每个页面都用到,那么可以自定义个控制器父类,然后和在父类构造方法里面初始化这个用户数据,放到$this->view_vars里面,那么所有的控制器再也不用重复的去取用户数据传给视图。

8.

灵活的session托管,支持的管理类型:mongodb,mysql,memcache,redis.当然也可以用系统默认的管理方式.session托管是可选的,根据项目具体情况择优选用即可。session托管的好处很多,比如:支持分布式、精确控制session过期时间,等等。

9. 灵活的缓存机制。

(1).可用的方式缓存驱动有:auto,apc,sqlite,files,memcached,redis,wincache,xcache,memcache。

(2).缓存配置有个第二驱动机制,比如:当你现在在代码中使用的是memcached,

apc等等,然后你的代码转移到了一个新的服务器而且不支持memcached 或

apc这时候怎么办呢?设置第二驱动即可,当你设置的驱动不支持的时候,系统就使用第二驱动。

(3).易拓展的缓存驱动,如果上面的驱动类型还不能满足项目的缓存需求,那么可以容易的拓展缓存驱动。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
MicroPHP v2.3.3 更新日志: 优化了: 1.数据验证的手机号验证规则,支持17号段手机号 修复了: 1.PDO数据库驱动RND拼写错误,更正为RAND MicroPHP v2.3.2更新日志: 修复了: 1.apache伪静态支持问题,新版apache在.htaccess中开启了伪静态在之后, $_SERVER里面的PATH_INFO变量变了名字为:REDIRECT_PATH_INFO 升级提示:无   升级提示: 1.修改入口文件里面最后两行 WoniuRouter::setConfig($system); WoniuRouter::loadClass(); 修改为: MpRouter::setConfig($system); MpRouter::loadClass(); 即可。 2.如果使用了插件模式,修改插件入口文件plugin.php里面最后一行 WoniuRouter::setConfig($system); 修改为: MpRouter::setConfig($system); 即可。 3.如果自定义了loader,ver2.2.14以前是自定义了loader必须继承WoniuLoader,现在修改为继承MpLoader即可。 4.如果自己使用了WoniuRouter::setConfig($system);WoniuRouter::loadClass(); 修改为MpRouter::setConfig($system);MpRouter::loadClass();即可.   MicroPHP是一个免费、开源、敏捷的MVC模式的PHP开发框架。它易拓展而不失灵活,可以轻松对应大中小型项目。它没有大而全的功能,只给你最需要的底层功能,但是给你无限的灵活拓展能力。   说一下MicroPHP的特性: 极简核心 整个框架核心就一个文件MicroPHP.php(压缩后的文件MicroPHP.min.php,140KB左右)。 入口亦配置 一个入口文件index.php也是整个项目的配置文件,可以自定义多个入口文件达到不同项目共存的目的,项目之间随意共享类库、帮助文件等目录,框架核心文件采用零侵入式编写,整个框架运行不依赖任何外部变量。 独特插件模式 插件模式可以把框架嵌入到任何现有的程序代码到中,然后按着MicroPHP框架的各种特性写代码。 结构灵活 项目控制器、模型、视图、类库等各种文件夹完全自定义,都不是必需的,用到什么就建立什么文件夹,彻底摆脱一堆无用的一大堆文件夹的困扰。 类库懒加载 类库采用懒加载模式,只在需要时才包含类库,而不是一次全部加载,做到按需启用。且支持一级子文件夹自动加载,在类库很多需要用文件夹分类时,能保持程序结构的简洁清晰。 共享视图数据 没有视图就不能指定视图数据?文件可以include共享那么视图为什么不能共享数据呢?在MicroPHP里面你不再有这个困挠,MicroPHP可以在$this->view_vars数组里面存放你的任何想在视图里面使用的全局数据。 SESSION管理灵活 SESSION托管支持:mongodb、mysql、memcache、redis。配置灵活,根据项目具体情况择优选用即可。 缓存灵活 缓存支持:auto、apc、sqlite、files、memcached、redis、wincache、xcache、memcache。auto:自动模式。 缓存第二驱动 当你现在代码中使用的是memcached,然后代码转移到一个新服务器且不支持memcached,这时候怎么办呢?设置第二驱动即可,当你设置的驱动不支持的时候,系统就使用第二驱动。 HMVC模式 HMVC(Hierarchical-Model-View-Controller),也可以叫做 Layered MVC。顾名思义,就是按等级划分的 MVC 模式,简单的解释就是把MVC又细分成了多个子 MVC,每个模块就分成一个 MVC。使用 HMVC 的好处就是可以降低各个功能模块之间的耦合性,提高代码复用性,使得每个功能都可以独立出来,每个模块都有自己的 MVC 结构,这就有点像 ActiveX 控件,每个控件都有自己的行为,控件之间互不影响。     相关阅读 MicroPHP 2.2.12 详细发布说明 同类推荐:程序框架
PHP Microservices by Carlos Perez Sanchez English | 29 Mar. 2017 | ASIN: B01MQGB212 | 392 Pages | AZW3 | 4.91 MB Key Features Build your own applications based on event-driven microservices and set them up on a production server. Successfully transform any monolithic application into a microservice. Monitor the health of your application, prevent downtime, and reduce costs. Book Description The world is moving away from bulky, unreliable, and high-maintenance PHP applications, to small, easy-to-maintain and highly available microservices and the pressing need is for PHP developers to understand the criticalities in building effective microservices that scale at large. This book will be a reliable resource, and one that will help you to develop your skills and teach you techniques for building reliable microservices in PHP. The book begins with an introduction to the world of microservices, and quickly shows you how to set up a development environment and build a basic platform using Docker and Vagrant. You will then get into the different design aspects to be considered while building microservices in your favorite framework and you will explore topics such as testing, securing, and deploying microservices. You will also understand how to migrate a monolithic application to the microservice architecture while keeping scalability and best practices in mind. Furthermore you will get into a few important DevOps techniques that will help you progress on to more complex domains such as native cloud development, as well as some interesting design patterns. By the end of this book you will be able to develop applications based on microservices in an organized and efficient way. You will also gain the knowledge to transform any monolithic applications into microservices. What you will learn Set up a development environment using the right strategies and tools. Learn about application design and structure to start implementing your application. Transform a monolithic application into microservices. Explore the best way to start implementing your application using testing. Understand how to monitor your microservices, handle errors, and debug the application. Deploy your finished application into a production environment and learn how to solve common problems. Know how to scale your application based on microservices once it is up–and-running. About the Author Carlos Perez Sanchez is a backend web developer with more than 10 years of experience in working with the PHP language. He loves finding the best solution for every single problem on web applications and coding, looking to push forward the best practices for development, ensuring a high level of attention to detail.He has a bachelors degree in computer engineering from the University of Alicante in Spain, and he has worked for different companies in the United Kingdom and Spain. He has also worked for American companies and is currently working for Pingvalue. You can connect with him on LinkedIn at https://www.linkedin.com/in/mrcarlosdev. Pablo Solar Vilarino is a software developer who became interested in web development when PHP 4 started becoming a popular language. Over the last few years, he has worked extensively with web, cloud, and mobile technologies for medium-to-large companies and is currently an e-commerce developer at NITSNETS. He has a passion for new technologies, code standards, scalability, performance, and open source projects. Pablo can be approached online at https://pablosolar.es/. Table of Contents What are Microservices? Development Environment Application Design Testing and Quality Control Microservices Development Monitoring Security Deployment From Monolithic to Microservices Strategies for Scalability Best Practices and Conventions Cloud and DevOps
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值