开发者

PHP MVC paradigm, should i bother? [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 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. Closed 11 years ago.

i come seeking a little guidance.

over the last 18 months or so i have been teaching myself PHP & Jquery and must admit that i have become somewhat good at it :-).

I have developed a few decent webapps / websites that work really well but one thing that always pops up is these frameworks such as yii.

I have never used the MVC paradigm before but am starting to consider it as i see many "pros" use it.

I have developed my own style in the last 6 months that i find works well (build a php file say api.php and using jquery ajax calls to interact with it and the front html, whilst building a html front end the good old fasioned way)

Now my questions are these:

  • should i bother to learn a framework/MVC?
  • is it considered more professional / better?
  • what benefits / disadvantages can i expect?
  • which framework should i start off with?

开发者_StackOverflow社区I know this seems like a lot to ask but i would really appreciate some help on this matter


Well, before super users of SO exercise their super powers, let me share my experience with you. A framework

  • takes away the pain of reinventing the wheel
  • bothers about security
  • makes your app distribute-able as a code with lesser problems
  • ease of deployment
  • ease of scaling, if you follow the rules correctly
  • ease of maintenance and management, again if you follow the rules correctly
  • makes you follow some standards, good for you and many many more. Thy shalt google for more.


I wrote an article on PHP frameworks just a few days ago: http://www.factor3.co.uk/blog/web-frameworks. This will show you the benefits of using frameworks.

Regarding MVC design pattern. The main benefit of this is that it separates the different parts of your code into logical parts. This is useful in numerous situations. Eg. you might have different people working on each part. It also allows you to easily change the display of an application, without affecting the functionality. Having an MVC breakdown is also useful as your application scales.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