News Feed
Sections




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

NetTuts.com:
A Practical Use of WordPress Global Variables
September 23, 2014 @ 11:54:09

On the NetTuts.com site there's a new post (a part of a series) that introduces you to the global variables available in WordPress and provides a practical use for them.

In the first article in this series, we reviewed an introduction to WordPress global variables. Specifically, we said that they are variables that hold a variety information that can be accessed from anywhere in the WordPress page lifecycle. We learned how to access a global variable and display various details about the latest post using the $post global variable. In today's article, we will dive further into global variables by learning how to access them to display the author information.

In this post they focus on extracting user (author) data from the system via the "authordata" global variable. He shows an example of a print_r output of the data it contains and use this to filter posts, only showing three per-author.

0 comments voice your opinion now!
wordpress global variable author information authordata

Link: http://code.tutsplus.com/tutorials/a-practical-use-of-wordpress-global-variables--cms-20854

SitePoint PHP Blog:
Being a Full Stack Developer
September 23, 2014 @ 10:53:55

In this new post to the SitePoint PHP blog George Fekete shares some thoughts about what it means to be a "full stack developer" and what kinds of technology and skills are involved.

The barrier of entering the web development industry as a web developer is still low, but it's getting increasingly complex. The dynamic nature of the whole industry makes requirements shift often to the most popular and "next best thing" tools and programming languages. Gone are the days when only one programming language or a very specific process was required from a developer. Nowadays programmers must know a range of technologies across multiple platforms in order to do good work.

He starts with his own definition of what the term "full stack developer" means and how it's different from what it meant even just a few years ago (like back in 2000). He breaks up the skills and technology into a few different categories:

  • System administration
  • Web development tools
  • Back-end tech
  • Front-end tech
  • Design (including UX/UI)

Each item on the list includes a bit of context around the topic and a few items that could fit inside it. He ends the post wondering if it's better to be a full stack developer or not. Is being a generalist better than being a pro in a particular technology?

0 comments voice your opinion now!
fullstack developer opinion technology knowledge

Link: http://www.sitepoint.com/full-stack-developer/

Rob Allen:
Using ZF2 Forms with Twig
September 23, 2014 @ 09:28:53

Rob Allen has a new post today showing how to integrate Zend Framework 2 forms into a Slim framework based application. He started the topic in a previous post and continues, this time using the Twig templating framework to handle the rendering.

The ZF2 view helpers, formRow and formElement now look like Twig functions, however we don't want to have to rewrite all our ZF2 view helpers into Twig. Fortunately, Twig supports the concept of a undefined function callback is called whenever Twig encounters a function that it doesn't know how to call. We can use this to proxy through to the ZendView system and get it to render the ZF2 view helpers.

He shows how to use this callback functionality and a custom view layer with the Slim-Views component to render the output. He includes a simple Slim example, setting up the custom View class as a parser extension and how to register the callback to invoke Twig.

0 comments voice your opinion now!
zendframework twig render slimframework integration tutorial view

Link: http://akrabat.com/zend-framework-2/using-zf2-forms-with-twig/

Community News:
Packagist Latest Releases for 09.23.2014
September 23, 2014 @ 08:02:12

Recent releases from the Packagist:

Community News:
Latest PECL Releases for 09.23.2014
September 23, 2014 @ 07:05:36

Latest PECL Releases:
  • couchbase 2.0.0 This is the first GA release of the new 2.0 PHP SDK. No changes since release 2.0.0beta2.

  • graphdat 1.0.3 Stable release, linux based platforms only

  • mongo 1.5.7 ** Bug * Windows compile fixes.

  • mongo 1.5.6 ** Bug * [PHP-1155] - php_mongo_io_stream_read() should revert to default_socket_timeout if socketTimeoutMS was zero * [PHP-1156] - Use default and block indefinitely for zero and negative connect/socket timeouts, respectively * [PHP-1158] - Driver emits warnings after setting connectTimeoutMS * [PHP-1220] - Client doesn't find Primary after election ** Improvement * [PHP-1154] - Make connect/read timeouts for blocking and defaults consistent ** Documentation * [PHP-1157] - Fix documentation for MongoCursor::timeout() default * [PHP-1159] - Document that users may need to copy libsasl.dll to lib path for Windows installs * [PHP-1162] - Update documentation for MongoLog constants * [PHP-1167] - Clarify that $snapshot only prevents duplicates in documentation * [PHP-1216] - Clarify that RS connections to non-canonical hostnames are not kept

0 comments voice your opinion now!



SitePoint PHP Blog:
What to Expect from Yii 2.0
September 22, 2014 @ 12:32:17

The SitePoint PHP blog has a new post today from Arno Slatius that talks about some of the features coming in Yii 2.0, a PHP-based MVC framework with a target for a stable release coming very soon.

