Upgrade to Pro — share decks privately, control downloads, hide ads and more …

RAILS NO ES TU APLICACIÓN

RAILS NO ES TU APLICACIÓN

Applying DDD and SOLID principles to architect APPs that are deliver using Ruby on Rails

Manuel Vidaurre

June 08, 2012
Tweet

More Decks by Manuel Vidaurre

Other Decks in Programming

Transcript

  1. RAILS NO ES TU APLICACIÓN REFACTORING PARA PATRONES ARQUITECTÓNICOS USANDO

    DDD EN ROR BDD · Agile Dev · Software Craftsmanship [email protected] http://about.me/manuel.vidaurre +52 33 1370 5224 http://www.agiltec.com.mx :passions = {:people, :value, :roi} :skills = {:agiledev, :patterns, :cc, :pm, :ddd} :pl = {:ruby, :js, :coffescript} :web = {:rails, :sinatra} :tools = {:cucumber, :rspec, :git, :jquery, :sql, :mongodb} :segments = {:health, :real_state, :gis} soluciones inteligentes
  2. Manuel Vidaurre CTO founder · Master Craftsman [email protected] http://about.me/manuel.vidaurre +52

    33 1370 5224 soluciones inteligentes DISCLAIMER The following presentation will use names of mexican political parties and presidential candidates as well it will mention some prominent people of the political scene. This is not a proselytism message or event. This is not for trying to convince people to vote for somebody. If you have a weak constitution or are easily offended by frank language, political humor, or by strong political content, please do not continue. Continue at your own risk . . . you have been warned.
  3. Manuel Vidaurre CTO founder · Master Craftsman [email protected] http://about.me/manuel.vidaurre +52

    33 1370 5224 soluciones inteligentes %+99.+35898/-4/C)'49)5362+=/9>5,3'4> applications is not technical. It is in the domain itself, the activity or business of the user - Eric Evans. Domain-Driven Design: Tackling Complexity in the Heart of Software Software gets built for a reason. The target application, whether a trivial game or a program to guide radiation therapy, is the entire point. - Sandi Metz. . Practical Object Oriented Design in Ruby software development is a value creation exercise - Mark Denne, Jane Cleland-Huang. Software by Numbers: Low-Risk, High-Return Development
  4. Manuel Vidaurre CTO founder · Master Craftsman [email protected] http://about.me/manuel.vidaurre +52

    33 1370 5224 PATTERNS OF ENTERPRISE APPLICATION ARCHITECTURE http://martinfowler.com/eaaCatalog/ soluciones inteligentes
  5. Manuel Vidaurre CTO founder · Master Craftsman [email protected] http://about.me/manuel.vidaurre +52

    33 1370 5224 DOMAIN-DRIVEN DESIGN DDD http://domaindrivendesign.org/ soluciones inteligentes
  6. Manuel Vidaurre CTO founder · Master Craftsman [email protected] http://about.me/manuel.vidaurre +52

    33 1370 5224 WHAT COULD HAPPEN IF WE BUILD THE APPLICATION WITHOUT ENOUGH UNDERSTANDING OF THE DOMAIN AND THE BUSINESS CONTEXT? soluciones inteligentes
  7. Manuel Vidaurre CTO founder · Master Craftsman [email protected] http://about.me/manuel.vidaurre +52

    33 1370 5224 SCREAMING ARCHITECTURE UNCLE BOB, SEP 2011 soluciones inteligentes
  8. Manuel Vidaurre CTO founder · Master Craftsman [email protected] http://about.me/manuel.vidaurre +52

    33 1370 5224 THE SECONDARY AND THE PRIMARY VALUE OF SOFTWARE soluciones inteligentes
  9. Manuel Vidaurre CTO founder · Master Craftsman [email protected] http://about.me/manuel.vidaurre +52

    33 1370 5224 RUBY MIDWEST 2011- KEYNOTE: ARCHITECTURE THE LOST YEARS ROBERT MARTIN soluciones inteligentes http://www.confreaks.com/videos/759-rubymidwest2011-keynote-architecture-the-lost-years
  10. Manuel Vidaurre CTO founder · Master Craftsman [email protected] http://about.me/manuel.vidaurre +52

    33 1370 5224 USE CASES soluciones inteligentes http://www.ivarjacobson.com/use_case2.0_ebook/
  11. Manuel Vidaurre CTO founder · Master Craftsman [email protected] http://about.me/manuel.vidaurre +52

    33 1370 5224 ELECTRONIC VOTING SYSTEM ? Electronic voting (also known as e-voting) is a term encompassing several different types of voting, embracing both electronic means of casting a vote and electronic means of counting votes. Electronic voting machine by Premier Election Solutions (formerly Diebold Election Systems) used in all Brazilian elections and plebiscites. Photo by Agência Brasil soluciones inteligentes
  12. Manuel Vidaurre CTO founder · Master Craftsman [email protected] http://about.me/manuel.vidaurre +52

    33 1370 5224 DDD BUILDING BLOCKS (BB) soluciones inteligentes Models are built to find out whether something will work. In DDD high- level concepts and practices are articulated, such as ubiquitous language meaning that the domain model should form a common language given by domain experts for describing system requirements
  13. Manuel Vidaurre CTO founder · Master Craftsman [email protected] http://about.me/manuel.vidaurre +52

    33 1370 5224 DDD BB: ENTITIES soluciones inteligentes An Entity is an object that is not fundamentally defined by its attributes, but rather by a thread of continuity and identity. Sometimes such an object must be matched with another object even though attributes differ. An object must be distinguished from other objects even though they might have the same attributes. Mistaken identity can lead to data corruption
  14. Manuel Vidaurre CTO founder · Master Craftsman [email protected] http://about.me/manuel.vidaurre +52

    33 1370 5224 DDD BB: VALUE OBJECTS soluciones inteligentes A Value Object is an immutable object that contains attributes but has no conceptual identity. Value Objects are instantiated to represent elements of the design that we care about only for what they are, not who or which they are.
  15. Manuel Vidaurre CTO founder · Master Craftsman [email protected] http://about.me/manuel.vidaurre +52

    33 1370 5224 DDD BB: SERVICES soluciones inteligentes A Service is an operation that do not conceptually belong to any object. Therefore a Service is an operation offered as an interface that stands alone in the model, without encapsulating state, as Entities and Value Objects do. A Service tends to be named for an activity, rather than an entity—a verb rather than a noun
  16. Manuel Vidaurre CTO founder · Master Craftsman [email protected] http://about.me/manuel.vidaurre +52

    33 1370 5224 DDD BB: AGGREGATES soluciones inteligentes An Aggregate is a cluster of associated objects that we treat as a unit for the purpose of data changes. Each Aggregate has a root and a boundary. The boundary defines what is inside the Aggregate. The root is the only member of the Aggregate that outside objects are allowed to hold references to, although objects within the boundary may hold references to each other.
  17. Manuel Vidaurre CTO founder · Master Craftsman [email protected] http://about.me/manuel.vidaurre +52

    33 1370 5224 DDD BB: FACTORIES soluciones inteligentes A Factory encapsulates the knowledge needed to create a complex object or Aggregate. Complex object creation is a responsibility of the domain layer, yet that task does not belong to the objects that express the model.
  18. Manuel Vidaurre CTO founder · Master Craftsman [email protected] http://about.me/manuel.vidaurre +52

    33 1370 5224 RUBY MIDWEST 2011- KEYNOTE: ARCHITECTURE THE LOST YEARS ROBERT MARTIN soluciones inteligentes http://www.confreaks.com/videos/759-rubymidwest2011-keynote-architecture-the-lost-years The point of this architecture is to defer critical decisions – such as desktop or GUI, which database, or even no database. A Ruby team fails if '/28/89.+C7899./4-9.+> do. (It’s kind of hard to defer the language decision.) The app should be thought of a kind of library (gem in Ruby) that is assembled with some IO system, such as the web.
  19. Manuel Vidaurre CTO founder · Master Craftsman [email protected] http://about.me/manuel.vidaurre +52

    33 1370 5224 OBJECTS ON RAILS AVDI GRIMM soluciones inteligentes http://objectsonrails.com This book is aimed at the working Rails developer who is looking to grow and evolve Rails projects while 1++6/4-9.+3D+=/(2+3'/49'/4'(2+ and robust. The focus is on pragmatic solutions which tread a "middle way" between the expedience of the Rails "golden path", and rigid OO purity
  20. Manuel Vidaurre CTO founder · Master Craftsman [email protected] http://about.me/manuel.vidaurre +52

    33 1370 5224 PRACTICAL OBJECT ORIENTED DESIGN IN RUBY SANDI METZ soluciones inteligentes http://my.safaribooksonline.com/book/programming/ruby/9780132930895 This book is about designing object- oriented software. It teaches how to arrange software so as to be productive today and to remain so next month and next year. It shows how to write applications that can succeed in the present and still adapt to the future. It lets you raise your productivity and reduce your costs, for the entire lifetime of your applications. This book believes in your desire to do good work and gives you the tools you need to best be of use.
  21. Manuel Vidaurre CTO founder · Master Craftsman [email protected] http://about.me/manuel.vidaurre +52

    33 1370 5224 ROBERT MARTIN’S MESSAGE TO THE ROR COMMUNITY IN MEXICO soluciones inteligentes Remember that you are professionals. Professionals know that the only way to go fast, is to go well. So write the best code you can, make sure you practice TDD and refactoring. And keep your code and architecture clean