网站 - MVC架构 [英] Web site - MVC Architecture

查看:137
本文介绍了网站 - MVC架构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在Visual Studio 2010中基于MVC架构创建网站

How to create a website based on MVC architecture in Visual Studio 2010

推荐答案

在开始之前,您应该了解模型 [ ^ ],意见 [ ^ ]和控制器 [ ^ ]。

Before starting you should have knowledge about Models[^], Views[^] and Controllers[^].
概述:



  • 一个模型,代表数据的基础逻辑结构在软件应用程序和与之关联的高级类中。该对象模型不包含任何有关用户界面的信息。
  • 一个视图,它是表示用户界面中元素的类的集合(用户可以看到和响应的所有内容)屏幕,例如按钮,显示框等)
  • 一个Controller,它表示连接模型和视图的类,用于在模型和视图中的类之间进行通信。


  • 对于初学者来说,将MVC添加到webforms项目非常简单。其次,您可以在当前的Web表单项目中创建一个controllers文件夹和views文件夹。您还可以使用索引操作创建一个简单的控制器。然后在 global.ascx 文件中设置/配置路线。



    你应该从基础开始。

    http://en.wikipedia.org/wiki / Model%E2%80%93view%E2%80%93controller [ ^ ]

    http://msdn.microsoft.com/en-us/library/ff649643.aspx [ ^ ]



    要创建网站,请参阅以下链接:

    ASP.NET MVC简介 [ ^ ]

    使用ASP.NET MVC 4,EF,Knockoutjs和Bootstrap设计和开发网站:第1部分 [ ^ ]





    - Amit


    For starters adding MVC to a webforms project is pretty simple. Second you can create a controllers folder and views folder in your current web forms project. You can also create a simple controller with an index action. Then setup/configure the routes in the global.ascx file.

    You should start from the basics.
    http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller[^]
    http://msdn.microsoft.com/en-us/library/ff649643.aspx[^]

    To create the websites refer the links below:
    Intro to ASP.NET MVC[^]
    Design and Develop a website using ASP.NET MVC 4, EF, Knockoutjs and Bootstrap : Part - 1[^]


    --Amit


    这可能是关于MVC的最佳教程互联网:



    http://mvcmusicstore.codeplex.com/ downloads / get / 228002 [ ^ ]



    阅读本文并实现此目的。按照本教程,您将学到很多东西。
    This is perhaps the best tutorial on MVC on the internet:

    http://mvcmusicstore.codeplex.com/downloads/get/228002[^]

    Read this and implement this. You will get to learn a lot by following this tutorial.


    这篇关于网站 - MVC架构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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