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

  1. 用partial view实现公共部分,@Html.Partial("partialPage")
  2. 使用Razor的templates实现如EditorFor这类功能,~/Views/ControllerName(Shared)/EditorTemplates/Templatename.cshtml, ~/Views/ControllerName(Shared)/DisplayTemplates/Templatename.cshtml
  3. 使用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的更多相关文章

  1. Chapter 5: Design and implement security

    Configure authentication Authenticating users IIS authentication Anonymous ASP.net impersonation Bas ...

  2. Chapter 3: Develop the user experience

    Plan for search engine optimization and accessibility 使用analytical tools分析HTML,如SEO toolkit from MS, ...

  3. Chapter 1: Design the application architecture

    1.1 Plan the application layers 提到了repository pattern,SoC(Separation of Concern), 进而提及MVC,Action/Act ...

  4. Chapter 7. Design and Performance

    本章将对MPEG4及H.264的实现细节进行讲解和比对. Motion Estimation 衡量运动估计的好坏有三种函数(第228页):MSE,MAE和SAE,其中由于SAE运算速度最快所以采用的最 ...

  5. MapReduce Design Patterns(chapter 1)(一)

    Chapter 1.Design Patterns and MapReduce MapReduce 是一种运行于成百上千台机器上的处理数据的框架,目前被google,Hadoop等多家公司或社区广泛使 ...

  6. (转)MapReduce Design Patterns(chapter 1)(一)

    翻译的是这本书: Chapter 1.Design Patterns and MapReduce MapReduce 是一种运行于成百上千台机器上的处理数据的框架,目前被google,Hadoop等多 ...

  7. Chapter 6 — Improving ASP.NET Performance

    https://msdn.microsoft.com/en-us/library/ff647787.aspx Retired Content This content is outdated and ...

  8. 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 ...

  9. MVVM与Backbone demo

    MVVM https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel

随机推荐

  1. DataTable 删除列 调整列顺序 修改列标题名称

    DataTable dt = new DataTable(); //删除列 dt.Columns.Remove("Sex"); dt.Columns.Remove("Ag ...

  2. iOS开发:正则表达式

    语法/字符说明表 值表达 .      匹配除换行符外的任意字符 \w   匹配字母或者数字的字符 \W   匹配任意不是字母或数字的字符 \s    匹配任意的空白符(空格.制表符.换行符) \S ...

  3. php 网页 301 跳转

    php 跳转 if('http://'.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'] =="http://www.nikemalaysia.co ...

  4. Promise与Defer认识

    1.deffer对象:jquery的回掉函数解决方案:含义是延迟到未来某个点再执行: 2.$.ajax链式写法: $.ajax("test.php")     .done(func ...

  5. windows 下用eclipse搭建java、python开发环境

    本人只针对小白!本文只针对小白!本文只针对小白! 最近闲来无事,加上之前虽没有做过eclipse上java.python的开发工作,但一直想尝试一下.于是边查找资料边试验,花了一天时间在自己的机器上用 ...

  6. iOS一些常用的小知识点

    //获取全局的Delegate对象,这样我们可以调用这个对象里的方法和变量 [[UIApplication sharedApplication] delegate]; //获得程序的主Bundle N ...

  7. CRYPTO-MD5

    这是昨天WHUCTF比赛的一道题目,本属于crypto,其实和crypto没多大关系, 比赛时其实差不多有这种思路了,但不相信自己,就没这样做下去,回来之后,照做了,果然是这样 链接:http://p ...

  8. Mac下搭建php开发环境【转】

    Mac OS X 内置了Apache 和 PHP,这样使用起来非常方便.本文以Mac OS X 10.6.3为例.主要内容包括: 启动Apache 运行PHP 安装MySQL 使用phpMyAdmin ...

  9. C语言读取PE文件信息(一)

    接下来的内容来源于对该博客文章http://www.pediy.com/kssd/pediy06/pediy7006.htm的解析. 一.打印Sections信息.下面的程序打印出Windows_Gr ...

  10. Android 媒体存储服务(二)

    Android 媒体存储服务 简介: 本文是<深入Android媒体存储服务>系列第二篇,简要介绍媒体存储服务扫描文件的流程.文中介绍的是 Android 4.2. Android 有一套 ...