⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 subject_44037.htm

📁 一些关于vc的问答
💻 HTM
字号:
<p>
序号:44037 发表者:dongfanghong 发表日期:2003-06-16 08:59:27
<br>主题:类的构造
<br>内容:RUP中,分析类的构造,将类分成边界类,控制类,实体类。<BR>和MVC模式是否是一回事?
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
回复者:dongfanghong 回复日期:2003-06-16 09:12:13
<br>内容:偶正在学习,有兴趣的进来讨论讨论。
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:木一 回复日期:2003-08-02 21:23:25
<br>内容:非常类似,我对联MVC了解不多,简单看了MVC的<BR><BR>MVC模式本身--简单的从字面上以及应用上说,通过将系统的设计分为Model模型/逻辑、View视图/界面、Controller控制/流程三个逻辑部分达到良好的项目效果,以此便利各部分开发者的工作并降低日后的维护成本<BR><BR>相对权威一点的解释如下:<BR><BR>The MVC paradigm is a way of breaking an application, or even just a piece of an application's interface, into three parts: the model, the view, and the controller. MVC was originally developed to map the traditional input, processing, output roles into the GUI realm:<BR><BR>Input --&gt; Processing --&gt; Output<BR>Controller --&gt; Model --&gt; View<BR><BR>The user input, the modeling of the external world, and the visual feedback to the user are separated and handled by model, viewport and controller objects. The controller interprets mouse and keyboard inputs from the user and maps these user actions into commands that are sent to the model and/or viewport to effect the appropriate change. The model manages one or more data elements, responds to queries about its state, and responds to instructions to change state. The viewport manages a rectangular area of the display and is responsible for presenting data to the user through a combination of graphics and text.<BR><BR>The model, viewport and controller are intimately related and in constant contact. Therefore, they must reference each other. The picture below illustrates the basic Model-View-Controller relationship: <BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&n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sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; / \/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+------------+ &lt;------ +------------+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;View&nbsp;&nbsp;&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Controller |<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+------------+ ......&gt; +------------+<BR><BR><BR>另一解释<BR><BR><BR>In the MVC paradigm the user input, the modeling of the external world, and the visual feedback to the user are explicitly separated and handled by three types of object, each specialized for its task. The view manages the graphical and/or textual output to the portion of the bitmapped display that is allocated to its application. The controller interprets the mouse and keyboard inputs from the user, commanding the model and/or the view to change as appropriate. Finally, the model manages the behavior and data of the application domain, responds to requests for information about its state (usually from the view), and responds to instructions to change state (usually from the controller). The formal separation of these three tasks is an important notion that is particularly suited to Smalltalk-80 where the basic behavior can be embodied in abstract objects: View, Controller, Model and Object. The MVC behavior is then inherited, added to, and modified as necessary to provide a flexible and powerful system.<BR><BR><BR><BR>而边界类,控制类,实体类的目的也与之相似。可以这样认为,MVC是一种具体化。<BR><BR>http://www.sdmagazine.com/documents/s=815/sdm0103c/0103cf5.gif<BR>边界类,控制类,实体类之间相互访问,有一个允可问题,参见上图(不知怎么贴图)<BR><BR><BR>2003-8-2 22:23:41

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -