News Feed
Jobs Feed
Sections




News Archive
feed this:

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

David Makin:
Creating a simple REST application with Silex
December 27, 2013 @ 10:36:48

David Makin has put together a new post to his site showing you how to make a simple REST web service with Silex, the PHP microframework from the Symfony project.

So you have come to the conclusion that, rather than having the code to update customer details and that little fix to convert the date from GMT to UTC should happen in once place rather than being copied into several pieces of code, a REST service is the answer. Perhaps you just think you should know how to create a REST service. Either way this post is for you. In this post we will start off with a blank directory and go through installing Silex and getting it to serve a couple of simple routes.

He helps you get Silex installed via Composer and gets you started with a simple root and "stock code" route. He uses these to explain a bit about the framework's route handling and includes URLs to call that will execute them.

0 comments voice your opinion now!
silex microframework introduction beginner tutorial

Link: http://sleep-er.co.uk/blog/2013/Creating-a-simple-REST-application-with-Silex/

7PHP.com:
Slim PHP Micro Framework Through The Lens Of Jeremy Kendall
December 09, 2013 @ 09:44:13

On 7PHP.com today there's an interview with PHP community member Jeremy Kendall sharing some of his opinions about the Slim Framework.

Have you ever tried to use Slim PHP micro framework? Or you are in a confusion whether to choose it or not? Well, today I bring you a small chat with Jeremy Kendall [@jeremykendall] who's been using Slim PHP for quite some time now and he is even using it on his side open-source project as you will discover. Jeremy has previously been giving a nice talk about Slim PHP Microframework last year in November at Tech Camp Memphis, you can view the Youtube video here! Also worth noting, he has recently delivered another Slim talk at the recent php[tek]2013, you can view his slideshare talk here.

Jeremy talks some about his background with the Slim framework and his overall thoughts on it as a microframework. He shares some of the things he thinks the framework could work on in the future and places where "it rocks" and does it all right. There's a brief comparison of Slim versus Silex and Jeremy's choice of it over something like Zend Framework of Symfony.

0 comments voice your opinion now!
slim framework microframework jeremykendall interview community

Link: http://7php.com/slim-php-micro-framework-jeremy-kendall-opinion/

Igor Wiedler:
How heavy is Silex?
September 03, 2013 @ 13:17:35

Igor Wiedler has shared some of his thoughts on his site today about the "heaviness" of things that call themselves "microframeworks" and why it may not be about the amount of code involved at all.

Quite often silex has been described as heavy or bloated. It's time to put this myth to rest. [...] Micro-framework What an excellent buzzword! Let's face it, this is an overloaded and mostly nebulous term. I don't think it's possible to clearly define what it means. [...] But the real answer lies in what silex doesn't do.

He suggests that the "micro" in "microframework" is more about it providing a limited amount of features (bare-bones) versus a more full-featured, possibly full stack framework. He talks about the dependencies that Silex currently has and provides some statistics about it and these packages it depends on. He also briefly mentions the minimal interface the framework provides, citing the few components you'll probably touch in your work with it.

0 comments voice your opinion now!
silex heavy myth microframework bloated linesofcode dependencies minimal

Link: https://igor.io/2013/09/02/how-heavy-is-silex.html

CodeForest.com:
Creating simple tasks app with Backbone.js and Slim micro framework (part 1)
June 25, 2013 @ 11:52:44

New on CodeForest.com today, Luka Peharda has posted the first part of a series that combines the Slim microframework with backbone.js to make a simple tasks (to-do) application.

The app in this tutorial will be called "Tasks". I know, right? Super creative. This first article will give an introduction to the technologies and the idea of the series. Also, we'll cover project structure and entire PHP side of the story. In second article we'll cover Backbone.js side of the story and create simple tasks application which we'll refine and upgrade in later articles (third and fourth one).

They introduce the two technologies (briefly) and get right in to the directory and database structure they'll be using. They use the NotORM library for accessing the database. Code is included showing the routes for getting, adding, updating and deleting tasks out of the database.

0 comments voice your opinion now!
tutorial slim microframework backbonejs tasks todo application

Link: http://www.codeforest.net/creating-simple-tasks-app-with-backbone-js-and-slim-micro-framework-part-1

NetTuts.com:
Taming Slim 2.0
April 02, 2013 @ 09:17:11

On NetTuts.com today there's a new tutorial posted about "taming" Slim 2.0, the latest version of the popular PHP microframework. They look at application structure and share some tips to using this update.

Slim is a lightweight framework that packs a lot of punch for its tiny footprint. It has an incredible routing system, and offers a solid base to work from without getting in your way. Let me show you! But that's not to say that Slim doesn't has some issues; it's one-file setup becomes cluttered as your application grows. In this article, we'll review how to structure a Slim application to not only sustain, but improve its functionality and keep things neat and systematic.

He starts with an example of "vanilla Slim" and looks some at what's happening behind the scenes in the routing engine. They then give you a step by step installation and usage guide including updating the router to use class files. An example controller is included as well as some basic error handling using a Twig template for use across the application.

0 comments voice your opinion now!
slim microframework tutorial introduction class controller router error handling


Fabien Potencier:
Debugging Silex applications just got fun
February 08, 2013 @ 11:54:38

