High quality applications are simple.  They do some one thing well.  The classic example is the famous Hello World app.  It simple displays the text back to the caller.  While there are vast language dependant permutations lets follow our own advice, keep it simple, and stick with C#.

 

using System;

 

class HelloWorldApp

{

      public static void Main()

      {

            Console.WriteLine("Hello, world!");

      }

}

 

Simple, Easy, effective … what more could one want?  How about making this enterprise ready. 

 

First we need to get more serious about what Enterprise Ready means. On the short list, and enterprise ready application would;

 

  • Comply with the enterprise architecture
    • N-tier
    • Component based
  • Use existing components for common tasks
    • Data access
    • Logging
    • Rules
  • Be extensible over time
    • Implements the façade pattern
    • Separates GUI from business implementation from data access
  • Be flexible once deployed
    • Provides variables outside of the compiled code
  • Support multiple languages
    • Unicode
  • Be secure
    • No trust at machine (maybe even component) boundaries
    • Communications are not in clear text and keys, if used, are securely stored

 

Left to fend for itself, this is nearly punitive overhead for a simple application.  To keep it simple and meet the enterprise needs the people responsible for the enterprise architecture need to provide the parts and examples on their application (not their internals) to the developers.  If the enterprise parts exists the changes to the code may be a few extra parts and a few additional lines of code. 

 

A client windows application will need to be built to call a server hosted façade.

The façade would implant the enterprise security and call a refactored, generic text handler.  Except for the text handlers overloaded interfaces, it need only know about the enterprise data access component.  Every thing else would be invisible to the developer.

 

By most estimates the application would still be considered simple;

Windows form code;

private void button1_Click(object sender, System.EventArgs e)

{

      myFacade myF = new myFacade();

      CultureInfo cu = new CultureInfo( "es-ES", false );

      string s = myF.getText(text, cu);

      this.textBox1.Text = s;

}

 

 

Façade code;

using System;

using System.Globalization.CultureInfo;

 

namespace MyCompany

{

      public class getText

      {

            public string getText(string text, CultureInfo cu)

            {

                  string s = MyCompany.Dattacess.getCutlureText(text, cu);

                  return s;

            }

      }

}

 

Complexity for the enterprise is provided by the enterprise;

  • The text handler would get text from a database or resource file using an existing data access component, and ensure the connections a managed and the correct language is returned in the appropriate character set.
  • Access controls would have been established and implemented in groups and roles
  • Logging would happen by attributing the appropriate interfaces in the data access class.
  • The users identity would be flipped to a generic application role which would limit access and improve performance.

 

So a simple application can comply with the enterprise architecture but ONLY IF the enterprise invests in providing the application developers enterprise ready components BEFORE the application is being built.