StrataFrame Forum

UI, BO in seperate assemblies

http://forum.strataframe.net/Topic9102.aspx

By Chan - 5/26/2007

Hi,

I was thinking to put my application UI (forms) and BO (business object and rule) classes in seperate assemblies. Is it a best practise?

Please advice.

Thank you

By Trent L. Taylor - 5/27/2007

I was thinking to put my application UI (forms) and BO (business object and rule) classes in seperate assemblies. Is it a best practise?

Yes, this is the recommended approach.  During our training class we cover this type of application construction which relates to this very issue.  You should DEFINITELY have a BO library.  We generally have an assembly called Business which houses all of our BOs.  We also have some other assemblies such as Base, which has no references to any other application assemblies, Business, which is the BOs, UI, which houses any inherited controls or custom controls, then the application or entry point EXE.  The course curriculum goes over this is much more detail and also gets into namespaces, etc.  But in short, yes, you should break up your application into categorized assemblies which includes your BOs in a separate assembly.

By Chan - 5/27/2007

Hi,

Thank you for info. Then do you recommend to have seperated by each module?

For example:

MyApplication.exe
MyApplication.UI.Base
MyApplication.Business.Base
MyApplication.ModuleA.UI.dll
MyApplication.ModuleB.UI.dll
MyApplication.ModuleA.Business.dll
MyApplication.ModuleB.Business.dll

Thank you

By Trent L. Taylor - 5/28/2007

Yes, this is more like our structures.  Below is a sample of our assembly structure.

Company.Product.Base
Company.Product.Business
Company.Product.UI
Company.Product.Client (This is the EXE assembly)
Company.Product.ModuleA (A class library referenced within the client)
Company.Product.ModuleB