Yii 2.0 was released into beta last April and the goal for a first stable release was set for the middle of 2014. The GitHub issue list has 300 open issues and 2913 closed while I'm writing this and both numbers are still increasing. The progress to the 2.0RC milestone was at 99%. My guess is that the team is close, but we'll probably have to wait just a little bit longer. While we're all waiting, lets take a look at what we can expect by looking at an already available example.

He starts with a "tiny bit of history" about the framework (its origins, the work done on 2.0) and talks about some of the requirements to get it installed and working. He helps you set up a sample project and shows off the Twitter Bootstrap integration, the debug bar and the "Gii" tool that can help generate code automatically (following the conventions of the framework). He finishes off the post with a look at some of the main things that changed in the 2.0 release including moving some method calls to properties, datetime handling, behavior definitions and model/view updates.

0 comments voice your opinion now!
yii v2 introduction tutorial changes requirement install gii history

Link: http://www.sitepoint.com/expect-yii-2-0/

NetTuts.com:
How to Build Rate Limiting into Your Web App Login
September 22, 2014 @ 11:12:14

In this new tutorial on NetTuts.com, Jeff Reifman shows you how to build rate limiting into your application to help with issues on your login caused by possible brute force attacks.

Since one of the wealthiest corporations in the world [Apple] didn't allocate the resources to rate limit all of their authentication points, it's likely that some of your web apps don't include rate limiting. In this tutorial, I'll walk through some of the basic concepts of rate limiting and a simple implementation for your PHP-based web application.

He starts with a brief look at how (brute force) login attacks actually work and how that relates to the most common passwords used. He splits out the two main approaches to rate limiting in applications: limit based on failures by username or limiting by IP address. He then gets into the actual code examples, choosing a Yii framework-based application for his illustration. He creates a simple "failed login" database table, shows how to log the attempts and includes a snippet to purge items older than (by default) 120 minutes ago. Finally, he includes the code to check the table and see if the username has too many failures listen and, if so, denies them access.

0 comments voice your opinion now!
rate limiting login application tutorial mysql database

Link: http://code.tutsplus.com/tutorials/how-to-build-rate-limiting-into-your-web-app-login--cms-22133

Halls of Valhalla:
From PHP 5 to 7
September 22, 2014 @ 10:56:32

On the "Halls of Valhalla" site there's a new post the tries to explain the jump from PHP5 to PHP7 and what all that means for the language (and community around it).

Since around 2005 we've heard talk about PHP 6 development. There have even been books sold about it. But where is it? As of July of this year it was decided that there won't be one and that PHP will skip directly to version 7. Why is it skipping to the next major version, and what ever happened with PHP 6? And if we're already jumping to PHP 7, what kinds of features will it have?

They start with a "brief history" of PHP since its inception back in the mid 1990s and follow its evolution at a high level through the years. Then comes the topic of PHP6 and the work that was already being put towards it and integrated Unicode support. It talks about some of the difficulties of this conversion and the delays that ended up happening. Instead, it was decided that things would stay in the PHP 5.x series and 5.3, 5.4 and 5.5 have been created since. The jump to PHP7 came from this vote with several different reasons influencing the decision.

The post finishes with a look at some of the new things that will be coming in PHP7 including major performance improvements, abstract syntax tree functionality and asynchronous programming, allowing for the execution of parallel tasks in the same request.

0 comments voice your opinion now!
php5 php6 php7 community unicode language history features

Link: http://halls-of-valhalla.org/beta/news/from-php-5-to-7,146/

Sameer Borate:
Data cleaning in PHP applications
September 22, 2014 @ 09:41:56

Sameer Borate has a new post today showing the use of a "cleaner" library to help sanitize the data input to your application. In this tutorial he introduces you to Mr Clean, an "extendible PHP Data Cleaner".

Scrubbers or data cleaners are an important part of the data transformation process. Whenever you are involved in some data import or export process, data scrubbers can help you clean and standardize your data elements before storing. There are many libraries that help in sanitizing and cleaning data. One such I recently found is mr-clean; it is a extendible PHP Data Cleaner that you can use in your PHP applications to clean heterogeneous data before storing it in your database or other persistent storage like CSV files.

He walks you through the installation (via Composer) and the creation of an instance of the main "cleaner" object. He then provides a few examples of some data scrubbing features it offers:

  • Basic scrubbing (trim, stripping HTML tags, etc)
  • Booleans
  • Filtering HTML
  • Stripping CSS attributes
  • Nullify
  • Null if repeated
  • Strip Phone Number
  • Pre/Post scrubbing handling

He finishes up the post with a look at creating a custom scrubber class, an "only numeric" handler that replaces any character that's not a number in a string with an empty string (removing it).

0 comments voice your opinion now!
data cleaning mrclean library introduction tutorial

Link: http://www.codediesel.com/data/data-cleaning-in-php-applications/

Community News:
Packagist Latest Releases for 09.22.2014
September 22, 2014 @ 08:00:11

Recent releases from the Packagist:


Community Events





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


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

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