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.

5
votes
0answers
297 views

A* Algorithm in F#

Inspired by this post I looked up A* on wikipedia and went on with my own implementation as seen below where I try to mimic the pseudocode on Wikipedia but in a recursive manner. I would like any ...
4
votes
0answers
474 views

Implement OO interfaces in Python

Edit: Whoops! I just remembered there's already an long-lived package for this, zope.interface. I'd like a review all the same. This is a proof-of-concept ...
3
votes
0answers
51 views

Extensible Python Interfaces

Some background before the actual code: My team needs to develop an optimization library for a specific problem. In order to optimize (pun intended) the projects life-cycle I am trying to write some ...
2
votes
0answers
697 views

Processor for handling generic commands

I'm trying to implement business logic layer based on concepts of commands and command handlers. A command is a thing that contains input parameters for executing some action, and it knows what kind ...
2
votes
0answers
61 views

Expression validator service

I'm working on a project (in C++98) that uses a grammar validation service to validate mapping expressions for a small DSL. To simplify the project code, I've written a small interface for using the ...
2
votes
0answers
126 views

Safest Connection pool in Java

I have read the code reviews on this website: this one and this one So creating the pool in itself might not be that difficult, I'm more worried about the client closing the connection or the ...
2
votes
0answers
114 views

Interface modelling for a journaling program in Java

My program's Journal consists of unique Pages identified by their Day. Within those pages ...
2
votes
0answers
85 views

NodeJS, status propagation to interface

If you have an interface served by a NodeJS API, what is the most clean way to propagate status changes to the interface? For example, I have a page that has 2 statuses, user logged in and guest. How ...
1
vote
0answers
45 views

Simple Serial Port Windows Interface

I implemented a very simple blocking uart interface. Most of the serial instruments I interface with are master/slave and I have to wait on data to proceed forward. I am contemplating add some ...
1
vote
0answers
295 views

MongoDB database abstraction

Backstory The company I work, we have the code below that acts as an abstraction of our database layer, which is mongoDB. This ensures our other code is not too dependent on the database. This is ...
1
vote
0answers
310 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
24 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
834 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
51 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)...