interface

Good Product Management Software

Currently, we have information about our products in a variety of places. ERP, Various Databases, etc. Generally we're using SQL Server to store most of the database. We want to create a centralized place where we can store all the information related to our products and start replacing these disjoint databases (with the exception of t...

Specialize a template parameter to implement 2 interfaces in D?

interface I1 { ... } interface I2 { ... } struct List(T) { ... } How do I specialize my List to operate only on classes that implement both I1 and I2? One interface is easy: struct List(T : I1) Other languages. In C# it's: struct List<T> where T : I1, I2 And in Java I'd say: class List<T extends I1 & I2> One catch: I don't wan...

How/When to design an interface?

I'm trying to get in the habit of designing the interfaces to my websites at the very beginning before I do any actual coding. I've read "Getting Real" by 37 signals and they recommend doing the interface first, before any actual code is produced. What exactly is meant by that? Does that mean use pure HTML and CSS to design the site and...

Creating an interface in PHP, which can specify a type to determine which class to use

Hi all, I'm creating an interface for "PickupPoints", Each pickup point needs to be able to return all pickup points found and the pickup point details and maybe in the future more information. That's okay with the code below: <?php interface iPickupPoint { public function getPickupPoints($countryCode, $postalCode, $city); pub...

Interfaces in .Net

Hello everyone! I would like to use the same code for copying files to an FTP server, and through USB. I've already written some code, which as of now uses functions from the System.IO namespace. To minimize code duplication, I've listed the functions which I need from the system.IO namespace, and I was thinking of designing an interfa...

How to prevent an interface from getting extended

Hi, In Java, Is there a way to prevent extending an interface. Since final cannot be added to an interface , i was curious to know whether there was a way if any, to prevent extending an Interface. ...

How can you explain the difference between an interface and an abstract class to a non-programmer?

Possible Duplicate: When to use an interface instead of an abstract class and vice versa? Hi, I am teaching OOP concepts to non-programmers. I wanted to know how can you explain the difference between an interface and an abstract class. What I am actually looking for, is a real world example that can help highlight the differe...

When to use abstract classes and when to use interfaces in C#

Possible Duplicates: Abstract classes vs Interfaces Interface vs Base class Hi, In C# when should we use interfaces and when should we use abstract classes? Please explain with example ...

When is using the C# ref keyword ever a good idea?

The more I see ref used in production code, the more misuse I encounter and the more pain it causes me. I have come to hate this keyword, because from a framework-building standpoint, it seems silly. When would it be a good idea to communicate to users of your code the notion of maybe changing an object reference/value out from beneath t...

Isn't it easier to work with foo when it is represented by the class ArrayList rather than the interface List?

I see this syntax a lot and don't understand the reasoning behind it. I thought you generally want to work with classes rather than interfaces to make it easier to carry out the full panoply of operations you might want to perform. Why do this: List<Foo> foo = new ArrayList<Foo>(something.getFoo()); instead of this: ArrayList<Foo> f...

trying to call an interface function throughout an abstract heirarchy of an object instance

Hi, I have recently been implementing a templating system for my home-grown web-site generator platform. What I'm currently trying to implement is the use of an interface throughout the template class heirarchy like so (this is just an example): interface IStyleSheet { public function StyleSheetFragment(); } abstract class Templa...

highly customized UIs in Cocoa - Interface Builder or not?

Ive been working with some guys on a highly customized UI for a Cocoa app as well as a few for iPhones. Am I the only one who is starting to see interface builder as a cludge? Its good for standard components and simple apps.. but the moment you get more deep and complex and customized it becomes painful fast. Is it better to for in...

CORBA: Can a CORBA IDL type be an attribute of another?

Before I start using CORBA I want to know something. It would seem intuitive to me that you could use an IDL type as an attribute of another, which would then expose that attribute's methods to the client application (using ".") as well. But is this possible? For example (excuse my bad IDL): interface Car{ attribute BrakePeda...

When is an "interface" useful?

OOP interfaces. ...

How to use powershell to send SQL command to Access DB and return results?

What are the ways to pull info from an Access DB to powershell? ...

Creating a class implementing an interface dynamically

Hi, I'm trying to write a code that allows a user to load an assembly (DLL file), choose an interface in said assembly, than generates a class inheriting that interface, with stubs for all required methods. The class would be generated either into a file or into an active VS session (the code is intended for use inside an IWizard initi...

Usage of Interfaces

Just a clarification from an earlier question about OO PHP. I've checked on the php.net website but still not completely sure. Should be a quick answer, I expect. When 'defining' methods in an interface, must the class that implements it use all the listed methods from the interface? Example: interface foo { public function blah()...

Java reflection where a method parameter is an interface.

First off let me say I am maintaining someone else's poorly designed code so I am limited in how much I can change it. Now what is happening is that they have created a series of methods that are invoked by reflection. One of those methods takes a Map as one of its arguments. At runtime this Map is implemented with a Hashtable. Here'...

How to find a static String in a Interface

I have the folowing interface; public static interface Attributes { public final static String InterestDeterminationDate = "InterestDeterminationDate"; public final static String CreditType = "CreditType"; public final static String NumberInternal = "NumberInternal"; public final static String InterestRat...

C# Type Conversions for Generics Parameter

This is a rather elementary C# question; my apologies, but I haven't been able to find this elsewhere. What is the best way to convert from Object<class> to Object<interface>? I.e. //fake interface interface ignu {} //fake class which implements fake interface class bee : ignu {} //function which accepts a generic with the interface...