News Feed
Sections




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

PHPBuilder.com:
Creating Real Time Applications with PHP and WebSockets
July 29, 2014 @ 12:13:07

On PHPBuilder.com today there's a new tutorial introducing you to the combination of PHP and WebSockets to make real-time requests to fetch data in your application.

This article will explore the main PHP libraries used to create real time, bi-directional applications between clients and servers over WebSockets. WebSocket is full-duplex client/server communication over TCP. It is also a new feature available in browsers as a part of the HTML5 specs that allows JavaScript clients to open bi-directional socket connections to a server. [...] WebSocket connections are basically TCP socket connections that following the WebSocket rules to communicate. The WebSocket Protocol is an independent TCP-based protocol.

They introduce some of the basic concepts behind WebSockets (including an example URL) and show how to use the PHPWebSockets library to handle some sample requests. They also include some basic JavaScript to make the request to the backend PHP script and send or fetch content on the server. They also show you how to implement a simple chat server using a few other libraries like Ratchet, Elephpant.io and Socket.io.

0 comments voice your opinion now!
realtime application websockets tutorial introudction

Link: http://www.phpbuilder.com/articles/application-architecture/optimization/creating-real-time-applications-with-php-and-websockets.html

NetTuts.com:
Understanding and Working with Data in WordPress
July 29, 2014 @ 11:28:05

On NetTuts.com there's a new post for those new to WordPress (or just wanting to figure out more about the internals of the tool) showing how some of the data is structured and how to work with it.

Most WordPress users never come into direct contact with the database and may not even be aware that it's constantly working to populate their site. When WordPress serves up any kind of page, be that the home page, a single post or page or an archive, it's accessing the database to bring up content that editors and administrators have added to the site. In this series of tutorials I'll look in detail at different aspects of the WordPress database.

This post is the first in the series and provides an overview of the database and what kinds of information each one contains. They talk about content types and provide the table structure and relations in a handy graphical form (an ERD). They then go through each of the tables and describe what the data is including link tables, joining the content in different places.

0 comments voice your opinion now!
data wordpress introduction database table erd overview

Link: http://code.tutsplus.com/tutorials/understanding-and-working-with-data-in-wordpress--cms-20567

Expert Developer:
Install PHP CodeSniffer on Windows Machine
July 29, 2014 @ 10:33:45

On the Expert Developer site there's a new tutorial showing you how to get the PHP CodeSniffer tool up and working on a Windows installation. PHP CodeSniffer provides functionality to enforce standards and best practices in your application's development (providing code quality).

In this article we will focus on improving Code Quality. Very first step towards improving code quality is to maintain coding standards across developers. [...] Here we will talk about PHP CodeSniffer, which help us to maintain coding standard across multiple developer. Dealing with CodeSniffer is much easier: create rule set, validate your file against your rule set and get the result immediately. It will immediately show how many mistakes you have made in terms of following coding standards and eventually all developer will start coding as per coding standards you have defined.

There's two main parts to the article: first is getting PEAR installed (a package manager for PHP) and then using it to install CodeSniffer. Complete instructions and commands are included as well as a few screenshots along the way.

0 comments voice your opinion now!
install tutorial codesniffer windows code quality

Link: http://www.xpertdeveloper.com/2014/07/install-php-codesniffer-on-windows-machine/

Sameer Borate:
Downloading Gmail attachments in PHP - an update
July 29, 2014 @ 09:37:40

Sameer Borate has posted an update to a previous post of his about downloading attachments in PHP. In this new post he updates the script to remove any other dependencies other than the IMAP PHP extension.

As mentioned in the earlier post, automatically extracting attachments from Gmail can be important for reasons where you need to process the attached files periodically with a CRON job or need to process the files programmatically. Also it can be useful for automatically archiving important attachments. [The code in this post] is a simple proof-of-concept plain PHP code, devoid of any object-oriented features that extracts attachments from your Gmail account.

The example code makes a request to the Gmail IMAP servers with the given username and password, grabs the first set of emails, parses their attachments to pull them down to the local host. He also includes some searching capability to locate ones only matching certain criteria. A list of the allowed search keywords is also included. He finishes the post with a look at using READONLY mode and fetching the email headers.

0 comments voice your opinion now!
attachment download gmail tutorial search

Link: http://www.codediesel.com/php/downloading-gmail-attachments-in-php-an-update/

Community News:
Packagist Latest Releases for 07.29.2014
July 29, 2014 @ 08:01:39

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



Community News:
Latest PECL Releases for 07.29.2014
July 29, 2014 @ 07:08:13

Latest PECL Releases:
  • SeasLog 1.0.0 - First version for pecl.net

  • binpack 1.0.0 - first release

  • sync 1.0.1 - Fixed Reader-Writer objects. - Removed a lead from package maintainers list.

  • yac 0.9.1 - Try to fix windows build

  • yac 0.9.0 - first release

  • ibm_db2 1.9.6 Fixed: Fetching of mixed character data when the application code page different from database code page Fixed: db2-bind-param with INOUT LOB parameters Enhanced: Enable iSeries system naming mode from LUW to iSeries Enhanced: Clear global error state at end of request

