Chapter 2: Design the user experience
Apply the user interface design for a web application
介绍了Css的常用属性和html5的新element,以及Htmlhelper的简单方法,如BeginForm, TextBox, TextArea。
Design and implement UI behavior
- client validation:
在Model中使用attribute binding to property,在View中使用EditorFor/ValidationMessageFor实现client validation。
Server side再通过ModelState.IsValid来check。
- remote validation
通过Remote("Action", "Controller")属性binding to property,
如下web.config中key的value需为true。
<appSettings>
<add key="ClientValidationEnabled" value="true" />
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
</appSettings>
- 使用AJAX更新部分page
- 使用jQuery实现UI
Compose the UI layout of an application
- 用partial view实现公共部分,@Html.Partial("partialPage")
- 使用Razor的templates实现如EditorFor这类功能,~/Views/ControllerName(Shared)/EditorTemplates/Templatename.cshtml, ~/Views/ControllerName(Shared)/DisplayTemplates/Templatename.cshtml
- 使用Master page,Layout可变,if(ViewBag.switch=="layout1") Layout = “~/Views/Shared/_plainLayout.cshtml"; else Layout = "~/Views/Shared/_Layout.cshtml";
Enhance application behavior and style based on browser feature detection
- 使用userAgent header的信息判断browser的名字,如IE
- 通过DisplayModeProvider.Instance.Modes.Insert(0, new DefaultDisplayMode("")...),支持不同的display mode。
Plan an adaptive UI layout
- 使用<meta> tag和CSS的@media查询指定layout
- 使用jQuery.Mobile.MVC
Chapter 2: Design the user experience的更多相关文章
- Chapter 5: Design and implement security
Configure authentication Authenticating users IIS authentication Anonymous ASP.net impersonation Bas ...
- Chapter 3: Develop the user experience
Plan for search engine optimization and accessibility 使用analytical tools分析HTML,如SEO toolkit from MS, ...
- Chapter 1: Design the application architecture
1.1 Plan the application layers 提到了repository pattern,SoC(Separation of Concern), 进而提及MVC,Action/Act ...
- Chapter 7. Design and Performance
本章将对MPEG4及H.264的实现细节进行讲解和比对. Motion Estimation 衡量运动估计的好坏有三种函数(第228页):MSE,MAE和SAE,其中由于SAE运算速度最快所以采用的最 ...
- MapReduce Design Patterns(chapter 1)(一)
Chapter 1.Design Patterns and MapReduce MapReduce 是一种运行于成百上千台机器上的处理数据的框架,目前被google,Hadoop等多家公司或社区广泛使 ...
- (转)MapReduce Design Patterns(chapter 1)(一)
翻译的是这本书: Chapter 1.Design Patterns and MapReduce MapReduce 是一种运行于成百上千台机器上的处理数据的框架,目前被google,Hadoop等多 ...
- Chapter 6 — Improving ASP.NET Performance
https://msdn.microsoft.com/en-us/library/ff647787.aspx Retired Content This content is outdated and ...
- Lesson 1: What is design? Why is it important?
Week 2: What is design? Why is it important? Article 1: Startups, this is how design works. It's a s ...
- MVVM与Backbone demo
MVVM https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel
随机推荐
- Ubuntu下mysql-server的安装
(1)更新 #apt-get update (2)安装 #apt-get install mysql-server 出现窗口设置"root"用户的密码为"456456&q ...
- POJ 题目2411 Mondriaan's Dream(状压DP)
Mondriaan's Dream Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 13519 Accepted: 787 ...
- 关于JavaScript和html的随笔
最近听了一些关于JavaScript和html的讲课和读了一些书籍.因为我是给项目做网站知道的,所以要特别的注意和努力.JavaScript是一门挺好用的脚本语言,比较简单灵活,在这上面我深有体会,因 ...
- [转]OC与JS的交互详解
事情的起因还是因为项目需求驱动.折腾了两天,由于之前没有UIWebView与JS交互的经历,并且觉得这次在功能上有一定的创造性,特此留下一点文字,方便日后回顾. 我要实现这样一个需求:按照本地的CSS ...
- Maven联网问题
关于Maven联网问题 关于如何找到Maven默认的本地仓库问题 修改Maven默认本地仓库 找到 <localRepository>/path/to/local/repo</loc ...
- js相关参考资料
[图片等比例适配:]http://www.cnblogs.com/zengxiangzhan/archive/2009/09/12/1565323.html
- JAVAWEB学习总结 HttpServletResponse对象(一)
Web服务器收到客户端(浏览器)的http请求,会针对每一次请求,分别创建一个用于代表请求的request对象,和代表响应的response对象. request和response对象既然代表请求和响 ...
- 用户新加入Group
Linux中一个user可以加入多个分组 以下以用户holmes为例,原始用户组为holmes,新加入用户组users 首先进入root模式 [holmes@KirCentOS share]$ su ...
- NOIP 考前 并查集复习
POJ 1182 把一个点拆成x,x+n,x+2*n,x吃y可以表示认为x,y+n是一类的,x+n,y+2*n是一类,x+2*n,y是一类. #include <cstdio> ; ],n ...
- Kmeans++算是DONet实现
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.D ...