Hy I want to understand what is a better approach on problem solving point of view for a php project , a framework or the mvc pattern?
I would like to add that I know that both principels are quite the same but with a minor diffrence that a framework was made by someone else and has his style applied to it and a mvc pattern you build your own classes and templates and create it in your own style.
My concern regarding the mvc pattern is that a application build from scartch is harder to do and create a good secuirty or my assumption is a bad one.

I would like some oppinion and ideas regarding this topic Thank you very much for your time.

Recommended Answers

All 5 Replies

Not necessarily true. You can have a framework that implements the MVC pattern. Most do actually.

Yes most frameworks are mvc(Model-View-Controller) based or hmvc(Hierarchical model–view–controller).
So does the mvc pattern for a cms should we say ,be a good ideea or using a framework is a better approach?

MVC is always a good idea, whether you use a framework, or build it yourself. A framework is just a timesaver as you won't have to reinvent the wheel.

Member Avatar for diafol

I would imagine that a lot of this is down to the complexity of your site. Frameworks are great, as Pritaeas states, for saving time due to most of the work being done for you. However, frameworks won't necessarily save you time in smaller projects, as there may be a steep learning curve (just look at Symfony!) for little return. On the other hand, developing a robust DIY MVC is no mean feat. You'll probably end up producing a poor man's answer to a framework anyway - although if you're up on your OOP, it may be a quicker option. You could get away with procedural stuff with the odd class here or there too. I can feel afioncionados screaming at me for suggesting such a blasphemy, but it's true in my experience anyway. If you have a good idea of what your site is supposed to do and how, then you can start sketching out the 'modules' of code that you need. Many of these may be available already in PEAR or PECL, which may obviate the need to go framework or even DIY. Each project should be studied case by case as IMO there's no such thing as a 'one size fits all'.

Thank you both of you for your feedback I decided that for my project I will use mvc pattern it's a small project so I think will work well

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.