News Feed
Sections




News Archive
feed this:

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

Zumba Tech Blog:
Caching CakePHP 2.x routes
October 28, 2014 @ 10:47:02

On the Zumba Tech Blog today there's a new post with some helpful hints around caching routes in CakePHP 2.x to help optimize the requests and response time even further.

At Zumba we are continuously looking for optimization in our applications. These optimizations help to reduce the server loads, consequently reducing the number of servers and saving money. Besides that, it gives a better user experience for the end user by serving content faster and in some cases saving on consumer bandwidth (specially for mobile users). This week we profiled our app using Xdebug profiler and we identified the router was responsible for a big part of the request time. [...] In order to optimize the routing time, we started looking at options to optimize our routing process. After some research and deep checking in our codebase as well as CakePHP's code, we found we could cache the routes easily.

Taking a cue from how FastRoute does their caching, their implementation uses a temporary file with the routes completely resolved and written out for easier handling. Since the routing is relatively static, this method works well and can be much faster than resolving them every time. They talk about some of the work done to optimize their method and some of the issues they came across during the process.

0 comments voice your opinion now!
cakephp framework cache route file resolve

Link: http://tech.zumba.com/2014/10/26/cakephp-caching-routes/

Angular Tips:
Working With a Laravel 4 + Angular Application
October 28, 2014 @ 09:11:31

On the Angular Tips site today they have a tutorial posted showing you how to combine the power of the Angular JS frontend framework with a Laravel backend. They walk you through the full process of getting an application up and running, including a bit of actually functionality (not just a "Hello World").

So you decided that Laravel is a great choice for a backend and that Angular is going to fit perfectly as the framework of choice for the frontend. Yeah! That is correct and I am starting to like you. How to start? So many question, so little time.

They start by getting everything you'll need installed, both on the Laravel and Angular sides. Then it gets into the actual development of the application, changing up the default Laravel page to include Angular and a little test to be sure it's working correctly. With this working correctly (after a little route updating too) they get to the more real-world application: a listing of TV shows generated from a dataset on the Laravel backend. They include all the code you'll need to create the frontend app and display the results.

0 comments voice your opinion now!
laravel tutorial angularjs application frontend framework

Link: http://angular-tips.com/blog/2014/10/working-with-a-laravel-4-plus-angular-application/

Benjamin Eberlei:
Symfony All The Things (Web)
October 27, 2014 @ 09:18:52

In his latest post Benjamin Eberlei talks about some of his reasoning to want to Symfony all the things when it comes to building web applications. Actually, it's the results of a discussion he had with a coworker about when is the right point to move from a micro-services infrastructure to a full-stack framework like Symfony.

We use microservice architectures for the bepado and PHP Profiler projects that Qafoo is working on at the monent. For the different components a mix of Symfony Framework, Silex, Symfony Components and our own Rest-Microframework (RMF) are used. This zoo of different solutions sparked a recent discussion with my colleague Manuel about when we would want to use Symfony for a web application.

He talks about some of his own reasons for making the choice including things like the HttpKernel and having a well documented and standardized solution. He notes that most of his reasons are more because of his previous exposure to the framework and could be very similar for others and other frameworks, though. He then extends on the "Hello World" code from the previous post and makes an improved minimal Symfony app with just seven basic parts (including configuration files).

0 comments voice your opinion now!
symfony framework minimal reasons preference webapp

Link: http://www.whitewashing.de/2014/10/26/symfony_all_the_things_web.html

Symfony Blog:
The Symfony Project turns 9!
October 22, 2014 @ 11:50:14

There's some major news from the Symfony project (with matching post on their blog) worth celebrating - the framework and project are celebrating nine years since the first commits were made by Fabien Potencier himself.

