 | News Feed |
Sections
|
| feed this: |  |
Chris Hartjes' Blog: Dynamic Models in CakePHP 1.2
by Chris Cornutt August 06, 2008 @ 09:34:33
In this new post to his blog Chris Hartjes mentions a "nifty little feature" that the latest version of the CakePHP framework has - dynamic models.
By default now, Cake will automatically use the AppModel class and create a unique alias to a database table if it does not find the file. This means that if you have a table that follows the Cake conventions, needs no validation, and has no associations to other tables, you don't even have to create the model file any more. Woah, talk about a serious time saver in some cases.
He also mentions a gotcha to keep an eye out for - misspelling the model name when you use it. It'll definitely break things. You can find out more about models in CakePHP from this section in their manual, The Cookbook.
voice your opinion now!
dynamic model cakephp framework appmodel naming convention
Chris Hartjes' Blog: Namespaces in PHP? Why *wouldn't* you want them?
by Chris Cornutt July 01, 2008 @ 11:14:51
With more recent talk about namespaces in PHP 5.3, bloggers all over are tossing their comments into the discussion. Chris Hartjes is one of the latest with his thoughts on the point of the functionality.
I'm an outsider when it comes to tracking the going-on in the world of PHP internals. So, because of that, I'm not going to comment on the actual syntax of how namespaces will be implemented or it's impact on internals. That's not really important as far as this particular discussion goes.
He mentions one of the primary arguments for namespaces from the casual developer's perspective - keeping things separate and so classes can have the same naming as some of their cousins in other namespaces.
voice your opinion now!
namespace php5 syntax framework naming class
Tobias Schlitt's Blog: iRefuseToUse aNamingScheme
by Chris Cornutt July 01, 2008 @ 10:25:30
Tobias Schlitt has posted some comments on things recently said on PHP's upcoming support for namespaces - specifically on the ideas about naming classes the could conflict with PHP's own internal ones.
Namespaces are potentially coming in PHP 5.3 (does anyone believe?) and people start discussion about how they can even shorten their names from Abstract to aSomething and from Interface to iAnotherthing. I'm a fan of short names. [...] I agree with these rules and am of the opinion that class names must all above anything contain a semantic. Interfaces indicate what you can do with an object, while abstract classes model that different classes have a common base and can be used in the same mannor. And indeed you can add these semantics to names without using the terms.
He gives a few examples, things like Persistable, Configurable and Reflector.
voice your opinion now!
semantics naming scheme php5 namespace scheme conflict
Yet Another Web Development Blog: Dear PHP, I think it's time we broke up.
by Chris Cornutt December 19, 2006 @ 11:56:00
As anyone that's worked with a programming language for a long time knows, you get to know the ins and outs of it pretty well. You get a good feel for how it all works and how feel confident in your skills with it. But what happens if you decide to move on and leave the relationship? Check out this take on just such a situation from the Yet Another Web Development Blog.
We've been together for about five years now. I've had a lot of good times and I've really enjoyed being with you. However, the more we work together, the more concerned I get about our future. I'm sorry, but you don't have the elegance that inspires me to want marry you. I think it's time we broke up.
Some of the reasons given for moving on is PHP's seeming identity crisis, consistency in function names/functionality, and performance issues that were just too much.
Despite being a bit anti-PHP, it's still a well-written piece. Check it out...
voice your opinion now!
language issue identity performance naming convention language issue identity performance naming convention
PHPKitchen: Advantages of using the PEAR class naming convention
by Chris Cornutt October 26, 2006 @ 07:51:00
Keeping with convention - well, naming convention - is a good thing sometimes. Demian Turner thinks so and talks about one of many reasons he sees to follow a standard set in place for a while now - the PEAR naming standard.
By far the most convincing reason to use the file naming convention, which means that a class located in your include path like Foo/Bar/Baz.php is called Foo_Bar_Baz, is the ability to take advantage of PHP 5's __autoload magic method.
The __autoload functionality in PHP 5 is definitely one of the most handy, elegant single lines of code out there and I'd definitely vote for anything that will make working with it even easier. Demian also includes a few lines of example code to show the interaction between the function and the files with the naming convention.
voice your opinion now!
pear class naming convention autoload simple reason pear class naming convention autoload simple reason
Paul Jones' Blog: Solar 0.20.0 released
by Chris Cornutt June 27, 2006 @ 05:52:03
Paul Jones has posted today about the release of the latest version of his Solar framework, version 0.20.0 alpha.
Exactly one month after the last release, I have uploaded version 0.20.0 alpha. There are lots of changes in this release, but the biggest news is that the page-controller now uses method-based actions (as opposed to file-based actions).
You can read the change notes here, but it's a really long list. If you want something a little more readable, with better narrative, you'll find it after the jump below. The new page-controller information is especially good. However, the narrative is quite long, so consider yourself warned. ;-)
For those that don't want to take the time to read through it all, he summarizes it into six different sections:
- Naming and Standards
- Class Name Changes
- Inherited Config File Values
- Adapter Configuration
- Locale Files
- Page-Controller Class
Each section has its own explaination of the changes made in (a bit) more concise manner. Be sure to check out the full notes to read up on everything.
voice your opinion now!
solar framework release version0.20.0 naming standards solar framework release version0.20.0 naming standards
Tnx.nl: PHP in Contrast to Perl
by Chris Cornutt May 22, 2006 @ 06:21:33
As long as people "choose sides" when it comes to programming languages, there will always be articles like this to compare them. This time, it's a look at PHP versus another much-loved language, Perl.
The article takes a look at several different topics under this one umbrella, including:
- Arguments and return values are extremely inconsistent
- PHP has inconsistent function naming
- PHP has no lexical scope
- PHP has too many functions in the core
Obviously, they all seem to take a negative slant on PHP, but they do provide some content under each of the headings to back up their claims. They break out the contents of each of these examples to make comparison of Perl's and PHP's similar functionality easier. At the end, they also provide links to other resources and other posters illustrating some of the points they've shown.
voice your opinion now!
php contrast perl arguments function naming scope php contrast perl arguments function naming scope
|
Community Events
Don't see your event here? Let us know!
|