News Feed
Jobs Feed
Sections




News Archive
feed this:

Script-Tutorials.com:
Functional Programming - How to Write Functional Code in PHP
May 09, 2013 @ 11:04:26

On the Script-Tutorial.com site today there's a new post looking at functional programming in PHP - some of the concepts involved and example code showing how to make it work.

Functional programming can be defined in simple terms as a programming paradigm that do not change the state of a program instead it uses pure functions. A pure function is a function that has the ability to accept a value and return another value without changing the input supplied to it. It is characterized by its ability to support functions that are of high order. [...] A programming paradigm that is functional has the following attributes: do not alter the states which make parallelism easier, deals mostly with a function which is the smallest unit hence enhances readability of code, has deterministic functions that enable stability of a program.

He talks some about anonymous/lambda functions (closures) and their role in PHP's implementation of functional programming. He also talks some about partial functions, currying, higher order functions and recursion. He finishes off the article with a look at some of the advantages this method of development can bring as well as some of the disadvantages that come with things like recursion and the learning curve of the method.

0 comments voice your opinion now!
functional programming tutorial introduction concepts examples

Link: http://www.script-tutorials.com/functional-programming-php

NetTuts.com:
Aspect-Oriented Programming in PHP with Go!
April 10, 2013 @ 10:56:41

In this new tutorial on NetTuts.com today they introduce you to aspect-oriented programming (AOP) in PHP through the use of the Go! PHP library.

The concept of Aspect-Oriented Programming (AOP) is fairly new to PHP. There's currently no official AOP support in PHP, but there are some extensions and libraries which implement this feature. In this lesson, we'll use the Go! PHP library to learn AOP in PHP, and review when it can be helpful.

They start with a brief history of AOP in general and a basic vocabulary of some of the common terms like "point-cut", "aspect" and "cross-concern." They briefly look at some of the other PHP tools for AOP, but then help you get Go! up and running. Sample code is included showing how to integrate it into your project and, more practically, create a logging system that can be used as an aspect.

0 comments voice your opinion now!
aspect oriented programming tutorial go library introduction

Link: http://net.tutsplus.com/tutorials/php/aspect-oriented-programming-in-php-with-go

TechFlirt:
Object Oriented Programming in PHP
April 02, 2013 @ 13:05:23

If you've been writing mostly procedural PHP code and are looking to make that "next step" up to working with objects and classes (OOP), you should check out this detailed tutorial introducing you to some of the primary OOP-in-PHP concepts.

Object oriented programming (OOP) was first introduced in php4. Area for oop in php version 4 was not very vast. There were only few features available in php4. Major concept of the object oriented programming in PHP is introduced from version 5(we commonly known as php5). [...] But still in php5 object model is designed nicely. If you have good understanding of OOP then you can create very good architecture of your php application. You only need to know some of the basic principles of object oriented programming and how to implement that concept of oop in php.

While the wording is slightly odd in some spots (English doesn't seem to be the author's first language), it's' a great introduction to the major OOP-related topics including:

Each section also has downloadable code to go along with the examples, making it easier to follow and test out the actual scripts.

0 comments voice your opinion now!
object oriented programming tutorial introduction series beginner

Link: http://www.techflirt.com/tutorials/oop-in-php/index.html

Anthony Ferrara:
Failure Is Always An Option - Programming With Anthony
April 01, 2013 @ 09:03:19

Anthony Ferrara has posted another video in his "Programming with Anthony" series, this time pointing out that failure is always an option.

A few days ago, I posted a video about how to become a better developer. There were a few interesting comments made, but one in particular from the Reddit threadpeaked my interest. So I decided to do a reply.

You can watch the video either in his blog or over on Youtube. He's also included the some of the contents of the Reddit post and a funny (relevant) comic about learning "C++ in 21 days".

0 comments voice your opinion now!
failure option video programming youtube reddit


Reddit.com:
Good guidance for shifting to OO from Procedural coding
March 19, 2013 @ 12:33:29

On Reddit.com there's a conversation kicked off by user swiftpants about making the move from procedural PHP programming to the world of object-oriented programming. They ask for advice from the community for the next steps to take to make the jump.

One thing I always have in the back of my head is that all my code is procedural and I should be making use of classes and ?? more. I have a very basic understanding of OO programming but I rarely implement it. Is there a good book or online guide that can get me on my way to OO programming in php. I am especially looking for feed back from self taught programmers.

