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
随机推荐
- 【kate整理】matlab求商,求余数
a/b=q...r a=b*q+r r为余数 fix(a/b) 求商rem(a,b) 求余数还可以 mod(a,b) 两者的区别是余数的符号,rem与a相同,而mod与b相同 例1: & ...
- 移动混合开发之android文件管理demo
框架采用cordova,android编译环境为android studio.系统为mac,cordova 环境搭建参考网址:http://cordova.apache.org/docs/en/5.0 ...
- Javascript常用方法函数收集(二)
Javascript常用方法函数收集(二) 31.判断是否Touch屏幕 function isTouchScreen(){ return (('ontouchstart' in window) || ...
- 最小系统加载工具 systemjs
systemjs 是一个最小系统加载工具,用来创建插件来处理可替代的场景加载过程,包括加载 CSS 场景和图片,主要运行在浏览器和 NodeJS 中.它是 ES6 浏览器加载程序的的扩展,将应用在本地 ...
- JS总结 本地对象1
Data对象 用于获取当前时间的对象 例如,要用该对象输出: 2016年9月7日 10:57 星期三 这样格式的时间 var time=new Date(), month=time.getMon ...
- js相关参考资料
[图片等比例适配:]http://www.cnblogs.com/zengxiangzhan/archive/2009/09/12/1565323.html
- VS2010的项目配置
一直对VS的项目配置都是不怎么了解的,以前用过点,半年不用后,什么都忘记了... 下面这个是免于输入过长的引用头文件的,比如:#include “D:/C++/curl-7.37.0/libcurl/ ...
- 使用USRP探索无线世界 Part 1:USRP从入门到追踪飞机飞行轨迹
温馨提示:请自觉遵守无线电管理法规,依法设置和使用无线电设备 0×00 前言 USRP是数款流行的SDR硬件中功能和应用都相对成熟的一款产品,从WIFI协议.ZigBee协议.RFID协议.GSM通信 ...
- codeforces 722C (并查集)
题目链接:http://codeforces.com/contest/722/problem/C 题意:每次破坏一个数,求每次操作后的最大连续子串和. 思路:并查集逆向操作 #include<b ...
- javascript之小积累-匿名函数表达式的最佳实践
在写js的时候,还是经常会用的匿名函数表达式,比如 setTimeout(function() { console.log(110); }, 1000); 上面那个function()就是匿名函数表达 ...