开发者

PHP coding procedural vs object oriented [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or 开发者_如何学JAVAexpertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 11 years ago.

Procedural coding vs object oriented. Which is the best from the application point of view? Can an application function better with an object oriented coding? or be slower?


Don't think there is a 'best' here. Each have their own use and should be explored depending on what the context of the application is.


It depends upon the kind of application you are building. If the application is very simple one, (e.g. add_two_nums(x,y)) then OO is overkill. There are times when a very simple application starts expanding and becomes a complicated one. If there is a chalked out plan of such scenario, then OO is better because even though initially it seems overkill, in future, it will help to expand the application with ease. I have not seen any performance issues between procedural style and OO approach. Someone might throw some light into it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