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

Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptkotipi9215
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...OnePlan Solutions
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 

Recently uploaded (20)

Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
chapter--4-software-project-planning.ppt
chapter--4-software-project-planning.pptchapter--4-software-project-planning.ppt
chapter--4-software-project-planning.ppt
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
Maximizing Efficiency and Profitability with OnePlan’s Professional Service A...
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 

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