The history of the emergence of CUPID (criticism of SOLID)

What principles would you suggest for modern software development?





At the last virtual meeting of Extreme Tuesday Club, we discussed whether SOLID principles were outdated . Not so long ago I pushed a joke speech on this topic, so one of the meetup organizers asked me if I disagree with SOLID, what would I replace him with. It so happened that I had already thought about this for a while, so I decided to offer five principles of my own, from which the acronym CUPID came out .





This article is not about these principles, this will be my next post. This article is about why I think they are needed. I would like to tell the whole story and explain why I never bought SOLID. Let's talk about it.





Why is every SOLID item wrong

PubConf was invented as a kind of afterparty for NDC conferences. As the name suggests, the place takes place in a pub. Several speakers perform in Ignite style — 20 slides, 15 seconds per slide, auto-continuation — and the audience roars, claps, thrusts and thanks according to the location. The winner gets something, everyone has a great time.





Several years ago I was invited to speak at the PubConf event in London. I like the limited speaking challenge. I thought about Robert Martin's SOLID principles for a long time , and it seemed funny to me to refute each of these principles while trying to keep a serious face. I also wanted to suggest an alternative for each item.





: , , , , , - 5 . 15 , 45 . - 20 !





, , . -, , ( , ). -, : . " ""?", , .





SpeakerDeck , , , , .





, , . , 15 , , 15 , , 15 . ? !





(SRP)

SRP , . , " ". " " ( “Pointlessly Vague Principle” - . ). " "? DataProcessor ETL (extract-transform-load - - - ) ? , , , , , .





, " ". , - , . , - , - . , /, /, , , .





: " ?". , , , . , , , , .





, "" . , , , . , . , - , - (SRP). - , .





- (OCP)

, , , , , .





, :





  • : , C++ 1990 . .





  • : , IDE ( Smalltalk), .





  • , : - , ( , , , RCS SCCS ( - . )), . , . , . CVS, , , , . CVS, (changeset-based version control.)





, , , : , - ! , , , , , , . , .





" ". (Cruft Accretion Principle) (́(. accrētiō «, » accrēscere «») — . - . )





- "", , , . - . , ! , , , , , .





(LSP)

, , . , - , , , , .





, , LSP (""), , "" "", " " , 1980 , " (is-a)" " (has-a)" .





, , : "-- (act-like-a)", "-- (sometimes-be-used-as)" "---- (pass-off-as-a-if-you-squint)"; , , , , , . , , " ", .





(ISP)

- . - , , , . , , , God object, Xerox. Job



. , , , , " " . :





  • , Job



    .





  • , , , Job



    , , .





  • Job



    , . (, .)





, , . .





: " , ", " ".





, (God-). ( ) ( , ). , , " , !".





: , " " (Stable Door Principle). (, - . , - . ) , , , .





, . - , , Working Effectively With Legacy Code.





(DIP)

DIP . , , , .





. , , , . , main



.





, , J2EE, OSGi, Spring " ", - . J2EE , - EJB, servlets, web domains, remote service locations, - .





, , , DI , . , " DI " , , .





, , , . - , - , .





« , »

SOLID, , - , , , , . . ? , SOLID , , , , « , ».





, , 30 , - ? ? , .








All Articles