0 comments voice your opinion now!



SitePoint Web Blog:
Code Manifesto Words to Live By
July 28, 2014 @ 12:45:29

The SitePoint Web blog has posted an interesting article sharing something called The Code Manifesto. The "code" referenced here isn't so much related to the actual code developers write as it is the conduct they follow in their relationships with others (on a professional level).

The tech industry has a rather bad reputation. Stories of discrimination, disrespect, sexism and outright mistreatment aren't exactly hard to come by. [...] In an industry ostensibly aimed at helping everyone to reach their potential, it's clear that when it comes to issues of equality and respect, the tech world has a long way to go. Kayla Daniels is one person working to try to change this situation. A North Carolina PHP developer, Kayla is behind The Code Manifesto, a list of values she hopes can be a small step in the right direction.

Among the points made in the manifesto are things like:

  • Discrimination limits us.
  • We are our biggest assets. None of us were born masters of our trade.
  • Respect defines us. Treat others as you wish to be treated.
  • Reactions require grace.

The Manifesto was born out of the frustration felt by Kayla in her work in technology. The six points are designed to help with two main things: respect and equality and contributing to the community...all as equals.

0 comments voice your opinion now!
code manifesto values advice conduct technology

Link: http://www.sitepoint.com/code-manifesto/

SitePoint PHP Blog:
MVC - a Problem or a Solution?
July 28, 2014 @ 11:42:36

The SitePoint PHP blog has a new post by Jeroen Meeus that wonders if MVC is a solution or a problem when it comes to developing web applications.

Repositories, Adapters, MVC with all it cousins, SOLID, RTFM As a (PHP) developer, those words are thrown at you from every corner of the web. And I hate it, I've had enough. Stop telling me what to do and show me those kittens instead. [...] When solving the web-application problem, we are forced to use MVC. The dev community often frowns upon those who don't use it, but seldom lets those they're frowning upon ask why. [...] MVC doesn't solve the Code complexity problem. It doesn't solve the code reuse or no-flexibility problem either. And it doesn't guarantee decoupled code.

He goes on to talk about how design patterns don't "solve problems". Rather they help us as developers by providing a best practice we can follow to get the job done. He suggests, though, that MVC has become "the new Singleton" but it has been used so much in so many different ways, it's boarding on the point of being abused.

Depending on the situation, and the problem at hand, different patterns can help you write robust, secure and understandable code. Just be careful using them - if you catch yourself using the MVC pattern for a 1-pager, ctrl+a del.
0 comments voice your opinion now!
mvc designpattern problem solution abuse

Link: http://www.sitepoint.com/mvc-problem-solution/

Joshua Thijssen:
Internal PHP function usage
July 28, 2014 @ 10:05:39

Curious about the usage of the various "internal" (built-in, not user defined) functions in use is a wide range of PHP applications, Joshua Thijssen did some research on GitHub and has shared the results on his site today.

How many internal PHP functions (things like count(), strpos(), array_merge() etc), does PHP have? Depending on which version you use, and how many extensions you have loaded, somewhere between 1000 and 2000 would be a good guess. But how many of these internal functions are you REALLY using?

He created a custom script to fetch the results of a custom query (one that found repos with over fifty stars), grabbed the source and parsed the results looking for these internal functions. He shares the results of his parsing from 967 repos in the remainder of the post, including: the top ten most called, some interesting facts found in the results and some of the "bad" ones in wide use (like "exec" and "mysql_connect").

0 comments voice your opinion now!
internal function usage statistics github parse query

Link: https://www.adayinthelifeof.nl/2014/07/25/internal-php-function-usage/

Matt Frost:
Avoiding Burnout
July 28, 2014 @ 09:59:32

Matt Frost (one of the two hosts on the Loosely Coupled podcast) has a new post to his site about some of his own experiences and advice around avoiding burnout.

Writing software is an incredibly gratifying profession; the idea that you can take a problem and find creative solutions through the use of technology is what drives a lot of us forward. What happens though when the drive is gone? What happens when that nifty little side project, training course, blog post or book goes from being nifty to being a drudgery? I came to this point a number of months ago and stayed there for a while, having now come out of this funk there are some things I learned that I'd like to share.

He talks about some of his own trouble with burnout, the project he was involved in and what it taught him about dealing with it (and life in general). He gives some sensible advice including "don't sit at your desk all day" and "prioritize things". The advice is simple and to the point - avoiding burnout is something only you can do for yourself. Waiting for things to "just get better" isn't going to work.

0 comments voice your opinion now!
burnout experience personal programming advice

Link: http://shortwhitebaldguy.com/blog/2014/07/avoiding-burnout


Community Events





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


podcast refactor experience release list testing developer language community laravel wordpress interview framework series unittest opinion install code threedevsandamaybe introduction

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