Quantcast
Channel: User Filip Milovanović - Software Engineering Stack Exchange
Browsing all 164 articles
Browse latest View live

Answer by Filip Milovanović for Why just "interface segregation principle"...

These principles are largely language agnostic, so, the word "interface" doesn't mean a Java interface type (although, that's often what it will end up being in Java). The term is used in its more...

View Article


Comment by Filip Milovanović on Why does the HTTP protcol support multiple...

Hopefully, that answers the "why" behind it. That said, could it be done in some other way - yeah, probably, but you'd still have to provide facilities to satisfy those design considerations, it would...

View Article


Comment by Filip Milovanović on Will I lose confidence of my code working in...

"The problem is that in order to test it correctly I have to know the underlying mechanism" - no, the problem is that the Thing class, as you presented it, does nothing in itself (has no behavior of...

View Article

Answer by Filip Milovanović for Will I lose confidence of my code working in...

Now that I've read your question a bit more thoroughly, I think the problem lies in you being unclear about what the public API of the IMagic type is, and how the return value figures in it. (It is not...

View Article

Answer by Filip Milovanović for What's the difference between Observer...

This is the Observer pattern - it's the exact same thing.I have used some kind of "listeners" where I have an interface implemented by classes that need to be notified of some event (e.g.:...

View Article


Comment by Filip Milovanović on Broadly accepted term for a "thick wrapper"?

"A wrapper is often explained as modification of an interface to another function with very little added functionality" - in OO terms, this is what's called an Adapter; there are other kinds of...

View Article

Comment by Filip Milovanović on Why are programming instructions 'verb-initial'?

"Putting the command at the end like this also clearly indicates to the computer where the instruction ends" - making it easy to the computer is not necessarily the only (or primary) concern

View Article

Answer by Filip Milovanović for What is the right understanding for cohesion...

Firstly, am I wrong in assuming that just asking about cohesion and coupling with regards to this code is enough to motivate this refactoring, or should I be using other principles, asking other...

View Article


Comment by Filip Milovanović on How do unit tests facilitate refactoring...

"Unit tests are inherently tied to the way code is implemented." - no, but that's the crux of the issue: how most people write tests makes them tied to the implementation. Suppose you're testing a...

View Article


Comment by Filip Milovanović on Are there any true differences between XAML...

XML was all the rage back when they developed WPF (a desktop application framework), and my guess is that they wanted to base their UI markup language on XML and utilize existing XML-parsing and schema...

View Article

Comment by Filip Milovanović on How do we call the approach to unit test...

I'm not sure that there is a specific name for this.

View Article

Comment by Filip Milovanović on How do we call the approach to unit test...

I won't downvote, but this is not the PageObject pattern (which is a similar idea, but it's at a slightly lower lever compared to what the OP is asking about, and the motivation is different). Also,...

View Article

Comment by Filip Milovanović on How do we call the approach to unit test...

"This is where you apply similar techniques to your test data" - I just wanted to add (or clarify), it's not necessarily plain data classes (though that's probably very common), Object Mother could...

View Article


Comment by Filip Milovanović on How to manage long dependency injection list...

This question is very unclear - it would help if you provided some more context. From what I was able to gather, you're saying that the input data (the example you provided) is created by users through...

View Article

Comment by Filip Milovanović on Is it a good idea to return a Builder from a...

A builder is already a kind of a factory (a factory doesn't have to be a static class). So, I wouldn't go through a static function, unless your team absolutely insists on that for consistency with...

View Article


Comment by Filip Milovanović on How do you cache complicated data?

I feel the problem here revolves around caching the resulting transformations, with respect to inputs; for this, you'd probably want your transformation functions to be pure (guaranteed to return the...

View Article

Comment by Filip Milovanović on Clean architecture and components

Martin's view on how you deploy the application (single executable, bunch of local components, distributed components/services) is that this is, in a way, an orthogonal concern with respect to...

View Article


Comment by Filip Milovanović on DDD - Managing Relationships between Domain...

"there is a relationship between entities across aggregates, which should not happen" - that's not quite right. What DDD enforces is going through the aggregate root; it says that you shouldn't be able...

View Article

Comment by Filip Milovanović on In "I don’t want my users knowing that I’m...

Don't extrapolate too much from the tone. The author is just talking about what role he wants the class/interface to play in the design, and what information he wants to communicate, vs what he...

View Article

Comment by Filip Milovanović on Does the signature of a method create a...

I think the author made a poor choice of words. The signature of a method is to a method as an interface is to a class, so client code (callers) and the method's implementation are both dependent on...

View Article
Browsing all 164 articles
Browse latest View live