Where does the time go? This milestone reminds us all of how Symfony has become an important part of our professional lives and been changing the way we work with code for almost a decade! (We won't even talk about the whole "we're all getting older" thing!) [...] Over the last several years, the Symfony project has completely and continually reinvented itself. Originally a pure MVC framework with some auto-magical features, now it's both a set of decoupled components and a full-stack Request-Response framework backed by a vast development community.

They also talk some about the Symfony community and include a special thanks to all of the developers that have contributed their talents, both in code and documentation, to the framework over the years.

0 comments voice your opinion now!
symfony framework anniversary celebrate nine years

Link: http://symfony.com/blog/the-symfony-project-turns-9

Matt Stauffer:
Laravel 5.0 - Middleware (replacing Filters)
October 15, 2014 @ 10:18:00

In a new post to his site Matt Stauffer looks at a feature of the upcoming version 5 of the Laravel framework, middleware, and how it will replace the current Filter handling. This is part nine in a series about the new features coming in Laravel (the rest are linked at the top of the article).

If you've been following along with my previous blog posts about Laravel 5.0, you may have noticed that route filters were first moved to be their own directory and class structure, and then eventually they mysteriously disappeared. You may have even noticed that references to Middleware showed up in their place.

He starts off by defining what "middleware" actually is and how it fits into the overall execution flow of the application. He describes it as "a series of wrappers around your application that decorate the requests and the responses in a way that isn't a part of your application logic." He then gets into the code examples, showing how to write a simple Laravel-friendly middleware that blocks odd port requests to the application. He includes the configuration updates to integrate it, how to control where it runs and using before and after "filters" inside the middleware.

0 comments voice your opinion now!
series part9 tutorial laravel framework filter middleware introduction

Link: http://mattstauffer.co/blog/laravel-5.0-middleware-replacing-filters

SitePoint PHP Blog:
7 Reasons to Choose the Yii 2 Framework
October 14, 2014 @ 13:52:58

The SitePoint PHP blog has a new post today from Matthew Beaumont with severn reasons to choose Yii2 as your framework for your next project. The Yii framework is a full-stack framework option and has been around for a long time. It recently reinvented itself with version 2 and has improved a lot of the original functionality.

Late last year, SitePoint published an article highlighting the top PHP frameworks. Tied for the number four spot was the Yii (pronounced Yee) Framework. At that time the latest version of the framework available was 1.1.14. Recently, Yii 2.0 was made available, so you can begin to use it in production. While we did cover it recently when it was still in RC status, it just reached full release status, and we feel like it's time to revisit the topic with some reasons for choosing it over alternatives.

He includes brief descriptions with each of his seven points (some with links to other information too):

  • Easy to Install
  • Utilizes Modern Technologies
  • Highly Extensible
  • Encourages Testing
  • Simplifies Security
  • Shorten Development Time
  • Easy to Tune for Better Performance

Some of the items in the list include code snippets showing how they're implemented as well. Be sure to give it a look if you're trying to decide on your next framework or toolset.

0 comments voice your opinion now!
yii2 framework top7 list choose

Link: http://www.sitepoint.com/7-reasons-choose-yii-2-framework/

Reddit.com:
Would you take a job where you had to use a custom MVC framework?
October 08, 2014 @ 12:57:00

There's an interesting discussion happening in the /r/php subreddit on Reddit.com that asks about taking a job if a custom framework was involved.

i recently got a new job and whilst I'm working my notice period I've been tasked to find my replacement. One of the big questions my boss has is whether a developer would mind taking over a MVC framework I built specifically for the company. (I would explain why we didn't use Laravel / Symfony / Zend etc. but that's a whole post in itself). The framework is conventional and should feel familiar to someone with Laravel experience... But at the end of the day it's totally proprietary. It's built to PHP-FIG standards and would come with full documentation. So, would you have any issues taking the job, or would you be put off?

There's opinions shared that lean both ways, but there seems to be a large majority that strays more heavily into the "no" column. They suggest that, with all of the great and well-developed PHP frameworks already out there, a custom one would probably cause more problems that it solves. While there's plenty of technically oriented comments, there's also a few that are more "high level" looking at the reasoning for taking the job (hint: it's not just about technology) and what the needs/requirements of the business are.

