Showing posts with label Patterns. Show all posts
Showing posts with label Patterns. Show all posts

Tuesday, December 16, 2008

Application Architecture Guide is Available

After many months of work, we've released the patterns & practices Application Architecture Guide - http://www.codeplex.com/AppArchGuide.  You can download the pdf or you can view it all on the web, whichever is easier for you.

This is a 381 page playbook to designing well architected applications on the Microsoft .NET platform. It covers web applications, mobile applications, rich client applications, services and rich internet applications (like Silverlight). The guide is a distillation of many lessons learned from architecture experts both internal and external to Microsoft.  It’s principle-based and pattern-oriented to provide a durable, evolvable backdrop for application architecture that you can use for many years to come. 

Some key features of the guide:

  • Canonical app frame - Describes at a meta-level, the tiers and layers that an architect should consider. Each tier and layer is described in terms of its focus, function, capabilities, common design patterns and technologies.
  • App Types - Canonical application archetypes (such as web application or rich client application) are used to illustrate common application types.  Each archetype is described in terms of the target scenarios, technologies, patterns and infrastructure it contains.
  • Arch Frame - A common set of categories for hot spots for key engineering decisions. These include categories such as authentication and authorization, caching, state management, composition, configuration, transactions, validation, workflow and more.
  • Quality Attributes - A set of quality attributes that shape your application architecture, such as performance, security, scalability, manageability, reliability and more.
  • Principles, patterns and practices - Using the frames as backdrops, the guide overlays relevant principles, patterns, and practices, such as model view controller pattern, data transfer objects, service gateway, facade and more.
  • Technologies and capabilities - A description of the Microsoft platform and all the relevant technologies. For instance we provide guidance about which data access technologies to use, which UI and presentation layer technologies are best suited for your scenario, and when to use WCF vs. ASMX.

If you are an architect or a developer on the .NET platform, I highly recommend you pick it up. Its free, so you have nothing to lose!

Thursday, May 17, 2007

Focus on the Solution Instead of the Goal – Effectiveness Anti-Pattern

In my last post, I explained what effectiveness anti-patterns are and why they are useful. In this post I’ll give you an example of an anti-pattern that I’ve seen cause problems for a lot of people – including myself! If you are having trouble reaching your goals, perhaps you’ll recognize this anti-pattern in yourself and use the solution to become more effective.

Focus on the Solution Instead of the Goal

Problem

The anti-pattern occurs when you are more committed to the solution that you think will achieve your goal than to the goal itself. Once the solution has been found unworkable you assume the goal is unachievable, or you ignore the evidence and keep using the unworkable solution.

Context

  • You are working toward a clearly defined goal. For example you want to get promoted, buy a new car, move to a new town, get a date, or become financially independent.
  • You’ve identified a solution that you think will allow you to achieve your goal. For example, you think that if you work really hard you’ll get a promotion.
  • You are committed to the solution; you’ve put time and energy into it.
  • After time, evidence suggests that your solution is not working.

Forces

  • You are having trouble letting go of the ‘sunk-cost’, all the time and energy you’ve already committed to the unworkable solution
  • You are focusing on the current strategy instead of the larger goal
  • You are having trouble thinking flexibly

Solution

  • Define criteria for success. When you identify your goal, build a list of criteria that defines it. Instead of just saying you want a promotion, define the criteria you want to meet in order to feel the goal has been accomplished. Be precise so you know exactly what you are working for. For instance do you want more pay, a new title, more responsibilities and challenge, more recognition? Ask yourself lots of ‘why’ questions. Why do you want a new title? Why do you want more recognition? You may learn that a promotion isn’t the only way to achieve what you are looking for. This realization will give you more flexibility in meeting your goal.
  • Create multiple strategies. After you define your goal, brainstorm multiple strategies and solutions. These strategies can serve as backup to the preferred solution if it doesn’t work.
  • Measure progress. Measure your progress against the criteria you’ve defined. This will allow you to determine the effectiveness of the strategy you are using. By keeping the defined goal-criteria in the forefront of your mind you’ll stay focused on the goal and will be more willing to switch strategies as necessary.
  • Plan for failure. Hope for success, but plan for failure. Do your best to achieve your goal, but make sure you have a contingency plan in the case of failure. Don’t ever put yourself in the position that you must achieve your goal and have no fallback position.
  • Take risks. Encourage yourself to think creatively and don’t be afraid to take risks. If you punish yourself too severely for failure you'll tend to slip into a pattern of rigid thinking due to your increased fear. Unfortunately, this often results in additional failures and reduced effectiveness. If you can embrace your creativity and achieve a reasonable level of risk-taking you'll be more flexible and less likely to become stuck in this anti-pattern.
My Related Posts

Wednesday, May 16, 2007

Effectiveness Anti-patterns

As defined by Whatis.com, “An anti-pattern is a frequently used, but largely ineffective solution to a problem… Just as a viable pattern describes the way from a problem to a valid solution, an anti-pattern describes the way from a problem to a poor solution.”

An effectiveness anti-pattern is a common pattern of behavior that leads to reduced effectiveness. It’s useful, and fun, to identify these anti-patterns in myself and others and document them so that I can avoid them in the future.

I’ll write follow-up posts with some of the anti-patterns I’ve noticed. Each anti-pattern will contain following sections:

  • Title – A descriptive name for the anti-pattern.
  • Context –A description of the conditions in which this anti-pattern normally occurs.
  • Problem – A description of the resulting problem, what goes wrong when you use this anti-pattern.
  • Forces – A description of what leads people to use this anti-pattern.
  • Solution – A description of how to break the anti-pattern and move to a workable solution.
  • Example – An example of the anti-pattern in practice.

The neat thing about an anti-pattern is that it reduces the problem down to bare bones, making it easier to spot and fix.

If you've noticed any anti-patterns in your work or personal life, leave me a comment - I'd love to hear about them!