modess.io - PHP micro framework for your REST API – Part 1: Selection









Search Preview

PHP micro framework for your REST API – Part 1: Selection | modess.io

modess.io
Picking a PHP micro framework for your REST API can feel overwhelming. So many available frameworks are available. This will guide you through the jungle.
.io > modess.io

SEO audit: Content analysis

Language Error! No language localisation is found.
Title PHP micro framework for your REST API – Part 1: Selection | modess.io
Text / HTML ratio 58 %
Frame Excellent! The website does not use iFrame solutions.
Flash Excellent! The website does not have any flash contents.
Keywords cloud framework PHP micro frameworks Laravel packages dead API it’s don’t I’m community Symfony Lumen Community activity Zend REST documentation
Keywords consistency
Keyword Content Title Description Headings
framework 52
PHP 45
micro 29
21
frameworks 21
Laravel 19
Headings
H1 H2 H3 H4 H5 H6
2 14 0 0 0 0
Images We found 5 images on this web page.

SEO Keywords (Single)

Keyword Occurrence Density
framework 52 2.60 %
PHP 45 2.25 %
micro 29 1.45 %
21 1.05 %
frameworks 21 1.05 %
Laravel 19 0.95 %
packages 16 0.80 %
dead 14 0.70 %
API 14 0.70 %
it’s 13 0.65 %
don’t 13 0.65 %
I’m 12 0.60 %
community 12 0.60 %
Symfony 11 0.55 %
Lumen 9 0.45 %
Community 9 0.45 %
activity 9 0.45 %
Zend 9 0.45 %
REST 9 0.45 %
documentation 9 0.45 %

SEO Keywords (Two Word)

Keyword Occurrence Density
micro framework 22 1.10 %
PHP micro 21 1.05 %
a framework 14 0.70 %
a PHP 12 0.60 %
in the 11 0.55 %
to be 11 0.55 %
of the 10 0.50 %
to the 9 0.45 %
on the 8 0.40 %
REST API 8 0.40 %
as a 8 0.40 %
community around 7 0.35 %
need to 7 0.35 %
a few 7 0.35 %
want to 6 0.30 %
of them 6 0.30 %
I want 6 0.30 %
we can 6 0.30 %
stable release 6 0.30 %
for over 6 0.30 %

SEO Keywords (Three Word)

Keyword Occurrence Density Possible Spam
PHP micro framework 21 1.05 % No
a PHP micro 9 0.45 % No
I want to 4 0.20 % No
community around it 4 0.20 % No
around it is 4 0.20 % No
to be a 4 0.20 % No
a REST API 4 0.20 % No
the creator of 4 0.20 % No
micro framework for 4 0.20 % No
First stable release 4 0.20 % No
over a year 3 0.15 % No
sites forums QA 3 0.15 % No
as a PHP 3 0.15 % No
Community sites forums 3 0.15 % No
No activity for 3 0.15 % No
forums QA chat 3 0.15 % No
a framework is 3 0.15 % No
REST API with 3 0.15 % No
The community around 3 0.15 % No
for a PHP 3 0.15 % No

SEO Keywords (Four Word)

Keyword Occurrence Density Possible Spam
a PHP micro framework 9 0.45 % No
community around it is 4 0.20 % No
PHP micro framework for 3 0.15 % No
for a PHP micro 3 0.15 % No
sites forums QA chat 3 0.15 % No
Community sites forums QA 3 0.15 % No
micro framework for your 3 0.15 % No
framework for your REST 3 0.15 % No
for your REST API 3 0.15 % No
PHP micro framework to 2 0.10 % No
Deploying PHP Applications and 2 0.10 % No
in general I’m the 2 0.10 % No
general I’m the author 2 0.10 % No
a REST API with 2 0.10 % No
I’m the author of 2 0.10 % No
the author of Deploying 2 0.10 % No
author of Deploying PHP 2 0.10 % No
build a REST API 2 0.10 % No
of Deploying PHP Applications 2 0.10 % No
PHP Applications and organizer 2 0.10 % No

Internal links in - modess.io

