First we'll define the view-model. After that, we will bind the HTML markup to the view-model.
首先,我们要定义视图模型。之后,要将HTML标记与视图模型进行绑定。
Obuect-oriented view-model is constructed in this paper by use of special data structure of relational CAD system.
运用关系型CAD系统数据结构的独特性,构造面向对象的视图模型。
In the example below you can see how two asynchronous calls (presumably to a database) are in-lined with the constructor of the view-model.
在下面的例子中,你可以看到两个异步调用(可能是到一个数据库的调用)是如何嵌入视图模型的构造函数里的。
Even if you don't do the view-model separation, the MVC pattern is valuable in many situations, so you should take a look at how it works and what it can do for you.
即使您不进行视图-模型的分离,在很多情况下mvc模型也会有所价值,所以您应该去了解它如何工作,以及它可以为您做些什么。
This iterates over the cart array and displays the name, price, and quantity. Note that the "Remove" link and the "Create Order" button are bound to view-model functions.
这是对购物车的循环,并且显示名称、价格和数据。注意,“删除”链接和“创建订单”按钮都被绑定到视图模型的函数上。
We are mixing model and view logic.
我们正在混合模型和视图逻辑。
Dependency injection lets you weave together the main layers of your application, which, in turn, lets you produce a loosely coupled application with view, model, and controller layers.
依赖注入让您将应用程序的主要层次编织到一起,从而,这使您产生一个具有视图、模型和控制器层的松散耦合应用程序。
Figure 1 shows the logical model view of this architecture.
图1显示了此体系结构的逻辑模型视图。
It then provides a view model to add structure to the data so it can be aggregated to provide useful meaning.
然后它提供一个视图模型为数据添加结构,因此能够聚合数据得出有用的含义。
It is very simple and contains exactly one service and one view model with a "mock database".
它非常简单并且只包含一个服务和一个带模拟数据库的视图模型。
The view model here makes a concrete reference to the service.
这个视图模型对服务做了一个具体的引用。
It USES metaprogramming to generate the view model and allow you to bind to the objects you define in your controller.
它使用元编程来生成视图模型,使你能够绑定至你在控制器中定义的对象。
You can define a view model yourself to add customized behavior but you don't need to.
你可以定义你自己的视图模型以添加行为,但你并不需要。
A diagram is a view of the model, but it is not a view of the whole model.
图是模型的视图,但它不是整个模型的视图。
Instead the controller component is responsible for view to model updates, and often for updating the view based on the model data.
控制器组件则负责查看模型更新,并根据模型数据更新视图。
View the model object Calculator.
查看模型对象Calculator。
The controllers bridge the view and model (see Figure 1).
控制器作为视图和模型之间的桥梁(请参阅图1)。
Our servlet is serving as downstream view and model.
servlet的作用是充当下行视图和模型。
The Razor view model was designed for Web Pages first, then adopted by MVC 3.
Razor视图模式起初是为页面开发模式设计的,后来也被MVC3所采用。
In it, a single servlet processes view, model and controller logic.
在这个反模式中,一个单独的servlet将处理视图、模型以及控制器逻辑。
Because of the relatively slow speed of the broadband link, film downloads take place in the background, using a "queue and view" model.
但是因为宽带连接的速度相对较慢,所以电影下载一般用“排列式”下载方式转由隐藏控制下载。
This command creates the proverbial view and controller part of Model-View-Controller (MVC).
该命令将创建模型-视图-控制器(mvc)的视图和控制器部分。
The view model can import the dialog, then based on some change in state or a command, trigger the dialog service.
视图模型导入对话框,然后给予状态改变或是命令来触发对话框服务。
This design technique, called model-view-controller (MVC), makes it easier to isolate changes to a view or model.
这项设计技术叫做模型-视图-控制器(mvc),它使对视图或模型的更改更容易分隔开。
The DPTK is architected to use Model View Controller.
DPTK设计为使用模型-视图-控制器模式。
In this case, the view for the contact details can use this same view model, and simply bind to the CurrentContact property.
在这个例子中,联系人详细信息视图可以使用相同的视图模型,并简单绑定到CurrentContact属性。
The example I've included with this post is view-first. The view is created, then the view model attached.
本文中我使用的示例是视图优先模式。
Model-View-Controller (MVC) -- This pattern separates the visual presentation of the application model (the view) from the model itself.
模型-视图-控制器(Model-View-Controller,MVC)——此模式将应用程序模型的可视表示形式(视图)从模型本身分离。
Aiming to the feature of every view model, we adopt corresponding extension mechanism of UML to describe it.
针对每个视图模型的特点,采用相应的UML扩展机制对其进行描述。
应用推荐