Essential .NET 2.0
October 29th-2nd
Boston

November 5th-9th
Chicago


NEW- Essential Windows Communication Foundation
November 13th-16th
Boston

NEW-Essential Windows Presentation Foundation
October 22nd-26th
Bellevue, WA
November 26th-30th
Boston

Essential ASP.NET
October 8th-12th
Los Angeles
October 22nd-26th
New York
November 5th-9th
Orlando

November 12th-16th
Boston

NEW- Essential Windows WorkFlow Foundation
November 26th-30th
Los Angeles

.NET Architecture &
Design
October 22nd-25th
Chicago

November 5th-9th
New York

November 26th-30th
Los Angeles


NEW-Essential SharePoint 2007 for Developers
October 8th-12th
Boston
October 15th-19th
Los Angeles
November 5th-9th
Denver

NEW-Essential AJAX for ASP.NET Developers
November 6th-9th
Boston

Programming C#
November 5th-9th
Los Angeles

Essential SQL Server
October 22nd-26th
Boston

Essential BizTalk Server
November 12th-16th
Los Angeles









Patterns

By: Kevin Jones

Why Patterns

Over the course of time software development has changed greatly. The first major change was the introduction of structured programming. With structured programming an application was broken into many functions, with each function ideally performing one small task. Each function was named for the task it should perform. The seismic shift came with Object Oriented programming; made popular with Smalltalk and then commercially with C++. Now developers wrote their code in terms of Classes; with each class modeling something from the real world.

One of the primary aims of both these approaches was to help communication both within and across teams; it’s much easier for a developer to talk to other developers and end users when she can say ‘How exactly does a Customer open an Account?’ and then model that in terms of classes.

The last few years has seen the rise of ‘patterns’ in the developer community. Patterns are all about communication; they help developers understand and describe much more clearly the intent of a given piece of code.

Patterns and Communication

Imagine two carpenters talking; they are discussing the type of joint to use for a set of drawers they are making. One asks:

“What sort of joint are you going to make for the drawer?”

And the other replies:

“I’ll take the wood, cut down about 2 centimeters; cut back up at a forty-five degree angle; cut down 4 centimeters then back up at forty-five degrees; then down again and up at forty-five degrees; then...”

What the second carpenter is discussing is how to cut a dovetail joint, a standard type of joint in woodworking. Describing the joint in this way does not aid communication; in fact it hinders communication. If the second carpenter said “I’m going to use a dovetail joint” or “I’m going to use a mortise and tenon joint” that communicates far more information in far fewer words.

In the second case the carpenters are describing common joints and can make a decision based on their understanding of the joints, such as the cost versus complexity of each joint; the strength of each joint; and the suitability of each joint to the job.

This is where patterns come into play in software development. If a developer can say “I’m using the Strategy pattern” or “I’m using the Factory Method pattern”, this conveys lots of meaning to another developer who understands the patterns and how they are used.

What is a Pattern?

A pattern does not describe code; instead it allows developers to communicate the mechanism by which the problem they are discussing can be solved.  The pattern is a re-usable solution to a common design problem. Amongst other things patterns have a name and an intent. Both of these are extremely important.

Many patterns look alike, and sometimes examining the UML diagram of the pattern is not enough to tell them apart, for example the Proxy and Decorator patterns share the same UML diagram but the intent of each is different. One of the key concepts to grasp when studying patterns is the intent of the pattern; that is why and when a particular should be used.

Naming is also very important. Many people call all code that creates something a factory. However not everything that is a creator is a factory. Loosely calling something a factory does not convey the correct information. In fact there are two distinct factory patterns, the Factory Method and the Abstract Factory. Understanding the distinction between these patterns and understanding that not all creators are factories allows developers to communicate clearly just based on the name of the pattern.

Design Principles

Good OO design follows certain principles, and using patterns supports these principles. For example, to allow a greater degree of flexibility developers should code to an interface rather than an implementation, where interface in this case does not necessarily mean the ‘interface’ keyword but can also mean an abstract class. Many design patterns follow the ‘open/closed’ principle, open for extension but closed for modification. So whilst the tested code physically should not change, it should be written to except new pieces of code. The strategy pattern for example allows the supplying of code at runtime, the .NET Array.Sort class is an example of this. The Sort algorithm cannot physically be modified but you can supply the algorithm the code for it to use to compare items.  Thus the code is closed for modification but it can be extended to sort different types of entities.

Patterns in .NET

Much of the technical literature around patterns is written for a particular audience, the Java developer. Java is very similar to .NET and developers can often take a pattern written in Java and port that pattern to C# or VB.NET. However, Java and .NET are not the same environment, even though they have the same roots. For example, .NET has delegates, Java does not; .NET (at least in C#) has anonymous methods and Java does not. Both of these related technologies can be applied to many patterns, which make the way many patterns are written in C# fundamentally different to the way they are written in Java. Understanding how to use C# features is a key to developing and using patterns in .NET to their full extent.

