SlideShare a Scribd company logo
1 of 14
Rails::Engine
http://jyaasa.comCopyright 2016. Jyaasa Technologies.
miniature applications that provide functionality to their host applications
Why? > How? > What?
Namaste! - Sushil Shrestha
2y PSD + 1.5y HTML/CSS/JS + 1.5... y ROR
An enthusiastic start and a clean finish as my goal,
@sushil10018
http://jyaasa.comCopyright 2016. Jyaasa Technologies.
Maintain DRY within multiple apps
Easy upgrade when required
Reusable pieces of code
Quick Development
Separate Tests
1.
Why Engine?
A Rails
application is
actually just a
"supercharged"
engine
Admin Interface: Rails Admin
Authentication: Devise
Ecommerce: Spree
CMS: Refinery
1.2
Popular Engines.
Devise + Spree + Rails Admin == Possible
1.3
Mountable Engines.
“The details are details. They make the
product. The connections, the connections,
the connections. It will in the end be these
details that give the product its life.
http://jyaasa.comCopyright 2016. Jyaasa Technologies.
▸Charles Eames
2.
How To Engine?
Think !
Break !!
Make
!!!
http://jyaasa.comCopyright 2015. Jyaasa Technologies.
2.1
Process
to start engine
Generate Engine
$ rails plugin new <nicengine> --mountable
The --mountable option tells the generator that you
want to create a "mountable" and namespace-
isolated engine.
Namespace::TheMagic
-model, table_names, controller, views, mailers
-routes
-app directory: subdirectory for each namespace
-assets, controllers, views
-bin directory:
-the rails sub-commands used from within this will be
namescoped as well.
-test directory:
http://jyaasa.comCopyright 2015. Jyaasa Technologies.
2.3
Mount
engine in App
Integrate Engine
$ gem nicengine, path: "/path/to/nicengine"
by placing the gem in the Gemfile it will be loaded
when Rails is loaded
$ mount in application’s config/routes.rb
mount Nicengine::Engine, at: "/wherever"
=> http://localhost:3000/wherever
$ rake nicengine:install:migrations
copies the migration from engine to app
$ to override
create specific files in the same namespaced path
as it is by the engine like:
thepact/app/models/concerns/spree/
user_payment_source.rb
http://jyaasa.comCopyright 2015. Jyaasa Technologies.
3.
What?
is the engine!!!
Mini Rails Application
Can be mounted over host application
Lives being namespaced & modular3.1
Everything
can be an engine
●Getting Started with Engines:
http://guides.rubyonrails.org/engines.html
●Clearer Picture:
http://tech.taskrabbit.com/blog/2014/02/11/rails-4-engines/
●Depth:
http://api.rubyonrails.org/classes/Rails/Engine.html
●How to Build a Rails Engine:
http://brandonhilkert.com/blog/how-to-build-a-rails-engine/
http://jyaasa.comCopyright 2015. Jyaasa Technologies.
4.
Resources
learning is endless
Thank you, for
bearing me!
Any Queries?
Find me at www.sushil10018.com.
Feel free to contact me through any medium, I
always love to talk.
http://jyaasa.comCopyright 2015. Jyaasa Technologies.
fb.com/brokenmuskan
twitter.com/sushil10018
github.com/sushil10018

More Related Content

What's hot

Winter '19 release development.ppt
Winter '19 release development.pptWinter '19 release development.ppt
Winter '19 release development.pptKailas Shimpi
 
Ember App Kit & The Ember Resolver
Ember App Kit & The Ember ResolverEmber App Kit & The Ember Resolver
Ember App Kit & The Ember Resolvertboyt
 
Active Admin: Create Your Admin Interface the Easy Way
Active Admin: Create Your Admin Interface the Easy WayActive Admin: Create Your Admin Interface the Easy Way
Active Admin: Create Your Admin Interface the Easy WaySmartLogic
 
