Component-Based Rails Applications
Autor Stephan Hagemannen Limba Engleză Paperback – 22 iun 2018
The first and only guide to componentising Rails, this book offers hands-on, step-by-step coverage of
- Creating a full-fledged component-based Rails application from the ground up
- Refactoring an existing Rails application to extract components
- Using gems and engines to implement components in Ruby and Rails code bases
- Applying modern patterns such as DCI and hexagonal architecture
- Overcoming the unique challenges that arise during componentisation of Rails applications
Preț: 291.82 lei
Preț vechi: 364.78 lei
-20% Nou
Puncte Express: 438
Preț estimativ în valută:
51.65€ • 60.57$ • 45.28£
51.65€ • 60.57$ • 45.28£
Carte disponibilă
Livrare economică 30 decembrie 25 - 05 ianuarie 26
Livrare express 23-27 decembrie pentru 35.30 lei
Preluare comenzi: 021 569.72.76
Specificații
ISBN-13: 9780134774589
ISBN-10: 0134774582
Pagini: 304
Dimensiuni: 175 x 231 x 18 mm
Greutate: 0.49 kg
Editura: Pearson Education
ISBN-10: 0134774582
Pagini: 304
Dimensiuni: 175 x 231 x 18 mm
Greutate: 0.49 kg
Editura: Pearson Education
Cuprins
Foreword xi
Preface xiii
Acknowledgments xxi
About the Author xxiii
Chapter 1: Introduction to Component-Based Rails Applications 1
1.1 Component-Based Rails 2
1.2 Benefits of Component-Based Applications 4
1.3 Component-Based Ruby 13
1.4 The Application Continuum 14
1.5 Related Works 15
Chapter 2: Creating a Component-Based Application 17
2.1 The Entire App Inside a Component 18
2.2 ActiveRecord and Handling Migrations within Components 27
2.3 Handling Dependencies within Components 34
Chapter 3: Tooling for Components 49
3.1 Testing a Component 50
3.2 Testing the Main Application 65
3.3 Asset Loading for Components 74
3.4 Switching Databases 82
3.5 Deploying to Platforms-as-a-Service 86
3.6 Updating Application Dependencies 90
3.7 Proposal for a Different Application Root-Showcasing the Difference of Components' Structure 99
Chapter 4: Component Refactorings: Extracting Components Out of Components 111
4.1 Determining What to Extract: Bottom-Up 112
4.2 Refactoring: Extract Domain Gem-Predictor 120
4.3 Determining What to Extract: Top-Down 139
4.4 Refactoring: Pulling Up a UI Component-TeamsAdmin, GamesAdmin, PredictionUI, WelcomeUI 150
4.5 Refactoring: Pushing Down a Model Component-Teams, Games 168
4.6 Refactoring: Improve Naming of Component-AppComponent to WebUI 183
4.7 More Component Refactoring Patterns 189
Chapter 5: From Ball of Mud to First Components 195
5.1 Small Steps 196
5.2 One Big Step 196
Chapter 6: Component-Based Rails in Relation to Other Patterns 211
6.1 Hexagonal Architecture 212
6.2 Data-Context-Integration (DCI) 227
Chapter 7: Components in Other Languages 237
7.1 Kotlin, Java, and Gradle 238
7.2 .NET / C 241
7.3 Conclusion 243
Appendix 245
A.1 Plain versus --full versus --mountable Engines 245
A.2 How Do Engine Routes and Engine Mounting Work? 254
A.3 Additional Testing with Older Versions of Rails 261
Index 265
Preface xiii
Acknowledgments xxi
About the Author xxiii
Chapter 1: Introduction to Component-Based Rails Applications 1
1.1 Component-Based Rails 2
1.2 Benefits of Component-Based Applications 4
1.3 Component-Based Ruby 13
1.4 The Application Continuum 14
1.5 Related Works 15
Chapter 2: Creating a Component-Based Application 17
2.1 The Entire App Inside a Component 18
2.2 ActiveRecord and Handling Migrations within Components 27
2.3 Handling Dependencies within Components 34
Chapter 3: Tooling for Components 49
3.1 Testing a Component 50
3.2 Testing the Main Application 65
3.3 Asset Loading for Components 74
3.4 Switching Databases 82
3.5 Deploying to Platforms-as-a-Service 86
3.6 Updating Application Dependencies 90
3.7 Proposal for a Different Application Root-Showcasing the Difference of Components' Structure 99
Chapter 4: Component Refactorings: Extracting Components Out of Components 111
4.1 Determining What to Extract: Bottom-Up 112
4.2 Refactoring: Extract Domain Gem-Predictor 120
4.3 Determining What to Extract: Top-Down 139
4.4 Refactoring: Pulling Up a UI Component-TeamsAdmin, GamesAdmin, PredictionUI, WelcomeUI 150
4.5 Refactoring: Pushing Down a Model Component-Teams, Games 168
4.6 Refactoring: Improve Naming of Component-AppComponent to WebUI 183
4.7 More Component Refactoring Patterns 189
Chapter 5: From Ball of Mud to First Components 195
5.1 Small Steps 196
5.2 One Big Step 196
Chapter 6: Component-Based Rails in Relation to Other Patterns 211
6.1 Hexagonal Architecture 212
6.2 Data-Context-Integration (DCI) 227
Chapter 7: Components in Other Languages 237
7.1 Kotlin, Java, and Gradle 238
7.2 .NET / C 241
7.3 Conclusion 243
Appendix 245
A.1 Plain versus --full versus --mountable Engines 245
A.2 How Do Engine Routes and Engine Mounting Work? 254
A.3 Additional Testing with Older Versions of Rails 261
Index 265
Notă biografică
Stephan Hagemann most recently has been supporting clients of Pivotal Software in journeys of digital transformation. In these, organizational change is as much a topic as the implementation of Agile processes and software system architecture. This work grew out of Stephan's previous management and engineering roles within Pivotal Labs, Pivotal's software consulting group. Prior to joining Pivotal, Stephan moved to the United States from Germany where he worked as a software engineer for xing. He has a doctorate in information systems from the University of Münster in Germany.