Slides Ruby Conf 2014 on using simple techniques to create slimer, clearer models, controllers, and views in Ruby on Rails.
blog: http://www.railsonmaui.com
Code samples: https://github.com/justin808/fat-code-refactoring-techniques
Social networks are not new, even though websites like Facebook and Twitter might make you want to believe they are; and trust me- I’m not talking about Myspace! Social networks are extremely interesting models for human behavior, whose study dates back to the early twentieth century. However, because of those websites, data scientists have access to much more data than the anthropologists who studied the networks of tribes!
Because networks take a relationship-centered view of the world, the data structures that we will analyze model real world behaviors and community. Through a suite of algorithms derived from mathematical Graph theory we are able to compute and predict behavior of individuals and communities through these types of analyses. Clearly this has a number of practical applications from recommendation to law enforcement to election prediction, and more.
Introduction to Data Mining(Chapter 1)......Data Mining concepts and techniques by R. Deepa (IT) ..Batch(2016-2019) published on Oct-13 2018 from NS college of Arts and Science,Theni
This is a presentation of the popular NoSQL database Apache Cassandra which was created by our team in the context of the module "Business Intelligence and Big Data Analysis".
Social networks are not new, even though websites like Facebook and Twitter might make you want to believe they are; and trust me- I’m not talking about Myspace! Social networks are extremely interesting models for human behavior, whose study dates back to the early twentieth century. However, because of those websites, data scientists have access to much more data than the anthropologists who studied the networks of tribes!
Because networks take a relationship-centered view of the world, the data structures that we will analyze model real world behaviors and community. Through a suite of algorithms derived from mathematical Graph theory we are able to compute and predict behavior of individuals and communities through these types of analyses. Clearly this has a number of practical applications from recommendation to law enforcement to election prediction, and more.
Introduction to Data Mining(Chapter 1)......Data Mining concepts and techniques by R. Deepa (IT) ..Batch(2016-2019) published on Oct-13 2018 from NS college of Arts and Science,Theni
This is a presentation of the popular NoSQL database Apache Cassandra which was created by our team in the context of the module "Business Intelligence and Big Data Analysis".
In this lecture we analyze document oriented databases. In particular we consider why there are the first approach to nosql and what are the main features. Then, we analyze as example MongoDB. We consider the data model, CRUD operations, write concerns, scaling (replication and sharding).
Finally we presents other document oriented database and when to use or not document oriented databases.
Discover the origins of big data, discuss existing and new projects, share common use cases for those projects, and explain how you can modernize your architecture using data analytics, data operations, data engineering and data science.
Big Data Fundamentals is your prerequisite to building a modern platform for machine learning and analytics optimized for the cloud.
We’ll close out with a live Q&A with some of our technical experts as well.
Stretch your brain with a packed agenda:
Open source software
Data storage
Data ingestion
Data analytics
Data engineering
IoT and life after Lambda architectures
Data science
Cybersecurity
Cluster management
Big data in the cloud
Success stories
This is the first time I introduced the concept of Schema-on-Read vs Schema-on-Write to the public. It was at Berkeley EECS RAD Lab retreat Open Mic Session on May 28th, 2009 at Santa Cruz, California.
اسئلة نهائية لمقرر تقنية تصميم صفحات الويب - 1266
اعداد الطالبة: أنوار شوخة – فرع رام الله والبيرة
كلية التكنولوجيا والعلوم التطبيقية
جامعة القدس المفتوحة
Machine learning is overhyped nowadays. There is a strong belief that this area is exclusively for data scientists with a deep mathematical background that leverage Python (scikit-learn, Theano, Tensorflow, etc.) or R ecosystem and use specific tools like Matlab, Octave or similar. Of course, there is a big grain of truth in this statement, but we, Java engineers, also can take the best of machine learning universe from an applied perspective by using our native language and familiar frameworks like Apache Spark. During this introductory presentation, you will get acquainted with the simplest machine learning tasks and algorithms, like regression, classification, clustering, widen your outlook and use Apache Spark MLlib to distinguish pop music from heavy metal and simply have fun.
Source code: https://github.com/tmatyashovsky/spark-ml-samples
Design by Yarko Filevych: http://filevych.com/
Cost-based query optimization in Apache HiveJulian Hyde
Tez is making Hive faster, and now cost-based optimization (CBO) is making it smarter. A new initiative in Hive 0.13 introduces cost-based optimization for the first time, based on the Optiq framework.
Optiq’s lead developer Julian Hyde shows the improvements that CBO is bringing to Hive 0.13. For those interested in Hive internals, he gives an overview of the Optiq framework and shows some of the improvements that are coming to future versions of Hive.
Scaling Big Data Mining Infrastructure Twitter ExperienceDataWorks Summit
The analytics platform at Twitter has experienced tremendous growth over the past few years in terms of size, complexity, number of users, and variety of use cases. In this talk, we’ll discuss the evolution of our infrastructure and the development of capabilities for data mining on “big data”. We’ll share our experiences as a case study, but make recommendations for best practices and point out opportunities for future work.
Slides with notes from Ruby Conf 2014 on using simple techniques to create sl...Justin Gordon
Slides with notes from Ruby Conf 2014 on using simple techniques to create slimer, clearer models, controllers, and views in Ruby on Rails. Looks better at http://www.slideshare.net/justingordon/rails-conf-2014concernsdecoratorspresentersserviceobjectshelpershelpmedecideapril222014
blog: http://www.railsonmaui.com
Code samples: https://github.com/justin808/fat-code-refactoring-techniques
In this lecture we analyze document oriented databases. In particular we consider why there are the first approach to nosql and what are the main features. Then, we analyze as example MongoDB. We consider the data model, CRUD operations, write concerns, scaling (replication and sharding).
Finally we presents other document oriented database and when to use or not document oriented databases.
Discover the origins of big data, discuss existing and new projects, share common use cases for those projects, and explain how you can modernize your architecture using data analytics, data operations, data engineering and data science.
Big Data Fundamentals is your prerequisite to building a modern platform for machine learning and analytics optimized for the cloud.
We’ll close out with a live Q&A with some of our technical experts as well.
Stretch your brain with a packed agenda:
Open source software
Data storage
Data ingestion
Data analytics
Data engineering
IoT and life after Lambda architectures
Data science
Cybersecurity
Cluster management
Big data in the cloud
Success stories
This is the first time I introduced the concept of Schema-on-Read vs Schema-on-Write to the public. It was at Berkeley EECS RAD Lab retreat Open Mic Session on May 28th, 2009 at Santa Cruz, California.
اسئلة نهائية لمقرر تقنية تصميم صفحات الويب - 1266
اعداد الطالبة: أنوار شوخة – فرع رام الله والبيرة
كلية التكنولوجيا والعلوم التطبيقية
جامعة القدس المفتوحة
Machine learning is overhyped nowadays. There is a strong belief that this area is exclusively for data scientists with a deep mathematical background that leverage Python (scikit-learn, Theano, Tensorflow, etc.) or R ecosystem and use specific tools like Matlab, Octave or similar. Of course, there is a big grain of truth in this statement, but we, Java engineers, also can take the best of machine learning universe from an applied perspective by using our native language and familiar frameworks like Apache Spark. During this introductory presentation, you will get acquainted with the simplest machine learning tasks and algorithms, like regression, classification, clustering, widen your outlook and use Apache Spark MLlib to distinguish pop music from heavy metal and simply have fun.
Source code: https://github.com/tmatyashovsky/spark-ml-samples
Design by Yarko Filevych: http://filevych.com/
Cost-based query optimization in Apache HiveJulian Hyde
Tez is making Hive faster, and now cost-based optimization (CBO) is making it smarter. A new initiative in Hive 0.13 introduces cost-based optimization for the first time, based on the Optiq framework.
Optiq’s lead developer Julian Hyde shows the improvements that CBO is bringing to Hive 0.13. For those interested in Hive internals, he gives an overview of the Optiq framework and shows some of the improvements that are coming to future versions of Hive.
Scaling Big Data Mining Infrastructure Twitter ExperienceDataWorks Summit
The analytics platform at Twitter has experienced tremendous growth over the past few years in terms of size, complexity, number of users, and variety of use cases. In this talk, we’ll discuss the evolution of our infrastructure and the development of capabilities for data mining on “big data”. We’ll share our experiences as a case study, but make recommendations for best practices and point out opportunities for future work.
Slides with notes from Ruby Conf 2014 on using simple techniques to create sl...Justin Gordon
Slides with notes from Ruby Conf 2014 on using simple techniques to create slimer, clearer models, controllers, and views in Ruby on Rails. Looks better at http://www.slideshare.net/justingordon/rails-conf-2014concernsdecoratorspresentersserviceobjectshelpershelpmedecideapril222014
blog: http://www.railsonmaui.com
Code samples: https://github.com/justin808/fat-code-refactoring-techniques
Using the Mediator Design Pattern along with the MVC pattern in an attempt to formalize the combination of these patterns as an official design methodology called "MVCM: Model View Controller + Service Mediator".
Refactoring: Improve the design of existing codeValerio Maggio
Refactoring: Improve the design of existing code
Software Engineering class on main refactoring techniques and bad smells reported in the famous Fawler's book on this topic!
Clan code is extremely essential to build scalable application which can be maintained quite easily and improved further
Slide was prepared with contribution to my colleague
and i thank them for the help!
Clean code is subjective and every developer has a personal take on it. There are some ideas that are considered best practice and what constitutes clean code within the industry and community, but there is no definitive distinction.
Synthetic Fiber Construction in lab .pptxPavel ( NSTU)
Synthetic fiber production is a fascinating and complex field that blends chemistry, engineering, and environmental science. By understanding these aspects, students can gain a comprehensive view of synthetic fiber production, its impact on society and the environment, and the potential for future innovations. Synthetic fibers play a crucial role in modern society, impacting various aspects of daily life, industry, and the environment. ynthetic fibers are integral to modern life, offering a range of benefits from cost-effectiveness and versatility to innovative applications and performance characteristics. While they pose environmental challenges, ongoing research and development aim to create more sustainable and eco-friendly alternatives. Understanding the importance of synthetic fibers helps in appreciating their role in the economy, industry, and daily life, while also emphasizing the need for sustainable practices and innovation.
Francesca Gottschalk - How can education support child empowerment.pptxEduSkills OECD
Francesca Gottschalk from the OECD’s Centre for Educational Research and Innovation presents at the Ask an Expert Webinar: How can education support child empowerment?
Operation “Blue Star” is the only event in the history of Independent India where the state went into war with its own people. Even after about 40 years it is not clear if it was culmination of states anger over people of the region, a political game of power or start of dictatorial chapter in the democratic setup.
The people of Punjab felt alienated from main stream due to denial of their just demands during a long democratic struggle since independence. As it happen all over the word, it led to militant struggle with great loss of lives of military, police and civilian personnel. Killing of Indira Gandhi and massacre of innocent Sikhs in Delhi and other India cities was also associated with this movement.
Biological screening of herbal drugs: Introduction and Need for
Phyto-Pharmacological Screening, New Strategies for evaluating
Natural Products, In vitro evaluation techniques for Antioxidants, Antimicrobial and Anticancer drugs. In vivo evaluation techniques
for Anti-inflammatory, Antiulcer, Anticancer, Wound healing, Antidiabetic, Hepatoprotective, Cardio protective, Diuretics and
Antifertility, Toxicity studies as per OECD guidelines
Acetabularia Information For Class 9 .docxvaibhavrinwa19
Acetabularia acetabulum is a single-celled green alga that in its vegetative state is morphologically differentiated into a basal rhizoid and an axially elongated stalk, which bears whorls of branching hairs. The single diploid nucleus resides in the rhizoid.
Read| The latest issue of The Challenger is here! We are thrilled to announce that our school paper has qualified for the NATIONAL SCHOOLS PRESS CONFERENCE (NSPC) 2024. Thank you for your unwavering support and trust. Dive into the stories that made us stand out!
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
The Roman Empire A Historical Colossus.pdfkaushalkr1407
The Roman Empire, a vast and enduring power, stands as one of history's most remarkable civilizations, leaving an indelible imprint on the world. It emerged from the Roman Republic, transitioning into an imperial powerhouse under the leadership of Augustus Caesar in 27 BCE. This transformation marked the beginning of an era defined by unprecedented territorial expansion, architectural marvels, and profound cultural influence.
The empire's roots lie in the city of Rome, founded, according to legend, by Romulus in 753 BCE. Over centuries, Rome evolved from a small settlement to a formidable republic, characterized by a complex political system with elected officials and checks on power. However, internal strife, class conflicts, and military ambitions paved the way for the end of the Republic. Julius Caesar’s dictatorship and subsequent assassination in 44 BCE created a power vacuum, leading to a civil war. Octavian, later Augustus, emerged victorious, heralding the Roman Empire’s birth.
Under Augustus, the empire experienced the Pax Romana, a 200-year period of relative peace and stability. Augustus reformed the military, established efficient administrative systems, and initiated grand construction projects. The empire's borders expanded, encompassing territories from Britain to Egypt and from Spain to the Euphrates. Roman legions, renowned for their discipline and engineering prowess, secured and maintained these vast territories, building roads, fortifications, and cities that facilitated control and integration.
The Roman Empire’s society was hierarchical, with a rigid class system. At the top were the patricians, wealthy elites who held significant political power. Below them were the plebeians, free citizens with limited political influence, and the vast numbers of slaves who formed the backbone of the economy. The family unit was central, governed by the paterfamilias, the male head who held absolute authority.
Culturally, the Romans were eclectic, absorbing and adapting elements from the civilizations they encountered, particularly the Greeks. Roman art, literature, and philosophy reflected this synthesis, creating a rich cultural tapestry. Latin, the Roman language, became the lingua franca of the Western world, influencing numerous modern languages.
Roman architecture and engineering achievements were monumental. They perfected the arch, vault, and dome, constructing enduring structures like the Colosseum, Pantheon, and aqueducts. These engineering marvels not only showcased Roman ingenuity but also served practical purposes, from public entertainment to water supply.
Palestine last event orientationfvgnh .pptxRaedMohamed3
An EFL lesson about the current events in Palestine. It is intended to be for intermediate students who wish to increase their listening skills through a short lesson in power point.
Honest Reviews of Tim Han LMA Course Program.pptxtimhan337
Personal development courses are widely available today, with each one promising life-changing outcomes. Tim Han’s Life Mastery Achievers (LMA) Course has drawn a lot of interest. In addition to offering my frank assessment of Success Insider’s LMA Course, this piece examines the course’s effects via a variety of Tim Han LMA course reviews and Success Insider comments.
Embracing GenAI - A Strategic ImperativePeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
2. Concerns, Decorators, Presenters, Service
Objects, Helpers, Help me Decide!
RailsConf 2014
Chicago
April 22, 2014
!
Justin Gordon
@railsonmaui
Rails Consultant
www.railsonmaui.com
2
11. DHH Quote
JG: "This is starting to boil down to utilize the framework
capabilities and move beyond only when necessary.”
DHH: "Which is really just an extension of KISS (Keep It
Simple, Stupid). When you use the
framework code for what it’s
intended, you’re not cutting
against the grain. You don’t need to write as
much code. It’s clearer to everyone because it’s the same
approach everyone else is taking."
11
13. Refactoring Examples in Pull Requests
• https://github.com/justin808/fat-code-refactoring-techniques/
pulls
• Based on Michael Hartl’s “Rails Tutorial” MicroBlog example
application
13
14. Objectives
Patterns &
Techniques
14
DRY
Methods
< 5 Lines
Classes
< 100 lines
One Instance
Variable in View
Easy to
Test
Concerns
Draper
Decorators
Validation
Classes
Presenters
Split-up
Controllers
Clarity
Easy to
Change
Guidelines
Move Logic
to Models
Easy to
Find
15. • Huge model file with even larger spec file.
• Break up the model/spec using Rails concerns.Try to break it
up by domain, but any logical split will help.
15
Scenario
16. Scenario
• You’ve got duplicated code in two models, different database
tables.
• Tease out a concern that applies to both models. Since your
models extend ActiveRecord::Base, using regular
inheritance is problematic. Instead, use a concern.
16
18. Rails Concerns
18
Big Model
some-domain class macros
some-domain instance methods
some-domain class methods
other class macros
other instance methods
other class methods
Domain Concern
some-domain
class macros
some-domain
instance methods
some-domain
class methods
19. Concerns: How
• Discover set of related code for a problem domain
• Create a module with extends ActiveSupport::Concern
• Move code into the Concern
• Break out tests into corresponding test file for the Concern
19
20. DHH on Domain vs. Technical Refactoring
"I’ve not yet found a case where the scope of the current file/
class couldn’t be brought under control by using a domain-driven
extraction approach."
"In a sea of 60 methods, there will always be
domain-based groupings, rather than technical
groupings. Never seen that not be the case."
20
21. Concerns: Example
• Break out Emailable Concern out of User model
• Captures domain logic of lower case emails on user model
• Benefits: Smaller model, smaller spec
21
22. Objectives
Patterns &
Techniques
22
DRY
Methods
< 5 Lines
Classes
< 100 lines
One Instance
Variable in View
Easy to
Test
Concerns
Draper
Decorators
Validation
Classes
Presenters
Split-up
Controllers
Clarity
Easy to
Change
Guidelines
Move Logic
to Models
Easy to
Find
23. Scenario
• Model file creating detailed validation messages with HTML
tags and URL links.
• Move the message creation code into a Draper Decorator for
the model.These decorators work great for model based
presentation code.
23
27. Draper Decorators: Why?
• Removing presentation code from your model or model-
concerns
• Consolidating some helper, view, controller methods by models
• Presentation code relating to one model, but multiple
controllers/views
• Consolidation of flash messages related to a given model
27
28. Draper Decorators: Why
• Decorators are the ideal place to:
• format complex data for user display
• define commonly-used representations of an object, like a
name method that combines first_name and last_name
attributes
• mark up attributes with a little semantic HTML, like turning a
url field into a hyperlink
28
30. Example
Several views have code that format the micropost.created_at:
!
Posted <%= time_ago_in_words(micropost.created_at) %> ago.
30
31. Scenario
• You have duplicated rendering code in several files.
• Remedy:
1. If rendering code, use a partial.
2. If ruby code, use either a view helper or create a static
method on a utility class. View helpers have access other
helpers. Utility classes require extra work to call view
context methods.
31
32. Objectives
Patterns &
Techniques
32
DRY
Methods
< 5 Lines
Classes
< 100 lines
One Instance
Variable in View
Easy to
Test
Concerns
Draper
Decorators
Validation
Classes
Presenters
Split-up
Controllers
Clarity
Easy to
Change
Guidelines
Move Logic
to Models
Easy to
Find
33. Scenario
• You are setting too many instance variables in the controller
action.You also have local variables being assigned in the view.
• Presenter pattern: Create a PORO that wraps up the values
and logic going from the controller to the view.
33
34. Scenario
• Fragment caching in your view, but some extra queries still run
• Use the Presenter pattern, with memoization in the instance
methods.
• @foobar ||= calculate_foobar
34
35. Presenters
35
Presenter Object
Wrapping Data
Needed by View
Smaller Controller
Action Creating Only
the Presenter Instance
Big Controller
Action Setting
Many Instance
Variables
View with ONE
Instance Variable
View with MANY
Instance Variables
before
after
36. Scenario
• Problem:A controller file is huge with many actions and many more
private methods.
• Solution:
1. Split up the controller into multiple files by having your routing file
map to different controllers.
2. Put any common functionality in a controller concern, similar to
how you would do it for a model.An alternative is having an
inheritance hierarchy of controllers. Mix-ins are more flexible.
36
37. Scenario
• Problem:
• Your Presenter class needs to access the view context, but it’s PORO.
• Solution:
1. Use this include in your PORO: “include Draper::ViewHelpers”.
2. Pass the controller instance into the constructor of the Presenter (include
required helpers in controller), or set the view context in the view file.
3. Pass the view context into the methods that need it on the Presenter.
37
38. Objectives
Patterns &
Techniques
38
DRY
Methods
< 5 Lines
Classes
< 100 lines
One Instance
Variable in View
Easy to
Test
Concerns
Draper
Decorators
Validation
Classes
Presenters
Split-up
Controllers
Clarity
Easy to
Change
Guidelines
Move Logic
to Models
Easy to
Find
39. 39
If a minor posts profane words:
!
1. The post shall not be valid.
2. A counter will track how many times the
minor tried to use profanity.
3. The minor's parents shall be notified.
4. A special flash alert will alert the minor to
profanity usage.
Business Case
40. –David Heinemeier Hansson
“I've yet to see a compelling "make action a
service object" example in the wild. Maybe
they exist somewhere, though. Then again,
maybe unicorns are real too.”
40
https://gist.github.com/dhh/10022098
Service Objects?
41. Service Objects Example
41
Big Micropost
Create Action
on Controller
MicropostCreationService
ControllerResponse
Flash, Flash-now, status code
Tiny Micropost
Create Action on
Controller
https://github.com/justin808/fat-code-refactoring-techniques/pull/6
before
after
42. A Bit Humbling…
DHH: "Sorry to keep shooting the patterns down, but this is
exactly what I mean when I say that most code does not need
patterns, it just needs to be rewritten better."
JG: "I think it's a pattern either way.The pattern you presented is
to use validators rather than a separate object."
DHH: Right, which Rails already has built in, and the code is
easier to follow with less work.
42
43. Single Purpose Controller
• Controller with only one action
• https://github.com/justin808/fat-code-refactoring-techniques/
pull/7
43
Big Micropost
Create Action on
Controller
Micropost Controller
Just for Create
Rest of the
Micropost Controller
44. DHH on Controllers
“It’s [controller] intended to process the incoming request, fetch
the model, and direct the user to a view or another action. If
you’re yanking logic of that nature out of the controller, you’re
making an anemic controller. Shoving this into a
service object is imo the lazy approach that
doesn’t deliver any benefits in terms of
simpler code. It imo is the sweep-it-under-the-rug approach.
44
45. DHH on the work of a Controller
"I’ve yet to see compelling controller code that couldn’t be
slimmed down by simply writing it better, spinning off another
controller, or moving domain logic to the model. Here’s another
example of a code ping pong I did off a convoluted action in
RedMine: https://gist.github.com/dhh/10023987”
45
47. Scenario
• Excessive model logic in complicated controller method.
• Either:
• Move model logic out of controller and into the models,
utilizing Rails features such as validation.
• Create a non-AR based model to handle an interaction
between two models (aka “Service Object”)
47
48. POR (Plain Old Rails)
• Use Rails Models,Validation, and Controller for their proper
jobs
• KISS (Keep It Simple Stupid)
• Don’t Invent Patterns That Don’t Need to be Invented
• Know the why of the Rails way
• Know the Rails way before deviating
48
49. Refactoring Steps
• Move validation code and checks out of controller to model
• Move creation of flash message to decorator
• Move validation code to validation class
49
50. References
• Rails Guides: http://guides.rubyonrails.org/
• Patterns to Refactor Fat ActiveRecord Models: http://
blog.codeclimate.com/blog/2012/10/17/7-ways-to-decompose-
fat-activerecord-models/
• DHH’s Example of 2 Controllers with Concerns: https://
gist.github.com/dhh/10022098
50
51. Thanks!
Special thanks to those that helped review my code samples to this talk: @dhh,
@jeg2, @gylaz, @jodosha, @dreamr, @thatrubylove, @therealadam,
@robzolkos, Thoughtbot’s Learn program forum and Ruby Rogues Parley Forum
51
Rails on Maui HQ, aka Sugar Ranch Maui
52. Thanks!
• More details at my blog:
http://www.railsonmaui.com
• Feel free to contact me
regarding your projects
• justin@railsonmaui.com
• http://airpair.me/railsonmaui
52