This column is the (unplanned) second part of the previous post: “Guidelines for designing layers and packages”.

As a software architect you should ask some questions (and come up with a serious evaluation of some alternatives) like the following ones:

  • What are the operational (common) services you (own and) provide out of the box to all projects (i.e.: authentication, provisioning, SOMETHING to consistently read/write parameters –into DB or config files-, a tenant load balancer –for multi-tenant SAAS environments-,…).

If more than one developer in your team uses AppSettingsReader (and you AS technical lead haven’t come up with a wrapper class around it, consider yourself a bad SW Designer –therefore a terrible SW Architect-)

  • Which layer(s) should handle the errors?
  • If your solution contains Web Services, where will you place them? (e.g.: in the same application directory that other application pages)
  • Where will you place the Factories? (i.e.: in the business rules layer).
  • Where will you place the common abstractions? I mean, if you did any technique based on common abstractions (dependency inversion, strategy pattern, IoC, …).
  • How to handle the code (from upper layers) which does not use the single Facade entry point of the next layer below?

As a software designer you should ask:

  • What’s your policy for finalizing unmanaged resources? (e.g.: enclosing them in using blocks? Close + Dispose?)
  • What are the definitions for common constants? (e.g.: -1 for not found? Date time formats?)
  • How many classes should a package contain? How many packages should a layer contain? How many layers should a module contain?

A software layer usually contains one package, BUT is not always the case (prepare yourself to recognize them).

  • How is going to be the internal DLL distribution process? (An email to ALL does not count).
  • How will technology/middleware specific object be consumed? I mean, if you’re using a distributed cache, will all of you projects have references to that specific DLL (I call them dirty objects)?

Cheers,

Javier Andrés Cáceres Alvis

Microsoft Most Valuable Professional – MVP
Intel Black Belt Software Developer