- PeterMoulding.com
- Author
- Trainer
- Speaker
- Business Coach
- How to write a How To book
- PHP Courses
- Speaking
- Web Architect
- Australia
- Books
- Authors
- Akkana Peck
- Alex Berenson
- Andrew Nugent
- Ben Sanders
- Brock Clarke
- Chris Simms
- David Mercer
- Dianna Mullet
- Don Winslow
- Dori Smith
- Harlan Coben
- Jack McDevitt
- James Wines
- Jerry Yudelson
- John Grisham
- Kevin Mullet
- L. E. Modesitt Jr.
- Laurell K. Hamilton
- Marshall Karp
- Martina Cole
- Michael Marshall Smith
- Michel Roux Jr
- Nadia Sawalha
- Philip Pullman
- Raymond Khoury
- Richard North Patterson
- Robert Masello
- Sally Roth
- Sarah Langan
- Stella Rimington
- Stephen Booth
- Stephen King
- Stephen Leather
- T.C. Boyle
- Tom Negrino
- Tony Hillerman
- Urban Waite
- Val McDermid
- Valerio Massimo Manfredi
- Beginning GIMP
- Beginning Visual C++
- Culturalism
- Fiction
- A Drink Before The War
- A Talent for War
- Bag of Bones
- Blood and Ice
- Burn
- Dark Lady
- Dead Line
- Eclipse
- Empress of Eternity
- Exley
- Flipping Out
- Just One Look
- Nightfall
- Pet Sematary
- Savage Moon
- Skinwalkers
- Starvation Lake
- The Fallen
- The Gardens of the Dead
- The Jump
- The Last Templar
- The Mermaids Singing
- The Midnight Mayor
- The Secret Soldier
- The Summons
- The Terror of Living
- The Testament
- The Tower
- Under the Dome
- Virus
- AJAX and PHP
- Aging with Grace
- Food books
- Green Architecture
- Life Is So Good
- SQL: The Complete Reference
- The Backyard Bird Lover's Ultimate How-to Guide
- The Garden Gurus
- Authors
- Sustainability
- -18 hours left to decide the future of Australia
- Campbells vegetable stock or Massel vegetable stock?
- Carbon Sequestration
- Carbon tax for Australia is a fraud
- Copenhagen will fail
- Cost of living in Australia
- Dick Smith jumps on the population bandwagon
- Dry Run: Preventing the Next Urban Water Crisis
- Energy Saving Lights
- Garlic
- How many people can live in Australia?
- Its obsolete, throw it out!
- Julia Gillard offers 9.9 billion dollars bribe to Rob Oakeshott
- Laundry detergent
- Petrol or Diesel?
- Reflective foil batts kill
- RoHS
- Sea level to rise 3mm due to climate change
- Solar power
- Spring again in Sydney
- Sustainable fuels
- The CRUD Tax is back
- The people who make building regulations do not own houses
- Water efficiency
- Which insulation is safer, foil or wool?
- Will Australia reduce greenhouse gas emissions?
- Technology
- Android or Blackberry or iPhone or a flip phone?
- Apple versus Google 2011
- Cameras
- Cars
- Colour
- Burgundy
- Colour Blindness
- Colour Names
- Dulux colours
- Pantone colours
- Safe Colours
- Seculine ProDisk Mini colour balance card
- What Causes Colour Blindness?
- Hardware
- Batteries for the Digital Age
- Cables
- Cases
- Computer reliability
- Computrace
- Disks
- Astone ISO Gear 481E
- Best SSD for your notebook computer
- Disk block size
- Hitachi disk HDS722020ALA330
- LaCie USB 2.0 250 GB mobile hard drive design by F.A. Porsche
- SMART disk
- Samsung 2 TB HD204UI quiet low power disk for mass storage
- Seagate and Samsung merge disk business
- Select the right disk for your RAID array
- USB disk speed
- Western Digital WD20EARX 2 GB SATA 3 disk
- How long should computer hardware last?
- Keyboards
- Mainframe
- Memory cards
- Monitors
- Netbooks, notebooks, tablets, and xPads
- Network Attached Storage
- OLED Displays
- PC's are a thing of the past
- Printers
- Quiet
- Samsung Galaxy S
- Speed
- Television
- Tools
- USB
- Worst computer movies
- Xserve is dead. What next?
- Your backup will not work
- Z68 motherboards
- iPad or Acer Aspire One?
- IQ
- LG Intello Washing Machine
- Lack of a challenge
- Networks
- 802.11n wireless networking
- D-Link DIR-655 wireless router
- D-Link DWA-160 Xtreme N dual band USB adapter
- D-Link DWA-556 Xtreme N PCI Express desktop adapter
- MIMO
- NBN spends another $12 billion of our tax money on nothing
- National Broadband Network
- Netgear wireless modem router DGND3300 with 300 Mbps 802.11n
- Refrigerator kills wireless broadband
- Small Wireless Network
- TP-LINK TL-SG10005D 5 port gigabit switch
- TP-Link TL-WR1043N wireless N gigabit router
- Telstra Pre-paid Mobile Wi-Fi
- Where are the router plus proxy server combinations?
- Open Source documentation
- Software
- 7-zip
- Accounting
- Asterisk
- Audacity
- Backup software
- Bloat only in Windows
- CAD
- CDex
- Disk imaging software for copying and backup
- Exact Audio Copy
- Filezilla
- Firefox
- Java
- LibreOffice or OpenOffice?
- Linux
- 1 in 5 servers will ship with Linux
- Android phones outsell iPhone
- Another Move to Linux
- CentOS 5.5 installation on SSD and RAID 5
- Debian
- Debian 5.0.5 AMD64 installation
- Debian 5.06 installation
- Fedora
- Fedora or Ubuntu?
- Gnome or KDE?
- K9copy
- Linux 2.6.38
- Linux Gnome login settings lost
- Linux Mint
- Linux RAID, a rant
- Linux Speed
- Linux Time
- Linux reliability as demonstrated by Ubuntu 10.10
- Linux reliability as demonstrated by Ubuntu 11.4
- Linux still a struggle in 2011
- Linux workstation disk RAID 1
- Linux, NT, Windows, and SETI
- Linux, three years of progress
- London Stock Exchange switches to Linux
- Mandrake Linux 9.2
- The partition is misaligned by 48128 bytes - warning from Linux RAID
- Ubuntu
- How to fix the scroll bars in Ubuntu 11.4 Gnome
- Kubuntu 10.10 alternate installation on desktop with RAID 1
- POWbuntu
- Ubuntu 10.10 after 6 months use
- Ubuntu 10.10 alternate installation
- Ubuntu 10.10 desktop RAID 1
- Ubuntu 10.10 desktop RAID 5
- Ubuntu 10.10 desktop install on a netbook
- Ubuntu 10.10 desktop installation
- Ubuntu 10.10 netbook install on a netbook
- Ubuntu 10.10 server AMD64
- Ubuntu 10.10 upgrade to version 11.4 beta 2
- Ubuntu 10.4
- Ubuntu 11.10
- Ubuntu 11.10 first upgrade
- Ubuntu 11.4 after one month use
- Ubuntu 12.04 beta1 desktop amd64
- Ubuntu One
- Ubuntu by Microsoft?
- Ubuntu desktop upgrade 10.4 to 10.10 failed because I did not check the media
- Ubuntu strikes again
- Upgrade Ubuntu to Linux Mint 12 LDXE for extra speed
- Yes, use Linux but not that distribution!
- Nero
- OpenOffice
- OpenOffice is now Apache Office
- Project management
- Scribus
- Software for Windows and Linux
- Text editors
- Time
- Todo applications
- Tomboy notes
- Top text editors
- Version control
- VideoLAN VLC media player
- Visio
- Webmin
- Webmin installation on CentOS for Web development
- Webmin installation on Ubuntu
- What is the most popular open source software today?
- Windows
- Another Windows person goes Linux
- BAD_POOL_CALLER
- Cygwin
- Microsoft Malicious Software Removal Tool cannot find a common virus
- One of the developers of Windows XP is criminally insane
- There are unused icons on your desktop
- W32time
- Which Windows version?
- Windows 7 Home Premium
- Windows XP Stop 0x0000007B during installation
- Windows XP is a disaster
- Windows processes
- XML
- Zip, bzip, gzip, or 7zip?
- configFree
- Technology Succession Planning
- VoIP
- Web Sites
- Drupal
- Do Drupal themes have to use the GPL?
- Drupal 7
- A better search facility for Drupal
- Drupal - performance or flexibility
- Drupal 7 Fields are hard to fix
- Drupal 7 new features
- Drupal 7 ships on January 5
- Drupal 7.14
- Drupal 7.4 hits PeterMoulding.com
- Drupal function sequence
- The evolution of a module
- Undefined index: headers in DefaultMailSystem->mail() (line 54 of /modules/system/system.mail.inc).
- Undefined index: to in DefaultMailSystem->mail() (line 83 of /modules/system/system.mail.inc).
- implode(): Invalid arguments passed in DefaultMailSystem->format() (line 23 of /modules/system/system.mail.inc).
- Drupal 8
- Drupal Code Load Cut
- Drupal How To
- Drupal Modules
- Backup and Migrate
- Browscap
- CKEditor with Drupal WYSIWYG
- Captcha
- Cel
- Colorbox
- Content Construction Kit
- Content type
- Devel module for Drupal
- Drupal Rules as an automation language
- Drupal Spam add-on module
- Form alter to node
- IMCE
- IMCE Wysiwyg bridge
- ImageAPI
- Jdog
- Lightbox2
- Module variable
- Node Gallery Access
- Node_Gallery
- Path
- Path redirect
- Pathauto
- Pet
- Search
- Service links
- Session Variable
- Statistics
- Taxonomy
- Token
- Token ex
- Transliteration
- Trigger
- Watch
- Other modules
- Drupal Training
- Drupal access controls need a major rewrite
- Drupal coding tricks
- Drupal performance
- Drupal themes for the future
- Drupal.org colours
- Import existing data into Drupal
- Multiple Web sites made easy using Drupal multisite and the right start
- drupal_lookup_path()
- Adobe PDF
- Apache
- Apache Mahout
- Audi.com
- Bleet
- CSS Strikes Again
- CSS or xCSS
- Can you believe Facebook or email?
- Content Management Systems
- Databases
- Facebook scam
- Font
- Fonts
- HTML
- Install Apache, MySQL, and PHP 5 in Ubuntu 11.4 using the Ubuntu Software Centre
- Language Codes
- Marketing
- Memcache
- Nginx
- Open source development hits another roadblock
- Oscars
- PHP
- SPDY
- Search software
- Techoni.com.au
- Theme themes
- Things to hate on Web sites
- U.S. Patent No. 6,985,875
- Virtual Private Server
- Visible Improvement
- Web 4.0
- Web browser usage
- Web browsers
- Web site development
- Bluefish
- Crying over spilt code
- Eclipse and PHP
- Getting a Git client, a story of ancient technology and pain
- HTTrack
- MVC
- Netbeans
- PHP or ..., CakePHP/Symfony/ZF versus ...
- Programming
- Superfish
- Web browser emulators for testing your Web site
- Web development frameworks
- Web site books
- Web site development on your own computer
- Webmin or phpMyAdmin or cPanel for creating databases?
- aiki framework
- jQuery
- Views development - Learn Fields first
- Views development - Learn Actions and Rules
- jQuery .each()
- jQuery .has()
- jQuery .is()
- jQuery and Firefox Firebug
- jQuery children
- jQuery for people not using Drupal - Installation and getting started
- jQuery hover
- jQuery hover de-duplication example
- jQuery or CSS?
- jQuery performance
- jQuery tests
- Web site hosting
- Westpac Web site still broken after two years and ten months
- Wordpress wins another CMS survey
- Drupal
CakePHP 2.0.0
Submitted by Peter on Tue, 2011-03-01 22:04
CakePHP is mentioned in a few job advertisements. What is it? Should you learn CakePHP? Is the new 2.0.0 release ready for use?
CakePHP is a PHP based Web development framework competing against CodeIgniter, Symfony, Zend Framework, and a long list of other frameworks. There is a comparison in PHP or ..., CakePHP/Symfony/ZF versus .... Download CakePHP from cakephp.org.
Symfony claims to be the most popular framework world wide. Zend Framework is the most popular framework in Australian job advertisements with CakePHP and Symfony competing for a distant second. CodeIgniter used to be popular, used to be in the top two, and is now rarely mentioned.
Most frameworks give you a library of code you use to build something. CakePHP also includes a startup Web page application to test your Web site configuration and provide you with a basic starting point. +1 to CakePHP.
CakePHP is object oriented and the 2.0.0 code uses some of the latest features of PHP objects. Unfortunately some of the code is still 1990s stuff. 0 points for this. Update October, 2011. CakePHP version 2 has a stable release.
Naming conventions
Update May 31, 2011. CakePHP version 2 is undergoing a rename. One example is cake/libs/configure.php to lib/Cake/Core/Configure.php.
The CakePHP 1.3 naming conventions look like they fit fashion instead of logic. There are many inconsistencies. If you are familiar with the paintings of Jackson Pollock, you know what it would be like to classify his paintings by colour. CakePHP appear to use the Jackson Pollock painting approach to mix together every naming convention fashion. They then make it hard for you to change the names because they use one name to compute another instead of letting you specify each name. -1 for this approach.
Update May 31, 2011. The initial changes in CakePHP 2 might reduce this rating to -0.5. There will be more consistency in file naming. CakePHP 2 aims to follow the file naming convention proposed at groups.google.com/group/php-standards/web/psr-0-final-proposal and that proposal is inconsistent on several points. CakePHP 2 cannot be consistent if it is following an inconsistent standard.
Some of the inconsistencies:
Namespace names must be lower case but class names must have the first letter presented as a capital. Hey, what happened to the semantic Web? We are supposed to get rid of using case decoration to imply meaning.
Namespace names can contain underscores and are treated as names. Class names are the opposite, they are exploded on the underscore and the result is translated to a directory structure. The class name handling appears to be an importation of one of the worst features of Java. I hope CakePHP 2 will not enforce this ugliness on PHP developers. Who would want to replace 2 PHP style developers with 6 Java style developers?
Testing and startup
CakePHP version 2 is supposed to be better because all the code is tested automatically. Another big advantage of CakePHP over some competing frameworks is the included startup code to let you see CakePHP in action. You can work from a known starting point and test some things immediately.
I downloaded CakePHP 2.0.0 and it failed immediately with an obvious error, suggesting they never tested all the CakePHP code together as one release. Testing is useless if it does not test the basic things people do first. I suggest you skip CakePHP version 2 for any project you are starting early 2011 and revisit CakePHP 2 toward the end of 2011.
Update May 31, 2011. CakePHP 2 now has an official alpha release, 2.0.0 alpha. I have not tried it. The bug fix log mentions lots of startup errors fixed and lots of file renames. There is nothing to say all the startup errors and renames are complete.
I tried following some tutorials on CakePHP. I found nothing for version 2. There are some tutorials for the older 1.3 and 1.2 versions. There is enough mismatch between the old tutorials and CakePHP version 2 that I could not proceed beyond the basics of displaying a page, certainly not to the point of completing a basic form. Another -1 for CakePHP 2 in 2011.
Update May 31, 2011. I tend to write the documentation first, derive the testing from the documentation, then develop the code that does what is described in the documentation. Drupal documentation for the new release 7 featured several conversion pages so you could use the old documentation with the notes on what changes in version 7. I would not recommend CakePHP 2 for people starting a new project. Stick to Cake 1.3.
MVC
MVC is Model, View, Controller, and is a way to structure code to separate out the presentation layer. Modularised applications use HMVC, Hierarchical MVC, to add MVC structured modules to an MVC structured core application.
CakePHP talks about an MVC architecture and has an interesting structure that is closer to MVC than most other MVC frameworks I have used. The V part, the View, in CakePHP 1.3 still ends up as files with PHP and HTML mixed in a not so logical muddle. Some other frameworks beat CakePHP in the View area. No points either way on this point.
Conclusion
I might battle on with CakePHP for a test although I might scrap version 2 and go back to version 1.3. Update May 31, 2011. CakePHP 1.3 is the only CakePHP with documentation and the only choice for beginners. You might be able to learn CakePHP 2 if you have extensive experience with another framework, or CakePHP 1.3, and of reading code.Update October, 2011. CakePHP 2.0 is out in a stable release suitable for new projects if you can work without up to date documentation.









