Designing Multi-tier Structure Project (Template for different clients )

Jun 26 2010 2:04 PM
Hi! Im planning to design a project (n-tier) that is easy to customize and maintain without compromising efficiency... here is the draft of my (very original :)) design layout base on what I learned on how to built ntierarchitecture...

The project is composed of 3 DLLs (+1 for Helper Classes)
1. BusinessLogic.dll (Compose of 2 subfolders ValueObjects(DTO) and BusinessObjects)

2. AppDomainLogic.dll (i put here the domain driven classes like registration, admission, sale service classes, will use the Business Objects and VOs)

3. DataAccessLayer.dll

here is the code:

// in BusinessLogic.DLL, sub folder ValueObject
        public class Member
        {
            // getters and setters
            public string ID { get; set; }
            public string Name { get; set; }
        }

        // in BusinessLogic.DLL, sub folder Business Objects
        public class MemberBLL
        {

            public void AddNewMember(Member member)
            {
                new MemberDAL().SaveNewMember(member);
            }

            //side-question:
            //should I inherit the Member VO and do it like this
            //public void AddNewMember()
            //{
            //    new MemberDAL().SaveNewMember(this);
            //}
            // which is more effecient???
        }

        // in DataAccessLayer.DLL
        public class MemberDAL
        {

            public void SaveNewMember(Member member)
            {
                // Save to DB
            }
        }

        // in AppDomainLogic.DLL, base class
        public abstract class RegistrationTemplate
        {
            public virtual void RegisterNewMember(Member m)
            {
                new MemberBLL().AddNewMember(m);
            }
        }
        
        //Client 1 registration domain logic
        public class RegistrationForClient1 : RegistrationTemplate
        {
              // will use the template
        }

        // Client 2 registration domain logic
        public class RegistrationForClient2 : RegistrationTemplate
        {
            // overrides the template

            public override void RegisterNewMember(Member m)
            {
                // change the behavior of MemberBLL.AddNewMember
                // different implementation
            }
        }


        // UI Implementation for Client1
        static void Main(string[] args)
        {
            Member m = new Member()
            {
                ID = "1",
                Name = "John Mortred"
            };

            new RegistrationForClient1().RegisterNewMember(m);
        }


My priorities/Goals are:
1. Efficiency
2. Maintainable / Customizable / Reliable
3. RAD (fast development of the system)



My questions:
In your opinion,
1. Is the design flawed? how about code efficiency? performance?
2. Do I violate some rules on OOP archi or Tiered design?
3. Is this design Loosely/ Low coupled?
4. Can I achieve my Goals using this?

thanks in advance :)