News Feed
Jobs Feed
Sections




News Archive
feed this:

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

Lorna Mitchell:
9 Magic Methods in PHP
December 11, 2012 @ 12:18:49

Lorna Mitchell has a new post showing nine of the magic methods that are included in PHP by default (like __construct, __get and __set) including a few you may not have used before.

The "magic" methods are ones with special names, starting with two underscores, which denote methods which will be triggered in response to particular PHP events. That might sound slightly automagical but actually it's pretty straightforward, we already saw an example of this in the last post, where we used a constructor - so we'll use this as our first example.

She includes details (and some code samples) for these methods:

  • __construct
  • __destruct
  • __get
  • __set
  • __call
  • __sleep
  • __wakeup
  • __clone
  • __toString

You can find out about these and a few others in this page of the PHP manual.

0 comments voice your opinion now!
magic methods oop introduction beginner tutorial


NetTuts.com:
20 All Too Common Coding Pitfalls For Beginners
November 12, 2012 @ 14:52:59

On NetTuts.com there's a great list of tips and things to keep in mind if you're a budding programmer - a set of common pitfalls to watch out for as you hone your skills.

Regardless of our current skill level, we all were beginners at one point in time. Making classic beginner mistakes comes with the territory. Today, we've asked a variety of Nettuts+ staff authors to chime in with their list of pitfalls and solutions - in a variety of languages. Learn from our mistakes; don't do these things!

The article starts off with some Javascript tips, but quickly gets into some more PHP specific things like:

  • Use Ternary When Appropriate
  • Use Guard Clauses
  • Keep Methods Maintainable
  • Avoid Deep Nesting
  • Don't Overuse Variables

There's also two "extras" thrown in more concerning general programming practices - using methods to represent actions and some basic code readability suggestions.

0 comments voice your opinion now!
common issue beginner developer javascript general


NetTuts.com:
Quick Tip Deploy PHP to Heroku in Seconds
October 30, 2012 @ 09:50:41

For anyone that's wanted to try out the Heroku hosting platform but just want a bare-bones guide to getting up and running, NetTuts.com has what you're looking for.

We've raved about the brilliance of Heroku before, mostly around the fact that it makes launching a Rails or Node app rather simple without having to configure your own server. But what if you want the same kind of freedom and speed of deployment with PHP? Fortunately, Heroku has quietly offered support for PHP for quite some time.

You'll need to get their CLI deployment tool and set up an account but the rest is pretty easy. The steps to set up the git repo, add a new "heroku" branch and push the checked in code directly out to the server.

0 comments voice your opinion now!
quicktip deploy heroku beginner tutorial


Community News:
"The Joy of PHP Programming" Book & Course Kickstarter
September 10, 2012 @ 12:46:30

A Kickstarter project has been started up by Alan Forbes to author a book (and full training course) to "bring the joy back" into learning PHP - The Joy of PHP Programming (e-book and course).

PHP is a great programming language. It's free, powerful, relatively easy to setup and learn, and it has extensions and frameworks available to do almost anything you could imagine. Frankly, it's just plain fun too. But if you've never programmed before or have programmed before but not with PHP and want to learn it, wouldn't it be great to find a tutorial that conveyed the sheer joy of it? That's what I want to do!

It plans to be an introductory book, starting developers from the ground up to teach them things like basic usage, project organization, working with user input and bits on frontend and backend frameworks. There's already over 150 backers for the project and just 20 days remaining so if you're interested in learning more about it or want to contribute, check out this page on Kickstarter.com.

0 comments voice your opinion now!
book training course introduction beginner programming


Mayank Kandpal:
How I Start a New CodeIgniter Project
August 10, 2012 @ 09:14:43

For those interested in getting started with the CodeIgniter framework, but want a more step-by-step guide to getting it up and running, this recent post from Mayank Kandpal can help.

