11 2012 档案
CSharp设计模式读书笔记(5):原型模式(学习难度:★★★☆☆,使用频率:★★★☆☆)
摘要:原型模式(Prototype Pattern):使用原型实例指定创建对象的种类,并且通过拷贝这些原型创建新的对象。模式角色与结构:示例代码:using System;using System.Collections.Generic;using System.Linq;using System.Tex... 阅读全文
posted @ 2012-11-28 17:54 逝者如斯(乎) 阅读(629) 评论(0) 推荐(1)
CSharp设计模式读书笔记(4):单例模式(学习难度:★☆☆☆☆,使用频率:★★★★☆)
摘要:单例模式(Singleton Pattern):确保某一个类只有一个实例,而且自行实例化并向整个系统提供这个实例,这个类称为单例类,它提供全局访问的方法。模式角色与结构:示例代码:using System;using System.Collections.Generic;using System.L... 阅读全文
posted @ 2012-11-28 15:23 逝者如斯(乎) 阅读(2117) 评论(0) 推荐(0)
CSharp设计模式读书笔记(3):抽象工厂模式(学习难度:★★★★☆,使用频率:★★★★★)
摘要:抽象工厂模式(Abstract Factory Pattern):提供一个创建一系列相关或相互依赖对象的接口,而无须指定它们具体的类。抽象工厂模式又称为Kit模式。模式角色和结构图:抽象工厂是指一个工厂等级结构可以创建出分属于不同产品等级结构的一个产品族中的所有对象。示例代码:using Syste... 阅读全文
posted @ 2012-11-27 22:25 逝者如斯(乎) 阅读(1345) 评论(0) 推荐(0)
CSharp设计模式读书笔记(2):工厂方法模式(学习难度:★★☆☆☆,使用频率:★★★★★)
摘要:工厂方法模式(Factory Method Pattern):定义一个用于创建对象的接口,让子类决定将哪一个类实例化。工厂方法模式让一个类的实例化延迟到其子类。工厂方法模式又简称为工厂模式(Factory Pattern),又可称作虚拟构造器模式(Virtual Constructor Patter... 阅读全文
posted @ 2012-11-27 21:49 逝者如斯(乎) 阅读(917) 评论(0) 推荐(0)
CSharp设计模式读书笔记(1):简单工厂模式(学习难度:★★☆☆☆,使用频率:★★★☆☆)
摘要:Simple Factory模式实际上不是GoF 23个设计模式中的一员。模式角色与结构:示例代码:using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace CSharp.D... 阅读全文
posted @ 2012-11-27 21:02 逝者如斯(乎) 阅读(1064) 评论(0) 推荐(0)
CSharp设计模式读书笔记(0):设计原则(学习难度:★★☆☆☆,使用频率:★★★★★)
摘要:{参考:http://blog.csdn.net/lovelion/article/details/17517213}单一职责原则(Single Responsibility Principle--SRP):一个类只负责一个功能领域中的相应职责,或者可以定义为:就一个类而言,应该只有一个引起它变化的... 阅读全文
posted @ 2012-11-27 20:39 逝者如斯(乎) 阅读(518) 评论(0) 推荐(0)
CLR Via CSharp读书笔记(6):类型和成员基础
摘要:类型成员定义:类型的可访问性: internal: 仅对定义程序集中的所有代码可见。类型默认可见性为internal;publicclassThisIsAPublicType{}internalclassThisIsAnInternalType{}classThisIsAlsoAnInternalT... 阅读全文
posted @ 2012-11-27 11:05 逝者如斯(乎) 阅读(372) 评论(0) 推荐(0)
CLR Via CSharp读书笔记(5):基元类型、应用类型和值类型
摘要:引用类型和值类型应用类型:类值类型:结构体和枚举System.Object-->System.ValueType-->System.TimeSpan结构System.Object-->System.ValueType-->System.Enum--> System.DayOfWeek枚举值类型可以实... 阅读全文
posted @ 2012-11-25 10:05 逝者如斯(乎) 阅读(433) 评论(0) 推荐(0)
CLR Via CSharp读书笔记(3, 4):共享程序集和强命名程序集, 类型基础
摘要:共享程序集和强命名程序集difference between weakly named and strongly named assemblies:a strongly named assembly is signed with a publisher’s public/private key pa... 阅读全文
posted @ 2012-11-25 09:58 逝者如斯(乎) 阅读(470) 评论(0) 推荐(0)
CLR Via CSharp读书笔记(2):生成、打包、部署以及管理应用程序及类型
摘要:Ch02-1-SimpleProgram.cspublic sealed class Program { public static void Main() { System.Console.WriteLine("Hi"); }}Ch02-2-Minimum MSCorLib.cs// This project is a DLL that has the "Do not reference mscorlib.dll" option turned onnamespace System { public class Object { } public str 阅读全文
posted @ 2012-11-25 09:57 逝者如斯(乎) 阅读(504) 评论(0) 推荐(0)
CLR Via CSharp读书笔记(1):CLR的执行模型
摘要:ch01-1-WinInstall.bat@ECHO OFFREM The following directory is for .NET 2.0set DOTNETFX2=%SystemRoot%\Microsoft.NET\Framework\v4.0.30319set PATH=%PATH%;... 阅读全文
posted @ 2012-11-25 09:54 逝者如斯(乎) 阅读(602) 评论(0) 推荐(0)
WCF服务编程读书笔记(1,2):WCF基础 & 服务契约
摘要:例2-1:服务端的操作重载using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.ServiceModel;namespace WCFServiceProgrammi... 阅读全文
posted @ 2012-11-22 17:28 逝者如斯(乎) 阅读(198) 评论(0) 推荐(0)
WCF服务编程读书笔记(3):数据契约
摘要:Example 3-1. The DataContractSerializerusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.IO;using System.Xml;namespace WCFServiceProgramming{ public abstract class XmlObjectSerializer { public virtual object ReadObject(Stream stream); ... 阅读全文
posted @ 2012-11-22 17:27 逝者如斯(乎) 阅读(222) 评论(0) 推荐(0)
WCF服务编程读书笔记(4):实例管理
摘要:Example 4-1. The ServiceBehaviorAttribute used to configure instance context modeusing System;using System.Collections.Generic;using System.Linq;using System.Text;namespace WCFServiceProgramming{ public enum InstanceContextMode { PerCall, PerSession, Single } [Attrib... 阅读全文
posted @ 2012-11-22 17:26 逝者如斯(乎) 阅读(207) 评论(0) 推荐(0)
WCF服务编程读书笔记(5):操作
摘要:Example 5-1. Defining and configuring a callback contractusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.ServiceModel;using System.ServiceModel.Channels;using System.Diagnostics;using System.Runtime.Serialization;namespace WCFServiceProgramming.Library{ 阅读全文
posted @ 2012-11-22 17:25 逝者如斯(乎) 阅读(359) 评论(0) 推荐(0)
WCF服务编程读书笔记(6):错误
摘要:Example 6-1. The FaultException classusing System;using System.Runtime;using System.Runtime.Serialization;using System.Security;using System.ServiceModel.Channels;namespace System.ServiceModel{ [Serializable] //More attributes public class FaultException : CommunicationException { pu... 阅读全文
posted @ 2012-11-22 17:24 逝者如斯(乎) 阅读(203) 评论(0) 推荐(0)
WCF服务编程读书笔记(7):事务
摘要:Example 7-1. Explicit transaction managementusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.ServiceModel;using System.ServiceModel.Channels;using System.Diagnostics;using System.Runtime.Serialization;using System.ServiceModel.Dispatcher;using System.Ser 阅读全文
posted @ 2012-11-22 17:20 逝者如斯(乎) 阅读(237) 评论(0) 推荐(0)
WCF服务编程读书笔记(8):并发管理
摘要:Example 8-1. Manual synchronization using fragmented lockingusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.ServiceModel;using System.Transactions;namespace WCFServiceProgramming.Library{ [ServiceContract(SessionMode = SessionMode.Required)] publi... 阅读全文
posted @ 2012-11-20 22:25 逝者如斯(乎) 阅读(191) 评论(0) 推荐(0)
WCF服务编程读书笔记(9):队列服务
摘要:Example 9-1. Implementing and consuming a queued serviceusing System;using System.Collections.Generic;using System.Linq;using System.Text;using System.ServiceModel;namespace WCFServiceProgramming.Library{ [ServiceContract] public interface IMyContract { [OperationContract(IsOneWay = ... 阅读全文
posted @ 2012-11-20 22:24 逝者如斯(乎) 阅读(203) 评论(0) 推荐(0)
WCF服务编程读书笔记(10):安全
摘要:Example 10-1. Programmatically securing the basic bindingBasicHttpBinding binding1 = new BasicHttpBinding(BasicHttpSecurityMode.Message);BasicHttpBinding binding2 = new BasicHttpBinding( );binding2.Security.Mode = BasicHttpSecurityMode.Message;Example 10-2. Administratively securing the basic bindin 阅读全文
posted @ 2012-11-20 21:25 逝者如斯(乎) 阅读(186) 评论(0) 推荐(0)
软件开发过程读书笔记(1):RUP
摘要:RUP: Rational Unified Process(Rational统一过程)软件过程模式中四大要素:生命周期,人员,方法和产品生命周期:业务建模-->需求-->分析设计-->实施-->测试-->部署配置和变更管理,项目管理,环境 先启-->精华-->构建-->产品化 人员:分析员,开发人员,测试员,经理,其他角色 (图形设计员,系统管理员,技术文档编写员,工具专家)方法:用例及用例驱动 以架构为中心 在面向对象的分析设计中采用UML进行可视化建模 面向对象的设计与构件实现 产品:工件:中间或最终产物 阅读全文
posted @ 2012-11-20 16:19 逝者如斯(乎) 阅读(185) 评论(0) 推荐(0)
WCF之旅读书笔记(1):WCF重载和继承
摘要:<wsdl:operationname="AddWithThreeOperands">[OperationContract(Name="AddWithTwoOperands")] doubleAdd(doublex,doubley);classMyCalculatorClient:ClientBase<IMyCalculator>,IMyCalculator { publicdoubleAdd(doublex,doubley) { returnthis.Channel.Add(x,y); } }关键是ClientBase以及重写的 阅读全文
posted @ 2012-11-20 15:13 逝者如斯(乎) 阅读(139) 评论(0) 推荐(0)
WCF之旅读书笔记(2):WCF如何通过Binding进行通信
摘要:Server端: Uri-->binding.BuildChannelListener<IReplyChannel(Uri)-->ChannelListener<IReplyChannel>.AcceptChannel()-->channel.ReceiveRequest(TimeSpan)-->RequestContext.Reply(Message).Client端: EndpointAddress-->binding.BuildChannelFactory<IRequestChannel>-->channelFactory 阅读全文
posted @ 2012-11-20 14:54 逝者如斯(乎) 阅读(223) 评论(0) 推荐(0)
Javascript读书笔记(1):从零开始
摘要:<metahttp-equiv="X-UA-Compatible"content="IE=EmulateIE9"/>什么情况下使用JavaScript?在任何不得不用的场合使用,除此之外,不要再任何场合使用!JavaScript是面向对象的吗?JavaScript没有基于类的继承,但它有基于原型的继承。说JavaScript是一种基于对象的语言,是一种正确而略显保守的判断;说JavaScript不面向对象,则是错误的认知。JavaScript版本?http://www.csdn.net/article/2012-02-15/311826und 阅读全文
posted @ 2012-11-19 17:47 逝者如斯(乎) 阅读(174) 评论(0) 推荐(0)
Inside SharePoint 2010 (5): Pages and Navigation
摘要:#1, The SharePoint section of the web.config fileView Code <configuration><configSections><sectionGroupname="SharePoint"><sectionname="SafeControls"/><sectionname="RuntimeFilter"/><sectionname="WebPartLimits"/><sectionnam 阅读全文
posted @ 2012-11-15 22:43 逝者如斯(乎) 阅读(147) 评论(0) 推荐(0)
Inside SharePoint 2010 (4): Sandboxed Solutions
摘要:#1, Work Processes sandbox solution usesExecution Manager: Loading and execution of sandboxed solution code C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\UserCodeC:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\CONFIG\wss_usercode.configC:\Program Fil 阅读全文
posted @ 2012-11-15 15:33 逝者如斯(乎) 阅读(171) 评论(0) 推荐(0)
Inside SharePoint 2010 (3): Developing a SharePoint Solution (Class Library Project)
摘要:#1, Create solution structure#2: feature.xml<FeatureId="86689158-7048-4421-AD21-E0DEF0D67C81"Title="WingtipLeadTracker"Description="AsamplefeaturedeployedusingLocalhostDevProject1.wsp"Version="1.0.0.0"Scope="Web"Hidden="FALSE"ReceiverAss 阅读全文
posted @ 2012-11-13 23:29 逝者如斯(乎) 阅读(220) 评论(0) 推荐(0)
Inside SharePoint 2010 (2): Enabling the SharePoint 2010 Developer Dashboard
摘要:usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingMicrosoft.SharePoint;usingMicrosoft.SharePoint.Administration;namespaceConsoleApplication1{classProgram{staticvoidMain(string[]args){SPDeveloperDashboardSettingssettings=SPWebService.ContentService.DeveloperDashboardS 阅读全文
posted @ 2012-11-12 23:35 逝者如斯(乎) 阅读(147) 评论(0) 推荐(0)
Inside SharePoint 2010 (1): SharePoint 2010 HelloWorld
摘要:#1, 系统架构#2, 代码usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingMicrosoft.SharePoint;namespaceConsoleApplication1{classProgram{staticvoidMain(string[]args){constStringsiteUrl="http://localhost";using(SPSitesiteCollection=newSPSite(siteUrl)){SPWebsite=siteCo 阅读全文
posted @ 2012-11-12 23:18 逝者如斯(乎) 阅读(220) 评论(0) 推荐(0)