Questions about interface related design considerations, such as programming to the interface.

learn more… | top users | synonyms (1)

0
votes
2answers
241 views

Using interfaces as part of encapsulation

I'm creating interfaces for a number of our existing classes for mocking reasons. Many of these classes also have package scope methods as an attempt to give some level of encapsulation by ensuring ...
4
votes
1answer
110 views

Should an interface covariant on T ever implement an interface invariant on it?

I was reading through the Hacklang docs on Collections, and came across this curious definition [paraphrased slightly]: interface KeyedIterable<Tk, Tv> ... interface ConstVector<+Tv> ...
1
vote
1answer
386 views

JEE MVC, controller calls the interface instead of the interface implementation

I'm following this tutorial: http://wiki4.caucho.com/Building_a_simple_listing_in_JSP It creates a basic web application in Eclipse using the MVC pattern with Resin as the web container. Here's the ...
0
votes
1answer
374 views

Android, using a Fragment to hold/edit complex object, accesible from any Activity

I'll do my best to describe the problem, but I'm still very new to several concepts that I think this problem requires to be solved (namely interfaces and threads). I should preface this by saying ...
2
votes
0answers
103 views

What are the benefits of an input/output component design?

For the company I work at, all of our projects, including a new one started last year, are written in C89. We write for vxWorks (a real time embedded operation system). Our software runs multi-...
2
votes
0answers
214 views

The inheritance argument of zope.interface (providedby vs isinstance)

What limitations does inheritance of an interface through an abstract base class present that are addressed by zope.interface? In the following talk given in 2010 by Jeff Rush about interfaces, at 11:...
1
vote
0answers
40 views

Should I use RFC 2119 in interface documentation?

RFC 2119 defines several terms, including MUST, SHOULD, and MAY, for use in standards documents, particularly those relating to networking protocols such as IP and HTTP. These terms are widely used ...
1
vote
0answers
251 views

Class Interfaces with Multiple Classes and Dependency Injection

NOTE ON QUESTION TITLE: I did not really even know how to phrase the title so if someone can edit and make it more articulate I would really appreciate it. QUESTION: Basically, what I'm trying to do ...
1
vote
0answers
47 views

Adding new Interface & Replacing Method with Interface Type

Let's say that I have 2 classes: Foo and Bar. `Foo` { List<Bar> bars String bippy() int boop() } `Bar` { int biz() String baz() } Observe that Foo's fields include a List<Bar>. ...
1
vote
0answers
259 views

How far to go when future proofing fluent-method-chained-DSL test code?

Is it worth implementing interfaces, or using the getThis() trick, or even static factory methods to future proof against the need to extend this DSL? The current design is a pair of thin fluent-...
1
vote
0answers
178 views

Pattern or solution for using classes with different interface the same way

What I would like to achieve is to use classes (now two, later more) with different interface the same way, so I would like avoid using decisions based on the interface on upper levels for instance, I ...
0
votes
0answers
73 views

Can I keep my code loosely coupled with public-facing enums?

I have some enums in a concrete API/library that will be publicly used by application projects. My problem here, is that I cannot write an interface to these enums (that I know of). I should have ...
0
votes
0answers
23 views

Making my dependencies available in my public interfaces

I've made a bute Visual Studio extension. It works, and now I want to make it extensible and add unit tests. I notice straight off that I'm passing around within my methods, and making available in my ...
0
votes
0answers
37 views

Usage of “Passive View” for winforms application

I'm currently working on a winforms project which will have a rather complex structure with about 300/400 controls which I will have to access during the program is running. I am contemplating the ...
0
votes
0answers
56 views

Software Architecture: CQRS and port modeling

I have a PersonComponent, which an internal implementation is based on CQRS pattern. So which one is better way to model ports (and their interfaces): I'm not totally sure that how high or low -...
0
votes
0answers
26 views

Text based command/interface design

When using inter-process communication (pipes, memory streams, ...), I typically have a byte stream to communicate, also with http (unless using some heavy-weight web framework), the body comes as a ...
0
votes
0answers
37 views

Restructuring similar interfaces to one unified design

In my project, I have several types of Web API controllers (and their corresponding services and repositories). When I started out, I made an interface of a generic type that would describe the basic ...
0
votes
0answers
53 views

What should I do with too much interfaces needed for a dialog

Let me start by doing a small summary of the changes we did in our code in the last year. We have a software (VERY big) that is used to visualize multiples underground networks, enter data in the ...