Surely anyone who is engaged in programming remembers how at the very beginning of the journey a stream of information about algorithms, patterns and development methods falls on him. She remembers that very feeling when, having dealt with some fresh or simply new idea for oneself, the feeling "well, now we will live!" And also that feeling of slight despair - after trying to apply all this in a real project, with real people, with sudden turns of business logic and constant βvery urgentβ.
How is it that in a world where most projects fit into the "data entry, validation, and save to database" pattern, so many projects end up in a mess? Despite the fact that all developers are full of knowledge about algorithms, frameworks and patterns, and SOLID principles bounce off the teeth in the interview. I would venture to express on this occasion my assumption about the cause, as well as my personal way of how to deal with this.
Thesis
. , . : , , . , , , , ( ). , "" . , ββ .
? , . , ββ , .
, - , - , , . , . . , , UI. , ββ , .. ββ ββ. , : β β β β ?
, : , ββ, ? , ββ - , , - .
1- .
, , : (), , ? - ? , RFC 5322, - , . " " - . , , " ?". , .. , , . , , - - . , β-β. , , , . , , , .
1- : () .
, , , , . , - - . , , .
2- . "" ""
, ? , : , , ββ.
: , "" ()? . , - "" , . , " , - ", " ", , - .
3- .
2 . β ?β UI, , . Console.Write()
textbox.Text
html-, .
. , , , β β. , , , -, , .
, . , , , , , . , . , , , .
: Win , , .
4 : , , , . - - β β.
, . , . , . , , , . , , , () - : β β ? , ββ , . , , , . - , , , .
, . Windows .
. - SMS . - - .
, β , β, - - . , - .
, Client
, , IO - ClientGet(int id)
, .
, IO . ClientGet
Client. ClientVerySpecificStatsInfo
, IO . , , , , . , , , , , . , . - , , .
, - ( ββ) ββ , " !".
, . , - - , . , , - . , , , . . , - , - , , , , .
, , . , , MVP . - , - , , - ββ. , UserPresenter
, UserPrecursor
.
β β . , .. .. , - , β β - , , , .
: , UI. UI , ββ , UI. ( ) . .
. β β . β β . - . , ββ . , , , , .
, () - . , - . , Order (), Client User. Order Line (), . , Line Order . , , , . .
Logic.Order
Logic.Orders.Line
, Line Order - , Line Orders.
Logic.Order
Logic.Line
, Line , , .
, ββ , ββ, ββ, . , , . . , , Zip, City, Address - , . , , .
:
/Geo
Address
City
Zip
/Orders
Line
Order // "Orders"
, , : , .
, . , , , - , . , , . -.
, . - . UML, , , , - , β¦ β¦ . , - Zip, Address, City - - , - - GeoObject .
, , - . β - β - . - .Subitems
. - .Subtypes
, .
.Def
, , , - , . .Def
(Definitions). , . UML, , .
/Geo
Address
City
Zip
/Orders
/.Def
OrderType
OrderBase
Line
Order
.Spec
, 1-1 . 1-1 . , , , .. - .
, . UML .
.Spec
- ( specification - , ), .
, User UserLikes, , / Userβ .
β β . ββ , - .
. , UserStats (ββ) . , , , , . , , .. , . Stats, . (, UserStats , Stats .)
:
/Users
/.Spec
UserLikes
UserStats // 1-
Stats //
User
. , , UML, , UML. , , , - .
.Calc
, , . . , . , , .. . ββ , - , 0 1 . PDF , Adobe Acrobat Reader, . .Calc
( calculators).
, . , , , , . , β - ? ?β
- , - . . .
.Models
.Models
, -, , , . , Team, ID
Name
. , , , , ββ . 2- , User , .
- , . - , , , .
, . , presenter.Submit(input)
clientValidator.Validate(input)
, β-β , .
ββ , UI ββ.
, , , , , , .. . - . . , , Ms Excel. - UI, , . , , - Html, Pdf, Rtf, Json, Xls .
, , .
.Tech
, , . , , - - . , , , , . β β , , , .
, . , , ββ .. .Dev
. IO , .
, , - ? Money? ? , , Options? - , Context - MoneyContext, OptionsContext ..
MVC, MVP, MVVM
MVC, MVP MVVM , .. ( ) . , , , ββ - . , , . - .
, , - . . , . , β !β, . β β, β β, β β. , - .
, ββ - ββ. - , - - ( , ), .
, , β ?β. . , ββ . , - .
, , , - . , , , - , - . , - , "" . , .
p.s. C !