software-design

Onion architecture compared to hexagonal

独自空忆成欢 提交于 2019-12-04 10:12:43
问题 Is there any difference between them (onion | hexagonal), from my understanding they are just the same, they focus upon the domain which is at the core of the application and should be technology / framework agnostic. What are the differences between them if any ? Also I see no real advantage on using one over the other or even against an N-layered architecture, if done bad just following any of them won't make any difference What are the benefits of using one over the other and why you would

What are the DAO, DTO and Service layers in Spring Framework?

泪湿孤枕 提交于 2019-12-04 07:28:53
问题 I am writing RESTful services using spring and hibernate. I read many resource in internet, but they did not clarify my doubts. Please explain me in details what are DAO , DTO and Service layers in spring framework? And why usage of these layers is required in spring to develop RESTfull API services. 回答1: First off, these concepts are Platform Agnostic and are not exclusive to Spring Framework or any other framework, for that matter. Data Transfer Object DTO is an object that carries data

How to apply composition in android MVP?

荒凉一梦 提交于 2019-12-04 03:04:58
Recently I took over an android project which is built on top of MVP. While simple screens are quite straight forward and easy to read and maintain, the more complex parts of the app are not. Multiple inheritance levels have caused me days of switching between classes, trying to find out how the information flow is actually working. Here one example of the more problematic hierarchies: Since we use MVP, naturally there is another presenter class and another view class for each of the classes in the diagram. So I did some research and found this article: Composition vs Inheritance in MVP and it

Clean Architecture - should the controller talk to the presenter?

為{幸葍}努か 提交于 2019-12-03 17:07:08
In the Clean Architecture by Robert Martin, let's say I have this simplified version (not showing other stuff like Model, Gateway, Boundaries): Now let's say I have a View with 2 buttons, Dark and Light , that when clicked should change the background color of the View and show some text on the screen (the text's color should always be blue). So I though of something like this: Assuming here that I have to use one method in the controller for both buttons (maybe because it was a form or whatever), the button variable in buttonClicked(button) will contain the information on whether the Dark or

Fundamental software design concepts / principles books [closed]

半世苍凉 提交于 2019-12-03 15:01:17
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 8 years ago . I need to introduce basic design principles in my team. I am looking for books which are not restricted to only object oriented design

CoreBluetooth: How to design code for many characteristics (30 - 40)?

徘徊边缘 提交于 2019-12-03 12:08:25
I searched around a bit and just found this as a possible duplicate question: Multiple CBPeripheral's for same device My problem is: I have multiple services which all together have about 30-40 characteristics (Yes, I need all of them...). As starting point for dealing with CoreBluetooth I always used the Apple Sample Code ( CoreBluetooth Temperature Sensor ). Discovery and Service/Characteristic handling is divided into two classes and this works fine for just a few characteristics. But handling this huge amount of characteristics in one class is not what I understand under "good software

Why doesn't JavaScript get its own thread in common browsers?

不想你离开。 提交于 2019-12-03 10:28:29
Not enough that JavaScript isn't multithreaded, apparently JavaScript doesn't even get its own but shares a thread with a load of other stuff. Even in most modern browsers JavaScript is typically in the same queue as painting, updating styles, and handling user actions. Why is that? From my experience an immensely improved user experience could be gained if JavaScript ran on its own thread, alone by JS not blocking UI rendering or the liberation of intricate or limited message queue optimization boilerplate (yes, also you, webworkers!) which the developer has to write themselves to keep the UI

What's the best way to resolve a combinatorial explosion of interactions?

守給你的承諾、 提交于 2019-12-03 06:14:32
One of the things I'm working on right now has some similarities to a game. For purposes of illustration, I'm going to explain my problem using an example drawn from a fictitious, hypothetical game. Let's call it DeathBlaster 4: The Deathening . In DB4, you have a number of Ship objects which periodically and randomly encounter Phenomena as they travel. A given Phenomenon may have zero, one, or more Effects on a Ship that encounters it. For example, we might have four kinds of Ships and three kinds of Phenomena . Phenomena ========================================== Ships GravityWell BlackHole

Onion architecture compared to hexagonal

人走茶凉 提交于 2019-12-03 05:31:56
Is there any difference between them (onion | hexagonal), from my understanding they are just the same, they focus upon the domain which is at the core of the application and should be technology / framework agnostic. What are the differences between them if any ? Also I see no real advantage on using one over the other or even against an N-layered architecture, if done bad just following any of them won't make any difference What are the benefits of using one over the other and why you would use it ? when to use it? Thanks choquero70 What are the differences between them if any? Onion: There

Fundamental software design concepts / principles books [closed]

偶尔善良 提交于 2019-12-03 03:52:47
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. I need to introduce basic design principles in my team. I am looking for books which are not restricted to only object oriented design principles. And which can cover concepts such as Modularity, Information hiding etc. Just for information - The