51

Re: About "naive" DI and about architectural powerlessness

Hello, IQuerist, you wrote: IQ> I by the way too What sense to do investments in undoubted ... The code. Very simple. If you know, what this g-code to you brings money why and is not present?

52

Re: About "naive" DI and about architectural powerlessness

Hello, 0x7be, you wrote: 0> Hello, IQuerist, you wrote: IQ>> I by the way too What sense to do investments in undoubted ... The code. 0> very simple. If you know, what this g-code to you brings money why and is not present? Not... I about that it is not necessary to waste time and forces trying to present ... The code in a type something decent. What sense to do SUPERFLUOUS investments in undoubted ... The code.

53

Re: About "naive" DI and about architectural powerlessness

Hello, IQuerist, you wrote: IQ> Not... I about that it is not necessary to waste time and forces trying to present ... The code in a type something decent. IQ> what sense to do SUPERFLUOUS investments in undoubted ... The code. Now understood

54

Re: About "naive" DI and about architectural powerlessness

55

Re: About "naive" DI and about architectural powerlessness

56

Re: About "naive" DI and about architectural powerlessness

57

Re: About "naive" DI and about architectural powerlessness

58

Re: About "naive" DI and about architectural powerlessness

59

Re: About "naive" DI and about architectural powerlessness

Hello, 0x7be, you wrote: 0> Hello, IQuerist, you wrote: 0>>> You try to force ideas to write to you the program without people IQ>> much more interesting that people without ideas write. 0> I saw such. Normally it somehow works, but inside an infernal hell. 0> and when excited young men undertake to do "all on mind" it does not work, and inside an infernal hell. 0> a difference only that under each element of this hell of the young man clever words why so it is made can tell many. 0> between these two variants I select the first Principal danger of the second variant  that having justifications, not begins to change and correct anything.

60

Re: About "naive" DI and about architectural powerlessness

Hello, IQuerist, you wrote: IQ> Principal danger of the second variant  that having justifications, not begins to change and correct anything. Principal danger that the product will be never let out. All steam leaves in a whistle architecture.

61

Re: About "naive" DI and about architectural powerlessness

Hello, Sinix, you wrote: I>> There is a whole methodology TDD which the unit testing (and as consequence DI) is regarded as of paramount importance, by it popular, fashionable, youth and so on. S> it perfectly works for an infrastructure, almost for any scale, not bad works for small things and at all does not work even for average projects. That it was clear that such the average project: imagine typical biz-kejz in the form of the 20-page document 12 font, in which 90 % of the text - not water, and logic, and high-level, without  to separate instructions. Here perfectly all works, in conditions of even more rigid. Moreover, without TDD all is very bad, as about this logic on 100500 sheets a 12-font through change of one generation of developers (2-3 years) anybody the nobility at all will not be. In case of TDD there are tests which at least break at "innocent" refactoring. And if system also difficult, with exterior dependences generally variants any are not present. Only TDD with mock' behavior of exterior services.

62

Re: About "naive" DI and about architectural powerlessness

Hello, Cyberax, you wrote: a C> Hello, Sinix, you wrote: I>>> There is a whole methodology TDD which the unit testing (and as consequence DI) is regarded as of paramount importance, by it popular, fashionable, youth and so on. S>> it perfectly works for an infrastructure, almost for any scale, not bad works for small things and at all does not work even for average projects. That it was clear that such the average project: imagine typical biz-kejz in the form of the 20-page document 12 font, in which 90 % of the text - not water, and logic, and high-level, without  to separate instructions. The C> Here perfectly all works, in conditions of even more rigid. Moreover, without TDD all is very bad, as about this logic on 100500 sheets a 12-font through change of one generation of developers (2-3 years) anybody the nobility at all will not be. Cs> In case of TDD remain tests which at least break at "innocent" refactoring. Or there are tests which do not break at erratic refactoring, alas... Here warranties any.

63

Re: About "naive" DI and about architectural powerlessness

