Page 1 of 1

New advanced PHP book

Posted: Sun Nov 13, 2011 10:28 pm
by Jackolantern
I figured I would not add this to the Reviews section because I have not read the book yet, but it looks promising. Most programming books are just updated editions of older books that change very little. They usually add just enough to the code to be compliant with the new version, plus an extra chapter or two to cover any new features or perhaps just to serve as lipservice to a new edition. Eventually after about 3 or 4 editions the book has many pockets of outdated info, which can be murder in a field that moves as fast as software development.

However, Apress Pro PHP Programming is an all-new, 1st edition book that came out in August that discusses OO PHP, unit testing, mobile PHP, social media, modern db integration, continuous integration, etc. Since this book started at page 1 recently, it is more likely to accurately reflect modern development with PHP.

I hope to check it out soon, and will make a review then. I just thought some people here wanting to learn more about advanced PHP would be interested in looking in to it also!

Re: New advanced PHP book

Posted: Mon Nov 14, 2011 2:33 pm
by Xaleph
Looks promising indeed! One of the reasons I don`t like programming books is because most of the time, they`re outdated. I hope this really is a new book and actually teaches the proper way of programming. Especially in PHP, since so many people do it wrong!

Oh well, I try sticking with Pearson publishers, but then again, i`m going to skip this one altogether because I pretty much figured out PHP already. On a side note, I do hope the developers behind PHP will start working on proper namespacing soon.. A method that doesn`t require testing to see if the namespacing works. lol

Re: New advanced PHP book

Posted: Mon Nov 14, 2011 9:06 pm
by Jackolantern
I thought PHP 5.3 had proper namespaces in it? The book goes over usage of namespaces as if they were in the language and working properly, which I thought they were.

EDIT: It was supposed to be added in PHP 6, but it was changed to be added to a minor version of PHP 5 when PHP 6 was pushed back.

Re: New advanced PHP book

Posted: Mon Nov 14, 2011 9:20 pm
by Xaleph
Yeah, 5.3.X somewhat, I`m not sure which version, but my host supports it. However, the namespacing mechanism isn`t logical if you ask me. Everything is preceded by a \ backslash, so traversing namespaces \\Controllers\Support\SomeOtherNamespace\;

or better:

class \somenamespace {}

I mean, seriously?

Re: New advanced PHP book

Posted: Mon Nov 14, 2011 10:10 pm
by Jackolantern
Another casualty of PHP's bizarre concatenation operator :P Doing it the traditional way will require PHP to provide operator overloading so that you can use periods in different ways. And I don't think overloading is even on the To-do slate for PHP 6, so it probably won't happen.

Re: New advanced PHP book

Posted: Tue Nov 15, 2011 2:54 pm
by Xaleph
You know what I dont get? They mimmick C++ in so many ways, why not follow that same style? Or their rules of thought?

In fact, I`ve been thinking, if only we could use "regular" C++ in PHP by using a single line of command, like instead of <?php we use <?php! telling the server this document has to be parsed as strict PHP. And strict PHP should be completely OO, should have default unit testing cases, should have a good and strict set of usable operators, like the dot notation for objects or the -> for references. Either way, you catch my drift right? That way the more advanced PHP developers can start working completely OO removing the use of $ and strong type variables. Because, lets face it, the unit testing for PHP is a laugh right now..

Re: New advanced PHP book

Posted: Tue Nov 15, 2011 9:27 pm
by Jackolantern
I think you are basically saying PHP should have an option to be ASP.NET MVC :lol:

I hear you, though. In many ways it feels like PHP is a language who got too big for its britches, like the foundation was laid for it to be much smaller, simpler, and non-enterprise oriented. However, I do applaud what they have done so far. It is quite remarkable how in just 7 years or so they went from an object-aware language who's OO support was more in line with Javascript to a language, that while not strictly-OO, allows for basically every OO construct and methodology available in Java (method overloading is entirely possible without client code having any idea of what is really going on, even if it is not as elegant as Java/C#'s overloading). Few languages have ever succeeded in a full paradigm shift. Visual Basic essentially had to crash and burn VB6 and start over in .NET to become a fully OO language. So I won't knock it too hard! And besides, I still find it a very enjoyable language to code in :)

EDIT: As far as unit testing goes, yes, PHPUnit is primitive compared to things like JUnit, NUnit and the Microsoft Testing Framework. You should look into continuous integration if you are not familiar with it. While I am still just starting to look into it, it is a way to integrate build scripts (which we are now finding are very handy for web applications that have huge hierarchies of disparate files all over the place), unit testing, and other tools and metrics into a system that will continuously run all of our tests and keep tabs on our development all through the development life cycle. There are a couple of nice servers available that deal with continuous integration, such as Xinc and CruiseControl :)