Packagist Latest Releases for 01.28.2015
January 28, 2015 @ 08:05:54
Recent releases from the Packagist:0 comments voice your opinion now!
Recent posts from PHP Quickfix
January 28, 2015 @ 07:01:31
Recent posts from the PHP Quickfix site:0 comments voice your opinion now!
January 2015 Issue Released - Be the Boss
January 27, 2015 @ 13:18:45
php[architect] magazine has just released their January 2015 issue - "Be The Boss". This issue includes articles talking about freelancing, the importance of communication in open source and the usual columns.
This month is a personal favorite of mine, as the theme is "Be the Boss". It speaks to those who wish stop working as an employee and strike out on there own, something I've done twice in my life. In Get Off the Freelance Roller Coaster!, Yitzchok Willroth (@coderabbi) talks on the importance of not placing all of your eggs in one basket (or projects with one vendor). In Choose Your Own Adventure-Freelancer or Founder?, Joshua Warren talks about the two avenues that are open to those going it on their own, freelancer or business founder.
Articles in this month's edition include:
The usual columns (Laravel Tips and Education Station) return once again as well as a a new one from David Stockton called "Leveling Up" to help you become a better developer. You can pick up your own copy from the php[architect] website.
SitePoint PHP Blog:
Starting a New PHP Package The Right Way
January 27, 2015 @ 12:08:09
In part one of a new series on the SitePoint PHP blog Bruno Skvorc looks at the right way to start a PHP package using a set of guidelines that have evolved recently in well-structured, well-tested PHP packages.
In recent years, good standards for PHP package design have popped up, in no small part due to Composer, Packagist, The League and, most recently, The Checklist. Putting all these in a practical list we can follow here, but avoiding any tight coupling with The League (since our package won't be submitted there - it's specifically made for a third party API provider and as such very limited in context).
The list of rules includes topics like having a license selected, using PSR-4 autoloading and having in-depth code comments. Bruno uses these as a foundation and starts in on the creation of a package. He uses the PHP League skeleton structure to create the files and folders for a basic package. From there he updates the contents with details for his Diffbot example and installing other needed software libraries. The rest of the post is broken up into the two remaining steps and examples under each: sticking with the PSR-2 guidelines and planning for the structure of the package.
Design Patterns The Simple Factory Pattern
January 27, 2015 @ 11:53:20
NetTuts.com has posted the next part of their series focusing on design patterns (and more specifically implementing them in PHP). In this latest post they look at a simple version of the Factory design pattern.
When you think of a factory, what comes to mind? For me, it's a place where things are created - that is, it's a centralized placed where things are produced. Later, the delivery of said products are done by the factory based on an order. Let's say that you're requesting a car. A factory will create one based on the specifications of the work order and will then deliver it once it's complete. Just as their real world counterparts, a software factory (that is, software that implements the factory design pattern), is an object that is responsible for creating and delivering other objects based on incoming parameters.
They mention the three different versions of the factory pattern but focus in on the simplest one (hence the "simple" in the title). They continue on with the car example, showing how to use a simple factory (a "carFactory") to build an instance of the "Car" class based on different classes of car types. The object is constructed when a "build" method is called with the type.
Extending Laravel's Application
January 27, 2015 @ 10:48:37
Matt Stauffer has a new post to his site today showing you how to extend Laravel's Application class to enhance its handling with other handy features.
It's seldom that we need to extend Laravel's core, and even when we do, it's most likely we're going to extend specific components, which is detailed in the docs. However, all of these instructions presume you're using the core Laravel Application (IOC Container) to extend the other classes. What if you want to extend the Application itself?
The example he provides is from his own real-world experience, based around changes they wanted to make in the default folder paths for things like the "storage" or "public" directories. He shares the three simple steps to making this custom handling work:
In this case, changing the default paths is something that's under discussion already, but it gives a good simple example of changing that default functionality.
Questions from the Field Should I Escape My Input, And If So, How?
January 27, 2015 @ 09:22:04
In his latest post Derick Rethans shares his answer to a question he was asked at a recent PHP conference regarding the escaping of input before use in a MongoDB query.
At last weekend's PHP Benelux I gave a tutorial titled "From SQL to NoSQL". Large parts of the tutorial covered using MongoDB-how to use it from PHP, schema design, etc. I ran a little short of time, and since then I've been getting some questions. One of them being: "Should I escape my input, and if so, how?". Instead of trying to cram my answer in 140 characters on Twitter, I thought it'd be wise to reply with this blog post. The short answer is: yes, you do need to escape.
He uses the rest of the post to get into the longer answer, a bit more detail about why you should escape and what kinds of things can be done. He points out that, because of how MongoDB queries are created, SQL injection is much more difficult. He does remind you that superglobals can also be used to send arrays too which could lead to unexpected data input. He gives an example of how this would work and why it would be a problem.
So although MongoDB's query language does not require you to build strings, and hence "escape" input, it is required that you either make sure that the data is of the correct data type.
Packagist Latest Releases for 01.27.2015
January 27, 2015 @ 08:02:36
Recent releases from the Packagist:
Latest PECL Releases for 01.27.2015
January 27, 2015 @ 07:06:29
Latest PECL Releases:0 comments voice your opinion now!
php[tek] 2015 Schedule Announced
January 26, 2015 @ 13:43:50
php[tek] is a PHP conference like no other: it brings together great technology content and great people and mixes them up in a wonderful cocktail of PHP fun. We like to think of php[tek] as a professional conference with a community flair. You will find a high-quality presentations by the brightest experts in the PHP world, coupled with a welcoming and friendly community of attendees and speakers.
Sessions at this year's event cover a wide range of topics including:
You can pick up your tickets for the event directly from the main conference website.
Don't see your event here?
Let us know!
voicesoftheelephpant language community configure podcast extension release conference laravel list interview install opinion series symfony introduction unittest composer api version
|All content copyright, 2015 PHPDeveloper.org :: firstname.lastname@example.org - Powered by the Solar PHP Framework|