views:

352

answers:

3

i have been developed my last project like below as by last architecture

View -> Controller -> Service Code -> Repository with DDD(Model)

Now i want to use WF and WCF?where are they to be on my last architecture?please tell me show me an example.

A: 

The trick is to have a single solution, within the solution you have different types of projects with references between the projects.

Shiraz Bhaiji
A: 

my service layer have interfaces for example the ICustomerService and impleting of the CustomerService class.

Beforehand i called this service class from the CustomerController class after my CustomerService class call the my CustomerRepository class.All workflows are in my ServiceLayer classes by .net remoting or web service between two machine(db server,app server,uı server)

But now i decided use to WF and WCF.but i dont know that where does call Wf my service classes or WCF.i dont know where do i put wc and wcf my project.

tobias
+1  A: 

Mostly I organize my projects as follows:

  • Solution.Core
  • Solution.Configuration
  • Solution.Services
  • Solution.Presentation
  • Solution.Web

More information about this kind of structure could be found at Arc wiki

All service interfaces and domain entities goes to Core project. Services project contains implementation of Application Services. Contollers and View Models are in Presentation project. If my controller needs a service I reference it's interface in Controller's constructor and wire it to real implementation via IoC/DI container.

Workflows won't contain only business logic, so I encapsulate business logic as small services/commands and call them from workflows. That leaves workflows to Services project.

WCF services implementations should be in Services project and interfaces in Core.

This way it should look like Controller > Service > Workflow > Uses other services to get a result.

For WCF services it's needed to configure endpoint and it should look Service > Workflow > Uses other services to get a result.

Marek Tihkan
yes actualy i want a core service as a class library project.all business,validation and workflow activities codes(not wf activies code) contain in this service.for example if i deciced a workflow engine an this case i have decided to the WF,My WF codes dont any business logic.it calls my core service library when it needs.in the future may be i decided to use other workflow framerowk and i change the WF Framework easly.
tobias
If you want to change WF framework later easily, then I recommend to wrap it or abstract it a bit. Basically you need a pipeline where you add commands, so maybe WF is not really needed.
Marek Tihkan
i found my answer following link.http://www.asp.net/learn/mvc-videos/video-428.aspx
tobias
Btw this StoreFront series is quite good and if you have time then watch them all.
Marek Tihkan
yes i like,i will try to watch them all.
tobias