This free Computer Ebooks and tutorial download site provides free e-books in Core JAVA, J2EE, Advanced, J2ME, JSP Ebooks and Tutorial, CCIE, CCNA, CCIP, CCNP, CCDP, CCSP Ebooks and Tutorial & Ebook references, Basic Electronics, Computer Hardware, Microprocessor, System programming, Oracle, Mysql, Ms sql, sybase, db2 Ebooks and Tutorial, Networking Ebooks and Tutorials, Data Structure and Algorithms Ebooks and Tutorial, CSS, HTML, Javascript, CGI,cisco,php,SAP.

Sunday, March 16, 2008

Object-Oriented Programming with Php5

Object-Oriented Programming with Php5

Hasin Hayder “Object-Oriented Programming with PHP5"
Packt Publishing | 2007-12-30 | ISBN: 1847192564 | PDF | 272 pages | 1,8 Mb

This book for beginners to intermediate users of PHP5 covers core object-oriented programming (OOP) features as applied to PHP in simple language with many examples; comprehensively documents the Standard PHP Library (SPL) with working examples; and covers advanced topics such as Reflection, Unit Testing with PHPUnit, using Design Patterns to simplify coding, the improved MySQLi API for MySQL, PHP Data Objects (PDO), using the Active Record and Object-Relational Mapping (ORM) patterns in PHP, processing XML in PHP with SimpleXML and DOMDocument, using and building frameworks to implement the Model-View-Controller (MVC) pattern. Some basic objected-oriented features were added to PHP3; full support for object-oriented programming was added with PHP5. Object-oriented programming eases and speeds development and can greatly improve the performance of a properly planned and designed program. This book helps you to leverage PHP5's OOP features to write manageable applications with no pain.

With PHP 5.3 looking very close to release, bringing with it significant changes such as namespaces, this is an awkward time to release a PHP book of any generality. Within a few months it will be clearer how well the new features are taking hold and there is almost certainly going to be a clamour for books that show how new features affect development practices and how to make use of them. Even without that, it is hard to recommend this book as it fails to live up to its promise and provides a poor introduction to Object-Oriented programming.

The book's first problem is the poor quality of the English contained. The author does not appear to be a native English speaker and the publisher has apparently done little to clean up the language. For the most part that simply makes for some curious rhythm and phrasing but there are a number of places where it contributes to inaccuracies, such as constant confusion between objects and classes. Finding such inaccuracies alongside mistakes such as confusing polymorphism and inheritance I'm left wondering how well the authors really know their subject. Packt would do well to employ another reviewer to clean up the syntax and definitions before any reprints.

The structure of the book is curious. Rather than approaching topics through the use of an example project or projects, the author gives disconnected samples, often offering little beyond that which can be found in the online PHP documentation and generally failing to explain how techniques would be useful. While he insists that PHP5's Reflection API is an important tool, there is little to back up that assertion. There's a large code sample and a list of the methods and attributes of a reflection object, but no real substance. The database section covers some key examples, such as PDO, ADODB and MDB2, and touches on the ActiveRecord pattern, but uses four pages to list the RDBMSs that ADODB supports and then only spends a page and a half on ActiveRecord, failing to explain either its concepts or advantages in any detail.

The high point of the book is the half chapter on unit testing. A few well chosen examples provide a demonstration of how code can be tested and how that allows for refactoring without fear of regressions. The reasons for unit testing are clear as is basic usage of PHPUnit. I'd have liked to see further examples rather than several pages listing all the default assertions PHPUnit provides, and I disagree with the claim that there should never be more than one assertion per test (individual tests should focus on a single concern, but can use multiple assertions to do so) but by that point in the book it was good just to see a section that made its point clearly.

Fundamentally, I came away from this book feeling it had failed to communicate clearly the core principles or reasons for object oriented programming. By trying to cram in too much reference material, not offering clear contexts for each technique, and not lingering on ideas like encapsulation the book fails to instill OO techniques.

BigDownload link :


Digg this

No comments: