News Feed
Jobs Feed
Sections




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

SitePoint PHP Blog:
Getting Started with PHP Underscore
April 17, 2014 @ 13:50:28

The SitePoint PHP blog has a new article posted showing you how to get started with Underscore, a PHP library ported over from Javascript's popular Underscore.js library with many of the same methods intact.

If you've ever used the Backbone framework for JavaScript, you'll already be familiar with Underscore. Indeed, it's become incredibly useful for JavaScript developers in general. But did you know that it's been ported to PHP? [...] Underscore describes itself as a "utility belt library for JavaScript that provides a lot of the functional programming support that you would expect in Prototype.js (or Ruby), but without extending any of the built-in JavaScript objects. It's the tie to go along with jQuery's tux, and Backbone.js's suspenders."

He starts by showing you how to get it installed and some of the basic syntax of the methods it defines (basically replace the period with the double-colon) for both the procedural and OOP handling. He shows examples of a few of the more handy methods it provides including:

  • Each
  • Pluck
  • Minimum and Maximum
  • Filter and Reject
  • sortBy
  • groupBy

...and many more. There's also a bit of talk about templating and extending the library via "mixins".

0 comments voice your opinion now!
underscore port introduction methods functionality

Link: http://www.sitepoint.com/getting-started-php-underscore/

NetTuts.com:
Routing Overview & Basics in Symfony 2
April 17, 2014 @ 12:10:12

If you're relatively new to using the Symfony2 framework, you might be wondering about some of the things happening during requests to your application. One of these things is the routing and handling of each request. In this new post from NetTuts.com they introduce you to the foundations of Symfony2 routing in a screencast.

In the last video, I said we'd take a look at controllers next, but I actually feel it may be easier to learn the framework in a slightly different order. Instead, we're going to learn about the basics of Symfony 2 routing, to give our applications clean and pretty URLs and make it easy to manage our applications URLs and links. We're not going to get too detailed, as Symfony's routing can do quite a bit, but we'll at least cover what we need to know by keeping it straight and to the point.

The screencast is a bit less than 10 minutes long and provides an overview of the routing, how it interacts with bundles and controllers. There's also a bit about using annotations to help define routing information directly in the controller.

0 comments voice your opinion now!
routing basics symfony2 introduction screencast demo

Link: http://code.tutsplus.com/tutorials/routing-overview-basics-in-symfony-2--cms-20754

Edd Mann:
Storing PHP Sessions/File Caches in Memory using TMPFS
April 17, 2014 @ 11:19:59

Edd Mann (of the Three Devs & A Maybe podcast) has shared a method of session storage he worked up to help increase performance in his application. He shows how to store sessions in memory with the help of TMPFS.

Yesterday I was looking through some application logs and noticed a significant bottleneck with I/O reads in the implemented file cache. [...] This was when I found 'tmpfs', saving me from all sorts of issues relating to adding yet another application to the production stack. 'tmpfs' appears as a mounted partition on your system, however, under the hood it allocates and uses a section of physical memory (non-persistent through reboots). [...] his results in the desired speed boosts, without tampering with the application logic itself. Even better, if the mount is unsuccessful for some reason, it will safety fall-back to using the persistent hard-disk solution.

Since PHP sessions make it easy to change the "save_path" location for the data in an ini value, setup is easy. He includes the needed configuration change and the commands you'll need to mount the tmpfs partition on your local file system.

0 comments voice your opinion now!
tmpfs session file cache memory tutorial comamnds ini

Link: http://eddmann.com/posts/storing-php-sessions-file-caches-in-memory-using-tmpfs

Sameer Borate:
PHP applications on Google App Engine
April 17, 2014 @ 10:40:02

Sameer Borate has posted a guide to his site today showing you how to get started with PHP applications on the Google App Engine now that it natively supports it (well, mostly).

A couple of years back if you needed to run PHP on Google App Engine you were required to use a open source tool like Quercus, a 100% Java implementation of PHP, to run your PHP applications on the App Engine. However, as you would have guessed, it was not easy to work as with using a native PHP implementation. Now that App Engine natively supports PHP and MySQL, you can easily write PHP applications.

He walks you through the setup and configuration of the App Engine SDK to interact with the service and shows how to create a simple "Hello World" PHP application and deploy it. He talks some about the overall advantages of using the Google App Engine for your application including the scalability it offers and the secured infrastructure it runs on. He finishes the post looking at the different options for data storage and how sessions should be handled (hint: memcache).

