Questions tagged [interface]

Object interfaces allow you to create code which specifies which methods a class must implement, without having to define how these methods are handled.

Filter by
Sorted by
Tagged with
1
vote
1answer
54 views

Passing some redundant parameters to an interface vs creating a new request object every time for the interface

I am writing a proxy class, that will fetch a certain property (say propertyA) by calling an underlying service. Currently we use Service A to get propertyA, but there is a chance that in the near ...
1
vote
0answers
339 views

Base Class Interface for Parent/Child tree hierarchy

I have a class named Object, which is a common interface for all its derived class. The following rules apply to all Object instances. As zero or one parent. As zero or more child. Can not be the ...
1
vote
0answers
25 views

Factory module to convert DOM / ORM data structures

The following code is part of a real estate data processing API. It is being invoked by several modules of a software that translates real estate data in-between different formats (ORM models, DOMs, ...
1
vote
0answers
881 views

Interface for Dapper repository

I'm creating a little proposal for the data access layer using Dapper ORM. The code is based in an generic interface IStore: ...
1
vote
0answers
52 views

A generic interface for nearest-neighbor data structures

I have written the following interface to represent data structures such as VP trees that perform nearest-neighbor searches. ...
1
vote
0answers
73 views

Is this interface structure/setup correct?

I'm working on wrapping the last.fm web API. I'm trying to use Interfaces to be able to easily make calls via functions which return an interface (as opposed to an object which would need to be free'd)...
0
votes
4answers
99 views

iOS SDK object to represent a place

I am building an iOS SDK to be consumed by apps. I am building an object that represents a physical place. The interface looks like so: ...
0
votes
1answer
82 views

Different implementation of an Interface along with additional parameters

I am designing an interface for 2 distinct implementations as follows: Perform operations without client credentials ( for my local applications) Perform operations using security token. (for web ...
0
votes
2answers
4k views

Safe DbContext Disposal

I have a service class called ClientService, the service class is called using an interface IClientService. The service class ...
0
votes
1answer
46 views

proper structure of classes using interface classes [closed]

Given the following two interfaces what would the proper way to set up the two actual classes? ...
0
votes
2answers
80 views

Have a class that holds all the interfaces [closed]

I seriously didn't know how to write this in Google, there must be an answer lying around. Here it goes: I'm using Ninject (IoC) and ASP.NET MVC 5. I have a business layer with a couple of classes. ...
0
votes
2answers
195 views

Very complicated Java HelloWorld app

This program attempts to shows the basic concepts of inheritance and polymorphism. In what ways could the code be modified to better demonstrate those concepts? The interface, abstract class and the ...
0
votes
2answers
76 views

Would you utilise “Using” on a member which is going to be added to a list? [closed]

I have an interface and a concrete class which I am using in the code below: ...
0
votes
1answer
78 views

Functional List in C++ [closed]

This is rather toy example of immutable datatype in C++. I've tried to follow functional languages like Scheme, Racket - making list as a cons cell: list is list or is empty. ...
0
votes
1answer
59 views

Using a wrapper on a primitive as a generic for an interface used for Java lambda

I apologize for that title, lol. I have a Java method that I'm writing where I want to be able to pass in an array of Objects and two interfaces that will be used for lambda expressions that specify ...
0
votes
1answer
27 views

interface design for allowing custom parameter struct, falling back on defaults

Right now I have an awkward setup, but don't really know what the cleaner solution would look like. The parameter struct is defining the action keys for a simple fly camera. Right now it looks like ...
0
votes
2answers
106 views

Is this code a good solution for this task?

...
0
votes
1answer
1k views

ViewModel class in Typescript

I am trying to refactor a ViewModel class because it has two methods that are really similar called updateRegions and ...
0
votes
1answer
72 views

Wrapping packet information [closed]

I am developing a network application and therefor need to specify the packets I want to send. I have a basic interfaces class and one for the packets that implement them. ...
0
votes
1answer
2k views

Polymorphic template cloning class

I have a requirement of a templated clone() method which Base classes can implement through an ICloneable interface and all the ...
0
votes
3answers
81 views

“Human” interfaces with two implementation classes

The Helloworld class executes all of the methods. Human is the interface, and Nate & <...
-1
votes
1answer
49 views

An interface for designing Arduino code [closed]

Writing code could be divided into three parts. 1.Interface structure At this stage programmer should describe all the devices used in his project. Of course, only those of them which Arduino ...
-2
votes
1answer
221 views

Parsing various types of message strings

Similar question MessageFormat: represents the various kinds of messages. (XML, JSON, ...