Submitted by Guest on Wed, 04/28/2010 - 12:06pm

I beg to differ that Static Classes are not OOP. While this is true on a technical level because we are not dealing with an object that we pass around per se it is part of an understanding of Object Oriented Programming. This is why the article is titled an OOP Approach, it is more a way of thinking about organizing your code in a way that makes more sense and is easier to reference and reuse. Pick up any book on OOP and you will find a chapter on Static Classes and their place in o o programming. At the very least the Static Class is definitely better than a bunch of functions just sitting in the code without any real rhyme or reason to how they are organized.

The idea of a utility module is very good and one that makes a lot of sense if we were to want to share code among modules.

True ,Ruby on Rails is not MVC this is why I qualified my statement about MVC stating "The way the popular frameworks have adopted this pattern for web-based applications..." MVC is just one pattern, which has gotten a lot of attention due to Rails, CodeIgniter, Cake and others.

While it is true that documentation has nothing to with either MVC or OO it has everything to do with best practices. If a developer follows certain conventions when writing static classes or any code for that matter they can take advantage of tools that are available to help them work faster. Unfortunately some of these tools do not work on stray functions that sit in a file or are badly commented - they expect a certain structure to work correctly.

I appreciate your feedback and ideas, thanks for sharing.

The content of this field is kept private and will not be shown publicly.

Plain text

  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.