Relative Content

Tag Archive for interfaces

Use of keyword “Using” in C# interface

When I’m using C# to write some code and I define an interface using Visual Studio 2010, it always includes a number of “using” statements (as shown in the example)

Developing JSON API for a Carpool Engine

I am developing a new set of API methods for carpooling/cab booking, so if a developer needs to develop an app or webportal for carpooling, he can call my JSON API. Basically making it easy for developers.

Can interface be not abstract?

Friend of mine said that not every interface is abstract. I haven’t chance to discuss that with him but it get me thinking of not abstract interface in any type of language.

What are the differences between abstract classes, interfaces, and when to use them

Recently I have started to wrap my head around OOP, and I am now to the point where the more I read about the differences between abstract classes and interfaces the more confused I become. So far, neither can be instantiated. Interfaces are more or less structural blueprints that determine the skeleton and abstracts are different by being able to partially implement code.

Use of interfaces to ease rapid development/prototypes

Recently I’ve started to put almost all of my data structures into interfaces, and many of the classes that contain pieces of logic code as well, depending on how much work they are. I find that this makes development of applications much easier because I can easily swap out parts of my code when they do not work as well as intended without changing the rest of the application and swap them back in when I have corrected them, or if I need something simpler for the time being.
I was wondering if I’m developing a bad habit here.

Interface extension

Suppose that I have an input stream interface, which defines a method for reading data. I also have a seekable interface which defines a method for seeking. A natural way of defining a input file is then to implement both input stream and seekable.