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

SitePoint PHP Blog:
Data Validation in Laravel - Introduction & Custom Validators
August 12, 2014 @ 13:59:16

The SitePoint PHP blog has posted the first two parts of a new series looking at how to do data validation in Laravel, a popular PHP framework. Laravel comes with a set of included validators that can easily be used to check incoming data. This article series introduces them and the features they can provide.

If an app was a world then data would be its currency. Every app, no matter what its purpose, deals in data. And almost every type of app works with user input, which means it expects some data from users and acts on it accordingly. But that data needs to be validated to make sure it is of correct type and a user (with nefarious intent) is not trying to break or crack into your app. Which, if you are making an application which requires user input, is why you would need to write code to validate that data as well before you do anything with it.

In the first part of the series they start with an example of doing validation the "old way". They reproduce this same validation using the Laravel validators and show how to introduce it as a service to the overall application. Their "RocketCandy" validation service can then handle the same validations and make for a cleaner interface in the calling script. It's refactored even more to include exceptions when the validation fails and the HTML for outputting the error messages thrown. Unit tests are also included to ensure things are working as they should.

In the second part of the series they build on the examples from part one and introduce custom validators. An example of validation around dashes, spaces and alphanumeric data is included (using regular expressions) and how they can be defined as custom validation rules.

0 comments voice your opinion now!
data validation laravel introduction custom validator framework

Link: http://www.sitepoint.com/series/data-validation-in-laravel-the-right-way/

Hari KT:
Aura Framework V2 The Missing Manual
July 16, 2014 @ 10:14:52

Hari KT has a new post to his site today about a book he's been working around around the Aura framework that provides the missing manual for v2 of the project. He's publishing it as a book over on Leanpub too, so it's easy to grab...and for free too.

Aura has an awesome collection of libraries for different purpose. [...] If you are new to aura, there is probably something you may want to figure out yourself. Some of the components have version 1 and version 2 releases. There is a question of which branch corresponds to which version. [...] But people new to aura may be having hard time to find the specific documentation or may be stuck sometime. [...] I was talking with Paul M Jones regarding the documentation lately, and he too shared some concerns. Talking with him gave me some inspiration to start the missing manual for the aura framework.

The goal of the book it to provide a good resource for people to learn about the framework/components and their use and to help promote Aura. The book is available for free either on Github or Leanpub (or, to help support Hari and the project consider purchasing a copy).

0 comments voice your opinion now!
aura framework component missing manual leanpub github

Link: http://harikt.com/blog/2014/07/15/aura-framework-v2-the-missing-manual/

Symfony Blog:
Improving REST in Symfony
July 11, 2014 @ 12:15:56

On the Symfony blog there's a recent post about a new effort being started to help improve REST in Symfony-based applications. William Durand talks about some of the current tools and some of the missing features/difficulties each has. This effort wants to help change that.

Building APIs with Symfony is not new. We've done that since the early beginning of Symfony: Askeet, Jobeet, it's been a long time! Nowadays, more and more web applications are made of an API and a client side application. Sharing data across applications using APIs also became an essential feature. [...] For most of us, it is not as clear as it should be, and we can certainly do better than what we have right now! Hence the creation of a working group to gather both people and knowledge for REST in Symfony: https://groups.google.com/forum/#!forum/resting-with-symfony.

The target of the group is just about anyone associated with the development of APIs: developers who build them, developers to contribute to Symfony's REST functionality, people with questions about REST and, really, anyone else interested. It's a part of their wider developer experience initiative they've recently ramped up.

0 comments voice your opinion now!
developer experience rest discussion group symfony framework

Link: http://symfony.com/blog/improving-rest-in-symfony

Developer's Lane:
Top 20 CakePHP Interview Questions and Answers
July 04, 2014 @ 13:48:25

The Developer's Lane site has posted a top ten list of questions answered about the CakePHP framework. The idea is that they could be used as a part of an interview to see how well the candidate knows the framework.

Here there are many questions and answers about How CakePHP Framework works? and basic questions related to CakePHP framework functionality.

Questions include:

  • What are are drawbacks of Cakephp?
  • What is the name of Cakephp database configuration file name and its location?
  • What are commonly used components of Cakephp?
  • Why does Cakephp have two vendor folders?
  • Can you remember what is the directory structure when you download Cakephp?

The questions provide a good overview of the framework, but won't tell you if the developer is any good...you still need to figure out that one on your own.

0 comments voice your opinion now!
cakephp framework interview questions developer overview

Link: http://www.developerslane.com/top-20-cakephp-interview-questions-and-answers/

Leonid Mamchenkov:
CakePHP 3, here we go again.
July 02, 2014 @ 13:18:55

In this new post Leonid Mamchenkov looks at the latest version of a PHP framework that's been around since the PHP4 days, CakePHP, and some of the improvements that will come with version three.

Currently, I am at the start of a couple of projects, which require a bit of the future support. CakePHP 2.x can handle the job now, but I'm looking more into the next 3-5 years. And that's why I'm looking at CakePHP 3, which is still in the early development stage, with an alpha release coming not too long from now (have a look at the CakePHP 3 roadmap document). Let's have a look at the high level goals for CakePHP 3.

Among the items he mentions are things like:

  • The adoption of broader PHP community standards
  • An increase in modularity
  • Developing for PHP 5.4+
  • Composer support (and using PSR-4 autoloading)
  • The removal of some more complex, brittle code in favor of simpler, easier to extend options

Check out the roadmap and migration guides for full information.

0 comments voice your opinion now!
cakephp v3 framework refactor features roadmap goals

