Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why Use Interfaces
Message
General information
Forum:
ASP.NET
Category:
Class design
Miscellaneous
Thread ID:
01278205
Message ID:
01278224
Views:
25
So, to play devil's advocate, why would I not just write a class to access the public
members of the server side component? In other words, why not just write a class
with...


There are several reasons...

The use of an interface means that, in your client-side project, you don't need to add a reference to a server-side class that's residing on a completely different domain (which could change over time).

I'm guessing you 'could', but I'm pretty certain that kind of model would wind up being more complicated.

The user of an interface means you can work with the concept of the class in a strongly-typed manner, in disconnected mode, and not have to worry about connecting to it until runtime.

Kevin
Previous
Reply
Map
View

Click here to load this message in the networking platform