2

I've written a backend app for use with a iOS App. When I started the project, I didnt know OOP at all.

Now half the scripts are classes and I am using a mvc pattern and classes. It sure is easier to reuse my methods now, but now there is alot more going on with each request.

For a backend system that handles pre fabricated (Predictable) requests, is it better "performance-wise" to use basic procedural scripts or use mvc and oop?

I ask as it seems as though much more happens when using mvc and oop.

netcoder
  • 66,435
  • 19
  • 125
  • 142
Peter
  • 2,276
  • 4
  • 32
  • 40
  • possible duplicate of [Speed Comparisons - Procedural vs. OO in interpreted languages](http://stackoverflow.com/questions/3057/speed-comparisons-procedural-vs-oo-in-interpreted-languages) – netcoder Feb 27 '11 at 00:08
  • 1
    I would argue most "OO" code is procedural code hiding in some fashion of "objects" ^^ –  Feb 27 '11 at 01:27

1 Answers1

2

A hand-crafted solution written in assembly language for the target CPU by expert programmers will perform best in general, but cost 100 times more. Your solution, while it may perform a little less than a procedural program will be far more maintainable over time, allowing you to a) do something else and b) buy faster hardware. Since these are pre-fab queries, add a caching layer such as memcached.

David Harkness
  • 35,992
  • 10
  • 112
  • 134