Difference between revisions of "Working with the Domain Driven Architecture"

From Opentaps Wiki
Jump to navigationJump to search
m (Protected "Working with the Domain Driven Architecture": Sysop page [edit=sysop:move=sysop])
(Instantiating Services and Repositories)
Line 4: Line 4:
  
 
If you have a domain, the easiest way to instantiate a Service or Repository from your domain is to use the <tt>instantiateService</tt> or <tt>instantiateRepository</tt> methods, like this:
 
If you have a domain, the easiest way to instantiate a Service or Repository from your domain is to use the <tt>instantiateService</tt> or <tt>instantiateRepository</tt> methods, like this:
 
+
<pre>
 +
    public OrderInventoryService getOrderInventoryService() throws ServiceException {
 +
        return instantiateService(OrderInventoryService.class);
 +
    }
 +
</pre>
  
 
This will automatically set up the Infrastructure and User for your Service or Repository.
 
This will automatically set up the Infrastructure and User for your Service or Repository.

Revision as of 00:48, 5 December 2008

Here are some tips for working with the Domain Driven Architecture:

Instantiating Services and Repositories

If you have a domain, the easiest way to instantiate a Service or Repository from your domain is to use the instantiateService or instantiateRepository methods, like this:

    public OrderInventoryService getOrderInventoryService() throws ServiceException {
        return instantiateService(OrderInventoryService.class);
    }

This will automatically set up the Infrastructure and User for your Service or Repository.