background preloader

API First Application Development

Facebook Twitter

SOA2009-REST-Patterns.pdf. Building RESTful API in Laravel - start here - Maxoffsky. Over the past few weeks I’ve been very busy learning basics of Backbone – an MV* framework for Javascript because it simplifies creation of one page applications (great for mobile devices!).

Building RESTful API in Laravel - start here - Maxoffsky

In just two weeks I built a working mobile app for the company I’m working for, and soon it will be released to Android and Apple app stores. Of course there is great complexity behind this all but what I have noticed is that having a bad API for your application can slow down building mobile apps and impact the ecosystem of your product. My goal for this month is to learn building RESTful APIs from scratch in Laravel – the framework that I use for all of my new web applications. If you don’t know what RESTful means, check out this wikipedia article : What is the purpose of RESTful APIs? (from Or watch this video on vimeo : Teach a Dog to REST from Apigee on Vimeo. I am using Laravel, so where do I start?

GET /todos – show all todos GET /todos/id – show todo with ID equal to id In Routes.php I just add : Web Design Hamilton - VO2 Web Design. September 12, 2013 • Gavyn Jones Building an API that supports your internal and external applications makes a lot of sense in today's multi-device world.

Web Design Hamilton - VO2 Web Design

In this article we look at one method to accomplish this using the Laravel framework. “Make your API the center of your ecosystem.” For the purposes of brevity, I'll assume you've got a running instance of Laravel, along with a database with a simple 'users' table set up. The architecture of our application will consist of an API package that holds our models and controllers, an HMVC vendor package for consuming our API internally, and of course some routes.

The API Firstly, we're going to create our API package by running php artisan workbench Vo2/Api --resources (replace Vo2/Api with your own vendor/package naming convention). Next we need to create a home for our models and controllers, so create those directories under workbench/vo2/api/src. "classmap": [ "src/migrations", "src/controllers", "src/models" ], <?

And now our controller. API testing using Codeception and Laravel. I followed a video serie from Laracasts: Incremental APIs to create an API for my application.

API testing using Codeception and Laravel

I wrote an article on the subject Using Fractal with Laravel to create an API. If you haven't already be sure to check it out. Now I got to the part of writing tests for my API. Initially I used PHPUnit as was being used in the video serie on Laracasts but soon I wanted more features, and the process of writing tests was very slow. So, I really wanted to use something that is simple to write tests with and easy to understand. Codeception I assume that you have already setup your Laravel application to work with Codeception.

Introducing Lumen from Laravel - MattStauffer.co. Posted on April 14, 2015 | By Matt Stauffer (This is part of a series of posts on Lumen by Laravel.

Introducing Lumen from Laravel - MattStauffer.co

Check back soon for more.) Lumen is a new project from Laravel creator Taylor Otwell. It's a "micro-framework", meaning it's a smaller, faster, leaner version of a full web application framework. PHP has two other popular micro-frameworks, Slim and Silex. Lumen has the same foundation as Laravel, and many of the same components. What's it for? Lumen is for projects and components that can benefit from the convenience and power of Laravel but can afford to sacrifice some configurability and flexibility in exchange for a speed boost. Lumen is targeted at microservices--small, loosely-coupled components that usually support and enhance a core project. Show me So as not to talk too much about microservices and Lumen at the same time, let's just start by providing a simple caching layer in front of a slow or unreliable external service.

Lumen - PHP Micro-Framework By Laravel. API-first CMS - Laravel.IO - The Official Laravel PHP Framework Community Portal. Hi guys, so I've been toying with this idea of possibly making an API centric CMS.

API-first CMS - Laravel.IO - The Official Laravel PHP Framework Community Portal

"What the hell is that? " The API itself would implement a (relatively) simple open document format which would allow you to simply store & retrieve your data. This would leave the front-end implementations (web sites, mobile apps, etc.) entirely up to you, the developer. "Why bother? " Those working with or within digital agencies etc. will be all too familiar with various CMSs having weak API plugins etc. as they're always an afterthought and the majority don't follow proper RESTful conventions.

Some identified potential pitfalls. I also envision some content management & collaboration features built into the admin backend as clients forever hold projects up when it comes to content. Another concern is SEO. Anyways, that's my rough idea - would be awesome to add websockets functionality for a realtime API, but baby-steps first. :) All the best, Niall.