Thursday, March 08, 2012

Implementing SOA Design Patterns in WCF

Implementing SOA Design Patterns in WCF

I'll be giving this presentation at VS Live! San Francisco on March 27, 2007



Patterns for Flexible WCF Services


While SOA promotes loose coupling at the transport layer and also facilitates platform independence between consumers and the services they interact with, we are still coupled to the interface as defined by the service’s contract. We’ve learned a lot about how to create loosely coupled systems over the last few decades, but how can we apply those lessons to services? This article expands upon Martin Fowler’s
Service Layer Pattern. It presents patterns that allow you to define descriptive, maintainable, yet extensible contracts specifically with Microsoft’s WCF technology.



Thanks to Marc Hadley for Help on Service Design Patterns Book

I’d like to thank Dr. Marc Hadley of Oracle (formerly of Sun Microsystems) for taking time out of his busy day to meet with me in support of my work on the Service Design Patterns book. Marc is a Java and Web Services Architect , the specification lead for JSR 311 (i.e. a Java API for RESTful Web Services), and is the author of the Web Application Description Language (WADL). Marc has represented Sun in the W3C XML Protocol and W3C Web Services Addressing working groups where he was co-editor of the SOAP 1.2 and WS-Addressing specifications. Marc also served as the technical lead for Sun’s participation at the Web Services Interoperability Organization (WS-I) and was co-spec lead for JSR 224 (JAX-WS). Thanks so much Marc for your input, and I look forward to more stimulating conversations!!!!



Using Generics to Enable the Data Director Pattern

Context:

  • You decide to use the Data Mapper pattern because you’d like to decouple the data model from the domain model (i.e. business objects).
  • You decide not to use code generation for Object-Relational Mapping because you want more flexibility in the ways you work with domain objects. For example, you might want to flexibly build object hierarchies, or you might want to merge or split business object fields and and database columns. You might also use continuous integration techniques to build or check the validity of your calls to stored procedures.  
  • You decide not to use the reflective approach for Object-Relational Mapping because you want a higher degree of run-time performance.
  • You decide you’d rather not use a vendor product so that you may avoid vendor lock-in.
  • You want to minimize the amount of code required to map data from business objects to stored procedures and vice versa.
  • You want to achieve a highly structured and consistent way to organize the mapping logic for all database CRUD operations for individual business objects or for lists of the same.


This article will discuss a simple pattern that leverages the power of Generics to achieve these ends.



AntiPatterns, The Top 10 List
Design Patterns are in vogue these days, but unfortunately Anti-Patterns seem to prevail. Here's a light-hearted and satirical look at the common ways architects and developers shoot themselves in the foot.

Resources Updated
I've updated the Resources Links page, adding more screenshots too.

Wednesday, March 07, 2012

Competitions

Competitions
I restored the Competitions page I once had.

Tuesday, March 06, 2012

Speaking at Dr Dobb's Architecture and Design World 2007

Speaking at Dr Dobb's Architecture and Design World 2007

I'm honored to have been selected to speak at the Dr Dobb's Architecture and Design World 2007. The roster is really quite exceptional with people like Ivar Jacobsen, Arnon Rotem-Gal-Oz, and a number of other thought-leaders in the architectural space. Here are the presentations I'll be giving:


Monday, March 05, 2012

The Passage from Developer to Architect

The Passage from Developer to Architect

Those who have been software developers for any length of time are probably familiar with the fabled crossroads where we must choose between a managerial path and a technical one. There is yet another crossroads we might encounter. When we are asked to play the role of architect, we must choose whether or not we will act as a "pure architect" who focuses on the world of abstract ideas, or if we will also continue to code (i.e. become a developer/architect). The compulsion to pitch in and help with the programming effort can indeed be strong. Most developers who want to be architects or think of themselves as such probably love coding, as do I, and leaving your love is hard. But if your goal is to become a professional architect, especially the enterprise species of architect, then you might have to consider leaving your beloved behind, at least in the workplace.



Flat File Database Demo 6
This demo splits the results of a flat file database search into separate pages. Instead of listing everything in one long list, the results are shown in groups. You get buttons to move to the next page to see the next group...

Patterns for Flexible WCF Services


