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

AboutPerformance Blog:
How to Spruce up your Evolved PHP Application - Part 2
August 08, 2014 @ 10:57:51

On the About:Performance site today there's a new post (part two in the series, part one is here) about increasing the performance in your PHP application. In this new post he talks about a few other updates that can be made to make your app fly.

In the first part of my blog I covered the data side of the tuning process on my homegrown PHP application Spelix: database issues, caching on both the server and the client. [...] In this part, I will concentrate more on technical topics: network traffic, code caching and session handling.

The post shares helpful tips and code examples showing how to:

  • Reduce Network Traffic
  • Leverage Browser / CDN cache
  • Use Conditional and Non-Conditional Caching
  • Using the HTML5 Application Cache
  • Optimize Session Handling

He does suggest the use of a commercial tool for a more in-depth analysis, but there's nothing here that it's required for. A little poking around in your browser can yield most of the same results.

0 comments voice your opinion now!
application performance tips traffic cdn cache session optimize

Link: http://apmblog.compuware.com/2014/08/06/spruce-evolved-php-application-part-2/

SitePoint PHP Blog:
Dependency Injection with Laravel's IoC
June 05, 2014 @ 11:51:08

The SitePoint PHP blog has a new tutorial posted showing you how to use the Laravel dependency injection container to handle dependencies in you Laravel-based applications. Younes Rafie introduces some of the basic concepts behind dependency injection and the various types to get everyone started on the same level.

As developers, we are always trying to find new ways to write well designed and clean code by adopting new styles, using design patterns, and trying new robust frameworks. In this article we will explore the dependency injection design pattern through Laravel's IoC component and see how it can improve our design.

He includes examples of the three basic types of injection - controller, setter and interface - with brief code examples of their implementation. He goes on to talk about the "Inversion of Control" principle (part of the SOLID set of principles) and how the Laravel dependency injection container helps by binding objects and instances for later retrieval. Code examples for session storage handling (through a MySQL database) are included that are automatically resolved as the class requires them.

0 comments voice your opinion now!
laravel dependency injection container ioc tutorial introduction session mysql

Link: http://www.sitepoint.com/dependency-injection-laravels-ioc

Master Zend Framework:
Using Sessions In Zend Framework 2 - Part 2
May 06, 2014 @ 11:18:26

The Master Zend Framework continues its series about using sessions in Zend Framework 2 applications. In part two of the series he focuses on validators and some of the backend storage options the framework makes possible.

In last week's tutorial we covered the basics of sessions in Zend Framework 2, looking at how to implement them by making changes to module/Application/Module.php so that they're available application-wide then how to both set and retrieve information in the session. In this week's tutorial, we're going to take last week's post further, by looking at session validation as well as different backends. These two things will help protect your session data from session hijacking, as well as help you scale your application, by storing the information using a more universal backend, which a filesystem most often times will never be.

He starts off with a bit of background about the structure of an average session in the framework is like, broken out into sections via the "Container" object. Then he starts in on the validators and describes a two of the built-in methods: "HttpUserAgent" and "RemoteAddr". A few code examples are included before he moves on to the backend options (like Cache, DbTable and MongoDB) using a "StorageFactory" object in the configuration.

0 comments voice your opinion now!
session zendframework2 part2 series validate backend

Link: http://www.masterzendframework.com/sessions/using-sessions-zend-framework-2-part-2

Master Zend Framework:
Using Sessions In Zend Framework 2 - Part 1
April 29, 2014 @ 12:09:49

On his Master Zend Framework site today Matthew Setter has posted the first part of a series looking at working with sessions in Zend Framework 2 applications.

To help work around [the stateless nature of the language], PHP introduced the concept of sessions, which allows for storing information across requests. However, like most things, as application's have become more complex, the ability to interact with sessions in a way that matches the needs of the application has continued to grow. Gladly, in Zend Framework 2, a set of classes is available, which helps reduce the complexity of managing session information, whether that's interaction, configuration or backend storage, without placing too much distance between you and the underlying PHP implementation, or adding too much complexity in the process.

Using the ZF2Skeleton as a base, he shows you how to add session support to the overall project in a few simple steps:

  • Update Module.php to initialize the session
  • Create a new container & store some data
  • Retrieve it later

There's not too much code change involved, but the snippets to add/update are included. In the next part of the series, he'll look at validation, preventing hijacking and using different backend storage methods.

0 comments voice your opinion now!
zendframework2 session tutorial series part1 introduction

Link: http://www.masterzendframework.com/sessions/using-sessions-in-zend-framework-2-part-1

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

Edd Mann:
Securing Sessions in PHP
April 09, 2014 @ 12:14:23

In his most recent post Edd Mann shows you how to secure your session in PHP applications via a custom SessionHandler class and a bit of encryption. For those interested in the full code right away, check out this gist over on Github.

Following on from my previous post on Self-signed SSL certificates, I would now like to address the second most common Web application vulnerability (Broken Authentication and Session Management). When delving into the subject I was unable to find a definitive resource for an PHP implementation. Due to this, I set out to combine all the best practice I could find into a single Session handler, to help protect against the common attack vectors. Since PHP 5.4, you are able to set the Session handler based on a class instance that extends the default 'SessionHandler' class.