0 comments voice your opinion now!
opinion custom mvc framework work

Link: http://www.reddit.com/r/PHP/comments/2il722/would_you_take_a_job_where_you_had_to_use_a/

SitePoint PHP Blog:
Build your own PHP Framework with Symfony Components
October 03, 2014 @ 09:12:05

On the SitePoint PHP blog today there's a post introducing you to the concept of building a framework with Symfony components, using only the ones you need from the Symfony framework ecosystem to create a customized framework to fit your needs.

You've probably met Symfony in your PHP career - or have at least heard of it. What you may not know is that Symfony is, at its core, composed of separate libraries called components, which can be reused in any PHP application. For example, the popular PHP framework Laravel was developed using several Symfony components we will also be using in this tutorial. The next version of the popular CMS Drupal is also being built on top of some of the main Symfony components. We'll see how to build a minimal PHP framework using these components, and how they can interact to create a basic structure for any web application.

He covers some of the main parts of the framework, how to grab the components that will help with some of the common functionality and integrating them to work together. He uses the HttpFoundation, HttpKernel, Routing and EventDispatcher (along with their own dependencies) to create a simple example that will respond to a few different route requests.

0 comments voice your opinion now!
framework components symfony tutorial introduction custom

Link: http://www.sitepoint.com/build-php-framework-symfony-components/

NetTuts.com:
Building a Customer Management App Using AngularJS and Laravel
October 01, 2014 @ 11:52:09

The NetTuts site has posted the first part of a tutorial series showing you how to create an application with Laravel and AngularJS to do some customer management. The application lets you track customers and transactions related to them.

When creating a single-page app we should use some kind of framework to do some of the job for us so we can focus on the actual functionality. AngularJS fits here perfectly, because features like dynamic dependency injection and bi-directional data binding are just great. Sometimes we also require some kind of server. If you've chosen PHP then Laravel may be your best option, as it's easy to work with and pretty powerful. In this part of the tutorial, we will build the front-end of our application using AngularJS.

He starts with some of the "preparation work" that has to be put into the main template for Angular to even work, including the loading of the Angular files themselves. He sets up a basic route and, some initial styling (CSS) and talks about the overall structure of the application. He includes the code to create the customer controller and transactions handling (via controllers) and how to do the usual CRUD (create, read, update, delete) operations for each. HTML output templates are also included to handle the forms and other tabluar output needed to display customer details.

0 comments voice your opinion now!
angularjs laravel framework singlepage customer management tutorial

Link: http://code.tutsplus.com/tutorials/building-a-customer-management-app-using-angularjs-and-laravel--cms-22234

Sound of Symfony:
Episode 4 - Best Practices
September 25, 2014 @ 09:32:38

The Sound of Symfony podcast has released their latest episode (#4) today focusing on Best Practices. Join hosts Magnus Nordlander and Tobias Nyholm and guest Kris Wallsmith ask they talk about some good practices to follow in Symfony-based applications.

In this episode we talk to Kris Wallsmith about best practices for your Symfony app. If you've ever wondered which code belongs in your controller, how to write your model, or how to separate your code into bundles, this is the segment for you. It also features the return of Magnus' favorite segment, the hidden gems section, and a discussion on news and a rundown of community updates.

Other topics mentioned include the walking trip to SymfonyCon, a few "hidden gems" and community updates about Symfony Live London 2014 and Symfony Live New York 2014. You can listen to this latest episode either through the in-page audio player or by downloading the mp3 for listening offline. If you enjoy the show, be sure to subscribe to their feed for more great content.

0 comments voice your opinion now!
soundofsymfony podcast ep4 bestpractices symfony framework

Link: http://www.soundofsymfony.com/episode/episode-4/


Community Events





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


podcast introduction release package list voicesoftheelephpant opinion tips language series bugfix api library community interview install laravel symfony framework deployment

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