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
随机推荐
- php 文件操作
$fn="e:\debug.txt"; if(is_writable($fn)==false){ die("不能写入"); } file_put_content ...
- jQuery是什么?
jQuery就是javascript的一个库,把我们常用的一些功能进行了封装,方便我们来调用,提高我们的开发效率. 极大地简化了 JavaScript 编程. Javascipt跟jQuery的区别: ...
- bigdecimal 保留小数位
public class test1_format { public static void main(String[] args) { BigDecimal decimal = new BigDec ...
- 19:A*B问题
总时间限制: 1000ms 内存限制: 65536kB 描述 输入两个正整数A和B,求A*B. 输入 一行,包含两个正整数A和B,中间用单个空格隔开.1 <= A,B <= 50000 ...
- Android开源框架:Universal-Image-Loader解析(三)DiskCache
- header、footer、hgroup、address
header:整个页面或者一个块级区域的头部区域,通常用来放置标题等信息: footer:整个页面或者一个块级区域的底部区域,通常用来放置版权信息.联系方式等: hgroup:用来对属于一个块级区域的 ...
- nodejs入门 SSH服务器远程部署nodejs
最近刚刚接了一个项目我也是个nodejs的初级的人 从开始吧 建立服务器 用什么ssh工具我就不说了 这个界面大家都熟悉吧 点击下面的 All download options wget http: ...
- UVA 12549 - 二分图匹配
题意:给定一个Y行X列的网格,网格种有重要位置和障碍物.要求用最少的机器人看守所有重要的位置,每个机器人放在一个格子里,面朝上下左右四个方向之一发出激光直到射到障碍物为止,沿途都是看守范围.机器人不会 ...
- Android 开发常用命令
1.生成keystore文件 keytool -exportcert -keystore keystore_path -list -v 2.查看APK签名 keytool -list -printce ...
- ThinkPHP 自动验证相关注意
1.假如加入了表单令牌的话,表单的各种名与对应Model字段一致,不然报坑爹的令牌错误. 2.假如加入了表单令牌的话,Create只能采用默认的POST数据创建数据对象,不然又是坑爹的令牌错误. 3. ...