I have worked with a lot of projects which was written by usual "everything in controller" way and when they become to grow their support complexity grows exponentially. Sometimes developers tried to move code to helper classes, but it doesn't help a lot. Every project had the same illnesses: Copy-paste driven development, God classes, etc. Modern frameworks offers a lot of features to implement functionality super-fast, but when project grows almost all these "optimizations" becomes a big pain for developers. In the same time there a lot of dogmas, like SOLID and others, which described very abstractly and becomes some kind of cargo cults. "if project has 100% code coverage by unit tests, it has super code quality", "if project doesn't have static methods, it's well organized", etc. Someone very clever said: Software Engineering Is Art Of Compromise.


Some of these dogmas have very important exceptions. Some of them easy to misunderstand.In this book I'm going to analyze usual project with common mistakes. How implementing new requirements can decrease code quality. Then step by step I'll show how I usually refactor the code: extracting classes, using DI, using exceptions. How this refactoring consequences moving to layered architecture. After moving to layered architecture we will talk about pro and contras of Command Query Responsibility Segregation(CQRS). After CQRS it's hard to don't talk about Event Sourcing(ES).I'll use examples in Laravel , but it's not very important. The book is about framework-agnostic code.


Table of Contents

1. Introduction

2. Bad Habits

3. Dependency injection

4. Painless refactoring

5. Application layer

6. Error handling

7. Validation

8. Events

9. Unit testing

10. Domain layer

11. CQRS

12. Event sourcing

13. Sagas

14. Useful books and links


ISBN

9781090308313

برند

Leanpub

تعداد صفحات

257

سال

2019

course image

ایزی اگزم

90%رضایت مشتریان عملکرد عالی

نام مولف:

John Priece

نام ناشر:

Leanpub

موجود نیست

متأسفانه این محصول در حال حاضر موجود نمی باشد