ENGLISH

Component-Based Rails Applications

Book information

Year
2016
Language
english
Format
PDF
Filesize
20 MB (21171798 bytes)
Pages
184\184
Time added
2016-02-08 11:07:00

Description

What are component-based applications? And what is this book about?Component-based applications show the single responsibility principle at work at all levels of an application. When implementing new features, the developers of these applications ask not only "what is the best place to put this"? but also "is that best place still good enough or do we need a new one"? In doing so they create pieces of code that exhibit high cohesion on their inside and low coupling on the outside.In terms of Ruby, the first-class levels are method, class, and application. Along this continuum of increasing size, it becomes more difficult for developers to answer the question of single responsibility. What makes this even more challenging is that some of the frameworks we use, most notably Rails, value other principles more and thus take focus away from writing single responsibility pieces.Another aspect to the difficulty of implementing component-based applications in Ruby is that one level has been very much overlooked due to a concept missing from the Ruby language: the package. Modules used as namespaces get close to the idea of a package, but don't provide another layer of visibility rules and thus fall short of being package equivalents.Gems, used as packages and distributed as vendor code, as part of the application, turn out to be the closest thing to the idea of the package in Ruby. As such they impact the list of levels that single responsibility can be sought for: they add a level. That makes the list method, class, gem, and application. Because gems provide everything needed to simulate packages and because they are composable and distributable, here we will call them "components."This book explores the many ways to use components, how to get there in the face of a classic Rails application, and all the steps along the way.

Similar books

Session C11: Ancient Cultural Landscapes in South Europe – their Ecological Setting and Evolution, Session C22: Gardeners from South America, Session S04: Agro-Pastoralism and Early Metallurgy Sessions, Session WS29: The Idea of Enclosure in Recent Iberian Prehistory, Session C88: Rhytmes et causalites des dynamiques de l'anthropisation en Europe entre 6500 ET 500 BC: Hypotheses socio-culturelles et/ou climatiques: Proceedings of the XV UISPP World Congress (Lisbon 4-9 September 2006) / Actes du XV Congrès Mondial (Lisbonne 4-9 Septembre 2006) Vol.36

2010 · PDF

THE BRITISH ARMY IN INDIA: ITS PRESERVATION BY AN APPROPRIATE CLOTHING, HOUSING, LOCATING, RECREATIVE EMPLOYMENT, AND HOPEFUL ENCOURAGEMENT OF THE TROOPS. with AN APPENDIX ON INDIA : THE CLIMATE OP ITS HILLS ; THE DEVELOPMENT OF ITS RESODRCBS, INDUSTRY, AND ARTS ; THE ADMINISTRATION OF JUSTICE ; THE BLACK ACT ; THE PROGRESS OF CHRISTIANITY ; THE TRAFFIC IN OPIUM ; THE VALUE OF INDIA ; PERMANENT CAUSES OF DISAFFECTION, AND OF THE RECENT REBELLION ; THE TRADITIONARY POLICY; MISGOVERNMENT BY NATIVE RULERS ; ANNEXATIONS OF THEIR TERRITORY, ETC.

1858 · PDF