While SOA promotes loose coupling at the transport layer and also facilitates platform independence between consumers and the services they interact with, we are still coupled to the interface as defined by the service’s contract. We’ve learned a lot about how to create loosely coupled systems over the last few decades, but how can we apply those lessons to services? This article expands upon Martin Fowler’s
Service Layer Pattern. It presents patterns that allow you to define descriptive, maintainable, yet extensible contracts specifically with Microsoft’s WCF technology.



Asynchronous Messaging Patterns with WCF
  Demo Code

A client program calls a service and must wait for it to finish before moving on to do more work. We all know how to do synchronous calls; it’s as easy as writing a “Hello World” program. But how does one design a system where lots of work can be done in parallel?

In this session you’ll see how to use WCF to do just that. You’ll learn about several patterns used in the world of asynchronous messaging including callbacks, store and forward, and conversations. This session will provide you an introduction to some of the fundamental concepts required to build distributed Event Driven Architectures.

Grid Login Demo

Grid Login Demo
My latest demo. View the post to see what it's about.

Sunday, March 04, 2012

Speaking at Dr Dobbs' SD West 2009

Speaking at Dr Dobbs' SD West 2009



I love Dr Dobbs. They are vendor neutral, so you know that few here have supped of the proverbial kool-aid. I am proud to announce that Dr Dobbs has asked me to speak at the prestigious SD West 2009 Conference & Expo which will be held from March 9–13 at the Santa Clara Convention Center, Santa Clara, CA (the heart of Silicon Valley).

SD West is where the software development community gathers to learn about the latest business-critical technologies, network with peers, connect with innovative vendors and get inspiration from industry visionaries. The comprehensive conference program covers today’s most important topics including cloud computing, concurrent programming, dynamic languages, agile processes, security, testing and much more. As a speaker, I can offer you an additional $100 off the VIP Pass. Simply register at http://www.SDExpo.com with the code 9ESPK to get your discount.


Saturday, March 03, 2012

Anatomy of a Real Live ASP.Net 2.0 Web Site

Anatomy of a Real Live ASP.Net 2.0 Web Site

I'll be giving an updated version of this presentation at VS Live! San Francisco on March 27, 2007



The Command Queue Pattern

This is the second article in a two part series; the first was Using Generics to Enable the Data Director Pattern.

Context:

  • You decide to use the Data Director Pattern in order to decouple the data model from the domain model (i.e. business objects), and also because you want to achieve a highly structured and consistent way to organize the mapping logic for all database CRUD operations associated with individual business objects.
  • You need to execute a set of data operations as one transaction (i.e. all of the data operations must complete successfully or they should all be rolled back).
  • You would like the flexibility to easily swap in or out the data operations that should be executed within this transaction.
  • You would like to eliminate all of the repetitive and tedious ADO.Net coding that we typically need to do when performing CRUD operations (i.e. creating connections, transactions, commands, executing queries, and committing or rolling back transactions). You would also like to simplify the manner in which parameters are mapped to and from properties on domain objects.

This article will present a pattern that allows you to queue up a set of Data Mappers so that you may execute them as a unit which must complete in its entirety. It is called the “Command Queue” pattern because Data Mapper operations also function as Commands which may be added to a queue so that they may be executed sequentially.



Competitions
I restored the Competitions page I once had.

Patterns-Oriented Sites

Web sites that are pattern-oriented ...

Hillside Patterns

Cetus Links - Architecture & Design Patterns

Patterns and Software Essential Concepts and Terminology

Microsoft Patterns and Practices Home

Martin Fowler: Enterprise Application Architecture

Martin Fowler: Patterns in Enterprise Software

Patterns and Best Practices for Enterprise Integration

Patterns Share.Org

Microsoft Patterns and Practices Live!

Web Service Security: Scenarios, Patterns, and Implementation Guidance: Home

Brad Appleton's Patterns in a Nutshell



Service Design Patterns Manuscript Accepted Into Martin Fowler's Signature Series!!!

I am proud to announce that after three years of research, coding, writing, and rewriting, Martin Fowler has accepted my book "Service Design Patterns: Fundamental Design Solutions for SOAP/WSDL and RESTful Web Services" for inclusion into his prestigious Signature Series!!!!

