Bunian Basic Design

By | October 23, 2008

Well, it’s moving on, very slow, but it’s moving!

If you have been following this blog, then I think you are familiar with Bunian, the open source project for charity organizations. During the last Bunian team meeting at the beginning of this week, the basic design emerged (still being discussed and subject to changes till the minute of this post); we have decided to skip the dummy DTO objects, and to try Business Objects (BO), where most of the business logic lays, rather than in a separate Business Service.

The design will be like the following:

  • Business Object classes: like Child, or Family. These classes will have the correspondent business logic within, including the data access (although some may object) but data access will be through repository interface data member.
  • Repository interfaces: each BO will hold an interface data member specific to the data access needs of that BO. For example, the Family BO will have the interface data member IFamilyRepository. These repository interfaces will have a parent repository interface IRepository.
  • Concrete repository classes: as it may be obvious, it implements the repository interfaces mentioned above. These classes will be in different project, in order to be able to change the behavior depending on the Database (Microsoft SQL server, MySql, etc…)
    Note here that there will be no direct dependency on these concrete classes; they will be injected through IoC container which we haven’t chosen yet (most likely would be Windsor,  available to discussion).
  • MVP infrastructure: a project will host Views interfaces and their Presenters.

The following diagrams are examples of the discussed above:

– Business Objects using repository interfaces:

BO having repository interfaces as members 

– Concrete classes implementing repository interfaces:

BunianDesgin2

Of course all of this might be changed so let’s not hold our breath! so stay tuned if you want to know the end of the story 😉

Any suggestions? comments?

Leave a Reply

Your email address will not be published. Required fields are marked *