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
随机推荐
- FB
转眼间,开始工作到现在好几年,忙着功能,忙着补漏填坑,忙着项目,现在回顾着开始的理想,一时有点恍惚,然后鄙视了下自己居然还在“理想”中…… 那就开始吧,做点什么呢? DX9/DX11的支持是必须的,S ...
- Python的平凡之路(13)
一.Python的paramiko模块介绍 Python 的paramiko模块,该模块和SSH用于连接远程服务器并执行相关操作 SSH client 用于连接远程服务器并执行基本命令 基于用户名和密 ...
- jQuery原生框架-----------------属性操作
// 添加一个处理兼容获取样式的静态方法jQuery.getStyle = function( dom, styleName ) { // dom不是dom,styleName不是字符串,直接打走 i ...
- Alignment trap 解决方法 【转 结合上一篇
前几天交叉编译crtmpserver到arm9下.编译通过,但是运行的时候,总是提示Alignment trap,但是并不影响程序的运行.这依然很令人不爽,因为不知道是什么原因引起的,这就像一颗定时炸 ...
- esxi 6 添加硬盘、网卡
添加硬盘 esxi系统装完之后,直接再接上一块硬盘,然后再使用管理工具添加硬盘 打开VMware vSphere Client,登录esxi服务器, 打开配置-存储器-选择添加存储器 选择磁盘 这里能 ...
- 如何启动一个Java Web应用
最近使用一个开源项目写程序,为了方便沟通加入了相关的讨论群,经常在群里看到有人问项目怎么启动不起来,在此提供一下解决思路1.查看自己下载的项目目录通过文件夹结构,你能够看出来你下载的是一个maven项 ...
- 简单C程序生成的汇编代码分析
首先给出完整的C代码: int g(int x) { ; } int f(int x) { return g(x); } int main(void) { )+; } 使用命令:gcc –S –o h ...
- api将一统江湖,再无app
api的出现,使人们可以通过各种软硬件设备获取所需服务,而不需要安装臃肿的app:今后的智能设备将不再依赖软件.操作系统和硬件,或许一台51单片机都可以提供给用户所需信息.当然连名字都可以简单到不叫a ...
- C#字符串截取
.取前i个字符 ,i); string str1=str.Remove(i,str.Length-i); .去掉前i个字符 ,i); string str1=str.SubString(i); .从右 ...
- TextFieldDelegate
#import "AppDelegate.h" @interface AppDelegate ()<UITextFieldDelegate> @end @impleme ...