News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
APIfy Your Legacy App with Toro
August 19, 2014 @ 12:09:39

The SitePoint PHP blog has a new post that wants to help you API-ify your legacy application with ToroPHP, a router that's "designed for minimalists" to make routing and handling RESTful requests easier.

For the Google Summer of Code 2014, I was selected for a project to create a REST API for ATutor. ATutor has hundreds of thousands of lines of code, yet is written in core PHP. Introducing a PHP router class for the API was necessary, but we needed something unintrusive.

The result was the ToroPHP library. He introduces the library with some background about why it was created and some of the goals it was trying to achieve. Next he shows you how to create a simple "Hello World" endpoint that just defines the endpoint and echoes back the string. He shows how to separate out the logic from the route handling via the "urls.php" definition file. He also shows the handling of URL prefixes and mentions user authentication, making a "backbone" for the API and reuse of classes for similar objects.

0 comments voice your opinion now!
tutorial legacy application torophp library api rest

Link: http://www.sitepoint.com/apify-legacy-app-toro/

blog comments powered by Disqus

Similar Posts

IBM developerWorks: Devise Web 2.0 applications with PHP and DHTML (Part 1)

Asvin Balloo's Blog: AJAX image cropper with YUI and PHP

Reddit.com: Preferred framework for REST usage?

Builder.com: Match users to their geo-location with PHP and PEAR Net:Geo

ProDevTips.com: Writing a CMS/Community with Smarty and the Zend Framework: Part 9


Community Events

Don't see your event here?
Let us know!


api community list composer opinion part2 framework testing yii2 example laravel php7 podcast introduction symfony series language interview project application

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework