[PHP] I've some doubts if I should go with 5.2 or go already with 5.3 (for a course)

2009-06-23 Thread Manuel Aude
I'm giving a PHP course next semester (3 hours all saturdays for 22 weeks)
and I just realized that PHP 5.3 is coming very soon (2 days now!). So, my
plans of teaching PHP 5.2 are starting to change, and I think it's a good
idea to teach them 5.3 already.

While the majority of the students use Windows, I'm aware that a vast amount
will be using Ubuntu/Debian (and some use Gentoo, Fedora and Arch)
distributions of Linux, so I'm hoping there won't be too many problems on
installation. I don't want to waste the entire first class fixing
installation problems, because that kills the student's motivation.

The course starts on August, but I'm preparing it during the last two weeks
of July. You think that installation packages will be bulletproof by then?
Or should I just teach 5.2 and wait for another semester before starting on
5.3? I mean, most hosts will remain with PHP 5.2 for the rest of the year,
so I'm a bit confused on what I should do.

I'm just a university student that wants to spread PHP, for I've been using
it for many years now =)

Thanks for the advices,
Mamsaac


Re: [PHP] I've some doubts if I should go with 5.2 or go already with 5.3 (for a course)

2009-06-23 Thread Manuel Aude
The thing is, that part of the planned course was to develop a small
framework, so that they could see the dynamic and OOP posibilities that PHP
offers. With PHP 5.3, there are namespaces, which change a lot the design of
a framework, as well as true lambdas with closures. So, naturally, the
architecture of this minimalistic framework changes and I have plans to
write it before the course starts.

Why a framework? If you know how an MVC framework is created and how it
works, you will most likely get into Zend Framework or CakePHP much faster.
Plus, it's a very good way to learn the language. It wouldn't be the first
one I've written, so it's not much trouble.

That's why I care about PHP 5.3. Now imagine if there were Traits!

Anyway, I think I will do as someone mentioned, and teach them 5.2 during
the entire course and then at the end show them some of 5.3.

-- Forwarded message --
From: Per Jessen p...@computer.org
To: php-general@lists.php.net
Date: Tue, 23 Jun 2009 10:12:55 +0200
Subject: Re: [PHP] I've some doubts if I should go with 5.2 or go already
with 5.3 (for a course)
Manuel Aude wrote:

 I'm giving a PHP course next semester (3 hours all saturdays for 22
 weeks) and I just realized that PHP 5.3 is coming very soon (2 days
 now!). So, my plans of teaching PHP 5.2 are starting to change, and I
 think it's a good idea to teach them 5.3 already.

Does it _really_ matter which one?  I can't imagine there are that many
revolutionary changes in a dot-release.


Re: [PHP] I've some doubts if I should go with 5.2 or go already with 5.3 (for a course)

2009-06-23 Thread Manuel Aude
Let's put it this way: MVC frameworks with namespaces are going to change a
lot. The architecture can be made much cleaner and class names won't have to
be so long (Zend_Db_Adapter_Db2_Exception), for instance.

The design part of coding is __VERY__ important, and this changes are
specially for that. See PHAR extension, which will be enabled now, which
allows for easier distribution of software. And closures, which simply have
so many uses in design and save you from clustering your code with too many
function names.

Sure, it doesn't change the language, and it doesn't really break apps that
were written in PHP 5.2, but if you're going to design an application,
thinking about this options is very useful.

Too bad we don't get Traits yet =( Horizontal re-use is very nice.


 Robert Cummings wrote:

  Per Jessen wrote:
  Manuel Aude wrote:
 
  I'm giving a PHP course next semester (3 hours all saturdays for 22
  weeks) and I just realized that PHP 5.3 is coming very soon (2 days
  now!). So, my plans of teaching PHP 5.2 are starting to change, and
  I think it's a good idea to teach them 5.3 already.
 
  Does it _really_ matter which one? I can't imagine there are that
  many revolutionary changes in a dot-release.
 
  Given the naming of PHP versions of PHP-x.y.z, I would agree that not
  much changes between versions at the .z level. But at the .y level
  there are usually significant changes.
 
  Coming to a PHP 5.3 near you are the following notable features:
 
  - namespaces
  - closures
  - late static binding
  - garbage collector to handle cyclic references
  - PHAR
  - goto

 I hadn't actually seen/studied the list, but apart from the goto, I
 don't consider any of those revolutionary :-)


 /Per