- shared code across controller, models and views
- stored in gems
- has folder structure similar to app
- lib directory has engine file as it's gem
- load order - change so that engine loads first
- config railties order
- based on load path app files can expand classes
- keeps only common code in engine
- can't be expanded like Ruby class
- app will use either the app or engine file
- made change in engine commit then get GIT ref
- change git ref in Gemfile of all apps
- symlink engines to app directory with rake tasks or gem link to path
- before deployment go through typical dev process
- Name space all engine files to avoid name conflicts
- Prevent bi-directional coupling
- Avoid app specific conditional
- include base behaviour and assoiations
- in each add app specific code and behavoir
- need to customize persentation for one app specific
- common helper in engine and redfine specific methods
- extract parts of view that needs to be customize to partial and redfine in app
- problem multiple apps need to contribute data to view in different places
- add helper that reads partials from ext directory and insert based on file name
- each needs different features in different location
- engine looks up config from YAML file and uses conditionals
- setting up engine first time
- switching contexts for making changes
- adding ref to Gemfile
- resuse of code
- defined boundries for where app code and feature code exists
- reusing small bits of MVC
- avoid network infrastructure and more code to interacte
- less over head to use as engine at first
- better for large ammount of code
- information needs to be consumed by muliple laungages
- offload feature to it's own service
- Develop engine for Student Managment for myCP
- Possible replace theme gem with engine