On his site Fabien Potencier has posted about a feature added to Silex to help make debugging the flow of your application "more fun" - the Symfony web profiler.

One of the big advantages of both Symfony and Silex is that they are based on the Symfony HttpKernel component. [...] But handling HTTP requests with the Symfony HttpKernel also gives you a lot of free and optional features like a built-in reverse proxy written in PHP, easy handling of ESI and Hincludes (via the Fragment sub-framework), or the gorgeous Symfony web profiler.

The profiler provides information on which components were accessed, their memory consumption and how long they took to execute. The integration happens via the WebProfiler provider for Silex and is already integrated into the Silex skeleton base application.

0 comments voice your opinion now!
silex debug profiler microframework httpkernel skeleton


Vance Lucas:
Introducing Bullet The Functional PHP Micro-Framework
December 21, 2012 @ 09:02:00

Vance Lucas has a new post to his site sharing at a project he's been working on, a micro-framework for PHP that takes a functional approach to its structure (and the structure of the apps you can make with it), Bullet.

Bullet is a new PHP micro-framework with a unique functional approach to URL routing that allows for more flexibility and requires less verbosity than the more typical full route+callback approach found in other micro-frameworks. The main problem with most micro-frameworks and even full-stack MVC frameworks that leads to code duplication is that the callback or method executed to perform the action and respond to the URL route lives fully within its own scope. This means that you are forced to repeat a lot of setup code across URL route handlers that load the same resource, authorize it, etc.

He illustrates with an example of a GET/DELETE to the same routes and having to create multiple handlers for each. He restructures this with Bullet and shows how it can nest callbacks inside of handlers to make for simpler routing. It also scopes down requests and gets more fine grained as you nest, making it easier to create reusable handlers (like in other files). If you're interested in finding out more about Bullet and its structure, you can find it in the project's main site.

0 comments voice your opinion now!
bullet microframework nested functional scope routing


IBM developerWorks:
Create REST applications with the Slim micro-framework
December 17, 2012 @ 12:56:24

On the IBM developerWorks site there's a new tutorial posted walking you through the process of creating a REST application with Slim, a popular microframework for PHP.

In this article, I introduce you to Slim, a PHP micro-framework that's designed for rapid development of web applications and APIs. Don't be fooled by the name: Slim comes with a sophisticated URL router and support for page templates, flash messages, encrypted cookies, and middleware. It's also extremely easy to understand and use, and it comes with great documentation and an enthusiastic developer community.

They start off by defining REST in terms of its usual four "verbs" - GET, POST, PUT and DELETE - and the conventions of the types of actions for each. Once you get the framework installed (via Composer) they help you create a sample database with an "articles" table and some sample data your service will work with. They go through each of the "verbs" and include code showing how to respond to the requests for each, including some exceptions for when things go wrong. There's also a bit about adding authentication "middleware" to the process - a hook to validate a user key as a part of the routing process. They finish things off by showing how to support multiple response formats and like XML and JSON based on the requested media type.

0 comments voice your opinion now!
slim microframework tutorial rest api interface


Stan Lemon:
Aura.Micro - Experimental Replacement for Silex
December 14, 2012 @ 09:29:12

With all of the recent talk about the Aura framework that's been happening lately, Stan Lemon thought it would be interesting to see how a microframework based on the Aura packages would be to create. He's posted about his experiences on his site today.

I was recently working on a small project that used Silex. As I browsed my vendor folder, I realized how much extra "stuff" I had inherited with Silex. There were a bunch of other components required when all I wanted was some quick and easy routing, micro-framework style. When I think about going lean I always find myself coming back to Aura. Micro-frameworks are not a new to idea to Aura, so I wondered if I could take the elegance and ease of Silex by wrapping up Aura.Router and exposing it through a similar API.

The result of his work is Aura.Micro, a simple microframework that really just handles routing (unlike Silex with builds on the Pimple DI as well). He includes an example of it in use, defining several different kinds of actions on the routing like "before", "finish" and a few "get" routes.

0 comments voice your opinion now!
auramicro microframework experiment silex router


Volker Dusch:
A silex love story - 'Embedded' PHP
December 05, 2012 @ 12:03:17

In this new post to his site Volker Dusch talks about some of his first experiences with the Silex microframework (from the folks behind Symfony) and the evolution his code went through in its first few versions.

A couple of weeks ago Igor wrote a fantastic blog post about "Scaling a Silex code base" which made me remember a story I wanted to share about how I fell in love with Silex. This blog post aims to tell that story. If you never heard of Silex is let me paste the blurp from the silex home page for you: "Silex is a PHP microframework for PHP 5.3. It is built on the shoulders of Symfony2 and Pimple and also inspired by Sinatra."

He talks about some of his "first steps" with the framework and their need for a smaller system that could run embedded on a local machine. He talks about how Silex let him rapidly prototype and develop the application with only what was needed. He shows the evolution of his route handling from simple closures to method calls on objects out to using providers.

0 comments voice your opinion now!
silex microframework embedded application opinion



Community Events











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


framework package application unittest hhvm release language hack composer install example symfony2 component podcast security overview opinion introduction facebook code

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