Cassio Posted April 1, 2005 Posted April 1, 2005 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. Quote Stream of Consciousness (My blog)
Mister E Posted April 1, 2005 Posted April 1, 2005 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. Quote
Cassio Posted April 1, 2005 Author Posted April 1, 2005 (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 April 1, 2005 by Cassio Quote Stream of Consciousness (My blog)
Administrators PlausiblyDamp Posted April 2, 2005 Administrators Posted April 2, 2005 https://www.mainfunction.com/DotNetInAction/HowTo/display.aspx?ID=30 is an article by Eric Gunnerson that discusses performance of calling code dynamically, also he has a blog entry that you might find useful as well. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
IngisKahn Posted April 3, 2005 Posted April 3, 2005 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. Quote "Who is John Galt?"
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.