Posts Tagged ‘cakephp’

Private methods in PHP programming - response

Saturday, August 23rd, 2008

Felix over at Debuggable wrote an interesting article about private methods. He thinks it’s not a very good thing to use, but, kudos to him, doesn’t rule out the possibility. He argues that he doesn’t have any formal education in programming and development, but I don’t think that matters much at all since he seems to have quite a bit of programming experience.

But what I think is that, of course, you alwas can write private-method-free code, but sometimes it’s not very good. When you need to duplicate code time after another, you might begin to see the need for another method (refactoring) or for that matter class. What that method does or returns maybe, just maybe, isn’t that good for the rest of the world (read application) to access directly rather than through your other, more high level methods.

CakePHP itself is has lots of private methods. Could we do without them all? Of course we could. Would it make the code easier to read? Maybe. Would it make the code easier to maintain? I think not.

With that said, you always need to make an active decission whether you choose to make a method public, private or protected. Chances are, if you only write public because you are used to it, you might be making a mistake that could compromise stability or security of your application if another developer makes use of that method…

WebDevKungfu, Web Design, Web Development, Web 2.0 Conversations » Blog Archive » Accessing WordPress with CakePHP

Sunday, August 3rd, 2008

newbie-cakephp.pdf (application/pdf-objekt)

Saturday, July 26th, 2008

Cook up Web sites fast with CakePHP, Part 5: Adding cache

Monday, July 14th, 2008

Cook up Web sites fast with CakePHP, Part 4: Use CakePHP’s Session and Request Handler components

Monday, July 14th, 2008

Cook up Web sites fast with CakePHP, Part 3: Use Sanitize for your protection

Monday, July 14th, 2008

Cook up Web sites fast with CakePHP, Part 2: Bake bigger and better with CakePHP

Monday, July 14th, 2008

Cook up Web sites fast with CakePHP, Part 1: Adding related information and services

Monday, July 14th, 2008

JSMin Helper Compress and cache javascript | The Bakery, Everything CakePHP : Articles

Monday, June 9th, 2008

Links - CakePHP Content Management Systems | Development

Monday, June 9th, 2008