Link: http://mamchenkov.net/wordpress/2014/07/01/cakephp-3-here-we-go-again/

7PHP.com:
A Comprehensive Interview About Slim The Micro PHP Framework
June 24, 2014 @ 10:42:35

On the 7PHP.com site today Khayrattee Wassem has posted the latest in his PHP community interview series. This time it's with Josh Lockhart, creator of the Slim framework, talking about his experiences as a developer and in working on the open source project. This time the focus is more on the framework than Josh himself, though.

Last time, I've introduced the Captain America of The PHP Ecosystem to you, aka Josh Lockhart, via a 7PHP 'PHP Interview series to help drive thy PHP aspirations'. This time we go a little bit further with Josh to find out 'as much as we can' about his little masterpiece, I named Slim Framework - the PHP micro framework. Let's get started..

Josh answers questions about:

  • How the framework got started and what was the motivation behind it
  • What need the project tries to solve
  • Why someone might choose Slim over other frameworks
  • How many developers are involved in the project
  • What's coming in Slim v3

There's lots more too, so be sure to check out the full post for the answers to these and other interesting (and enlightening) questions.

0 comments voice your opinion now!
7php community interview joshlockhart slim framework

Link: http://7php.com/slim-php-framework-interview/

Symfony Blog:
Making the Symfony Experience *Exceptional*
June 18, 2014 @ 12:52:34

In this new post to the Symfony blog Ryan Weaver talks about some steps the project is making to help improve the "developer experience" (DX) around using the framework. There's four things listed that they're trying out to see if they can improve the framework even more.

When Symfony was released, we (the community) thought a lot about the Symfony experience: working on documentation, improving error messages and creating open source bundles. But since then, innovation has slowed down and the Symfony experience has stopped evolving. Today, the Symfony Framework is still the highest quality PHP Framework available. But the Symfony experience has stagnated. The good news is that improving the developer experience is easy, and it involves you!

He includes the "four easy steps" that any developer using Symfony can follow to help out the development team and make things even easier (and more intuitive) to use:

  • The DX (Developer Experience) Label (on the Symfony issues list on GitHub)
  • Adding a suggested DX Label for your own repository
  • Working on DX issues at a Community Hack Day
  • Being Aggressive, Focusing on Beginners
0 comments voice your opinion now!
symfony framework community developer experience

Link: http://symfony.com/blog/making-the-symfony-experience-exceptional

Matthias Noback:
Symfony2 How to create framework independent controllers?
June 18, 2014 @ 09:15:16

Matthias Noback has a new post to his site today, the first part of a series, looking at making framework-independent controllers for use in a Symfony2 framework-based project.

The general belief is that controllers are the most tightly coupled classes in every application. Most of the time based on the request data, they fetch and/or store persistent data from/in some place, then turn the data into HTML, which serves as the response to the client who initially made the request. [...] In this post I demonstrate that this high level of coupling is definitely not necessary. I will show you how you can decrease coupling a lot by taking some simple steps. We will end with a controller that is reusable in different types of applications, e.g. a Silex application, or even a Drupal application.

In this first part he focuses on a few places where the common practices lead to some unnecessary coupling between the controller and framework:

  • Using the framework helper methods
  • Using dependency injection (manually injecting instead)
  • Making the controller a service instead

The next post in the series will look at the use of annotations and how to refactor them out of the controller to remove yet another coupling point.

0 comments voice your opinion now!
framework independent controller symfony2 tutorial refactor decouple

Link: http://php-and-symfony.matthiasnoback.nl/2014/06/how-to-create-framework-independent-controllers/

SitePoint PHP Blog:
How to Create a Laravel CSS-Minify Command
June 11, 2014 @ 14:58:31

The SitePoint PHP blog has a new post today from Tounes Rafie showing you how, in a Laravel framework based application, to create a minify command with the framework's "artisan" command.

In this article you'll learn how to use Laravel's Artisan command line tool, and how to create a customized command. Note that you need to be familiar with the Laravel framework to get the most of this article. In this tutorial we're going to build a command to minify our css assets.

He starts with a (very) brief look at what Laravel commands are and the options this articular one will include. Next up is the code you'll need to create the command, making use of Laravel's integration of the Symfony Console component. He shows how to register the command with the rest of the application and how to work with the options/arguments for the input. From there he shows how to run the command and how to make some other improvements including colorized output and more information on execution.

0 comments voice your opinion now!
css minify command laravel artisan framework tutorial

Link: http://www.sitepoint.com/create-laravel-css-minify-command

Community News:
Sound of Symfony Podcast, Episode 1
June 06, 2014 @ 09:56:48

A new podcast has joined the list of things for your PHP-related listening pleasure, the Sound of Symfony podcast. This new show, hosted by Magnus Nordlander and Tobias Nyholm, focuses in on the Symfony ecosystem and things that revolve around it. They're already posted their first episode too - Episode 1 - The one where we're audio production noobs.

In our first episode, coming to you straight from a small conference room in Stockholm, Sweden, we go through the news, interview a prominent community member, and run through the conference calendar for the year. Of course, since this is our first episode, it has some mandatory audio production mistakes, we're sorry about those. Nothing too horrible, you might not even hear it, but we'll always know it's there, and we'll make sure to do better next month!

You can listen to this first episode through the in-page player or you can just subscribe to their feed and get this and future shows as they're released.

0 comments voice your opinion now!
soundofsymfony podcast ep1 audio noobs symfony framework

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


Community Events





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


list wordpress community configure interview language code testing release unittest series library application developer threedevsandamaybe podcast install laravel introduction api

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