Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I've been developing using frameworks since the last year, and is true that those pieces of software really help me and improve my development, that's until you need to fulfill your client's dreams, like, the app needs to fly to the moon and back and collect information about the sun. Or he has an app that needs a basic crud functionality but doesn't need the other 90% of the framework.

I know I can handle dependency management using composer, but what if the client has an specific need to be coded over the previously developed app? That's why I'm asking here if anyone of you guys knows a minimal MVC framework?, that can be improved as needed.

I just need some base to start my new projects, and the cleanest and minimal, the better.

Main charasteristics I'm looking for. - Obviously mvc design. - Database integration. - Built in basic Crud operations. - Security. - Code readability

Would like: - Template engine (like smarty) integration. - Helper classes.

Also it has to be easily expandable.

I've looked at yupp, but I don't find it complete and also a little bit buggy for development purposes.

Thanks.

share|improve this question

closed as not constructive by jmort253, Yusubov, Kilian Foth, Martijn Pieters, gnat Feb 6 '13 at 11:56

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 expertise, 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.If this question can be reworded to fit the rules in the help center, please edit the question.

1  
Would you mind listing what features you would like in the minimal MVC framework? –  gahooa Feb 5 '13 at 23:58
    
Added the ones that get to my mind right now. –  Necroside Feb 6 '13 at 0:18
    
Hi Necroside, this type of question, a list question, really isn't a good fit for our Q&A model and will likely be closed since every single answer would be correct. Instead of asking for a list of frameworks, I'd suggest describing a problem you're trying to solve, and if answers contain certain frameworks, so be it. Hope this helps! :) –  jmort253 Feb 6 '13 at 5:01

1 Answer 1

Off-the-shelf frameworks, while definitely useful, have one disadvantage: they need to cater to a wide range of needs, and so they have to balance the required level abstraction vs. the maximum tolerable degree of complexity. That is, in order to be generic enough to support all possible use cases, they tend to be more complex than they would have to be for each individual project.

At the same time, the advantage of such frameworks grows with their user base: the more popular a framework, the more likely it is to have seen rough real-world exposure, which probably means it's been tested and fixed more thoroughly. The same goes for any other piece of code, naturally, not just frameworks.

This means you have two viable choices:

a) Go with one of the popular frameworks, get to know it well, and learn how to bend it to your desires. Most of them are flexible enough to get you there, even though some things might be harder than they would have to be in a perfect world.

b) Roll your own. A minimalistic MVC framework doesn't really take that much: a controller base class, a model base class, a template system, and a bootstrapping script that takes care of configuration loading, routing and autoloading and such. For database access and templates, you can use existing solutions; there is an abundance of ORMs and template engines for PHP, but at least for the ORM part, again, writing your own isn't that hard if you know what you're doing.

One final note: you list "security" as one of the desired characteristics. This sounds as if you expect a framework to be able to solve the security problem for you, but it doesn't work that way. A system is as secure as the weakest link; the best a framework can do is not be the weakest link, and provide you with some tools that help you avoid common problems. Textbook examples for such tools include a template engine that automatically HTML-encodes variables (which protects you from XSS vulnerabilities), a data access API that uses parametrized queries (to avoid SQL injection), a forms API that takes care of CSRF protection, etc. But note that even a framework that gets every single one of these things 100% right does not give you "security": you can still make mistakes, and those mistakes can still translate into vulnerabilities.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.