Martin’s standards are high. He describes his review process here. This series includes such luminaries as Elliott Harold, Gregor Hohpe, Bobby Woolf, Josh Kerievsky, Gerard Meszaros, and Scott Ambler, to name a few. I am honored.

We’re going to hold off on going to the Copy/Edit phase for a little while so that I can incorporate feedback from this latest round of peer reviews. I expect to complete this work within a few weeks, and anticipate that we'll move to production for traditional "book form" and digital formats (i.e. Kindle, Nook, iPad, etc.) by Q2 or Q3 of this year.

Once Addison Wesley has what they need to move to production, I’ll restart my efforts to deploy the companion web site to www.ServiceDesignPatterns.com. This site will contain brief pattern summaries, much like is done at http://martinfowler.com/eaaCatalog and http://www.eaipatterns.com/.

Stay tuned ...



Apple Logo Steve Jobs Demo (Updated link to post about the demo)
An animated version of the Apple logo featuring Steve Jobs created recently by Jonathan Mak.

Friday, March 02, 2012

AntiPatterns, The Top 10 List

AntiPatterns, The Top 10 List
Design Patterns are in vogue these days, but unfortunately Anti-Patterns seem to prevail. Here's a light-hearted and satirical look at the common ways architects and developers shoot themselves in the foot.

Creating Custom WCF Behaviors in the April 2007 Issue of the .Net Developer's Journal

Check out the April 2007 Issue of the .Net Developer's Journal. It will be dedicated to the coverage of the Windows Communication Foundation. I've got an article on Custom WCF Behaviors in there too! Here's the abstract:

When building WCF services you’ll eventually encounter the need to integrate common logic that could be applied across a number of services, contracts, endpoints, or operations. Examples include logging, security, error handling, and message or parameter manipulation. Since this type of logic cuts across all of these concerns and must oftentimes be executed somewhere between the submission of a message from a client to the service, we are presented with an interesting design and programming challenge. Fortunately, WCF provides a feature called Custom Behaviors which allows us to inject common and “cross-cutting” logic into the WCF runtime at either the proxy (i.e. client) or dispatcher (i.e. service) in order to achieve such ends.



REST vs WS-Star Smackdown

Two camps have risen in the SOA world, the RESTafarians and the WSDL-ites. Each has passionately argued that they are the one true path. Now they need battle no longer, for in .Net 3.5 they have been brought together into the same happy WCF family. In this session we’ll dive into the tenets of REST, and consider when to use it versus WS* types of services. Not only that, but we’ll see how the same service can be created in the REST and WS* styles with C# and WCF. 

View the "REST vs WS-Star Smackdown" presentation here.

View the "REST vs WS-Star Smackdown" code samples for WCF here.



Architects and the Alpha Male Syndrome

The ranks of software development are full of aggressive, competitive, and driven personalities, and architects are no exception. Given that the role of the architect is to lead and persuade, one would think that they would naturally be experts at the soft skills. Yet many of us, myself included, continue to struggle with these things. We probably know what social skills are helpful or hurtful, but repeatedly and inexplicably exhibit self-defeating behaviors that we later regret. For those of you who have been searching for answers, I’ve found a fantastic book that may help you understand yourself or others better.

The Alpha Male Syndrome, by Kate Ludeman and Eddie Erlandson, might just help those architects who are grappling with the soft skills. The authors explain how the traits that create great leaders (e.g. competitiveness, innovation, tenacity, skepticism, confidence) can paradoxically also be their greatest liabilities. To find out your strengths and weaknesses, visit the Alpha Assessment.



Speaking at Dr Dobb's Architecture & Design World 2008

I'm honored to have been selected to speak at the Dr Dobb's Architecture and Design World 2008. The conference has another stellar cast this year.



The Spirit of Code Reviews

For many, code reviews are a thing that are akin to a visit to the dentist. Some organizations focus on things that don’t necessarily translate into something that either has business value or helps the teams do what they do better. For example, undue attention is oftentimes paid to certain coding styles (e.g. where to declare instance fields, order of these declarations, naming of variables, and other minutia). Every developer has a different style and needs to be creative, and while, within a given organization, we hope to achieve a similar "look and feel" to our code, our goal shouldn’t be to make their code identical to what we would have produced ourselves. Attention to such matters probably isn’t the best use of everyone's time and won’t provide the "value add" that would justify the review itself.