Using these .NET features changes the way we use some common patterns. For example, using delegates makes writing the Observer pattern trivial; using partial classes with the State pattern allows us to split the code across multiple files, with each file containing one class per state, making it easier to manage the code; using ThreadStatic means that thread bound singletons can be created easily. Other techniques that can be used in patterns are .NET iterators and transparent proxies.

Conclusion

Patterns provide a mechanism for communication between developers. They allow developers to communicate at a higher level than code and so aid in the understanding of the code being developed. Patterns can be adapted to the environment in which they are used, and in particular can take advantage of many of the features of .NET including delegates, partial classes and anonymous methods.

We are now offering a new course "Code Smarter with Design Patterns with .NET". To get a detailed course outline, CLICK HERE and put "Design Patterns" in the subject line or call 800.699.1932.

 

For more information email: onsites@develop.com or call 800.699.1932
 
Featured New Course

NEW-
Guerrilla Connected Systems
- Connecting WCF, Workflow & BizTalk 2006 R2

October 29th-November 2nd in Los Angeles register online or call 800.699.1932


What you’ll learn…
Using WCF, WF and BizTalk you explore how to integrate applications, explain why certain technologies are not suitable for particular types of applications, and demonstrate how your applications benefit from effective use of design patterns.

Highlights Include:

  • Application Design and Practices
  • Distributed Application Architecture and SOA
  • Design Patterns
  • Distributed Application Security
  • WCF Concepts and Architecture
  • Network and Queued Communication using WCF
  • WCF Security, CardSpace and Federation
  • Design by Contract, SOA and Service Factory
  • WF Concepts and Architecture
  • WF Activity model and hosting
  • Using WF for service composition
  • BizTalk Architecture and Orchestration
  • Scalability and Availability
  • Deployment and Application Monitoring


    Want to get a detailed course outline?

    CLICK HERE
    and put "Guerrilla Connected Systems" in the subject line.


 
NEW- .NET: MyTeam Custom Editions

We've developed 4 customizable .NET developer courses
based on the experience level of your team!

Start customizing your course today with a few simple answers. We'll recommend a custom edition that is designed for the experience level of your team. Then you can tailor the course to best support the application you're building.
Customize now: www.develop.com/myteam
 

Upcoming Guerrilla Events

What You Can Expect:

- Multiple instructors (2-5) per event

- Extended course hours
- A team of industry leading experts
- Leading-edge technologies
- Innovative course materials, including slides, labs, books, demos
- Your own PC and development platform
- Peer-to-peer collaboration and competition
- An exciting, multi-media learning environment


All Inclusive Price includes:
5-NIGHTS HOTEL, ALL MEALS AND BEVERAGES

ABOUT GUERRILLA EVENTS

To get a detailed course outline for any of the Guerrilla Events listed below, please send an email to requests@develop.com and put the course name in the subject line.

Featured Guerrilla Event

Guerrilla .NET
- Now includes: WCF, WPF, Workflow, LINQ and Silverlight
November 12th-16th in Tampa, FL register online or call 800.699.1932


What you’ll learn…
Guerrilla .NET gives you a comprehensive look at the modern .NET development. It will give you the skills and knowledge to build large reliable applications with confidence and troubleshoot them effectively.

This course also includes cutting-edge coverage of new .NET technologies. You’ll work with Windows Communication Foundation (WCF), build GUIs with Windows Presentation Foundation (WPF) and see how Windows Workflow Foundation can help you build workflow-based applications. You’ll also get to see upcoming technologies like Language Independent Query (LINQ) and Silverlight. You’ll get a chance to write some code and see how current technologies will evolve in the near future, helping you plan effectively.

Highlights Include:

  • Iterators and Anonymous Methods
  • Lambda Expression
  • Extension Methods
  • Implicit Typing and var
  • Dealing with Exceptions
  • Transactions
  • Threading and Concurrency
  • Memory Management
  • Using and Extending Visual Studio
  • Dealing with Production Errors using SOS and WinDBG
  • Windows Communication Foundation
  • Windows Presentation Foundation
  • Windows Workflow Foundation
  • Language Integrated Query (LINQ)
  • Silverlight


    Want to get a detailed course outline?
    CLICK HERE
    and put "Guerrilla .NET" in the subject line.

back to top

 

Upcoming Courses

To get a detailed course outline for any of the courses listed below, please send an email to requests@develop.com and put the course name in the subject line.

Essential .NET 2.0
October 29th-November 2nd in Boston register online or call 800.699.1932
November 5th-9th in Chicago register online or call 800.699.1932

What you’ll learn…
You will leave this course with a clear view of what .NET does (and does not) do, and how to start designing and building robust applications that take maximum advantage of the platform while avoiding common traps and pitfalls.

NEW- Essential Windows Communication Foundation
November 13th-16th in Boston register online or call 800.699.1932

What you’ll learn…
Learn to build secure and reliable WCF applications. Upon completion you will know how to define and access services using channels, bindings, messages, data contracts, operation contracts, and faults and know the built-in functionality of WCF, including instance management, concurrency, reliability, queues, transactions and security.

