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

Community News:
Packagist Latest Releases for 09.21.2014
September 21, 2014 @ 08:05:50

Recent releases from the Packagist:
0 comments voice your opinion now!



Community News:
Packagist Latest Releases for 09.20.2014
September 20, 2014 @ 08:01:25

Recent releases from the Packagist:
0 comments voice your opinion now!



Reddit.com:
The purpose of a framework
September 19, 2014 @ 12:19:48

In this post over in the /r/PHP community of Reddit.com, there's a question about frameworks. The original poster wonders about the purpose of a framework and if they're a requirement to build any kind of application that's "worthwhile".

I read posts here from time to time, and Laravel and Symphony are mentioned a lot here, and I always get the impression that it is a must to use a framework, to build something worthwhile. A little background on myself is that I've always approached development in a cowboy coding style where I just code. I've made a system where I use the basic mysqli object in PHP for database interaction, and I use Smarty templating system to output the html/css/js. I build my own classes based on what the customer is asking for, and then obviously I make the controller pages calling the classes I made - manipulate the data and output to smarty. What would Symphony help me with - that would be hard to accomplish regularly?

Plenty of answers and opinions are shared in the comments of the post, ranging from:

  • Encouragement for Symfony2 and the development speed it accommodates
  • Building a project without a framework
  • The benefits and downfalls of using MVC and other design patterns you may not fully understand
  • A definition of what a "framework" means outside of the world of MVC

There's also a consensus among several of the posts that one of the major benefits of a framework is to provide an overall decrease in the time to market with the handy features and things it provides out of the box. What do you think? Head over and post some thoughts of your own about frameworks and where they fit in your development.

0 comments voice your opinion now!
framework purpose opinion reddit mvc

Link: http://www.reddit.com/r/PHP/comments/2gub3p/the_purpose_of_a_framework/

SitePoint PHP Blog:
Ardent Laravel Models on Steroids
September 19, 2014 @ 11:54:34

In Ardent, an enhancement to the model system in the Laravel framework that allows for easy configuration of validation rules.

One of the (few) things I don't like about Laravel is that you cannot move the validation code from your controller to your models easily. When I write software I like to apply the "fat models, skinny controllers" principle. So, for me, writing the validation code in the controller is not a good thing. To solve this, I'd like to introduce Ardent, a great package for Laravel 4. To be more precise, Ardent presents itself as "Self-validating smart models for Laravel Framework 4's Eloquent ORM." In other words: exactly what we need!

He introduces the library as a part of a test application, a To-Do list that includes user and task handling. He starts with the creation of the base Laravel migrations to build the tables and the code for the two necessary models. He then shows how to install Ardent and put it to use in the controller code, adding validation rules and messages for each property on failure. He also shows how to use the model auto-hydration and hooks to make working with the models even easier. He finishes off the post showing how to set up relations "the Ardent way" using a slightly different format as the usual Laravel handling.

0 comments voice your opinion now!
laravel model ardent library tutorial introduction

Link: http://www.sitepoint.com/ardent-laravel-models-steroids/

PHP.net:
PHP 5.4.33 Released
September 19, 2014 @ 10:18:06

The PHP development group has officially release the latest in the PHP 5.4.x series today - PHP 5.4.33. This is largely a bugfix release, but all users are encouraged to update to this latest version.

The PHP development team announces the immediate availability of PHP 5.4.33. 10 bugs were fixed in this release. All PHP 5.4 users are encouraged to upgrade to this version. This release is the last planned release that contains regular bugfixes. All the consequent releases will contain only security-relevant fixes, for the term of one year. PHP 5.4 users that need further bugfixes are encouraged to upgrade to PHP 5.6 or PHP 5.5.

Updates in this release include bugs fixed in the OpenSSL handling, the GD graphics functionality and the language core. As always, the latest source for this version can be downloaded from the main downloads page or from windows.php.net for Windows users. If you're in interested in the full set of changes, check out the Changelog for the release.

0 comments voice your opinion now!
language release bugfix update

Link: http://php.net/index.php#id2014-09-18-2

NetTuts.com:
Refactoring Legacy Code - Part 10 Dissecting Long Methods with Extractions
September 19, 2014 @ 09:41:54

NetTuts.com is back with the latest part of their "Refactoring Legacy Code" series for PHP. In this latest article (part 10) they work on pulling apart longer methods into smaller, more manageable chunks.

In the sixth part of our series we talked about attacking long methods by leveraging on pair programming and viewing code from different levels. We continuously zoomed in and out, and observed both small things like naming as well as form and indentation. Today, we will take another approach: We will assume we are alone, no colleague or pair to help us. We will use a technique called "Extract till you drop" that breaks code in very small pieces. We will make all the efforts we can to make these pieces as easy to understand as possible so the future us, or any other programmer will be able to easily understand them.

This "extract 'till you drop" mentality (from Robert Martin) has you look at a piece of code and find the logic and lines that can be split out and isolated without removing functionality and interaction. They include some random code from a Stack Overflow post (checking if a number is a prime) and show how to split it out, making the logic and structure less complex and more understandable. They start with a unit test to ensure the result is the same post-refactor and fixing a few bugs along the way. They split it out into two different methods and move it from a more linear approach to something recursive.

0 comments voice your opinion now!
tutorial refactor legacy code part10 series extract method

Link: http://code.tutsplus.com/tutorials/refactoring-legacy-code-part-10-dissecting-long-methods-with-extractions--cms-22182

Community News:
Packagist Latest Releases for 09.19.2014
September 19, 2014 @ 08:09:02

Recent releases from the Packagist:
0 comments voice your opinion now!




PHP.net:
PHP 5.5.17 is available
September 18, 2014 @ 12:27:11

The PHP development group has just released the latest in the PHP 5.5.x series today - PHP 5.5.17.

The PHP development team announces the immediate availability of PHP 5.5.17. Several bugs were fixed in this release. All PHP 5.5 users are encouraged to upgrade to this version.

Bugs fixed include updates in the core language, the COM extension, GD image handling, OpenSSL functionality and the SPL. You can download this latest release (source) from the main downloads page or Windows users can use windows.php.net. You can get the full list of changes and the bugs they relate to in the latest Changelog.

0 comments voice your opinion now!
language release php55 bugfix download update

Link: http://php.net/archive/2014.php#id2014-09-18-1

Matthew Weier O'Phinney:
Deployment with Zend Server (Part 8 of 8)
September 18, 2014 @ 11:20:04

Matthew Weier O'Phinney has posted the last part of his "Deployment with Zend Server" series with part eight. This part focuses on some hints around the actual deployment and automation.

This is the final in a series of eight posts detailing tips on deploying to Zend Server. Zend Server SDK to deploy your Zend Server deployment packages (ZPKs) from the command line. Today, I'll detail how I automate deployment with zf-deploy and zs-client (the Zend Server SDK), and wrap up the series with some closing thoughts.

He quickly summarizes the previous parts of the series as individual steps and wonders if there's a better way than doing each of them manually. He shows exactly this with the automation handling that zf-deploy and zs-client offer combined with a make script defining steps for the deploy, ZPK update and a cleanup/Composer update task.

0 comments voice your opinion now!
deployment zendserver tip series part8 automation make command zfdeploy zsclient

Link: https://mwop.net/blog/2014-09-18-zend-server-deployment-part-8.html


Community Events





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


interview laravel community conference deployment api symfony podcast list bugfix series introduction zendserver voicesoftheelephpant tips language framework release threedevsandamaybe code

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