显示标签为“Design Pattern”的博文。显示所有博文
显示标签为“Design Pattern”的博文。显示所有博文

2009年4月10日星期五

April 10th-11th Links:Velocity,C#,SQL SERVER,ReSharper

.NET
    How to optimize passing complex data to the server

ASP.NET
    1) Favicon
    2) Titles And Meta Data
    Your page title is more important element for SEO and is also important so that users know what's on the page.Make sure it changes on every page and relate to that page's content.
    3) Cross-Bowser Checks
    4) Proofread
    5) Links
    6) Graceful Degradation
    7) Validation
    8) RSS Link
    The common conversion is to put a small RSS icon in the browser's address bar.
    9) Analytics
    10) Sitemap
    Adding a sitemap.xml file to your root directory allows the major search engines to easily index your website
    11) Defensive Design
    The most commonly overlooked defensive design element is the 404 page.
    12) Optimize

C#

Javascript

Velocity
    1) High Availability
    2) Notifications
    3) Local Caching
    4) Management & Monitoriting
    5) Better Integration

WEB

IE
    1) IE8 Opens More Connections Per Host Name
    2) IE8 Has a New Process Model
    3) All IE8 Tabls,Window and Pop-ups Belong To Same Browser Session
    4) The IE8 Process Model is Configurable
    5) Compatibility Workarounds for IE8
    6) New Built-in Developer Tools For IE9
    7) How to Use HttpWatch with IE8

ReSharper

SQL SERVER
    1. Logical Query Processing Phases- Order of Statement Excution
    1) FROM -> ON -> OUTER -> WHERE -> GROUP BY-> CUBE|ROLLUP->HAVING->SELECT->DISTINCT->ORDER BY->TOP

Other
    neXpert is an add-on to Fiddler which automates the classic performance best practice checks and produces a HTML report on the issues found in a Fiddler capture.
    3.4 Great Tools to use visual Studio

2009年3月10日星期二

March 10th-13th Links:C#,Struct,Word,Javascript

C#
    1. What The Defference Between Const and Readonly in .NET?
    1) The readonly keywork differs from the const keyword.A const field can only be initialized at the declaration of the field.A readonly field can be initialized either at the declaration or in a constructor.
    2) A const field is a compile-time constant,the readonly field can be used for run-time constants,as in this line: public static readonly unit l = (uint)DateTime.Now.Ticks;
    3) When using const,the value has to be set before compiling,and can not be changed. Once u make your assembly,the value of the const is baked in there.if u want to change the value of the const,u must go back into your code,change the value,then recompile.if another assemly(Assembly B) wants to use the const in the first assembly(Assembly A),the const is also baked in there as well.So,if u change the value of the const,not only will you have to rebuild your first Assembly A,you will also have to build all other assembly(e.g.:assembly B,C,D...).
    4) Another difference between const and readonly,is that const are static by default,where with readonly,you must define it as static(if you wnat it to be).
    c# 2.0(which shipped with VS2005) introduced the concept of anonymous methods,which allow code blocks to be wrritten "in-line" where delegate values are expected.
    Lambda Expressions provide a more concise(简明的),functional syntax for writing anonymous methods.Since they provide a very compact and type-safe way to write functions that can be passed as arguments for subsequent evaluation.
    syntax: params => expression
    One of the things that make Lambda expressions particularly(adv尤其) powerful from a framework developer's perspective(看法) is that they can be compiled as either a code delegate(int the form of IL based method) or as a expression tree object which can be used at runtime to analyze,transform or optimize the expression.
    1) Lambda Expressions to Code Delegates
    2) Lambda Expressions to Expression Trees

Design Patterns
    If u want to do something that requires interacting with multiple subsystems you can create a facade that same only a few methods that handle all the interaction with the subsystem.

JAVASCRIPT

Silverlight
    I have been wording extensively with both WPF and Silverlight over the past many months.Not too long ago,my workstation started having trouble - specifically Visual Studio 2008 was crashing when tring to open XAML files.Not just crashing either.maybe u should need this patch:  download this patch

English
    1. Unethical
    2. Survey: 调查,民意调查
    3. reusable: 重复使用
    4. fetch: 取得
    5. paragraphs:段
    6. Enumerable: IEnumerable
    7. concise
    8. syntax
    9. subsequent: 后续的
    10. evaluation: 付值,评估,评价
    11. perspective: 看法,透视

2009年3月1日星期日

March 2th-6th Links:Design Patterns,Observer Pattern,Decorator Pattern

ASP.NET

ASP.NET MVC

c#
    2. Snippet: Check for Internet Connectivity(c#)
    WHAT IS AN INTERFACE?
    Interface is a contract that implementer must follow.In other words,an interface says what class must defined.Importantly,an interface doesn't specify(or care) how the implemention is actually achieved. As we move forward we'll see how helpful this can be to us.
    An interface can define zero or more members(methods or propties) and a class can implement zero or more interface.Interface members always have public.An interface with zero member is called marker-interface,they don't require implementer to do anything.
    An raise exist of interface is to provide developers with a language-level tool that allows classes to be decoupled from each other.

Design Patterns
    The decorator pattern can be used to make it possible to extend (decorate) the functionality of a class at runtime.
    

Web

English
    1. legacy: 继承,遗产
    2. merciless: 殘忍的
    3. pair with: 搭配
    4. violation: 违反,违背
    5. proper: 适当的,正确的
    6. crucial: 关键的,决定性的
    7. snippet: 小片,片段
    8. badminton: 羽毛球
    9. decouple:
    10. overlap: 重叠

2009年2月24日星期二

February 25th Links: SQL SERVER,Design Pattern,Web

SQL SERVER
    T-SQL statement:
    SELECT name,physical_name AS current_file_location
    FROM sys.master_files
    T-SQL statement:
    SELECT *
    FROM sys.configurations
    Master database contains all the system level information of server.Information about all the login account, system configurations and information required to access all the other database are stored in Master Database.if the Master Database is damaged,it will be difficult to use any other database in SQL Server that makes it most important database in SQL Server.
    2) Exec sqlcmd command line:
        RESTORE DATABASE master FROM DISK='C\BackupLocation\master.bak' WITH                     REPLACE

Design Pattern
    Although enums aren't necessary a code smell for refactoring,they can definitely be a waring sign.Especially if u find yourself having to make changes in more than one place,in this case both the enum and the corresponding switch statement,each time that u wnat to add new functionality.If this sounds familiar to u,then it may be time to take a look at the strategy pattern for your own needs.

WEB

English
    1. Microsoft Certification Exam: 微软认证考试
    2. Polymorphism: 多态性
    3. Corresponding: 一致的,符合的