Every other day, I develop new websites from scratch for various clients and sometimes for some of my own projects. Unless the project is really complex, I prefer to develop in CodeIgniter, a super-flexible (MVC) PHP framework which lets me develop super-quick !

He walks you through all the steps you'll need - from downloading the latest to creating the application and things like setting up logging and authentication.

0 comments voice your opinion now!
codeigniter project guide stepbystep beginner


PHPMaster.com:
Laravel Is It Really Clean and Classy?
August 08, 2012 @ 12:34:18

PHPMaster.com has a new tutorial in their series about the Laravel framework posted today asking if the framework is really "clean and classy" as its documentation describes.

"Laravel is a clean and classy framework for PHP web development. Freeing you from spaghetti code, Laravel helps you create wonderful applications using simple, expressive syntax. Development should be a creative experience that you enjoy, not something that is painful. Enjoy the fresh air." That's the text which can be found on the Laravel homepage and, if we'd believe it, wouldn't it be wonderful? Let's test this claim by building a simple TODO application and see how much effort we have to put into it.

The article is pretty high-level and only touches on some of the key features like migrations (to create the database) and making the controller, model and view for the basic TODO app.

0 comments voice your opinion now!
laravel framework beginner clean tutorial


Reddit.com:
About to start learning my 1st MVC framework... What are your recommendations?
August 03, 2012 @ 11:18:53

In this recent post to Reddit, a reader is starting out with his work in PHP MVC frameworks and is asking for some advice:

I've had a lot of experience using OO PHP but have so far written my own code. I'd like to dive in and finally learn to use a decent modern MVC framework (something I've been putting off for a while due to the time needed to get past the learning curve). From what I've seen the leading contenders are FuelPHP and Kohana, but I really don't know how to judge one over another.

Of course, there's suggestions for specific frameworks but there's also some comments that promote the "it depends" mentality - basic the framework choice off of what you're going to use it for. There's also a few suggestions of working on his own framework, just to learn how some of the pieces fit together.

0 comments voice your opinion now!
mvc framework learn opinion beginner


PHPEasy.co.uk:
Tutorial Type Hinting in PHP
August 01, 2012 @ 12:14:35

On the PHPEasy.co.uk site there's a quick new tutorial posted about type hinting in PHP - how to use it and why you should use it in your code.

Type hinting allows you to tell a function which data type to accept for its arguments. When you call a function, if a type hint is present, the argument passed will be checked to make sure it is of the type specified. If a function has control over what it accepts as an argument, then it is more likely that the code within the function will have the data it needs to perform the task it is intended for.

He includes two code examples - one not using a type hinting on the parameters (assuming the correct arguments) and another forcing the input of the "PrintGuitar" method to be a "Guitar" object instance. You can find out more about type hinting in the PHP manual.

0 comments voice your opinion now!
tutorial typehint example code beginner


SitePoint.com:
Sneak Peek at Kevin Yank's New Book 'PHP & MYSQL Novice to Ninja'
April 27, 2012 @ 11:14:05

SitePoint.com has published an excerpt from an upcoming book by their own Kevin Yank aimed at those wanting to get into PHP with no background in the language at all - "PHP & MySQL: Novice to Ninja".

Kevin Yank's done it again! He's just completed a new 2012 edition of his best-selling book (Build Your Own Database Driven Web Site, 4th Edition) which is now titled - PHP & MySQL: Novice to Ninja.

The chapter excerpt they share is the book's "Introducing PHP" content the (very) basic introduction to the language showing syntax and some of the benefits of the language. They also give you a preview of some of the other bits of content in the book including sections on database design, building a CMS, setting up shopping carts and getting PHP+MySQL installed on multiple platforms.

0 comments voice your opinion now!
sitepoint book beginner novice ninja introduction kevinyank



Community Events











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


symfony2 database opinion framework podcast release development language zendframework2 phpunit rest usergroup community introduction interview testing unittest series conference functional

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