Why encapsulation is an important feature of OOP languages? [closed]

Encapsulation helps in isolating implementation details from the behavior exposed to clients of a class (other classes/functions that are using this class), and gives you more control over coupling in your code. Consider this example, similar to the one in Robert Martin’s book Clean Code: public class Car { //… public float GetFuelPercentage() { /* … Read more

the significance of java RMI please? [closed]

You really should not be using RMI for any application you build today, basically for the reasons you just laid out. In some cases (diving into legacy or “enterprise” applications) you just have no choice. However, if you are starting a new project, other options are: REST + JSON over HTTP The de-facto standard for … Read more

What is the core difference of redux & reflux in using react based application?

Flux, Reflux and Redux (and many other similar libraries) are all different ways to handle transversal data management. Basic React components work fine with parent-children relationships, but when you have to provide and update data from different parts of the app which are not directly connected it can become quickly messy. Those libraries provide stores … Read more

Questions about VIPER – Clean Architecture

1. May the Presenter query information from the view To answer this to your satisfaction, we need more details about the particular case. Why can’t the view provide more context information directly upon callback? I suggest you pass the Presenter a Command object so the Presenter doesn’t have to know what to do in which … Read more

Decompose microservices: Business capability vs Domain

The commenters are right – there are some subjective definitions at play here. But there are some principles and concepts that can help reason about the different approaches. Conway’s Law It’s not strictly the original definition, but I think the distinction can be better understood with reference to Conway’s Law: Any organization that designs a … Read more

Onion architecture compared to hexagonal

What are the differences between them if any? Onion: There are layers, with the dependencies always pointing inwards, i.e., a layer can use any of the layers inside it. The inner layer is Domain Model and the outer is infrastructure, but the number of layers between may vary. Hexagonal (it’s an alternative name for the … Read more