This post was last edited by liuser_cn on 2012-09-03 03:03:20
Just understand how a single page operates, in HTML mixed PHP, and then submitted to the database for display.
Backstage is finished, my understanding is not also in the HTML add PHP statement, and then through the background operation, (don't say MVC what is good?) ) for illustrative purposes.
There is a front page, there is only one line of navigation bar, for example, "Hello" "I am Good" "He is good".
Embed in this tag Write a variable inside, and then click Delete in the background, where the wood has value.
My understanding and expression are problematic, in the eyes of others is very simple problem, I like to complicate it, PHP MySQL Foundation has been learned,
Recently asked to write a small project, but I do not understand, with the instructor, also has been in the "Mmm-hmm" reply,
The lecturer left without understanding. Hope that a senior can speak in layman's words a ha.
If you want to say let me go to see the source code, then I have no say, I under the simplest are more than 1M, and are used by the MVC framework,
It makes me understand how to read. Can not be responsible to tell you that you tell me clearly this, I can basically understand MVC.
If you can help me solve the MVC concept,
V is the view, C is the controller, M is the module,
The action is submitted from V, communicated to C, then returned to C by the module execution, and then to the corresponding action.
Ask:
1) Do I see v? (Because what I see is definitely not V, it's just a template, how this v interacts with the foreground page).
Ask again:
Recently, there is a small project, I only 4 children "do not start", and then more than four words, "to cry no tears."
1) I heard that if you like which front desk, you can directly save it, and then on the basis of the modification, is this it?
2) I can not write the backstage, I now knock 20 lines of code, a login interface, matching users will be able to reluctantly jump to the Background Management page (blank page, below will not write, ah ah, I am not particularly stupid AH) ...
Recently, I was looking at MVC, but also see TP, I hope to understand from the TP above MVC, can see the more eggs pain,
And let's do it with MVC, my day, day and day.
MVC answer does not answer this is not the point, I hope your answer will allow me to thoroughly understand the background and the front desk relationship.
Off-topic "Backstage is not just adding and removing to check?" ... I pooh, to say the lightness.
Reply to discussion (solution)
If you feel that my foundation is not solid enough, or if it makes me reconsider the basic course, I think it is also good,
But the time is tight, and this project is to combine the previous knowledge points,
If possible, I hope is a compromise, you recommend to me a few sites commonly known as posts,
Can make me understand the relationship between front and back.
The most egg broken is unexpectedly in search engine searches this kind of article, is my key word is wrong or is too basic,
Which Master is the lecturer?
Whatever it is, you should be learning something now.
Ajax
You can search for jquery's Ajax
That is, using jquery (JS) Click to trigger event Ajax to get background values such interactive work.
The process is such HTML->click->ajax->php callback->modify html
MVC is only for large sites more convenient, easy to maintain, if you are not very clear about the MVC architecture, the Open source MVC framework is not familiar with the foundation is not very good, I suggest you still use the source code to do the site, understand what MVC is, there are many answers online, as for the landlord did not find a clear answer, I am puzzled by that.
Hugh has to question my lecturer,
You may be a little misunderstood, we did not learn there, progress has one months, the Mysql+php Foundation has been finished, so there is an intermediate project,
In fact, can not blame our lecturer, Class n students, they can understand, I will not, personal qualification problem, Jquery+ajax is the future course, first I will not, second time also not so much, there are a few days ah .... I want the template, I want the class library,
Which Master is the lecturer?
Whatever it is, you should be learning something now.
Ajax
You can search for jquery's Ajax
That is, using jquery (JS) Click to trigger event Ajax to get background values such interactive work.
The process is such HTML->click->ajax->php callback->modify html
I need an epiphany, not to mention the MVC stuff on the Internet, PHP is piled up into mountains,
Although more information, but I just do not understand .... Ah ah ah ah ah
MVC is only for large sites more convenient, easy to maintain, if you are not very clear about the MVC architecture, the Open source MVC framework is not familiar with the foundation is not very good, I suggest you still use the source code to do the site, understand what MVC is, there are many answers online, as for the landlord did not find a clear answer, I am puzzled by that.
My reply is gone ... Which Master is the lecturer?
Whatever it is, you should be learning something now.
Ajax
You can search for jquery's Ajax
That is, using jquery (JS) Click to trigger event Ajax to get background values such interactive work.
The process is such HTML->click->ajax->php callback->modify html
MVC is just an architecture, a thinking constraint, since you've only understood how a single page operates, in HTML, with PHP, and then submitted to the database for display.
Then your reading database is M, generating the page is V, interpreting the incoming data and forming the appropriate action is C
Just for your example:
There is a front page, there is only one line of navigation bar, for example, "Hello" "I am Good" "He is good".
In this tag embedded inside write a variable, and then click Delete in the background, where the wood has value.
The foreground and background are run separately, so you need to have a mechanism for communication between the front and back stations, which can be done through the database
When the "variable" of the current station is read from the database, the background can control the behavior of the foreground by processing the contents of the database.
Today, the lecturer alone gave me a comparisonof, and finally my understanding is that, without the front and back of the station,
The foreground is the result of only one query, but the front desk also needs to connect to the database. Then the query output to the page,
Backstage more features than the front desk, such as delete, increase and so on. MVC, I'll take a look at the video, it's too painful.
MVC is just an architecture, a thinking constraint, since you have quoted the landlord's reply:
Just understand how a single page operates, in HTML mixed PHP, and then submitted to the database for display.
Then your reading database is M, generating the page is V, interpreting the incoming data and forming the appropriate action is C
Just for your example:
There is a front page, there is only one line of navigation bar, for example, "Hello" "I am Good" "He is good".
Embed inside this tag a variable, then ...
Can the Java background and JSP pages not interact with each other in addition to the database?