Chapter 3: Develop the user experience
Plan for search engine optimization and accessibility
- 使用analytical tools分析HTML,如SEO toolkit from MS, Webmaster Tools from Google, W3C Markup Validation Service
- 使用Browser插件观察结构,如IE的F12可打开developer Toolbar。
- WAI-ARIA for accessibility
Plan and implement globalization and localization
- planning a localization strategy
- 从HTTP头的Accept-Language取得browser的preferred language,但要设置<system.web>的<globalization culture="auto" uiculture="auto" enableclientbasedculture="true" />
- 使用resource到UI
- 使用resx file
- 在client端使用globalize.js
- client端主动设置culture
- 使用satellite assemblies,使用al.exe生成satellite dlls.
Design and implement MVC controllers and actions
- attributes和filters
- RequireHttpsAttribute
- ValidateAntiForgeryTokenAttribute
- ValidateInputAttribute
- AuthorizeAttribute
- ChildActionOnlyAction
- ActionFilterAttribute
- OnActionExecuting
- OnActionExecuted
- OnResultExecuting
- OnResultExecuted
- 使用attributes
- on the action iteslf
- on controller level
- through global filters,如filters.Add(new RequireHttpsAttribute());
- 实现action的行为
- 实现action的result
- ContentResult
- EmptyResult
- FileResult
- JavaScriptResult
- JsonResult
- PartialViewResult
- RedirectResult
- RedirectToRouteResult
- ViewResult
- 实现model binding
- DefaultModelBinder
- LinqBinaryModelBinder
- ModelBinderAttribute
- ModelBinderDictionary
weakly-typed style,如@Html.TextBox("login.UserName")
使用Bind attribute,
如public ActionResult Login([Bind(Prefix="login")]LoginUser user)
public ActionResult Save([Bind(Exclude="Salary")]Employee emp)
使用value provider取model
- FormsValueProvider
- QueryStringProvider
- HttpFileCollectionValueProvider
- RouteDataValueProvider
Design and implement routes
- 使用MapRoute定义一个route
- 使用route的限制,如 new {id=@"\d+"}
- ignore一个route
- Adding custom route parameters
- 使用area
Control application behavior by using MVC extensibility points
- 使用filter和controller factory
- Authorization
- Action
- Result
- Exception
- 通过action result控制,override ExecuteResult() of System.Web.Mvc.ActionResult
- 通过view engine
- 通过model binder
- 通过route handler
Chapter 3: Develop the user experience的更多相关文章
- Chapter 2: Design the user experience
Apply the user interface design for a web application 介绍了Css的常用属性和html5的新element,以及Htmlhelper的简单方法,如 ...
- halcon算子
halcon的算子列表 Chapter 1 :Classification 1.1 Gaussian-Mixture-Models 1.add_sample_class_gmm 功能:把一个训练样 ...
- halcon的算子列表
Chapter 1 :Classification 1.1 Gaussian-Mixture-Models 1.add_sample_class_gmm 功能:把一个训练样本添加到一个高斯混合模型的训 ...
- Halcon 常用算子使用场合
Chapter 1 :Classification 1.1 Gaussian-Mixture-Models 1.add_sample_class_gmm 功能:把一个训练样本添加到一个高斯混合模型的训 ...
- Halcon算子解释
Halcon算子解释大全 Halcon/Visionpro视频教程和资料,请访问 重码网,网址: http://www.211code.com Chapter 1 :Classification 1. ...
- [eBook]Inside Microsoft Dynamics AX 2012 R3发布
最近一本关于Microsoft Dynamics AX 2012开发的书<Inside Microsoft Dynamics AX 2012 R3> 发布. Book Descriptio ...
- Halcon算子含义
1.1 Gaussian-Mixture-Models 1.add_sample_class_gmm 功能:把一个训练样本添加到一个高斯混合模型的训练数据上. 2.classify_class_gmm ...
- Girl Develop It Chapter Leaders at 2015 Annual Leadership Summit
Girl Develop It Chapter Leaders at 2015 Annual Leadership Summit Corinne Warnshuis, Executive Direct ...
- Android Programming: Pushing the Limits -- Chapter 4: Android User Experience and Interface Design
User Stories Android UI Design 附加资源 User Stories: @.通过写故事来设计应用. @.每个故事只关注一件事. @.不同的故事可能使用相同的组件,因此尽早地 ...
随机推荐
- 使用javaScript实现简单倒计时功能
效果如下: <div class="warp"> <p id="txt">距离”十一“国庆放假还有:</p><br&g ...
- Android --AsyncTask异步任务(一)
1.为什么要异步任务 Android单线程模式 耗时操作放在非主线程(UI线程)中执行 我们都知道Android是单线程模式,只有主线程才能对UI操作,简称UI线程.当然这样的好处是:保证UI的稳定性 ...
- 第二篇——The communication during software engineering.
I've learned a lot in my software engineering class about how a program comes out.That's also a esse ...
- 安全协议系列(二)----CCM与CCMP
CCMP(CTR with CBC-MAC Protocol) 是 IEEE 802.11i 中推出使用基于 AES 的 CCM 模式的安全加密协议.与原来脆弱的 WEP 算法及临时补救措施 TKIP ...
- mvc 导出excel
#region 导出new方法 [NonAction] protected string RenderViewToString(Controller controller, string viewNa ...
- cookie 保存导航菜单的展开状态
菜单展开状态保存,最开始是用session来存的,用session存没点击一次菜单就会多次访问后台页面,影响页面加载速度,后来改用js的cookie来存:代码如下 //获取cookie ...
- C++的默认构造函数与构造函数
今天看书,忽然发现自己对默认构造函数/构造函数的理解很模糊,在实际项目中写类时,这些细节问题并没有涉及到.因此,就专门对着<C++ Primer Plus>将默认构造函数/构造函数这一块简 ...
- JDom2的Xpath使用
/** * XPath获取属性值 * @param root * @param xPath * @return */ public static String getXPathAttributeVal ...
- UCanCode发布升级E-Form++可视化源码组件库2014 全新版 (V20.01)!
UCanCode发布升级E-Form++可视化源码组件库2014 全新版 (V20.01)! --- UCanCode有史以来最强大的版本发布! E-Form++可视化源码组件库企业版本2014最新版 ...
- Integer to Roman -- LeetCode 012
Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 t ...