0 comments voice your opinion now!
google appengine tutorial introduction sdk deploy

Link: http://www.codediesel.com/php/php-applications-on-google-app-engine/

Three Devs & A Maybe Podcast:
Delving into Laravel
April 17, 2014 @ 09:46:43

The Three Devs and a Maybe podcast has release their latest episode hosted by Michael Budd, Fraser Hart, Lewis Cains and Edd Mann. In this new edition, Episode #20, Delving into Laravel, they talk about the Laravel framework in their continuing series covering web application frameworks.

In this weeks show we follow up the discussion on CodeIgniter with an introduction to Laravel. Introduced only a few years ago, the framework has been a 'breath of fresh air' in the PHP framework landscape. Starting with a brief history of the project and how it has evolved, we move on to highlight key features of the framework that set it apart. One such inclusion is the extensive use of an IoC container, and how Facades cater for an expressive code-base.

Other topics include PHP2Python, virtPHP and the history and philosophy of Laravel. You can listen to this latest episode either though the in-page player, grabbing the mp3 or by subscribing to their feed.

0 comments voice your opinion now!
threedevsandamaybe application framework laravel introduction podcast

Link: http://threedevsandamaybe.com/posts/delving-into-laravel/

Community News:
Packagist Latest Releases for 04.17.2014
April 17, 2014 @ 08:05:59

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




Loosely Coupled Podcast:
Episode 2 My Code Is Perfect
April 16, 2014 @ 13:59:40

The Loosely Coupled podcast (with PHP community member hosts Jeff Carouth and Matt Frost) has released their latest episode, Episode #2: My Code is Perfect.

Writing clean code isn't something you pick up overnight, nor is it a brand new topic. In this episode Jeff and Matt discuss the characteristics and mechanics of creating clean code and how to approach your project from a clean code perspective. [...] In this episode, Jeff and Matt talk about code quality and beautiful code. Beautiful code follows a standard. If you don't have one, find one and adopt it.

There's some great notes in the post to accompany the recording with other suggestions, resources and links to other sources that can help you write cleaner, better code. You can listen to this latest episode either through the in-page player or by downloading the mp3 directly. You can also subscribe to their feed to get the latest episodes as they're released.

0 comments voice your opinion now!
looselycoupled podcast ep2 code perfect standard cleancode

Link: http://looselycoupled.info/blog/2014/04/14/episode-2-my-code-is-perfect/

SitePoint PHP Blog:
Implementing Multi-Language Support
April 16, 2014 @ 12:18:39

The SitePoint PHP blog has a new post from Jacek Barecki talking about a few ways you can include multi-language support in your PHP applications. There's not much in the way of actual code here, but there are links to some other tools that can help get the job done.

Setting up a multilingual site may be a good way to attract new customers to your business or gain more participants in your project. Translating a simple site with a few static pages probably won't probably be complicated, but more complex PHP web applications may require a lot of work when launching multiple language support. In this article I'll present different types of content that need to be taken under consideration when internationalizing a site.

He breaks it down into five different types of content that you might want to translate:

  • Multi-language Static Content
  • Database content
  • User submitted content
  • Resources (images, videos, etc)
  • Other types of content

He wraps it up with a few recommendations including making a checklist of the things you want to translate to figure out what tools you need to use.

0 comments voice your opinion now!
multilanguage support implementation content type

Link: http://www.sitepoint.com/implementing-multi-language-support/

PHPBuilder.com:
Using PHP Configuration Patterns Properly
April 16, 2014 @ 11:52:11

On PHPBuilder.com today they have a new post showing different configuration patterns for getting localized settings into your applications. They show the use of INI files, PHP scripts, text files, XML data and a database call.

PHP is a cross platform language. It is a server based application so we must think about the configuration settings of the PHP software. There are various ways of creating configurable PHP applications. The configuration flexibility comes as a built in feature in PHP. But we must understand the requirement clearly before making an application configurable. This article explores different PHP configuration patterns and their implementation.

For each of the options mentioned, there's a brief description of what the method is, some of the common uses and a code example showing a basic implementation. The database pattern is the only one without a code example as the database interface varies widely from application to application.

0 comments voice your opinion now!
configuration pattern ini script text xml database

Link: http://www.phpbuilder.com/articles/application-architecture/using-php-configuration-patterns-properly.html


Community Events











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


code security facebook application framework language composer component hhvm release opinion series symfony2 introduction unittest podcast package install threedevsandamaybe hack

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