continuous integration for Laravel with Jenkins
Laravel & Jenkins: Continuous integration | modess.io
Jenkins & PHP, continuous integration tutorial
Jenkins & PHP, continuous integration tutorial | modess.io
Simple pagination in PHP with the Laravel pagination package
Simple pagination in PHP with the Laravel pagination package | modess.io
PHP micro framework for your REST API – Part 1: Selection
PHP micro framework for your REST API – Part 1: Selection | modess.io
Possible benefits of meditation for developers
Possible benefits of meditation for developers | modess.io
One year of working remote
One year of working remote | modess.io
Older
Blog | modess.io
Talks
Talks | modess.io
Email
Email Protection | Cloudflare

Modess.io Spined HTML


PHP micro framework for your REST API – Part 1: Selection | modess.io Jump to: Navigation PHP micro framework for your REST API – Part 1: Selection 07 Jan 2016 Picking a PHP micro framework for your REST API can finger overwhelming. So many misogynist frameworks are available. This will guide you through the jungle.With the large number of frameworks that exists today, picking the right one for your next project can finger overwhelming. To make things easier for you when choosing your PHP micro framework, I want to take an in-depth at the misogynist micro frameworks that you can build your next REST API with. I’ll try to make a pearly and unbiased review of them based on their pros and cons. I’ll not be discussing on how you should build your API, I leave that to Phil Sturgeon and I can’t recommend his spanking-new book, Build APIs You Won’t Hate, enough.I’ve seen a few of these comparisons virtually on the interwebs, but find them very contradictory. They are usuallyally named something click-batey like “10 weightier and most wondrous X for 2016 that will make you shit bricks!”. Then 7–8 of them are denounced as utter garbage and that you shouldn’t use them. This isn’t the tideway I want to take here. I want to show my selection process surpassing I get to the very comparison. This is how I would tideway it if I had to make a decision.For comparison of these frameworks I often see a big focus on the performance metric. I’m not going to oppose it’s a bad metric, but to me there are increasingly important factors since most of the micro frameworks will be fast to a unrepealable degree. So I’m going to ignore that metric in my comparison and take the ignorant “it probably is fast enough”-approach, ignorance is truly kicks sometimes. And I moreover don’t think that “we chose this framework considering it can handle a gazillion of requests per second” is a good treatise except in some very edgy whet cases. A unconfined PHP micro framework delivers a lot increasingly than performance in my opinion.This is the first part of this series where I’ll gather all possible candidates I can find and run them through the list of what I consider important. Some will fall off, some will stay on, and in the end I can requite my judgment on the ones that lasted until the stormy end. I have found 26 variegated micro frameworks. Here is a list of all of them in no order what so ever. Wave, Zaphpa, Bullet PHP, One PHP, Tonic, Silex, Slim, Phalcon, Limonade, Lumen, Fat-Free Framework, Flight, Jolt, Aura, Epiphany, FRAPI, Zend Expressive, Respect/Rest, Swiftlet, PolyFrameWork, Nanite, MicroMVC, Hackwork, Fitzgerald, Deano, Afro. Phew, that’s a lot.Community & activityThe polity virtually a framework is often what makes it or breaks it. A PHP micro framework isn’t depending on that to the same extent since it’s smaller by design. A large polity virtually it is nice to have, but not a must. It brings maintenance, engagement, tools, packages and plugins to the table.Community or not, the lawmaking needs to be maintained with regular activity. A framework without commits in the last three months or so I’ll consider sufferer and not plane consider. Unless you’re willing to take over the maintenance of a framework or fork it, I don’t think it’s good to use a PHP micro framework that isn’t stuff maintained.RequirementsThere need to be some sort of requirement for our candidates. Since I’m looking for a PHP micro framework to build a REST API with we need a few things fulfilled, or at least have the possibility of fulfilling those requirements.MoreoverI need to sieve that I’m looking for frameworks, not components or packages. I want it to come as a package deal, it can be very minimal with the wing of extending it, that is unbearable for me.First and foremost I’ll be looking at documentation. To me a framework isn’t a framework without spanking-new documentation. It boils lanugo to developer experience, PHP Round Table have a unconfined podcast episode on how these tie together. I’d never consider choosing a framework without wide-stretching documentation, no matter what type of using I’m building. I might be harsh, but I don’t find a Github wiki page or readme sufficient as documentation when it comes to frameworks. For a package or a component I can live with that, but for a framework I expect increasingly of the tragedian and contributors.What I want a PHP micro framework to provide for us is:PSR-compatible autoloading. Since it’s 2016 now.Not try to be a know-it-all. We want it to embrace the mentality of a framework. That is gluing together the weightier pieces misogynist out there and presenting it in a nice malleate to the developer. If a framework is a “one file”-framework without dependencies, we shouldn’t bother. It’s then solving problems that have been solved somewhere else.Routing. A rather obvious one, but it should be worldly-wise to route on HTTP verbs (GET, POST, PUT, PATCH, DELETE). Another nice full-length would be if we can group routes for API versioning.Middleware. In supporting middleware we unlock some unconfined potential for an API, such as global token authentication, rate limiting, etc.Configuration. We want configuration with environment support.Database. We need to store and retrieve data, since 99% of all PHP applications use either MySQL or PostgreSQL as their main persistent storage.Cache. I do believe that enshroud is important, plane though it’s not a deal breaker. But since I previously stated that I don’t superintendency for performance as a metric, this is a good counter measure to that.Logging. We all need to debug our applications at some point.Testing. We should write tests for our applications to some extent.Validation. An API often handles input from the consumer and that data needs to be validated.Service container & providers. If we don’t have these, we’ll have a nonflexible time extending the framework. Service providers can be seen as optional since we can probably do our bindings in the service container somehow.A few features often ship with frameworks that I’d like not to see. I want to have the worthiness of removing them, since they have no place in a REST API. These are:Views & templates. We don’t need to present HTML to our consumers, we should present JSON.Sessions. We’ll be using a token based hallmark for the API and therefor don’t need session handling.Elimination roundNow that we’ve established some ground rules, it’s time to start wielding the hammer of doom to narrow lanugo the list. I don’t think many frameworks ultimatum to be a PHP micro framework will survive this round. Eliminating the prospects that don’t unhook equal to the list of requirements. In no particular order here are the ones that’s eliminated and why.Zaphpa. Have no dependencies, can’t be trusted in my book.Bullet PHP. No worriedness for scrutinizingly 11 months, dead.Wave.Wide-stretchingdocumentation filled with examples that made it squint promising. It moreover had the features I was looking for. But then the last commit was virtually one year ago, dead.One PHP. Wouldn’t qualify as a framework to me. Over six months ago since the latest commit, dead.Limonade. It got me intrigued with good (even though a messy single page one) documentation, then I found that it’s a “one file”-framework trying to solve everything itself without any dependencies. That file that had no commits for over 2 years, dead.Tonic. Some good ideas here, with HATEOAS support out of the box for example. But the documentation is limited to a one page readme file on github. No worriedness in the main workshop for over six months, dead.FRAPI. Interesting tideway to towers REST APIs. But the documentation is messy and there hasn’t been any commits to the master workshop for scrutinizingly two years, dead.Nanite. Not really a framework, and only support GET and POST requests.Fat-Free Framework. With an spanking-new site and documentation, it showed some real promise. But when looking at the lawmaking it has no dependencies and tried to solve everything on its own. No thank you.Jolt. No worriedness for over a year, dead.Epiphany. Trying to be a jack of all trades, not relying on any dependencies. No worriedness for over a year on top of that, dead.Respect/Rest. Just a component, and it does not want to be a framework. So that’s a no-go.Swiftlet. Another framework that doesn’t finger the need to depend on any other packages.PolyFrameWork. Uhm, no habla espanol..?MicroMVC. No commits to the very source lawmaking for over 3 years, super dead.hackwork. Not plane a composer file.Fitzgerald. No composer file either, over 3 years since last activity, dead.Deano.Worriednessstopped over a year ago, dead.Afro. No composer file, no activity, dead.Flight. I was excited well-nigh this one. Seemed like it had a unconfined philosophy as a micro PHP framework, extendable and flexible. Then I saw that it had no dependencies, and I don’t see a reason to reinvent the wheel.Aura. Branded as packages that can be built into frameworks. The packages are of spanking-new quality but gluing them together to a framework is too much of a task for this post, and that’s why it fell out.Phalcon. This stands out as it’s a framework written in C that’s misogynist as a PHP extension. However that leaves no room for slimming it down. You either get it all or nothing.The value of sufferer frameworks is simply astounding. Frameworks should come with a “don’t try this at home kids” warning label on them. It seems many people are interested in the thought of creating a framework, but may not be as keen on maintaining it. A PHP micro framework need just as much tender loving superintendency as the rest of the frameworks.The survivorsIt made me kind of sad that so many prospects got discarded in the suppuration process, as I was hoping for increasingly than one new and upcoming to be on the list. Perhaps there isn’t room unbearable for one increasingly PHP micro framework, sounds a bit unlikely though. We are left with a list that could be named The Big Three and the newcomer.LumenSilexSlimZend ExpressiveThe perk of a short list is that it allows for an increasingly in-depth review and comparison. It makes us go deeper in finding the “best” PHP micro framework. Lets uncork with a short introduction of them surpassing I swoop into implementation in the next part of the series.Lumen, by LaravelWebsite: https://lumen.laravel.com/Documentation: http://lumen.laravel.com/docsFirst stable release: April 14, 2015Repository: https://github.com/laravel/lumenA new player in the world of micro frameworks. It’s a trimmed lanugo version of Laravel, one of the worlds most popular PHP frameworks. This comes with many advantages for a PHP micro framework. The polity virtually it is huge, and scrutinizingly all concepts workable to Laravel will be workable to Lumen.Consideringof this, any polity resource will be relevant.Moreoversince it’s based on components from the Illuminate package that powers Laravel, any updates there goes into Lumen as well. This moreover ensures unconfined maintenance and updates to the underlying packages, which are built on top of the Symfony packages. The synergies could not be largest here.It features a few things out-of-the-box, packages that derive from Laravel. Database, cache, encryption, events, queues and so forth. All we need to get the show on the road. In a weightier specimen scenario we can remove packages we don’t have a need for. Unfortunately we can’t unchangingly plug-and-play third party packages for Laravel since they might depend on extended functionality, but often we can transmute them or find an volitional that is specific to Lumen.Community resourcesFor the most part these are for Laravel, but they’re moreover workable to Lumen.Screencasts / tutorials:LaracastsSitepointTuts+Community sites, forums, Q&A, chatLaravel.io – forumLaravel News – polity siteLaracasts – forumLarachat – slack#laravel – IRCReddit: /r/lumenReddit: /r/laravelStackoverflow: lumenStackoverflow: laravelBooksLeanpubAmazonSocial@laravelphp – official@taylorotwell – the creator of LaravelGoogle+FacebookLinkedInNewslettersLaravel WeeklyLaravel NewsPodcastsThe Laravel PodcastThe Laracasts SnippetLaravel News PodcastOtherLaracon US – yearly conferenceLaracon EU – yearly conferencePackalyst – Laravel packagesThe Silex frameworkWebsite: http://silex.sensiolabs.org/Documentation: http://silex.sensiolabs.org/documentationFirst stable release: September 26, 2014Repository: https://github.com/silexphp/SilexA relative newcomer but has been virtually a little while longer than Lumen. You could say that this is a trimmed lanugo version of Symfony, but I’d oppose it’s slightly different. The Silex framework is created by Fabien Potencier, the creator of Symfony, so you can expect it to be built mostly with Symfony components. And it is. It’s moreover inspired by the Sinatra framework, a micro framework for Ruby. Since it’s based on Symfony components you never have to worry well-nigh the quality of code, or maintenance to stop. Symfony is the most popular PHP framework and the polity virtually it is so wide-stretching it’s whimsically worth mentioning. You can find anything for this PHP micro framework.It arrives with a few services that meets the requirements, such as logging, database and validation to name a few. I hope we can trim the features lanugo to the yellowish essentials we want, since it comes with a template engine and a session handler for example. There’s moreover no shortage of third party packages misogynist for it.Community resourcesSince Silex ties into Symfony so much, pretty much all of these resources are for Symfony.Screencasts / tutorials:Youtube: SensioLabsTuts+SitepointCommunity sites, forums, Q&A, chatSymfony NewsSensio Labs Connect#symfony – IRCReddit: /r/silexphpReddit: /r/symfonyStackoverflow: silexStackoverflow: symfony2BooksLeanpubAmazonSocial@symfony – official@fabpot – the creator of SymfonyGoogle+FacebookLinkedInNewslettersSensio Labs ConnectPodcastsSound of SymfonyOtherSymfonyCon – conferencesKnp Bundles – bundlesSlim PHP frameworkWebsite: http://www.slimframework.com/Documentation: http://www.slimframework.com/docs/First stable release: November 2, 2010Repository: https://github.com/slimphp/SlimLet me repeat the stage of the first stable release, November 2, 2010. It has unquestionably been virtually in a stable version for over 5 years now! That’s an impressive track record for stuff one of the top contenders in the PHP micro framework wrestle today. I’m quite sure it has gone through a major incubation process during those years, but I’m very impressed by the team for keeping the Slim PHP framework up to stage for all these years.This is very bare-bone, all you get supplied with is an using container, routing and an interface for HTTP requests and responses, including middleware. This is very promising since we can proffer it in any way we please. There are moreover many, many packages with implementations for it. If you want a true micro PHP framework, this might be your choice.Community resourcesThe polity virtually it is substantially smaller than the other two big frameworks, mainly considering it doesn’t have an older parent. However implementations aren’t as specific as in the other frameworks where you have many packages with APIs tied to them.Screencasts / tutorials:YoutubeSitepointTuts+Community sites, forums, Q&A, chatOfficial blogOfficial support forum#slimphp – IRCStackoverflowSocial@slimphp – official@codeguy – creator of SlimPodcastsPHP Townhall – episode with the creator of Slim as a guestZend ExpressiveWebsite: http://framework.zend.com/expressiveDocumentation: http://zend-expressive.readthedocs.org/First stable release: N/ARepository: https://github.com/zendframework/zend-expressiveThe new kid on the woodcut as a PHP micro framework that was spoken in August 2015. It does not have a stable release yet, there is only a release candidate as I’m writing this. With that said you should be extremely cautious to use this in production, and there might be some breaking changes surpassing a stable version is ready. But it shows unconfined promise and has a very modern framework approach. It’s fully PSR–7 uniform and is based on middleware. I probably don’t have to tell you well-nigh Zend, the giant in the PHP polity with its Zend Framework that have been virtually for ages. This is completely variegated from the Zend Framework though but you can expect quality considering of it.It comes with a minimal core, and you can then segregate what components you want to include. It supports a few variegated routers and dependency injectors, and there’s an option to include a template engine, but that isn’t something we’re interested in. All in all we get a minimal framework with spanking-new flexibility and worthiness to proffer it.Community resourcesSince it’s so new and it differs so much from Zend Framework there isn’t much polity virtually the framework at the moment. The framework provides weightier practices increasingly than a toolbox of solving unrepealable tasks, that’s why I don’t consider the lack of polity viperous since we have the unshortened PHP polity at our disposal.Summing up our quest for a PHP micro frameworkWe’ve taken a squint at many candidates for stuff a good PHP micro framework we could build a REST API with. However it turned out that only a few, four to be specific, made the cut. We’ve transiently looked at the variegated frameworks in terms of background, features, current worriedness as well as the polity virtually them. All of them seem like good options at the moment. Lumen and Silex provide a larger toolbox while Slim and Zend Expressive are increasingly DIY solutions. All features lacking in Slim and Zend Expressive can be implemented using packages that you tie into your application, this could plane be packages from the other frameworks.It comes lanugo to personal preference what you want as your PHP micro framework. Do you want full flexibility?Planethough you’ll have to do some coding to get features that are provided for you otherwise. Do you want a well-constructed toolbox from the start? If you find sacrificing a bit of flexibility, and maybe performance, to be worth it.Whichever you go with, I think they’re all unconfined options as a PHP micro framework. In the next part I’ll lawmaking a vital API in all of the three and report on the developer wits for each of them. Hopefully I’ve shed some light on the current frameworks and why they are, or are not, suitable as micro frameworks for a REST API. AboutHi! My name is Niklas Modess and I’m a PHP developer from Stockholm, Sweden. I write mostly on deployment, continuous integration, Laravel and PHP in general. I’m the tragedian of Deploying PHP Applications and organizer of Laravel Stockholm. Social: Twitter GitHub Email Stack Overflow LinkedIn Related Posts Jenkins & PHP, continuous integration tutorial 08 Sep 2016 Simple pagination in PHP with the Laravel pagination package 10 Feb 2016 Possible benefits of meditation for developers 26 Sep 2015CommentsPlease enable JavaScript to view the comments powered by Disqus.© 2018. All rights reserved. Powered by Hydejack v7.5.0modess.io Hi! My name is Niklas Modess and I’m a PHP developer from Stockholm, Sweden. I write mostly on deployment, continuous integration, Laravel and PHP in general. I’m the tragedian of Deploying PHP Applications and organizer of Laravel Stockholm. Navigation: Talks Social: Twitter GitHub Email Stack Overflow LinkedIn Templates (for web app): Loading… Error Sorry, an error occurred while loading . Back Permalink