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

Comment by Filip Milovanović on Clean Architecture Chapter 8 - Financial Data...

Don't focus as much on the specific classes in this diagram - this is how CA might look like when implemented, but in principle, the classes and the details of the design here could be completely...

View Article


Comment by Filip Milovanović on Terminology for object...

Might be C++ specific terminology. There is a dynamic dispatch approach where the polymorphic method is chosen based on the types of two objects - this is called double dispatch, and is sometimes...

View Article


Comment by Filip Milovanović on Clean Architecture - Chapter 23: Presenters...

@Tozine - "like "Screen About Presenter," which would load the necessary information for the view" - I'm not sure I understand what you mean by that, could you elaborate a bit further? Do you mean...

View Article

Comment by Filip Milovanović on Can an aggregate just depend on the ID of...

Not everything needs to be an Entity. You also have value objects and services, and you can potentially introduce additional concepts. To me, this looks conceptually like a value object (e.g. if you...

View Article

Comment by Filip Milovanović on Aligning domain model to data model. Is my...

If you're never really going to need the metadata in isolation, treat the Order as an aggregate, and just have a save_order method on your repo that accepts a (domain layer) Order instance (which...

View Article


Comment by Filip Milovanović on How to know the expected result in Test...

This goes better with a different way of testing - where you're not testing for specific outputs, but for things you want to be true of any implementation. E.g. suppose Scramble(string) function should...

View Article

Comment by Filip Milovanović on How to translate points on a path relative to...

Just to add, in case the OP wants to search for further info: This "using a 3D matrix to allow for 2D translations" thing is referred to as affine transformations (or affine matrices), with the...

View Article

Comment by Filip Milovanović on How to translate points on a path relative to...

Is it OK if the curve moves as a sort of a rigid body attached to the line, or are there constraints that would prevent that? E.g., if you rotate the control line 180 degrees, do the endpoints of the...

View Article


Comment by Filip Milovanović on How to translate points on a path relative to...

One thing that was unclear to me was if this should be a simple rigid rotation, or something like what you have in 3D graphics where you have a "bone" inside a mesh (like, for an arm), with vertices of...

View Article


Comment by Filip Milovanović on C# var vs. interface vs. concrete class in...

Note that the first and the last approach (everything stated explicitly) were the only ones available in early versions of C#, so part of it is tradition / old habits. Type inference (var) and the...

View Article

Comment by Filip Milovanović on Interface with member interface?

"Java, an interface cannot have any member" this is a quirk of Java, but even there, methods (including getters) can have a return type that is an interface, and in Java, you can have abstract classes...

View Article

Comment by Filip Milovanović on Is the SRP of SOLID (or any) principle...

Is there a way to come up with an abstract representation of the data that does not depend on the details of how the packages work or the nature of what they produce. E.g., is there a generic way to...

View Article

Comment by Filip Milovanović on Is the SRP of SOLID (or any) principle...

Luckily for us, the Internet Archive has the Wayback Machine: article. BTW, there's also something called the Common Closure Principle, which is essentially SRP at the component level (not sure if we...

View Article


Comment by Filip Milovanović on How to handle authorization in CQRS

"Because of the anemic nature of query models, I find it hard to solve problems" - Why do you feel that way, could you elaborate? In Vernon's example you linked to, the domain model is just as anemic....

View Article

Comment by Filip Milovanović on What would be an example of the Liskov...

@ScottyJamison - Yes, it's very much about the subtype relationship - the whole point of the Liskov & Wing paper ("A behavioral notion of subtyping") that introduced the notion was to lay out the...

View Article


Comment by Filip Milovanović on Avoiding instanceofs with GUI composites

What you want is some sort of Chain of Responsibility-style mechanism - receive focus request, handle it by passing the request onto the first child, if any; if the child indicates the request is not...

View Article

Comment by Filip Milovanović on why would one use the "Functional Options"...

This does indeed look like a functional programming version of Joshua Bloch's builder pattern. One of the motivations there was the lack of named parameters in Java. Another one is to avoid telescoping...

View Article


Comment by Filip Milovanović on Documenting properties

You document the getter and the setter for the clients of your class. You document the private field for the maintainers of the class who care about the internals. One option is not to use javadoc for...

View Article

Comment by Filip Milovanović on Repository interfaces returning DTO in clean...

"This means that repository interfaces for query handlers cannot be in the Domain layer" - no, I would rather say this means that DTO-returning services aren't repositories as DDD envisioned them. A...

View Article

Comment by Filip Milovanović on Repository interfaces returning DTO in clean...

@MrChudz - if I understood you correctly, your comment suggests that your domain objects closely mirror the database tables, while your DTOs are more in line with the use cases of your application...

View Article
Browsing all 164 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>