title: Front Controller vs. Façade pattern
body: <p>Okay, I have done a bit of searching online and found <a href="http://www.coderanch.com/t/100644/OO-Patterns-UML-Refactoring/Difference-between-Facade-Front-Controller" rel="noreferrer">this</a> thread, but it still does not quite clear it up for me.</p>
  
  <p>What exactly is the difference between a Front Controller Pattern and a Façade pattern?</p>
  
  <p>As I understand it so far:
  A Façade pattern does not contain any business Logic, but merely centralizes access to multiple objects.</p>
  
  <p>A Front Controller does the same thing, but may contain business logic to facilitate the decision logic of what is called based on the input data and the like.</p>
  
  <p>To make sense of this, does the following simplistic pseudo code snippet mean that drawLine is a Façade to simplify converting the coordinates to points and then implementing the draw method that actually does the work?</p>
  
  <pre><code>    private void drawLine(Int32 StartX, Int32 StartY, Int32 EndX, Int32 EndY)
      {
          Point Start = new Point(StartX, StartY);
          Point End = new Point(EndX, EndY);
  
          Draw(Start, End);
      }
  </code></pre>
  
  <p>Can a Façade call into lower layers of your application or is it really just to centralise access to many components on the same layer?</p>
  
  <p>As I understand it, the front controller coordinates the complete function call process.</p>
  
  <p>Example: A Front controller would examine the data, and then decide what action to take. Then it would compile the data for each subsequent call to lower level classes, until it arrives at a suitable response that can be provided to the calling system.</p>
  
  <p>I think my understanding of the Façade pattern is wrong or just too simplistic. Please correct me if I'm wrong.</p>
  
  <p>If my understanding of this is correct, would it then not make more sense to change the Application Façade, into a Front Controller in the <a href="http://www.codeplex.com/AppArchGuide" rel="noreferrer">Microsoft Application Architecture Guide 2.0</a>? I'm specifically looking at the Service Architecture in chapter 18. (I have the Beta 2 version though)</p>
  
  <p><strong>Update:</strong> Thanks for a great response Rune. Why do you say it is not correct to change the Facade to a Front controller? I'm a big fan of the Front-controller because it keeps all lower level things a little more controlled. So although it may not make MORE sense, would it be completely wrong to do that? If yes: Why?</p>