OOP Vs MVC framework in PHP

Which one to be preferred?

Page 1 of 1

5 Replies - 2512 Views - Last Post: 15 September 2009 - 03:14 PM Rate Topic: -----

#1 HerofTime  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 24
  • Joined: 29-July 09

OOP Vs MVC framework in PHP

Posted 15 September 2009 - 01:35 AM

Which one to be preferred?
Use OOP with normal PHP or MVC framework like codeigniter?

I am using codeigniter for months now but I sense that codeigniter lacks OOP pattern though I don't mean that it is completely procedural. Coming straight to the point. Which route should I take?
Yes I know it depends on the type of application and the size of applicaton but lets just ignore these details for now. Thanks in advance!

Is This A Good Question/Topic? 0
  • +

Replies To: OOP Vs MVC framework in PHP

#2 RudiVisser  Icon User is offline

  • .. does not guess solutions
  • member icon

Reputation: 1004
  • View blog
  • Posts: 3,562
  • Joined: 05-June 09

Re: OOP Vs MVC framework in PHP

Posted 15 September 2009 - 02:27 AM

OOP is always a good route, there's absolutely no need to use any framework at all to achieve an "MVC" design pattern.. Afterall, that's all it is, a design pattern.
Was This Post Helpful? 0
  • +
  • -

#3 HerofTime  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 24
  • Joined: 29-July 09

Re: OOP Vs MVC framework in PHP

Posted 15 September 2009 - 03:14 AM

View PostMageUK, on 15 Sep, 2009 - 01:27 AM, said:

OOP is always a good route, there's absolutely no need to use any framework at all to achieve an "MVC" design pattern.. Afterall, that's all it is, a design pattern.


Yes, I know MVC is a design pattern but asking specific to the framework. I know can achieve MVC pattern without any framework. What I really want to know is, Which will be a better choice? OOP programming e.g. designing classes, making objects.etc or working in a framework like codeigniter. which approach is more reliable, reusable and fast? Thanks.
Was This Post Helpful? 0
  • +
  • -

#4 RudiVisser  Icon User is offline

  • .. does not guess solutions
  • member icon

Reputation: 1004
  • View blog
  • Posts: 3,562
  • Joined: 05-June 09

Re: OOP Vs MVC framework in PHP

Posted 15 September 2009 - 03:16 AM

I fail to see how writing code with codeigniter makes it reusable.. Anyway I've always used OOP and OOP is more certainly the most widely used / respected / built upon design pattern there is, by using OOP you'd also get complete control over your code.

I've always liked to know exactly what my code's doing and have complete control over absolutely everything, but I guess in the end it's down to personal preference like everything.
Was This Post Helpful? 1
  • +
  • -

#5 HerofTime  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 24
  • Joined: 29-July 09

Re: OOP Vs MVC framework in PHP

Posted 15 September 2009 - 03:25 AM

View PostMageUK, on 15 Sep, 2009 - 02:16 AM, said:

I fail to see how writing code with codeigniter makes it reusable..


Completely agree with you in this part. Infact, this was the thing which me made rethink to use OOP because I was kind of tired copying and pasting my own code from controller to controller to gain the same functionality and in the end codeigniter really ignited me to think about OOP. Found your answer useful tough, thanks!
Was This Post Helpful? 0
  • +
  • -

#6 5thWall  Icon User is offline

  • Occasional Member

Reputation: 31
  • View blog
  • Posts: 530
  • Joined: 17-September 08

Re: OOP Vs MVC framework in PHP

Posted 15 September 2009 - 03:14 PM

OOP and MVC are mutually exclusive? When did that happen?

Why not use both?

This post has been edited by 5thWall: 15 September 2009 - 03:19 PM

Was This Post Helpful? 0
  • +
  • -

Page 1 of 1