ssteenkiste / nettiers

Automatically exported from code.google.com/p/nettiers
1 stars 0 forks source link

More interface implementation (swin) - PATCH #21

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Hi, we are building our SCSF/CAB Framework and will use .NetTiers as our
datalayer!

For testing the ‘presenter’ we need more interface implementation. With
interfaces we can mock the behavior of the datalayer so that we can
dedicate our tests to the ‘presenter’ only.

We would like to change the service layer:

public partial class OrdersService :
Northwind.DataLayer.Services.OrdersServiceBase

TO
public partial class OrdersService :
Northwind.DataLayer.Services.OrdersServiceBase, IOrderService

AND

public override Orders Save(Orders entity)

TO
public override Orders Save(IOrders entity)

... Update, Delete, Insert , ... 

If we do that, we are sure that the IOrders interface needs more methodes
than the current version.  Did anybody already worked on this?Some
comments? We would like to integrate this changes (if possible) in the
templates so that we still can take advantage of new .NetTiers versions,
patches.

Patch can be found at the following forum thread
(http://community.codesmithtools.com/forums/t/8280.aspx)

What version of .netTiers and CodeSmith are you using?
2.2

Please use labels and text to provide additional information.

Original issue reported on code.google.com by bniemyjski on 23 May 2008 at 12:54

GoogleCodeExporter commented 9 years ago

Original comment by bniemyjski on 27 May 2008 at 4:34

GoogleCodeExporter commented 9 years ago
I come back with a first step in the direction discussed here:
- adding interfaces in Service layer for all the public methods of the classes 
generated there.

The main idea was to modify the template which is used to generate the classes 
of 
Service layer, by adding a new option for generation: "RenderInterface"
(defined in the file Components\ComponentDataAccess.cst).
This variable is used to generate wether the classes of Service layer (in one 
generation step), wether the interfaces implemented by those classes (in 
another 
generation step).

I submit a patch from the latest release 738 of today.
Please find attached the patch file, check it and, if OK, integrate it in the 
tool.

Original comment by stan.dan...@gmail.com on 6 Jun 2008 at 10:36

Attachments:

GoogleCodeExporter commented 9 years ago
I would like to implement this patch in the new .netTiers 2.3.0.73x beta. What 
are
the next steps that are required for this complete implementation (as this is 
only
step one)?

Original comment by polarbea...@gmail.com on 5 Sep 2008 at 7:02

GoogleCodeExporter commented 9 years ago
Hey Stan,

Do you have a patch for all the "steps", if so please attach the patch and I'll
commit it into core :).

-Blake

Original comment by bniemyjski on 8 Dec 2008 at 6:07

GoogleCodeExporter commented 9 years ago

Original comment by bniemyjski on 25 May 2009 at 3:26

GoogleCodeExporter commented 9 years ago

Original comment by bniemyjski on 25 May 2009 at 3:30