There's lots of comments on the post talking about everything from:

  • Introductory videos from KillerPHP
  • Reading lots of other people's (OOP) code
  • That OOP is more about code reusing and simplicity (DRY) than abstraction.
  • You can learn a lot by working with one of the MVC/OO frameworks. Download one and build something.
  • The suggestion of phptherightway.com

Have any other thoughts on the best ways to learn OOP in PHP? Share them here!

0 comments voice your opinion now!
reddit opinion oop procedural programming guide suggestion


PHPMaster.com:
Functional Programming and PHP
February 26, 2013 @ 09:43:42

On PHPMaster.com today there's a new tutorial written up by Shameer C looking at functional programming with PHP - some of the basic concepts of it and how much is possible in the language.

Many programmer like to talk about functional programming, but if you ask them if they've ever done it, most of their replies will be "No". The reason is quite simple: we are taught to think in an imperative manner when we first start learning to program, in terms of flow charts and steps to be followed in the program. So in this article I'll explain some important concepts to functional programming and how to write functional code in PHP.

He starts by defining some of the basic fundamental concepts of functional programming including recursion, referential transparency, higher order functions and lambda functions. He includes a bit of code along the way, showing things a bit more practically.

0 comments voice your opinion now!
functional programming tutorial introduction concepts fundamentals


SitePoint:
The 3 Myths of Learning Programming Languages
February 07, 2013 @ 11:43:52

SitePoint.com has a new article sharing three of the things they see as common myths around learning new programming languages.

Are you yet to learn your first programming language? Why is it that you're putting it off? If you think it's going to be too hard, like learning a real, spoken language - you are wrong. In fact, you've fallen victim to what I like to call The Big Programming Language Fallacy - the mistaken belief that programming languages are analogous to real languages.

They go through each of their myths and explain what's wrong about them, each building on the previous ones in the list:

  • Myth 1: Programming Languages are the 'Languages of Computers'
  • Myth 2: Programming Languages are Foreign and Hard to Read
  • Myth 3: Programming Languages Take Years to Learn

They point out that, in the case of most programming languages these days, they've been designed to be "readable" and something that can relate to basic terms (a subset of a completely new language).

0 comments voice your opinion now!
myth programming language learn fallacy


Lars Strojny:
Functional programming in PHP
January 17, 2013 @ 14:21:38

Lars Strojny has a new post that takes an in-depth look at the current state of functional programming in PHP:

PHP has traditionally been a simple, procedural language that took a lot of inspiration from C and Perl. Both syntax wise and making sure function signatures are as convoluted as possible. PHP 5.0 introduced a proper object model but you know all of that already. PHP 5.3 introduced closures and PHP 5.4 improved closures very much (hint: $this is available per default).

He starts by defining functional programming for those not familiar with the concept. With this understanding, he looks at what PHP has to offer that will help make this definition a reality, things like call_user_func_array and closures. He includes some code examples comparing the PHP structures to other languages and their features (like Haskell and Ruby). The post also gets a bit more practical with a "real world" example of a script that calculates the totals from the set of items in a shopping cart using a helper library to do some of the basic functional handling.

0 comments voice your opinion now!
functional programming example tutorial features functionalphp library


Anthony Ferrara:
Iterators - Programming With Anthony
January 17, 2013 @ 10:38:45

Anthony Ferrara is back again with another installment in his "Programming with Anthony" video series. In this new episode he takes a loot at iterators in PHP and how they can be used effectively.

Today's Programming With Anthony video focuses on the concept of Iterators. We'll look at the abstraction that they represent, how they can be used and some of the benefits of using them. When used correctly, Iterators can lead to very efficient, flexible and clean code.

You can also watch the video directly on YouTube and check out the rest of the series in his playlist. Other topics include dependency injection, boolean logic and prepared statements.

0 comments voice your opinion now!
video tutorial programming iterators series


James Fuller:
2013 Programming Podcasts for the New Year
January 03, 2013 @ 10:37:34

In a new post James Fuller has shared a list of programming podcasts he suggests you take a listen to as this new year starts off.

I have a long drive to work, and one of the things I do to pass the time regularly is listen to podcasts in the car. I really enjoy programming podcasts and conference talk recordings, and it's a really great way to educate yourself on the go. I wanted to throw a shout out to some podcasts that I haven't previously mentioned on the blog and hopefully turn on a few new listeners.

He's included six different shows in the list, some with a slant towards certain languages, but still valuable for developers in others:

0 comments voice your opinion now!
programming podcast suggestion listen



Community Events











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


api interview podcast example development series code language functional database framework composer community release zendframework2 application introduction opinion phpunit testing

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