New answers tagged

2

Ultimately, it depends on your requirements, specificially how often and for what reasons do you expect the application to lose the ability to reconnect? is it reasonable to assume a reconnect will be possible some minutes later? how much data can get lost in case there is unsaved data, and how important could that data be? Depending on the answers to ...


0

Three out of two of your classes don't have behavior. In an object-oriented setting this is not ok. Objects without behavior are just data records, which are unwelcome in OO. Regarding boundaries, those are for external systems (mostly), there is usually no reason to introduce them inside an application. I.e. if you want to present your object on the ui, ...


1

That comment was made by me as an offhand remark; it was probably too handwavy, so I better elaborate on it a bit. The problem is that both use the same terms and similar high-level concepts, but there are certain non-trivial differences. From a historical perspective, (classic) MVC came about in a language called Smalltalk, in the late 70's and the 80's. ...


2

You are trying to use the entity-control-boundary analysis to design an MVC architecture. Indeed, all the classes in your diagram belong to the „logical domain“, so are entities in the ECB logic, and model in the MVC. The boundary classes would be the GUI classes that interact with the user. They are indeed missing in the original diagram. But be ...


2

MVC is a pattern, a model, a principle, a way of thinking. Assigning roles and responsibilities. If you need to test an implementation x to see if it is MVC, you need to prepare a series of questions to test against. Do we have a separation of data, presentation and control flow? That's it. The pattern does not concern itself with details of it's ...


0

I think the question is a little too broad. The code samples tend to be somewhat brief and simplistic and usually do not represent real world applications. Often layers are omitted because they do not add value. For example, the code you quote pulls data from the database in the controller and that's ok - you could add a data layer, but it would not add any ...


3

I’ve been trying to get a firm understanding of the MVC design pattern Model View Controller is an impossibly simple pattern. As long as you have something that focuses on the model, the view, and the control then poof you're using MVC. The pattern is so old that no one agrees how those things communicate or how they should be separated. Anything beyond the ...


Top 50 recent answers are included