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
3
votes
1answer
71 views

Potentially superfluous iOS interface system

I have written an interface system for iOS that allows interface elements to be moved around on the screen as actors move around on stage. It can operate within a ...
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)...
4
votes
2answers
396 views

User Authentication Bundle

I wrote a user authentication program(s) for an MVC application. Before you ask part of the project specs are I have to store user information in company databases on servers that aren't the web ...
3
votes
1answer
120 views

Loose coupling, accessing class properties

I'm trying to get a better understanding of decoupling methods. Right now, I have this method: ...
3
votes
1answer
336 views

Cleaning User Input

I am not sure if I am approaching this task the correct way. I have a view model with multiple string properties. I pass the model through an interface to a service class that contains a void to ...
5
votes
1answer
782 views

Interface for a tree node in Qt

I have the following C++ interface (in Qt) for a tree node, inspired somewhat by Valve's implementation of a culling octree: ...
10
votes
2answers
329 views

Functional interface hierarchy in Java 8

I just created the following code and am wondering whether it is logically correct (all other feedback is of course also welcome): ...
11
votes
1answer
186 views

DataLayer Interfaces Genericized

I have some concerns on my refactoring for the data layer in my current Project. Just for a small info, I am currently building a CRM as "training JEE application". But enough of talk, let's talk code!...
5
votes
1answer
255 views

Binary relation interface

I'm trying to design a binary relation interface in Java and then implement it, but I'm not sure if I'm doing it right. I'd really appreciate a little feedback just so I know if I'm way in the wrong ...
4
votes
3answers
1k views
6
votes
1answer
2k views

How do I extract interfaces from existing similar classes?

I have about 11 singleton-esque classes divided over a dozen files: the first file is one that gathers all singleton definitions and makes them callable on a request scope: ...
5
votes
2answers
3k views

Generic Task Blocking Queue

A generic blocking queue has the following properties: It is thread-safe. It allows queuing and de-queuing of items of a certain type (T). If a de-queue operation is performed and the ...
2
votes
1answer
96 views

Backend interface VS hard contract

Here is an API for using a warehouse: ...
5
votes
1answer
723 views

Python model for a “snake”-like game

I wrote a python model for the game "snake" that I'm not really satisfied with. My intention was to separate the game logic from the drawing and input handling (which worked quite well) but I've got ...
3
votes
1answer
2k views

How to deal with interface inheritance and common properties? [closed]

I'm trying to design a generic caching system that takes keyed items and allows either read-only or read-write access to a cached version of it. The read-only backing interface is: ...
1
vote
1answer
2k views

Can someone review my doubly linked list?

Here is the implementation with the interface below: ...
2
votes
1answer
768 views

Empty abstract class enforce structure

I've been looking into empty abstract classes and from what I have read, they are generally bad practice. I intend to use them as the foundation for a small search application that I am writing. I ...
3
votes
2answers
6k views

Interface programming with Data Access Layer

I have several controls that are bound from database tables. Putting my OOP thinking cap on I figured since all of the controls will have a SqlCommand name and an ...
1
vote
1answer
216 views

Proper implementation of generic repository

What can be done better in this code? I am sure it's not missing much. You can copy and paste the whole thing in LinqPad; it's all there. ...
1
vote
1answer
6k views

Defining a Constructor In an Interface Java? [closed]

I have multiple different implementations of an object, which implement this custom interface I made called Board. ...
3
votes
2answers
5k views

Singleton interface in Java

I've created a singleton by means of an interface. I don't want to make a thing with getInstance() etc because I don't care about inheritance, and it's redundant ...
3
votes
3answers
152 views

Test Driving Interface Design [closed]

I have been doing TDD since I have started my first job out of university (about 5 months ago), most of which is working with legacy code. I started a personal project today and thought I would TDD it....