Recommended, "Lightweight" PHP development framework for small projects.

Source: Internet
Author: User
Tags codeigniter
Usage scenarios:

    1. Internal tools used, do not want the frame too complex file too large;
    2. PHP version 5.3+, so you can not need to be compatible with PHP4 to make compromises;
    3. Does not require too complex DB encapsulation, even directly with PDO can be accepted;
    4. Basic framework functions, routing, parameter filtering, form verification, etc.

Add a bit: I want the framework to be concise, PHP files and classes within 100

Reply content:

Usage scenarios:

    1. Internal tools used, do not want the frame too complex file too large;
    2. PHP version 5.3+, so you can not need to be compatible with PHP4 to make compromises;
    3. Does not require too complex DB encapsulation, even directly with PDO can be accepted;
    4. Basic framework functions, routing, parameter filtering, form verification, etc.

Add a bit: I want the framework to be concise, PHP files and classes within 100

has been using CodeIgniter, and then accidental opportunity to contact the Rising Star--laravel framework.

1. expressiveness

Do you know what the following line of code true means?

$uri = Uri::create('some/uri', array(), array(), true);

Also, do you know what the other parameters mean here (except the first one)? Of course you don't know. Because this line of code is not expressive. Expressive (adjective): an effective expression of thought or meaning to look at this code again:

$url = URL::to_secure('some/uri');

This expression uses the HTTPS protocol to create a URL link, in fact, both of the above are doing the same thing, but that one is more visible, more expressive?

Expressive code (with self-describing features)-meaning maintainable code

2. Simplicity

In fact, the nature of the Web (Internet) is very simple. It is just a request – a response. I told myself many times when I built the implementation Laravel. I just want to do it in a simple way – capture the request and send the response.

Route::get('home', function() { return View::make('home.index'); });

Of course, we also need to implement other functions, such as validation, paging, and so on. All of this is a simpler, less maddening configuration file that is implemented in Laravel. Do you want to pre-load user-published articles when displaying user information in pagination? No problem:

$users = User::with('posts')->paginate();echo $users->links();

Please note that the above code is straightforward. You don't have to tell Laravel what page you're currently working on, and you don't have to create some ridiculous paging profiles.

Article source: Why Choose Laravel?

The first PHP project using cakephp, then completely without the framework of handwriting for a few years, and later, by the common part of the code gradually abstracted a route control file plus a few common class library files, template and code separation, is our current development framework, the underlying things if the problem will be fatal, So if you are not delving into the framework, to develop products quickly, you need a framework of their own, you can clearly see whether each line of code will cause problems and whether it will affect performance, basically every framework has its own adaptation scenario, our framework for our products is very suitable for others can not use, Recommend you or write a bar yourself, in fact, it is not difficult, can be modified according to lazyphp.

Recommended colaphp, absolutely lightweight, coding style is also very like, the author has recently updated to version 2.0RC.
https://github.com/fuchaoqun/colaphp

For the performance test, give you a comparison test to see.
Http://www.ruilog.com/blog/view/b6f0e42cf705.html

http://www.slimframework.com/

Slim is a PHP Micro framework This helps you quickly write simple yet powerful Web applications and APIs.


  
   get('/hello/:name', function ($name) {    echo "Hello, $name";});$app->run();

FEATURES

    • Powerful router
      • Standard and custom HTTP methods
      • Route parameters with wildcards and conditions
      • Route redirect, Halt, and pass
      • Route Middleware
    • Template Rendering with custom views
    • Flash messages
    • Secure Cookies with AES-256 encryption
    • HTTP Caching
    • Logging with custom log writers
    • Error Handling and debugging
    • Middleware and Hook architecture
    • Simple configuration

SYSTEM REQUIREMENTS

PHP 5.3.0 or newer

Can try Ci (codeigniter), complete documentation, development is simple and fast, suitable for small and medium-sized projects

User Manual Catalog: http://codeigniter.org.cn/user_guide/toc.html

Recommended initphp framework, is I have seen relatively better and more efficient domestic PHP framework.

Its extended development and use are simple and quick to get started.

Interested to see: http://www.initphp.com/1_1.htm

===========================================

PDO currently I also provide the package well! It can be provided up to the time.

Fatfree I've seen the smallest PHP framework.

lazyphp
Light frame. Includes a front-end controller, 20 common functions and a layout system for page layouts, which can be learned in 10 minutes. LP uses the BSD Open source protocol to keep the framework name within the code to be commercially available.
Https://github.com/easychen/LazyPHP

Laravel +1 is just big. Lazyphp may be what you want.

Canphp,doitphp These two are also good.

xiunophp (Xiunobbs derivatives so frame performance can try Xiunobbs) high load Application PHP development framework, a total of only 34 files, encapsulated a variety of db (MySQL, MongoDB ...), CACHE (Memcached, Ttserver, Redis ...), well supported by NoSQL.

Flourish, PHP Unframework

Not a strict framework, but provides functionality such as an ORM class.

Continue to make trouble "to a homemade Https://github.com/hfcorriez/pagon

Saying no use the framework, but today saw a great God's blog said Zen Road framework only 4 documents, to frighten, went to see the next, really. Simple is to say that someone else's documents to take over to recommend, specific performance or something is unclear.

Zen Path PHP Frame: http://devel.zentao.net/

Update: See a framework today, the number of files is about 40, the most important thing is ... This is my first example of a successful run (I tested MVC c). (Forgive me for being a novice) ... Talk less, keep putting the address:

Fatfree:https://github.com/bcosca/fatfree

speedphp, small and light, easy to get started, support SAE Oh!

Why didn't anyone recommend thinkphp? At the outset, I had only a little ASP, HTML, CSS based on the premise of contact with Thinkphp, a short time to get a "art Customer network" (Cool station display, relatively simple, and now change WordPress). So I think, relatively lightweight, easy to get started, it should still be worth knowing. Let's leave a link. http://www.thinkphp.cn/

Makoframework

http://makoframework.com/

Recommended CI and thinkphp framework, CI Small project is also flexible, compared with the thinkphp framework, extensibility is not thinkphp better. The other two frameworks are especially suitable for beginners, and are very quick to get started.

Why don't you just zend the framework? With acceleration like eaccelerator, performance is completely acceptable.

has been using ZF with propel Orm to do the website

Silex

Based on Symfony2, later want to complicate, directly on the symfony on it can

Symfony2 need php5.3+, the project is php5+ ... A touch of sadness

used a few or codeignitor lightest favorite.

Now is the framework of their own, you say those features are easy to implement, as long as you look at the framework of the Code, and you do not consider the compatibility of other background environment, no additional code burden, code speed efficiency is fast, my MySQL class with meekro.com, basic framework functions , routing, parameter filtering, form verification only with a simple two files, plus Meekro of three files, everything in control.

With the next thinkphp, domestic documents complete, Exchange convenience, learning is relatively simple

Using CI and thinkphp, individuals tend to prefer CI.

Lightweight best to write one yourself. The best thing for your project is the best.

I took a rub, and popped out so many frames

According to the landlord's needs, I recommend a: Tinymvc. Very perfectly formed.

I've got a little project of my own. Now it's almost there, with Symfony2, interested to study

Recommend a router library to do the routing controller Https://github.com/lloydzhou/router, you can automatically retrieve variables from request according to the mapped handler, support custom error Handler and Hooks. Can be easily through the hook custom parameter filtering, login check and so on.

(new Router())->error(405, function($message){    header('Location: /hello/world', true, 302);})->get('/hello/:name', function($name){    echo "Hello $name !!!";})->execute();
  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.