Implement lazy loading in your existing angular application (get a faster, be...
Implement lazy loading in your existing angular application (get a faster, be...Implement lazy loading in your existing angular application (get a faster, be...
Implement lazy loading in your existing angular application (get a faster, be...Katy Slemon
 
Production ember getting started
Production ember getting startedProduction ember getting started
Production ember getting startedknomedia
 
ASP.NET Core 2.0 - Best Practices per le Web API
ASP.NET Core 2.0 - Best Practices per le Web APIASP.NET Core 2.0 - Best Practices per le Web API
ASP.NET Core 2.0 - Best Practices per le Web APIEmanuele Bartolesi
 
Wordpress as a CMS - WordCampNOLA
Wordpress as a CMS - WordCampNOLAWordpress as a CMS - WordCampNOLA
Wordpress as a CMS - WordCampNOLAMarc Juneau
 
The React Cookbook: Advanced Recipes to Level Up Your Next App
The React Cookbook: Advanced Recipes to Level Up Your Next AppThe React Cookbook: Advanced Recipes to Level Up Your Next App
The React Cookbook: Advanced Recipes to Level Up Your Next AppFITC
 
How angularjs saves rails
How angularjs saves railsHow angularjs saves rails
How angularjs saves railsMichael He
 
AngularJS meets Rails
AngularJS meets RailsAngularJS meets Rails
AngularJS meets RailsElena Torró
 
Expose web service
Expose web serviceExpose web service
Expose web serviceSon Nguyen
 
Deploy with maven
Deploy with mavenDeploy with maven
Deploy with mavenSon Nguyen
 

What's hot (20)

Winter '19 release development.ppt
Winter '19 release development.pptWinter '19 release development.ppt
Winter '19 release development.ppt
 
Ember App Kit & The Ember Resolver
Ember App Kit & The Ember ResolverEmber App Kit & The Ember Resolver
Ember App Kit & The Ember Resolver
 
Active Admin: Create Your Admin Interface the Easy Way
Active Admin: Create Your Admin Interface the Easy WayActive Admin: Create Your Admin Interface the Easy Way
Active Admin: Create Your Admin Interface the Easy Way
 
Implement lazy loading in your existing angular application (get a faster, be...
Implement lazy loading in your existing angular application (get a faster, be...Implement lazy loading in your existing angular application (get a faster, be...
Implement lazy loading in your existing angular application (get a faster, be...
 
What's new in Rails 4.1
What's new in Rails 4.1What's new in Rails 4.1
What's new in Rails 4.1
 
Production ember getting started
Production ember getting startedProduction ember getting started
Production ember getting started
 
Rest With Raml
Rest With RamlRest With Raml
Rest With Raml
 
ASP.NET Core 2.0 - Best Practices per le Web API
ASP.NET Core 2.0 - Best Practices per le Web APIASP.NET Core 2.0 - Best Practices per le Web API
ASP.NET Core 2.0 - Best Practices per le Web API
 
Devise and Rails
Devise and RailsDevise and Rails
Devise and Rails
 
Wordpress as a CMS - WordCampNOLA
Wordpress as a CMS - WordCampNOLAWordpress as a CMS - WordCampNOLA
Wordpress as a CMS - WordCampNOLA
 
The React Cookbook: Advanced Recipes to Level Up Your Next App
The React Cookbook: Advanced Recipes to Level Up Your Next AppThe React Cookbook: Advanced Recipes to Level Up Your Next App
The React Cookbook: Advanced Recipes to Level Up Your Next App
 
Selenium basics
Selenium basicsSelenium basics
Selenium basics
 
How angularjs saves rails
How angularjs saves railsHow angularjs saves rails
How angularjs saves rails
 
AngularJS meets Rails
AngularJS meets RailsAngularJS meets Rails
AngularJS meets Rails
 
Aptana Jaxer
Aptana JaxerAptana Jaxer
Aptana Jaxer
 
Expose web service
Expose web serviceExpose web service
Expose web service
 
Deploy with maven
Deploy with mavenDeploy with maven
Deploy with maven
 
Web application with mule
Web application with muleWeb application with mule
Web application with mule
 
Let's do SPA
Let's do SPALet's do SPA
Let's do SPA
 
Rails engines
Rails enginesRails engines
Rails engines
 

Similar to Rails engine

How to set up and test a Rails 3 Engine
How to set up and test a Rails 3 EngineHow to set up and test a Rails 3 Engine
How to set up and test a Rails 3 Enginenicholasf
 
Lightening a component based Rails architecture
Lightening a component based Rails architectureLightening a component based Rails architecture
Lightening a component based Rails architectureEnrico Teotti
 
1 app 2 developers 3 servers
1 app 2 developers 3 servers1 app 2 developers 3 servers
1 app 2 developers 3 serversMark Myers
 
Frontend Monoliths: Run if you can!
Frontend Monoliths: Run if you can!Frontend Monoliths: Run if you can!
Frontend Monoliths: Run if you can!Jonas Bandi
 
Rails engines in large apps
Rails engines in large appsRails engines in large apps
Rails engines in large appsEnrico Teotti
 
Rails Engine | Modular application
Rails Engine | Modular applicationRails Engine | Modular application
Rails Engine | Modular applicationmirrec
 
Viridians on Rails
Viridians on RailsViridians on Rails
Viridians on RailsViridians
 
Interstella GTC: Monolith to Microservices with ECS
Interstella GTC: Monolith to Microservices with ECSInterstella GTC: Monolith to Microservices with ECS
Interstella GTC: Monolith to Microservices with ECSAmazon Web Services
 
Rails Engine :: modularize you app
Rails Engine :: modularize you appRails Engine :: modularize you app
Rails Engine :: modularize you appMuntasim Ahmed
 
Reactive application using meteor
Reactive application using meteorReactive application using meteor
Reactive application using meteorSapna Upreti
 
Plug it on!... with railties
Plug it on!... with railtiesPlug it on!... with railties
Plug it on!... with railtiesrails.mx
 
Revised Rails Engine Patterns for Montreal.rb meetup Oct 16, 2012
Revised Rails Engine Patterns for Montreal.rb meetup Oct 16, 2012Revised Rails Engine Patterns for Montreal.rb meetup Oct 16, 2012
Revised Rails Engine Patterns for Montreal.rb meetup Oct 16, 2012Andy Maleh
 
AWS Container Services – 유재석 (AWS 솔루션즈 아키텍트)
AWS Container Services – 유재석 (AWS 솔루션즈 아키텍트)AWS Container Services – 유재석 (AWS 솔루션즈 아키텍트)
AWS Container Services – 유재석 (AWS 솔루션즈 아키텍트)Amazon Web Services Korea
 
Amazon Container Services – 유재석 (AWS 솔루션즈 아키텍트)
 Amazon Container Services – 유재석 (AWS 솔루션즈 아키텍트) Amazon Container Services – 유재석 (AWS 솔루션즈 아키텍트)
Amazon Container Services – 유재석 (AWS 솔루션즈 아키텍트)Amazon Web Services Korea
 
Rails Engines - A presentation for the 22nd Athens Ruby Meetup
Rails Engines - A presentation for the 22nd Athens Ruby MeetupRails Engines - A presentation for the 22nd Athens Ruby Meetup
Rails Engines - A presentation for the 22nd Athens Ruby MeetupSkroutz S.A.
 

Similar to Rails engine (20)

Sst hackathon express
Sst hackathon expressSst hackathon express
Sst hackathon express
 
How to set up and test a Rails 3 Engine
How to set up and test a Rails 3 EngineHow to set up and test a Rails 3 Engine
How to set up and test a Rails 3 Engine
 
Lightening a component based Rails architecture
Lightening a component based Rails architectureLightening a component based Rails architecture
Lightening a component based Rails architecture
 
1 app 2 developers 3 servers
1 app 2 developers 3 servers1 app 2 developers 3 servers
1 app 2 developers 3 servers
 
Frontend Monoliths: Run if you can!
Frontend Monoliths: Run if you can!Frontend Monoliths: Run if you can!
Frontend Monoliths: Run if you can!
 
Rails engines in large apps
Rails engines in large appsRails engines in large apps
Rails engines in large apps
 
Rails Engine | Modular application
Rails Engine | Modular applicationRails Engine | Modular application
Rails Engine | Modular application
 
Viridians on Rails
Viridians on RailsViridians on Rails
Viridians on Rails
 
Interstella GTC: Monolith to Microservices with ECS
Interstella GTC: Monolith to Microservices with ECSInterstella GTC: Monolith to Microservices with ECS
Interstella GTC: Monolith to Microservices with ECS
 
Rails Engine :: modularize you app
Rails Engine :: modularize you appRails Engine :: modularize you app
Rails Engine :: modularize you app
 
SCA Reaches the Cloud
SCA Reaches the CloudSCA Reaches the Cloud
SCA Reaches the Cloud
 
Reactive application using meteor
Reactive application using meteorReactive application using meteor
Reactive application using meteor
 
Plug it on!... with railties
Plug it on!... with railtiesPlug it on!... with railties
Plug it on!... with railties
 
Revised Rails Engine Patterns for Montreal.rb meetup Oct 16, 2012
Revised Rails Engine Patterns for Montreal.rb meetup Oct 16, 2012Revised Rails Engine Patterns for Montreal.rb meetup Oct 16, 2012
Revised Rails Engine Patterns for Montreal.rb meetup Oct 16, 2012
 
AWS Container Services – 유재석 (AWS 솔루션즈 아키텍트)
AWS Container Services – 유재석 (AWS 솔루션즈 아키텍트)AWS Container Services – 유재석 (AWS 솔루션즈 아키텍트)
AWS Container Services – 유재석 (AWS 솔루션즈 아키텍트)
 
Amazon Container Services – 유재석 (AWS 솔루션즈 아키텍트)
 Amazon Container Services – 유재석 (AWS 솔루션즈 아키텍트) Amazon Container Services – 유재석 (AWS 솔루션즈 아키텍트)
Amazon Container Services – 유재석 (AWS 솔루션즈 아키텍트)
 
ragi_tutorial_v1
ragi_tutorial_v1ragi_tutorial_v1
ragi_tutorial_v1
 
ragi_tutorial_v1
ragi_tutorial_v1ragi_tutorial_v1
ragi_tutorial_v1
 
Rails onCpanel
Rails onCpanelRails onCpanel
Rails onCpanel
 
Rails Engines - A presentation for the 22nd Athens Ruby Meetup
Rails Engines - A presentation for the 22nd Athens Ruby MeetupRails Engines - A presentation for the 22nd Athens Ruby Meetup
Rails Engines - A presentation for the 22nd Athens Ruby Meetup
 

More from Jyaasa Technologies (20)

Incident management with jira
Incident management with jiraIncident management with jira
Incident management with jira
 
Extreme programming practices ( xp )
Extreme programming practices ( xp ) Extreme programming practices ( xp )
Extreme programming practices ( xp )
 
The myth of 'real javascript developer'
The myth of 'real javascript developer'The myth of 'real javascript developer'
The myth of 'real javascript developer'
 
Microservices
MicroservicesMicroservices
Microservices
 
Facade pattern in rails
Facade pattern in railsFacade pattern in rails
Facade pattern in rails
 
Scrum ceromonies
Scrum ceromoniesScrum ceromonies
Scrum ceromonies
 
An introduction to bitcoin
An introduction to bitcoinAn introduction to bitcoin
An introduction to bitcoin
 
Tor network
Tor networkTor network
Tor network
 
Collective ownership in agile teams
Collective ownership in agile teamsCollective ownership in agile teams
Collective ownership in agile teams
 
Push notification
Push notificationPush notification
Push notification
 
The Design Thinking Process
The Design Thinking ProcessThe Design Thinking Process
The Design Thinking Process
 
User story
User storyUser story
User story
 
Design sprint
Design sprintDesign sprint
Design sprint
 
Data Flow Diagram
Data Flow DiagramData Flow Diagram
Data Flow Diagram
 
OKRs and Actions Overview
OKRs and Actions OverviewOKRs and Actions Overview
OKRs and Actions Overview
 
Vue.js
Vue.jsVue.js
Vue.js
 
Active record in rails 5
Active record in rails 5Active record in rails 5
Active record in rails 5
 
Design Patern::Adaptor pattern
Design Patern::Adaptor patternDesign Patern::Adaptor pattern
Design Patern::Adaptor pattern
 
Association in rails
Association in railsAssociation in rails
Association in rails
 
Web design layout pattern
Web design layout patternWeb design layout pattern
Web design layout pattern
 

Recently uploaded

VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in sowetomasabamasaba
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfkalichargn70th171
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...masabamasaba
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyviewmasabamasaba
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile EnvironmentVictorSzoltysek
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024VictoriaMetrics
 
tonesoftg
tonesoftgtonesoftg
tonesoftglanshi9
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 

Recently uploaded (20)

VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdfPayment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
Payment Gateway Testing Simplified_ A Step-by-Step Guide for Beginners.pdf
 
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
%+27788225528 love spells in Huntington Beach Psychic Readings, Attraction sp...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT  - Elevating Productivity in Today's Agile EnvironmentHarnessing ChatGPT  - Elevating Productivity in Today's Agile Environment
Harnessing ChatGPT - Elevating Productivity in Today's Agile Environment
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 

Rails engine

  • 1. Rails::Engine http://jyaasa.comCopyright 2016. Jyaasa Technologies. miniature applications that provide functionality to their host applications Why? > How? > What?
  • 2. Namaste! - Sushil Shrestha 2y PSD + 1.5y HTML/CSS/JS + 1.5... y ROR An enthusiastic start and a clean finish as my goal, @sushil10018 http://jyaasa.comCopyright 2016. Jyaasa Technologies.
  • 3. Maintain DRY within multiple apps Easy upgrade when required Reusable pieces of code Quick Development Separate Tests 1. Why Engine?
  • 4. A Rails application is actually just a "supercharged" engine
  • 5. Admin Interface: Rails Admin Authentication: Devise Ecommerce: Spree CMS: Refinery 1.2 Popular Engines.
  • 6. Devise + Spree + Rails Admin == Possible 1.3 Mountable Engines.
  • 7. “The details are details. They make the product. The connections, the connections, the connections. It will in the end be these details that give the product its life. http://jyaasa.comCopyright 2016. Jyaasa Technologies. ▸Charles Eames
  • 8. 2. How To Engine? Think ! Break !! Make !!!
  • 9. http://jyaasa.comCopyright 2015. Jyaasa Technologies. 2.1 Process to start engine Generate Engine $ rails plugin new <nicengine> --mountable The --mountable option tells the generator that you want to create a "mountable" and namespace- isolated engine. Namespace::TheMagic -model, table_names, controller, views, mailers -routes -app directory: subdirectory for each namespace -assets, controllers, views -bin directory: -the rails sub-commands used from within this will be namescoped as well. -test directory:
  • 10. http://jyaasa.comCopyright 2015. Jyaasa Technologies. 2.3 Mount engine in App Integrate Engine $ gem nicengine, path: "/path/to/nicengine" by placing the gem in the Gemfile it will be loaded when Rails is loaded $ mount in application’s config/routes.rb mount Nicengine::Engine, at: "/wherever" => http://localhost:3000/wherever $ rake nicengine:install:migrations copies the migration from engine to app $ to override create specific files in the same namespaced path as it is by the engine like: thepact/app/models/concerns/spree/ user_payment_source.rb
  • 11. http://jyaasa.comCopyright 2015. Jyaasa Technologies. 3. What? is the engine!!!
  • 12. Mini Rails Application Can be mounted over host application Lives being namespaced & modular3.1 Everything can be an engine
  • 13. ●Getting Started with Engines: http://guides.rubyonrails.org/engines.html ●Clearer Picture: http://tech.taskrabbit.com/blog/2014/02/11/rails-4-engines/ ●Depth: http://api.rubyonrails.org/classes/Rails/Engine.html ●How to Build a Rails Engine: http://brandonhilkert.com/blog/how-to-build-a-rails-engine/ http://jyaasa.comCopyright 2015. Jyaasa Technologies. 4. Resources learning is endless
  • 14. Thank you, for bearing me! Any Queries? Find me at www.sushil10018.com. Feel free to contact me through any medium, I always love to talk. http://jyaasa.comCopyright 2015. Jyaasa Technologies. fb.com/brokenmuskan twitter.com/sushil10018 github.com/sushil10018