惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V2EX - 技术
V2EX - 技术
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Latest news
Latest news
T
The Exploit Database - CXSecurity.com
博客园 - 三生石上(FineUI控件)
WordPress大学
WordPress大学
L
Lohrmann on Cybersecurity
aimingoo的专栏
aimingoo的专栏
B
Blog
T
Threat Research - Cisco Blogs
罗磊的独立博客
Application and Cybersecurity Blog
Application and Cybersecurity Blog
P
Proofpoint News Feed
P
Palo Alto Networks Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
宝玉的分享
宝玉的分享
博客园 - 司徒正美
Google DeepMind News
Google DeepMind News
Blog — PlanetScale
Blog — PlanetScale
T
Tor Project blog
阮一峰的网络日志
阮一峰的网络日志
Last Week in AI
Last Week in AI
Martin Fowler
Martin Fowler
酷 壳 – CoolShell
酷 壳 – CoolShell
Recorded Future
Recorded Future
D
DataBreaches.Net
Y
Y Combinator Blog
大猫的无限游戏
大猫的无限游戏
IT之家
IT之家
B
Blog RSS Feed
Scott Helme
Scott Helme
P
Proofpoint News Feed
V
Vulnerabilities – Threatpost
A
Arctic Wolf
Help Net Security
Help Net Security
L
LINUX DO - 最新话题
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
Vercel News
Vercel News
AWS News Blog
AWS News Blog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
S
Schneier on Security
Hacker News: Ask HN
Hacker News: Ask HN
N
Netflix TechBlog - Medium
L
LangChain Blog
博客园 - 叶小钗
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
M
MIT News - Artificial intelligence
N
News and Events Feed by Topic
Webroot Blog
Webroot Blog
W
WeLiveSecurity

博客园 - 番茄鸡蛋面

VS .NET add web reference Dynamic Link Library DLL COM Vs .NET (Qt ActiveQt) 复习进程和线程 process vs thread Window Firewall cause "MS SQL Server New SQL Server Registeration" and "New ODBC DSN " failure 牛人与非牛人的对话 - 番茄鸡蛋面 - 博客园 Web Accessibility toolbar -- a must-have toolbar for web developer 好好学习天天向上 Oracle table problem Oracle - MSSQL Convert Tips (2) .NET 数据访问体系结构指南 NET Framework Data Providers Links or Postbacks Word Note 001 Skype 0.98.0.28 release! I can't agree more Skype Skype Skpe Getting Your Résumé Read 在行进中开火 Fire and Motion By Joel Spolsky
ASP.NET features we use, ASP.NET experience I have
番茄鸡蛋面 · 2004-06-21 · via 博客园 - 番茄鸡蛋面

我现在参与的是一个multilingual ,multi-culture 基于web的项目。
要满足英语,德语,法语等不同语种和文化客户的需要。
数据库要同时满足Oracle和 MSSQL.
虽然说我们用了ASP.NET,但是我觉得并不是正宗的ASP.NET
我们只用到了其中的几个feature,很多的可以说是ASP.NET精髓的东西都没有用。
我们的Leader以前做ASP,PHP的经验比较丰富,所以对ASP.NET的一些新功能不是很感兴趣.
所以一些coding的要求也很有意思.

1. 我们用VS.NET 开发项目,code-behind,这点还不错,没让用EditPlus.
2. 我们不用ASP.NET的Event,delegate机制. 
    Leader认为Http协议本身就Requst,Response,引入event是把简单的事情复杂化了.
    所以我们只在Page_Load()里面写代码.
3. 我们不用ViewState. EnableViewState=“false“
4. 我们尽量不用ASP.NET Server Control,当然不用DataGrid,尽量用html 元素和Html Controls.
    如果是GUI相关元素,或者这个元素需要在Post以后恢复或者赋值,就把这个元素的属性设为 runat=server
5. 所有Form元素的值用Requst.Form[]取得.
 
我以前php,asp,jsp都有一定的经验,所以下面的代码结构我还是很快熟悉并习惯了.
我们用的最多的runat=server.和html control的动态输出.
我们的代码结构如下:

Page_Load()
{
     //fetch configuration
     //fetch the GUI element for the current culture
     doInit();
    //check  and get the URL parameter values;
    checkParameterElements();
   if the page is post back then
        //check and get the posted Form values;
        checkFormElements();
   if need to write to database then
        writeToDatabase();
   if no error happen then
        //The non-GUI related data are retrieved from the database and render here.
        renderDataUI();
   if no error happen then
        //GUI element render here
        renderGUI();
}
常用的表格输出代码:
System.Web.UI.HtmlControls.HtmlTableRow tr;
System.Web.UI.HtmlControls.HtmlTableCell td;
foreach(DataRow dataRow in sortedTable.Rows)
{
 tr = new HtmlTableRow();
 td = new HtmlTableCell();
 td.innerHtml="some stuff";
 tr.cells.add(td);
 table.rows.add(tr);
}

对于多语言界面和多数据库支持.我们用了同样的方法.
不同语言的text和不同数据库的sqlstring都放在数据库里面.
只是text表里面多了一个语言id字段,区分不同语言的text
sqlstring表里多了一个数据库id字段,区分不同的数据库 sqlstring
没有用到存储过程什么的.
我也看了PetShop 3里面的Present Layer ,Business Logic Layer, Data Access Layer划分.

经过一段的程序设计的体验,我慢慢习惯了我们目前的这种设计
也算是一种Framwork or Architecture 吧.

不知道各位朋友在类似项目或者ASP.NET项目中的设计体验如何?
欢迎交流!