64

Re: About "naive" DI and about architectural powerlessness

65

Re: About "naive" DI and about architectural powerlessness

Hello, Cyberax, you wrote: the C> Here perfectly all works, in conditions of even more rigid. So we not about tests, and about "TDD which testing (and as consequence DI) regards a unit as of paramount importance". Excessive radicalism with separate tests for each trifle in practice lifts cost of attending of time in two because of enormous code amount which it is necessary to correct at change of business rules at the next customer (that more likely the ordinary, than something exceptional). A combination "units-tests where it is necessary, integration tests for remaining +  everywhere" in this plan are much cheaper. A C> And if system also difficult, with exterior dependences generally variants any are not present. Only TDD with mock' behavior of exterior services. Not-not-not, for difficult systems I rub-TDD does not work. It turns out  in the pure state. Everywhere the beauty and grandeur, tests turn green, one implementers without a valerian to clients do not go.

66

Re: About "naive" DI and about architectural powerlessness

Hello, Sinix, you wrote: the C>> Here perfectly all works, in conditions of even more rigid. S> so we not about tests, and about "TDD which testing (and as consequence DI) regards a unit as of paramount importance". . Units-tests to write most easier. And on observations if it is not enough units-tests integration tests are not present generally. S> Excessive radicalism with separate tests for each trifle in practice lifts cost of attending of time in two because of enormous code amount which it is necessary to correct at change of business rules at the next customer (that more likely the ordinary, than something exceptional). So it , however. If change of one customer breaks 100500 tests the code or tests are written badly. Think as to alter. A C>> And if system also difficult, with exterior dependences generally variants any are not present. Only TDD with mock' behavior of exterior services. S> Not-not-not, for difficult systems I rub-TDD does not work. It turns out  in the pure state. Everywhere the beauty and grandeur, tests turn green, one implementers without a valerian to clients do not go. Tests considerably REDUCE development cost just because of it. The programmer after little change does not wait for the end of integration tests, and at once launches local units-tests with mock'. Certainly, they are not ideal, but find percent so 95 routine errors of time of development. The second 95 % are caught up at an integration testing stage.

67

Re: About "naive" DI and about architectural powerlessness

68

Re: About "naive" DI and about architectural powerlessness

Hello, Cyberax, you wrote: a C>>> And if system also difficult, with exterior dependences generally variants any are not present. Only TDD with mock' behavior of exterior services. S>> Not-not-not, for difficult systems I rub-TDD does not work. It turns out  in the pure state. Everywhere the beauty and grandeur, tests turn green, one implementers without a valerian to clients do not go. Cs> Tests considerably REDUCE development cost just because of it. The programmer after little change does not wait for the end of integration tests, and at once launches local units-tests with mock'. Certainly, they are not ideal, but find percent so 95 routine errors of time of development. Fantastic things Any you tell. You in what area work?

69

Re: About "naive" DI and about architectural powerlessness

70

Re: About "naive" DI and about architectural powerlessness

Hello, IQuerist, you wrote: Cs>> Tests considerably REDUCE development cost just because of it. The programmer after little change does not wait for the end of integration tests, and at once launches local units-tests with mock'. Certainly, they are not ideal, but find percent so 95 routine errors of time of development. IQ> fantastic things Any you tell. You in what area work? I inside Amazon' work in cloud computings. The epicenter service-based architecture, it is possible to tell. Development languages - Java and derivative of it.

71

Re: About "naive" DI and about architectural powerlessness

72

Re: About "naive" DI and about architectural powerlessness

