Adapter Pattern

March 26, 2008

Adapter Pattern Continuing the tour in the structural patterns I'm going to introduce the adapter pattern.You can read my previous posts on structural patterns here: Decorator pattern Proxy patternFacade pattern The Adapter PatternThe adapter pattern helps us to convert an interface of a class into another interface that we need. It helps us to adapt old systems to new systems without the need to rewrite the old systems. Also, adapter pattern enablesclasses to work together even though they have an incompatible interfaces.For a UML diagram of the pattern go to dofactory site.How does it Work?One way to implement the adapter pattern includes...
one comment

Enterprise Library – Building a Custom Trace Listener

March 21, 2008

Enterprise Library - Building a Custom Trace Listener IntroductionEarly this week, I got a phone call from a customer.The customer wanted to know how to build a new provider for logging application block in order tolog data to his log table and not to the suggested logging application block database.Also, he wanted to know why to use the ent-lib at all. I decided to write this post in order to show how to build such a provider and to answer whyI think you should use ent-lib.Building a Custom Trace ListenerBuilding a new provider to the logging application block has some simple...

SketchPad – Entity Framework and LINQ to SQL Examples

March 18, 2008

SketchPad - Entity Framework and LINQ to SQL Examples Are you tired of Northwind examples?Samir Bajaj a developer in the ADO.NET team has pubished a nice example of using the Entity Framework and LINQ to SQL.The example is not the ordinary Northwind example but a win SketchPad application.Samir implemented a startegy pattern that enable us to replace the data access between the two frameworks.You can use either his Entity Framework implementation or his LINQ to SQL implementation.I found this example very helpful.Samir's postDownlaod the example here
no comments

Facade Pattern

March 16, 2008

Facade Pattern Continuing the tour in the structural patterns I'm going to present today the facade pattern.You can read the my previous posts on structural patterns here: Decorator pattern | Proxy pattern. What is the Facade Pattern?The facade pattern is all about encapsulating a subsystem to make it easier to use.To reduce complexity of systems we usually build them as a union of subsystems.The facade hides the subsystem implementation and externalize an interface to that subsystem.The facade interface can have a new set of operations or operations that included in the subsystem.Another aspect of facade - the facade is an...
4 comments

My Reading List

March 14, 2008

Early this week I talked to a friend.One of the subjects in the conversation was the reading of professional books in order to gain knowledge. I promised him my reading list for the next months and there it goes (by my order of reading): Expert C# 2005 Business Objects 2nd Edition. LINQ in Action. Programming WCF Services. ASP.NET 2.0 MVP Hacks and Tips. ASP.NET AJAX in Action. Practical Software Factories in .NET. Windows Workflow Foundation Step By Step. C# 3.0 Cookbook. C# 3.0 Design Patterns. Also, I'm going to read...
no comments

Microsoft Certifications

I've been asked by friends and co-workers why I didn't written posts in the last weeks.The main reason is that I'm learning for my next MCTS exam.In the last 3 weeks I read and practiced the materials from the self-paced training kit for win forms.While I was learning I found and read a Hebrew post by Justin Angel about certifications and I must agree with the things he wrote.I want to explain one thing that he wrote:I sometimes interview candidates that write in their resume that they passed MCP's or other certifications. When that candidate can't tell me basic...
2 comments