什么是“模型"?在 MVC 模式中? [英] What is the "model" in the MVC pattern?

查看:60
本文介绍了什么是“模型"?在 MVC 模式中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我在 MVC 模式上进行了一些谷歌搜索,但我仍然不确定模型"部分是什么.它具体处理什么?我对编程很陌生,所以我能找到的所有解释都在我的脑海中.如果您能给我一个简单的解释,我将不胜感激.

So I did some Google searching on the MVC pattern and I'm still not exactly sure what the "Model" part is. What exactly does it deal with? I'm rather new to programming so all the explanations I can find go right over my head. I'd really appreciate it if you could give me an explanation in simple terms.

谢谢

推荐答案

我能描述它的最简单的方法是将其称为数据"部分.如果它必须处理获取或保存数据,它在模型中.如果您有 Web 应用程序,模型通常是您与数据库或文件系统交互的地方.

The simplest way I can describe it is to call it the "Data" part. If it has to deal with getting or saving data, it's in the model. If you have a web application, the model is usually where you interact with a database or a filesystem.

这篇关于什么是“模型"?在 MVC 模式中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