Hello, Cyberax, you wrote: a C> Pofig. Units-tests to write most easier. And on observations if it is not enough units-tests integration tests are not present generally. To write most easier is yes. To support is hardly Sm more low. A C> So it , however. If change of one customer breaks 100500 tests the code or tests are written badly. Think as to alter. No. It on requirements of one customer it is necessary to write 100500 tests if to solve a problem in a forehead. I speak It perfectly works for an infrastructure, almost for any scale, not bad works for small things and at all does not work even for average projects. That it was clear that such the average project: imagine typical biz-kejz in the form of the 20-page document 12 font, in which 90 % of the text - not water, and logic, and high-level... All reused infrastructure that more low, clear business, is covered a unit by tests, since It is easy for disassembling on spare parts and to test separately. With biz-logic so it does not turn out, since practically always biz-processes of the client represent wild  from pure rules of thumb,  to them and the emergency crutches because of the next changes of the legislation and extraordinary absorption. Most  that came across - calculations with the forced rounding off to whether 5, whether 8 signs after a comma after each of operations. For any ancient service at one of counterparts considered and differently digits did not fight. A real explanation and did not extract, as an apology-bajki - digits adjusted to even more ancient paper records which were conducted with such error. Well and about adjustment of an amount byte in mbyte the Author: Sinix Date: 22.04.15 wrote somehow. In general, it not . It is a reality such remarkable a C> the Second 95 % are caught up at an integration testing stage. In general, about same we speak, only different words. I do not state that units-tests are not necessary I about that it is not necessary to be restricted to them.

73

Re: About "naive" DI and about architectural powerlessness

74

Re: About "naive" DI and about architectural powerlessness

75

Re: About "naive" DI and about architectural powerlessness

Hello, maxkar, you wrote: M> It is very unsuccessful statement.... The part of things (like the same  and transactions) is a context integral part. Therefore everyones  just normally look as a context part (and it is not necessary to name them service!) . The context is an OOP-shnyj object with some general behavior. It not "service registry" in the standard sense. The dial-up of given services at it  also is known. Well so it is even more unsuccessful statement, at least for . Because instead of classical "there is no real scenario of usage - all theoretical researches go wood" we pass to " to a real problem, but on a canon (tm)". Last -  is faster to , there the such is very much approved. Why on the real scenario ? So your councils do not approach. The context does not have behavior, it on determination  (we want to give other dial-up of services - we substitute a context) and can give as  dependences, and difinienda in . Disorder otherwise begins: a part we transfer through a context, a part - through DI. Faugh-faugh-faugh M> Well here all is banal. Here directly to the given code refactoring "Tell, Don't ask" is applied. Also it turns out  mentioned Well so it angrily in the cleanest type. Instead of explicit sharing  (all initialization - in one method) at us turns out a mash from * Actually implementations * Wrappers SmartConfirmationService, * Substituted factory which will select specific implementation. Not to do copy SmartConfirmationService for other method, say, for GetAdvancedConfirmationService Here this approach "we do not look at a real problem, we can in patterns" is initially vicious, since it leads to wild recomplication of the code out of the blue. On the same example I will explain. Besides a heaping of types we have one more jamb: we prolong lifetime of dependences - in original code Consumer was necessary only for obtaining of specific implementation, it is possible to transfer only implementation further. At you consumer it is necessary to drag further. , we remember consumer through designer SmartConfirmationService. All? : at us a bug: consumer  if it to change not that service suddenly comes. , we define the necessary service at once, in the designer... And we appeared in an idiotic situation: the recomplicated code which as a matter of fact hides call GetConfirmationService in separate object. Hurt architecture. All the same problem of mongooses in a mail box the Author: Sinix Date: 01.06.14, . M> And here to get interfaces in a place "implementation insertions" - good. Well, there will be many small interfaces, will be Interface Segregation. Well, that's it about it I also spoke. Accurately to think over API - is not present,  the "correct" code wrappers in a place, even breaking architecture - yes. Not,  a taste question certainly, therefore even I will not argue M> And then the syllogism becomes very much. Instead of the further magnification of an amount of parameters, they decrease to one/two primitive values - identifiers of entities. And service learns to walk itself in basis artful requests and to get exactly that is necessary for it. Here such "overflow" of the list of arguments. Here it not simply angrily in the pure state, and rectificate is direct. Without comments, .