News Feed
Sections
News Archive


Community Events






Don't see your event here?
Let us know!


feed this:

Typical Programmer Blog:
Doing it wrong getters and setters
0 comments :: posted Monday June 16, 2008 @ 11:19:17
voice your opinion now!

According to this new post on the Typical Programmer blog, using getters and setters in your scripts only adds in a bit of unnecessary coupling and complexity to your scripts that you just don't need.

Today most of the popular programming languages support objects, limiting scope, modularity, passing by value, and sophisticated built-in types. There should be no reason to deliberately expose an object's data to the rest of the code because the language can enforce encapsulation and data hiding.

While not specific to PHP, the post does recommend against them because of one simple reason common to all languages that make them possible - they "break the encapsulation OOP offers". For them, they're like a cheat to get around bad coding practices and are not needed to make a successful application work.

tagged with: getter setter break object oriented encapsulation scope bad


Rails for PHP Developers:
Three New Articles Posted (Scope, Variables & RegEx)
0 comments :: posted Tuesday February 19, 2008 @ 08:44:00
voice your opinion now!

Mike Naberezny has posted a few more articles to the "Rails for PHP Developers" website (based on this book) covering some more of the basics.

There's three new tutorials posted:

  • Ruby Block Scope - the basics of Ruby block scope, a common point of confusion for PHP developers new to Ruby.
  • Variable Arguments - an article that shows two common API patterns found in Rails, variable arguments and option hashes, and how to implement them both in PHP.
  • Regular Expressions in Ruby - a useful reference that maps all of the common PHP regular expression functions to the equivalents in Ruby.

Check out the rest of the site for even more great content.

tagged with: rails development regularexpression variable argument scope ruby


security PEAR code package PHP5 zendframework book application ajax database cakephp zend conference developer job releases release framework pecl mysql

All content copyright, 2008 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework