How do you prefer to program?
There are plenty of arguements for and against both, but at the end of the day, which do you use?
- are you a Object Orientated Programming (OOP) devotee?
- a Procedural Programming fanatic?
- or perhaps you prefer to work both sides of the street?
Tell us which and why?
This entry was posted
on Monday, February 18th, 2008 at 2:08 pm, contains
52 words, and is filed under Web Tech.
You can follow any responses to this entry through the RSS 2.0 feed.
You can skip to the end and leave a response. Pinging is currently not allowed.
The views and opinions in this blog post are those of its author.
February 18th, 2008 at 3:15 pm
I really only work on smaller, personal web development projects.
With that in mind, I still write my reusable code in OOP. Then I mostly string the project together procedurally.
February 18th, 2008 at 4:13 pm
A bit of both . The last thing I would want to see is the people making absolute statements like XX is the only way to go. I prefer to organize frequently reusable modules that make sense as an distinct entities into classes and routines. Others tend to be procedural, generally. Nothing is carved in stone.
The search link you posted has expired.
February 18th, 2008 at 4:14 pm
BTW, your search link has expired.
February 18th, 2008 at 4:16 pm
I prefer a 99% object oriented route. I love abstraction especially for code maintainability, however there are instances where I’ll do purely procedural. Quick php scripts used by ajax scripts, things like that are best suited for a small, 20 line procedural page.
February 18th, 2008 at 5:53 pm
Large projects: OOP
Smaller Bits: Procedueral (Re-using OO Methods)
February 18th, 2008 at 7:07 pm
My web application framework is based on the 3 Tier Architecture, and both the business layer and data access layer are 100% OO. My presentation layer, however, is 100% procedural, and all my HTML generation is via XSLT which is definitely not OO.
Why do I like this mix? Because I do not share the opinion that “everything is an object”, or that “OO is best”. I am in the business of providing solutions, not to follow a theoretical set of programming or design principles.
February 18th, 2008 at 7:21 pm
OO approach
over the last few years i have build a very nice framework for myself that allows me to quickly make features/sites also it works nicely with other frameworks/libraries such as Zend Framework
also the newer code is progressively alot more maintainable and less buggy thanks to testing and loose coupling between components,
2 years ago it was weird mix of both ways i used but now i have to maintain that old web application (used by 110,000 people daily) and when i compare it to latest code i just think to myself “damn i can provide X faster/better/more efficient now thanks to sticking with OO”
February 18th, 2008 at 7:33 pm
You missed out functional programming - when I’m writing Python and JavaScript I often turn to functions and closures in place of objects if I want to encapsulate a small piece of state along with a function that acts on it. These days most of the JavaScript I write makes heavy use of closures and a functional programming style.
February 18th, 2008 at 9:33 pm
Mostly OO, with a bit of procedural. I use Object orientation for… objects. I don’t believe in having things like a ‘User Registration’ object or something, which I have seen before - that is an action, not an object. I will use procedural style for very small apps that are usually temporary, but the benefits of switching to OO (when I learned it years ago) from procedural was a real eye opener!
February 19th, 2008 at 5:20 am
OO
With the frameworks that are available for most languages nowadays there really isn’t an excuse to code anything outside of the most tiny projects procedurally any longer.
February 19th, 2008 at 8:25 am
I’m a firm believer in using the method best suited to the language as a first port of call. eg. C#=00, PHP=mixed, Javascript=mixed, etc, etc
February 20th, 2008 at 8:15 am
OO
For the most part anyways. I do deviate, but I often regret it.
February 20th, 2008 at 9:10 am
PHP makes it really easy to code procedurally because you could write a really small bit of code and it would just work without hassle. This was pretty much the expected way of programming since the beginning and people who have grown up with PHP have very little OOP code handy. I prefer OOP but most of my code is procedural.