Understanding, seemingly suddenly understand the MVC model!

Source: Internet
Author: User
Tags php website zend framework
MVC has always been a very mysterious thing to think of. Just graduated from the interview was asked MVC, do not understand a bit. Then also looked at CakePHP, thinkphp, the more you see the more you feel don't understand, the more you feel confused ... Think not MVC will not be able to work in PHP, more and more feel discouraged, almost to abandon PHP ... Later lost these directly ignored.

Later I write code things, do their own programs, but not to use those cakephp, thinkphp, in fact, from the time of school began. After graduation also insisted. Today suddenly got a n years ago (when you graduated from a code knock) to do a website platform (in fact, is a CMS) to change, the content of the site more, many kinds: software soft, picture pics, News, blog website site.
Then you see the folder structure:
Front page on one entrance get.php
Then the individual visits come through this:

(access to news list)
Front desk URL/get.php?db=news&mod=list&page= $page,
Handler/source/list_news.php
Template Address/template/default/list_news.htm

(Visit the News details page)
Front desk URL/get.php?db=news&mod=detail&id= $id
Handler/source/detail_news.php
Template Address/template/default/detail_news.htm

(Access software list)
Front desk URL/get.php?db=news&mod=list&page= $page (actually is C)
Handler/source/list_soft.php (this is m)
Template Address/template/default/list_soft.htm (this is V)



Previous posts:
Non-technical questions: I would like to know how many people and I do not like to use the framework of the
http://bbs.csdn.net/topics/320206261 (Posted on: 2009-11-28 23:33:49)


have been confused about what MVC is, the Java section of the friends who understand MVC, please enter!!
http://bbs.csdn.net/topics/350216811 (Posted on: 2010-12-10 22:01:11)


I'm really tired of arguing with others about MVC in PHP .
http://bbs.csdn.net/topics/350216861 (Posted on: 2010-12-10 22:38:53)


read "PHP5 using Zend Framework & Smarty to build a true MVC Application Model"
http://bbs.csdn.net/topics/350139910 (Posted on: 2010-11-03 15:00:35)




