Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hi! I´m working on a 3-layer architecture. And i'm using interfaces for all my classes in the Business Layer. I have a shared library for these interfaces. That was the way I found to make the Data Access Layer handle the Business Layer objects.

So I have lots of properties, method calls, casting, parameter passing...and many of them through interfaces.

I´d like to know whats the performance impact of this approach.

 

Thanks.

Posted
I doubt there is much overhead in using interfaces. All an interface really does for you, as a developer, is forces you to agree to a "contract" of sorts. It's analogous to a boyscout badge that says "I am an Eagle Scout". By using the interface you are forced to implement certain functions.
Posted (edited)
I doubt there is much overhead in using interfaces. All an interface really does for you' date=' as a developer, is forces you to agree to a "contract" of sorts. It's analogous to a boyscout badge that says "I am an Eagle Scout". By using the interface you are forced to implement certain functions.[/quote']

 

 

When I have this method

public bool Insert(IClient c)
{
  //code to insert the cliente
}

 

And then I pass a Client object that implements ICliente to this method, I guess theres casting at some point.

Thats what im worried about.

Edited by Cassio
Posted
What you should take away from that article is that if your function has some meat to it then there's no real hit in performance. It's only when using small funcions that can be inlined will you see a real difference.
"Who is John Galt?"

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...