SOLIDny sposób na kod
Transkrypt
SOLIDny sposób na kod
SOLIDny sposób na kod Katowice, 04.12.2014 Marcin Bielak i Paweł Markowicz Kim jesteśmy? Programistami Marcin Paweł SOLIDny sposób na kod.| Katowice 04.12.2014 Copyright ©Capgemini 2014. All Rights Reserved 2 Model domenowy a BHP Czym tak właściwie jest model domeny? „An object model of the domain that incorporates both behavior and data” Martin Fowler SOLIDny sposób na kod.| Katowice 04.12.2014 Copyright ©Capgemini 2014. All Rights Reserved 3 Gdzie w tym wszystkim jest SOLID SOLID jako nasze BHP Model domeny biznesowej SOLIDny sposób na kod.| Katowice 04.12.2014 Copyright ©Capgemini 2014. All Rights Reserved 4 SOLID – Single Responsibility Principal SOLIDny sposób na kod.| Katowice 04.12.2014 Copyright ©Capgemini 2014. All Rights Reserved 5 SOLID – Open\Close Principal SOLIDny sposób na kod.| Katowice 04.12.2014 Copyright ©Capgemini 2014. All Rights Reserved 6 SOLID – Liskov Substitution Principal SOLIDny sposób na kod.| Katowice 04.12.2014 Copyright ©Capgemini 2014. All Rights Reserved 7 SOLID – Interface Segregation Principal SOLIDny sposób na kod.| Katowice 04.12.2014 Copyright ©Capgemini 2014. All Rights Reserved 8 SOLID – Dependency Inversion Principal SOLIDny sposób na kod.| Katowice 04.12.2014 Copyright ©Capgemini 2014. All Rights Reserved 9 Zerknijmy na naszą domenę Wycinek naszej domeny - księgarnia Wymagania biznesowe Klient może złożyć zamówienie na książki. Klient może zamówić maksymalnie tyle książek ile ma kuponów (voucherów). Klient potwierdza zamówieni. SOLIDny sposób na kod.| Katowice 04.12.2014 Copyright ©Capgemini 2014. All Rights Reserved 11 Wycinek naszej domeny - księgarnia SOLIDny sposób na kod.| Katowice 04.12.2014 Copyright ©Capgemini 2014. All Rights Reserved 12 Zobaczmy to co ciekawe – kod. Jak posprzątać ten bałagan? SOLIDny sposób na kod.| Katowice 04.12.2014 Copyright ©Capgemini 2014. All Rights Reserved 14 Podsumowanie Po co? Zwiększenie czytelności Zamknięcie domeny -> jedna droga aby zrobić jedną rzecz Mniejsza podatność na błędy Testowalność Łatwiejsze wdrożenie nowych członków zespołu do projektu SOLIDny sposób na kod.| Katowice 04.12.2014 Copyright ©Capgemini 2014. All Rights Reserved 15 Contact information Marcin Bielak Paweł Markowicz Software Developer [email protected] Software Developer [email protected] Capgemini Office (Kraków) Capgemini Office (Kraków) Quattro Business Park ul. Bora - Komorowskiego 25a 31-476 Kraków Quattro Business Park ul. Bora - Komorowskiego 25a 31-476 Kraków SOLIDny sposób na kod.| Katowice 04.12.2014 Copyright ©Capgemini 2014. All Rights Reserved 16 About Capgemini With more than 130,000 people in over 40 countries, Capgemini is one of the world's foremost providers of consulting, technology and outsourcing services. The Group reported 2013 global revenues of EUR 10.1 billion. Together with its clients, Capgemini creates and delivers business and technology solutions that fit their needs and drive the results they want. A deeply multicultural organization, Capgemini has developed its own way of working, the Collaborative Business ExperienceTM, and draws on Rightshore®, its worldwide delivery model. www.capgemini.com The information contained in this presentation is proprietary. © 2014 Capgemini. All rights reserved.