Comments
I think that this is a pretty
I think that this is a pretty un-educated review of a product. CakePHP 2.0 isn't out yet, it has only just been released to alpha. It is sort of like trying to move into a house that is halfway through being built and complaining that there are no walls or the (non-existent) roof is leaking...
Version 1.3 is pretty solid as it has been out for some time, 2.0 is getting closer to release and a recent naming convention change should satisfy your -1 score for that area.
2.0 is only really for use if you have been developing on cake for a while and know the inner workings, if this isn't you then 1.3 is the way to go for now.
Cheers and good luck!
Any timeframe for a beta?
Hello Dean, Thank you for your feedback. I expanded the text to emphasis that CakePHP 2 is not yet ready for someone new to CakePHP. Based on notes at the CakePHP site, I thought the previous download was the alpha release. I added updates after an initial look at the official 2.0.0 alpha release. Looking through the change log and across at some incident reports, I did not find anything to indicate the file name changes are complete, a reason to not use Cake 2.0.0 alpha if you are learning CakePHP.
The one good thing from the renaming could be the ability to mix frameworks together, which could make CakePHP a nice choice if you want to convert a site that was built on PEAR. I do not have any projects of that nature. I do have some conversions lined up for sites built on unmaintained non standard frameworks and like the idea of converting to a framework with a step toward future compatibility with other frameworks. The Zend Framework is my other choice for those projects and Zend is working toward the same standard as CakePHP.