He walks through the code talking about some of the functionality it offers, how it encrypts the data and integrates expiration and validation (fingerprinting). There's also an interesting set of methods (get and set) to access values in the current session. One thing to note, this example is only for PHP 5.4 and above as it makes use of the newer SessionHandler interface.

0 comments voice your opinion now!
secure session encryption sessionhandler tutorial

Link: http://eddmann.com/posts/securing-sessions-in-php

NetTuts.com:
Laravel Unwrapped Session, Auth and Cache
March 11, 2014 @ 11:57:10

On NetTuts.com today there's a new tutorial introducing you to the Laravel framework and how to use its session, authentication/authorization and caching systems.

One thing though that not a lot of programmers take advantage of is Laravel's component-based system. Since its conversion to composer-powered components, Laravel 4 has become a very modular system, similar to the verbosity of more mature frameworks like Symfony. [...] In this tutorial, we'll be diving into a group of these components, learning how they work, how they're used by the framework, and how we can extend their functionality.

First up is the session component that lets you store the data in various places (file, cookie, etc) and how service providers fit into this. Next up is the Auth component, showing how to use the service providers to hook into a custom auth handler for finding and validating user logins. Finally, there's the Cache component. He shows how to apply a service provider to configure it, passing the data off to a MongoDB database to be stored.

0 comments voice your opinion now!
laravel tutorial session cache authentication serviceprovider framework

Link: http://code.tutsplus.com/tutorials/laravel-unwrapped-session-auth-and-cache--cms-19952

Mastering Zend Framework:
Gary Hockin's Maximising Zend Framework 2 Performance Talk (Review)
February 28, 2014 @ 10:33:30

From the Master Zend Framework blog there's a new post reviewing a talk from this year's PHPUK (2014) from Gary Hockin, "Maximising Zend Framework 2 Performance".

Whether you're new to Zend Framework 2, or an old hand (can someone really say they're an old hand after such a short period of time?) the talk covered a range of tools, tips, and techniques for increasing application performance. This wasn't an academic run through; it was a talk based on practical, hands-on, experience from Gary's time as a core ZF2 contributor, and his work at Roave, Yamgo and AdSpruce.

The post talks some about the tools Gary used to benchmark his improvements and some common metrics to be aware of in your own results. Xdebug and Xhprof were also recommended for more introspection into what the application is doing and where the bottlenecks lie.

0 comments voice your opinion now!
phpuk14 zendframework performance tools talk session

Link: http://www.masterzendframework.com/reviews/maximising-zend-framework-2-performance-phpuk14

Matt Frost:
Getting Talks Selected
January 27, 2014 @ 09:04:23

If you're considering getting into the world of speaking at an upcoming PHP conference, Matt Frost has some advice for you to help you get started. It can be intimidating, so learn from some of his own experiences as a relatively new speaker in the community.

It's a very busy conference season in and around the PHP Community. [...] These conferences are such a blessing to those who are able to attend, the speakers know their stuff and are very open to sharing and talking outside of their sessions. But you're a smart cookie too! You've got ideas and thoughts and knowledge that other people would like to have, so how do you get in on this? I'm going to tell you how I got into it, your mileage may vary, but hopefully it helps.

He points out that submitting a talk and getting accepted is "a lot like the lotto" sometimes, that you can't win unless you buy a ticket (submit that talk). He looks at a few of the other common questions from beginning speakers - what do I talk about, how do I write an abstract and common first time speaking concerns.

There's no magical elixir that will land you speaking gigs at cool conferences. Everyone that speaks, from the seasoned pro to the up and comer, has worked extremely hard to not only put the talks together; but acquire all the knowledge necessary to give the talk in the first place
0 comments voice your opinion now!
talk session technical conference advice beginner speaker

Link: http://shortwhitebaldguy.com/blog/2014/01/getting-talks-selected

Beth Tucker Long:
How to Submit a Talk to a Conference
January 03, 2014 @ 09:03:25

If you've ever thought about submitting a topic to speak at a technology conference, but never quite knew how to take those first steps, check out this advice from Beth Tucker Long. It's a list of steps and reminders to follow when thinking about your topics and submitting.

I've been on both sides of the proverbial conference table. I have been the one submitting proposals, hoping against hope that they will pick mine, and I have been on the selection committee, struggling to choose between hundreds of awesome proposals when you only have a few talk slots available. Through these varied experiences, I've learned a few things about what works and what doesn't when submitting a conference proposal.

Her list includes things like:

  • First and foremost, remember to hit spell-check
  • Have someone else read your submission
  • Identify a clear problem that the topic of your talk will help solve
  • Be honest about your topic
  • Share past feedback in the comments or notes section
  • Submit a lot of proposals
0 comments voice your opinion now!
submit talk session technology conference suggestions

Link: http://www.alittleofboth.com/2014/01/how-to-submit-a-talk-to-a-conference


Community Events





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


library podcast release install series api opinion package list laravel community language tips zendserver update deployment introduction interview symfony framework

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