0

I've been asked to write a multi-tier application. It has a database to read data from and a view. I thought about designing it this way:

  • DAL which has entity framework object of my actual db and methods for db.
  • WCF service which calls the DAL's methods.
  • RunService project to run the WCF service.
  • BL which has Service Reference of WCF service and has all the business logic
  • Console view which show the data.

Is this a good architecture? (I need to show other people that I know how to design it and use multi-tier architecture, not more than that).

alexwlchan
  • 5,699
  • 7
  • 38
  • 49
Avi Cohen
  • 55
  • 5

1 Answers1

1

I find the exposition of the idea a bit confused. It lacks for requirements and mix logic view (concept like DAL and BL, but no SL is mentioned) with implementation view (WFC) with deploy view (RunService project).

When you think to architecture it can be helpful to think to it as fractal.

Are you trying to wrap your DAL with a service infrastructure based on WCF? But there's some light weight "BL" (retrieving or saving data have always additional semantic that the data itself can't supply) to write inside the WCF service?

Look at the diagram at this link WS Application Architecture. Each service of the lower box "Services" could be structured as the service in the box above, with its own DAL (resource layer), BL, Service interface layer (based on WCF if you want but this is an implementation detail).

So if your requirements are:

  • supply a tier of high level services (composition of services)
  • data sources can be accessed only by a low level tier of services
  • each services must be build respecting a shared architectural template (for example the linked one)

Then:

  • first: make a view of a services oriented architecture where services use other services
  • second: show your idea about the architectural template of a service, with some hint on the technology you suggest
  • third: do some examples to justify the extra complexity of such design
Aris2World
  • 1,214
  • 12
  • 22
  • This is how I thought I'd do it, but I may be wrong and maybe lead you a wrong way. The application I've asked to do should be multi-tier the same as web applications with database and console view (only for the train). I though that this is what he meant. Do you think I was wrong? (didn't get much information - the real code I'll have to write tomorrow) – Avi Cohen Jan 18 '15 at 13:23
  • I think that what I have wrote is applicable; your situation is simpler than one I have described. – Aris2World Jan 20 '15 at 14:11
  • Try to start from a coarse grained design: DAL <-> BL <-> SIL (Service Interface Layer). Then try to refine it. DAL: how to access data? how is the interface layer to access data? Do I need WCF as implementation of this interface layer? BL: repeat same question from a console point of view, how to access business logic? and so on. At the end maybe the design you propose satisfies all the answer to those questions. – Aris2World Jan 20 '15 at 14:49