NEW-Essential Windows Presentation Foundation
October 22nd-26th in Bellevue, WA register online or call 800.699.1932
November 26th-30th in Boston register online or call 800.699.1932

What you’ll learn…
Learn how to build rich Window and Web client applications using the new WPF API. Upon completion you will be able to write compelling user interfaces using WPF that include documents, media and user interaction and be able to take advantage of the new features of the platform including XAML, styling, templates, and commands.

Essential ASP.NET
October 8th-12th in Los Angeles register online or call 800.699.1932
October 22nd-26th in New York register online or call 800.699.1932
November 5th-9th in Orlando register online or call 800.699.1932

November 12th-16th in Boston register online or call 800.699.1932

What you’ll learn…
Essential ASP.NET 2.0 is a week of in-depth exploration of the core issues involved with building browser-centric Web applications, where we will cover the latest technologies for architecting such applications. You will learn about the compilation engine of ASP.NET, see exactly how your .aspx pages are turned into .NET types, and learn how you can use those .NET types and others to build your Web sites.

NEW- Essential Windows WorkFlow Foundation
November 26th-30th in Los Angeles register online or call 800.699.1932

What you’ll learn…
Learn how Windows WF technology fits with the rest of the Microsoft stack and learn when to best apply Windows WF technology to create the next generation applications.

.NET Architecture & Design
October 22nd-26th in Chicago register online or call 800.699.1932
November 5th-9th in New York register online or call 800.699.1932
November 26th-30th in Los Angeles register online or call 800.699.1932


What you’ll learn…
Through discussion, demonstration and hands-on experience, this class provides essential and practical information for designers and senior developers building robust, reliable, high-performance distributed .NET applications.

NEW- Essential SharePoint 2007 for Developers
October 8th-12th in Boston register online or call 800.699.1932
October 15th-19th in Los Angeles register online or call 800.699.1932
November 5th-9th in Denver register online or call 800.699.1932


What you’ll learn…
For software developers and system architects that need to understand the architecture and programming techniques required to build collaborative applications using Windows SharePoint Services v3 and Microsoft Office SharePoint Server 2007

NEW-Essential AJAX for ASP.NET Developers
November 6th-9th in Boston register online or call 800.699.1932

What you’ll learn…
If you are an experienced ASP.NET developer and you’re being asked to take your Web applications to the next level, this course is for you. Upon completion, you will know exactly when and where to use AJAX, how to integrate it into both new and old applications, and even how to extend it to give you the exact functionality you need for your application.

Programming C#
November 5th-9th in Los Angeles register online or call 800.699.1932

What you’ll learn…
In this course you will spend the majority of your time on the C# language. It moves quickly through the basics so you can cover the most important features in depth. C# 2.0 features such as generics, partial classes, static classes, global namespace qualification, etc. are integrated throughout the course.

Essential SQL Server for Developers
October 22nd-26th in Boston register online or call 800.699.1932

What you’ll learn…
This course is designed for experienced SQL Server developers who want to take advantage of the latest features and functions in the new SQL Server 2005 release. Highlights include how and when to use Service Broker, Notification Services, and native Web services. Outside of the database, the client side has been greatly enhanced with support for new data types, functional enhancements in SqlClient, client-side XQuery functionality, additions to the .NET XML stack.

Essential BizTalk Server
November 12th-16th in Los Angeles register online or call 800.699.1932


What you’ll learn…

This course is for developers who have experience with .NET, XML, and Web Services and want to learn how to use BizTalk to build application integrations.

back to top

 

Community Blogs

What The SSIS Masters Know, Part 1
Tuesday, October 02, 2007
Kent Tegels On SQL, .NET and sometimes beer.

WF and ASP.NET - A Few Gotchas
Monday, October 01, 2007
Josh Lane on .NET

Patterns, Patterns everywhere
Friday, September 28, 2007
Andrew Clymer on .NET

Details of CardSpace RP Identity Generation
Thursday, September 27, 2007
Dominick Baier on .NET, security and other stuff

Understand LINQ in 15 Minutes
Sunday, September 16, 2007
Tony Sneed on .Net

To read all our instructor blogs, go to: www.develop.com/blogs

back to top

 
Books You Need to Read

Expert Visual C++/CLI: .NET for Visual C++ Programmers (Expert's Voice in .Net)

By Marcus Heege


 

About DevelopMentor

DevelopMentor provides advanced in-depth, hands-on training for experienced software developers. Our instructors are industry recognized experts who are highly effective in sharing their real-world experience, knowledge and passion for the technology. DevelopMentor offers comprehensive curricula in all key software areas including .NET, WPF, WCF, WF, ASP.NET, SQL Server, BizTalk 2006 R2, SharePoint 2007, JAVA, C#, C++, VSTS and more. Please visit our website for more information on all of our course offerings: www.develop.com/training

back to top

©2007 DevelopMentor - Phone: 800.699.1932 - Web: www.develop.com - email: requests@develop.com