Think of the first time to interview PHP work was severely rejected, memory is too deep, (Graduation of that month, with information to interview, sat three hours of public transport, from Wuchang to Hankou, the interview when the programmer actually even PHP how to jump will not, I think you can interview, the result is the opposite. Was mercilessly refused, 8,001 months of nothing, a week only to rest one day and also to be ready at any time, the trial period of less than 800, three months before the regularization. ...... the reason for rejection is that you're not familiar with MVC.Then I saw that their company's business was to engage a forum with a lot of PHP programmers.

Did I ask if there was a discuz? The boss is not happy with the result. He said that Discuz (who had Discuz 7.x at the time) did not conform to MVC at all, even more incompatible with the standard MVC, so their company wanted to do a discuz. Six months later, I went to search their company, the results even the official website can not open, the domain is sold status .....

A bit of emotion, but although it has passed so many years, but I still very rejection with cakephp, thinkphp! Why do you use these? Instead of using these, Why don't I take discuz or dedecms directly? Inside backstage, member system, data operation all have! Why does everything have to follow cakephp, thinkphp These rules and regulations to get. The feeling of that year MVC is cakephp, thinkphp, will not cakephp, thinkphp will not PHP, write PHP website Things must use cakephp or thinkphp (almost obsessive-compulsive disorder) ...

Get PHP all the way, not easy ~ ~


















Reply to discussion (solution)

Dip on the sofa oh ...
Thinkphp's still good, huh?
Want to learn thinkphp come to my group 7948162

Too impulsive, incredibly send this post ...

has been developed by the CMS two times waste of drifting ~ ~

Oh, more interested in the company, if DZ are 7, and phpwind should be divided between the world (local area network), and then with such a large ideal, but invite cheap developers, the outcome is not surprising.
Maybe that's not their main product line, maybe it's a hobby project ...
Those years, those things ...

What is MVC? What exactly is MVC?
MVC is just a product of every application abstraction. Or MVC is the sublimation of practice to theory.
Any program that is used for "people" is consciously or unconsciously used and is later referred to as the MVC design pattern.


Lou Pig, seems to have not read your position!!!

You know, C, it's good to make money.

I did not understand the principle of MVC framework before, but since? Claims to be the world's smallest MVC framework (only 140 lines of code) I understand.
http://twitto.org/
How to say, in fact, compared to the CMS is actually more useful, the most important thing is to force users to use the OOP mode, which is very good.
Some time ago I also developed their own exclusive MVC, now has been used very cool, haha

See LZ's epiphany, congratulations.
In fact, LZ himself did not develop the application of the MVC framework?
And MVC, though it's hard to read.
But it's almost like a little app that eats an MVC development ...

I did not understand the principle of MVC framework before, but since? Claims to be the world's smallest MVC framework (only 140 lines of code) I understand.
http://twitto.org/
How to say, in fact, compared to the CMS is actually more useful, the most important thing is to force users to use the OOP mode, which is very good.
Some time ago I also developed their own exclusive MVC, now has been used very cool, haha


HH, thank you for your reply. I feel that my understanding of MVC is still vague, and it is still unclear to OOP. has always been to make discuz, dedecms, writing style is basically the same as the two programs. OOP, MVC a threshold Ah ~~~~~







What is MVC? What exactly is MVC?
MVC is just a product of every application abstraction. Or MVC is the sublimation of practice to theory.
Any program that is used for "people" is consciously or unconsciously used and is later referred to as the MVC design pattern.

Good talk.

Six characters: data-driven interface

The real situation is, the interview of the person you still understand PHP, once in, where they used to recruit those who put the face.


Another one? The small case of the reverse attack of silk

800 What's the price of the age? I just got into the 3k.
This side of the dishwasher is more than five, where to 800 ah.

800 What's the price of the age? I just got into the 3k.
This side of the dishwasher is more than five, where to 800 ah.


In Wuhan, college students are everywhere, 800 are going to rob Ah or no, ~ ~ ~

Too impulsive, incredibly send this post ... What situation?

MVC does not have to be used, we do not have the MVC PHP application is also very useful, easy to modify and expand. This thing is like to say Java and C which is good, only applicable on the OK

Hey, I??? Began?

MVC is a concept of abstraction, a kind of factory thinking, which is often linked to MVC and OOP, although it has long been a trend, but will continue, in order to save costs and improve development and maintenance efficiency.

I like this kind of post most .... Better than pure technical paste ...

I did not understand the principle of MVC framework before, but since? Claims to be the world's smallest MVC framework (only 140 lines of code) I understand.
http://twitto.org/
How to say, in fact, compared to the CMS is actually more useful, the most important thing is to force users to use the OOP mode, which is very good.
Some time ago I also developed their own exclusive MVC, now has been used very cool, haha

Hello, your 140 lines of code can not download Ah, you have it. Can you send me a copy?

When I wrote a website, and then closed.
Recently took out the old procedures to change the front desk, continue to be used.
Discover or learn the basics of small development good, big must be MVC it?

To do data, HTML, separate, and then a single class file to deal with IS MVC,
For this, I've seen a lot of people trapped before.

Poof, the first glance became "Goku, ..."

Reference 10 Floor Sibang reply: I did not understand the principle of MVC framework, but since? Claims to be the world's smallest MVC framework (only 140 lines of code) I understand.
http://twitto.org/
How to say, in fact, compared to the CMS is actually more useful, the most important thing is to force users to use the OOP mode, which is very good.
Some time ago I also developed their own exclusive MVC, now has been used very cool, haha

Hello, your 140 lines of code can not ... You're on the wall.

The greatest benefit of MVC is that code is clear, maintainability is strong, M and v are relatively independent, debugging can save a lot of time to consider whether it is M or v out of the problem

Learning ing ...

Learning ing ...
But it's not quite understood.

Many interviews others have asked themselves to write a framework without

What is MVC?

Oop these

Hey, years down, accumulate in ...

A bunch of unscrupulous interviewers,
How many innocent and beautiful teenagers have been harmed.
MVC is hype, fashion.

Not even jump to the company where the programmer is located,
And what about MVC,
No words anymore!

The landlord did not go to be considered right.

Just two words: layering ....

41 layers, the knot has been pasted

41 layers, the knot has been pasted

Good. hehe ~ ~ looked phpcms, in fact still is the process many.

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.