ASP.NET Web Developer Checklist
The following is a simple checklist you can use when building web
applications. Much of this still applies to other technologies and can
easily be extended. I try not to get too specific on technology or
methodology, but it is definitely leaning toward ASP.NET.
If you
can think of something I am missing or disagree, please leave a
comment. Detailed information follows the checklist.
How much
of the checklist you follow will depend on the project. If its just a
hobby site, you may skip items like load testing, but as the site grows
you will likely need to check off more and more items. Some items, like
separation of logic should just be done from the start. In any case,
you should make an actual decision to ignore the item. This is much
better than just forgetting to do it.
The Check List
Everywhere
Use source control.
Be consistent with naming
conventions.
Create documentation.
Backup
everything.
Use code analysis tools.
Database
Use non-clustered indexes on unique identifier columns.
Setup foreign key relationships.
Use a last updated
timestamp column.
Add simple audit columns or a history
table.
Analyze and tune your database.
Business
Logic
Clearly separate business and data logic.
Use some standard patterns and stick with them.
Do not
duplicate rules. Data is okay.
Create unit tests.
Web Interface
Make the site accessible.
Use
resource files.
Minimize use of server controls.
Separate
your HTML, JavaScript and CSS.
Minimize ViewState.
Pay
attention to search engine optimization.
Clearly separate
presentation and business logic.
Don’t forget a site map,
favicon and search provider.
Create user interface unit
tests.
Check your site with YSlow.
Load test the
site.
Security test the site.
Use a hosting
provider.
Minify and combine resources.
Turn on
IIS compression.
Process
Stay agile.
Vision before you design.
相关文档:
cache在开发高可扩展性的web应用中起着至关重要的作用,我们可以按照预定的时间将任何get请求缓存到浏览器中,如果在预定的时间内用户请求同一URL那么response就会通过浏览器的cache来实现而非server。可以通过下面的action filter在ASP.NET MVC应用中实现同样的功能:
using System;
using System.Web;
using System.We ......
★1. 使用QueryString变量
QueryString是一种非常简单的传值方式,他可以将传送的值显示在浏览器的地址栏中。如果是传递一个或多个安全性要求不高或是结构简单的数值时,可以使用这个方法。但是对于传递数组或对象的话,就不能用这个方法了。下面是一个例子:
a.aspx的C#代码
private void B ......
public string NoHTML(string Htmlstring) //去除HTML标记
{
//删除脚本
Htmlstring = Regex.Replace(Htmlstring, @" <mce:script[^><!--
]*?>.*?
// --></mce:script>", "", RegexOptions.IgnoreCase);
//删除HTML
Htmlstring = Re ......
ASP.NET学习路线图
如果你已经有较多的面向对象开发经验,跳过以下这两步:
第一步 掌握一门.NET面向对象语言,C#或VB.NET 我强烈反对在没系统学过一门面向对象(OO)语言的前提下去学ASP.NET。 ASP.NET是一个全面向对象的技术,不懂OO,那绝对学不下去!
第二步 对.NET Framework类库有一定的了解 可以通过开发W ......
一、三层体系架构 1.表示层(USL):主要表示WEB方式,也可以表示成WINFORM方式。如果逻辑层相当强大和完善,无论表现层如何定义和更改,逻辑层都能完善地提供服务。
2.业务逻辑层(BLL):主要是针对具体的问题的操作,也可以理解成对数据层的操作,对数据业务逻辑处理。如果说数据层是积木,那逻辑层就是对这些积木的 ......