Component-Based Rails Applications

Large Domains Under Control

Paperback Engels 2018 9780134774589
Verwachte levertijd ongeveer 9 werkdagen

Samenvatting

When Ruby on Rails was introduced, web developers flocked to it, quickly building applications that have become utterly indispensable to their organisations. But those early Rails applications have often proven extremely difficult to maintain, evolve, and scale. Now, in Component-Based Rails Applications, Stephan Hagemann introduces a practical, start-to-finish methodology for modernising and restructuring existing Rails applications with modern components. One step at a time, Hagemann demonstrates how to revamp Rails applications to exhibit visible, provably independent, and explicitly connected parts--thereby simplifying them, and making them far easier to manage, change, and test.

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 Throughout, Hagemann introduces concepts and techniques that developers can use to improve applications of many kinds, even if they weren’t built with Rails or Ruby.

Specificaties

ISBN13:9780134774589
Taal:Engels
Bindwijze:Paperback

Lezersrecensies

Wees de eerste die een lezersrecensie schrijft!

Inhoudsopgave

<p>Foreword xi</p> <p>Preface xiii</p> <p>Acknowledgments xxi</p> <p>About the Author xxiii</p> <p><strong>Chapter 1: Introduction to Component-Based Rails Applications 1</strong></p> <p>1.1 Component-Based Rails 2</p> <p>1.2 Benefits of Component-Based Applications 4</p> <p>1.3 Component-Based Ruby 13</p> <p>1.4 The Application Continuum 14</p> <p>1.5 Related Works 15</p> <p><strong>Chapter 2: Creating a Component-Based Application 17</strong></p> <p>2.1 The Entire App Inside a Component 18</p> <p>2.2 ActiveRecord and Handling Migrations within Components 27</p> <p>2.3 Handling Dependencies within Components 34</p> <p><strong>Chapter 3: Tooling for Components 49</strong></p> <p>3.1 Testing a Component 50</p> <p>3.2 Testing the Main Application 65</p> <p>3.3 Asset Loading for Components 74</p> <p>3.4 Switching Databases 82</p> <p>3.5 Deploying to Platforms-as-a-Service 86</p> <p>3.6 Updating Application Dependencies 90</p> <p>3.7 Proposal for a Different Application Root—Showcasing the Difference of Components’ Structure 99</p> <p><strong>Chapter 4: Component Refactorings: Extracting Components Out of Components 111</strong></p> <p>4.1 Determining What to Extract: Bottom-Up 112</p> <p>4.2 Refactoring: Extract Domain Gem—Predictor 120</p> <p>4.3 Determining What to Extract: Top-Down 139</p> <p>4.4 Refactoring: Pulling Up a UI Component—TeamsAdmin, GamesAdmin, PredictionUI, WelcomeUI 150</p> <p>4.5 Refactoring: Pushing Down a Model Component—Teams, Games 168</p> <p>4.6 Refactoring: Improve Naming of Component—AppComponent to WebUI 183</p> <p>4.7 More Component Refactoring Patterns 189</p> <p><strong>Chapter 5: From Ball of Mud to First Components 195</strong></p> <p>5.1 Small Steps 196</p> <p>5.2 One Big Step 196</p> <p><strong>Chapter 6: Component-Based Rails in Relation to Other Patterns 211</strong></p> <p>6.1 Hexagonal Architecture 212</p> <p>6.2 Data-Context-Integration (DCI) 227</p> <p><strong>Chapter 7: Components in Other Languages 237</strong></p> <p>7.1 Kotlin, Java, and Gradle 238</p> <p>7.2 .NET / C 241</p> <p>7.3 Conclusion 243</p> <p><strong>Appendix 245</strong></p> <p>A.1 Plain versus --full versus --mountable Engines 245</p> <p>A.2 How Do Engine Routes and Engine Mounting Work? 254</p> <p>A.3 Additional Testing with Older Versions of Rails 261</p> <p>Index 265</p>

Managementboek Top 100

Rubrieken

    Personen

      Trefwoorden

        Component-Based Rails Applications