Reverse Engineering
Rails Models
Content
• what is reverse engineering?
• Creating Rails models
• Applying reverse engineering
• how it works
• rare_map
• commands
• schegen
install rare gem
create rare_map.yml
Reverse Engineering
raremap
rake db:migrate
Model files will be generates
Design the DB
with ER diagram
Use DB tool to convert
ER
diagram to tables
restore database
backup file
create empty database
using DB tools
How it works…
Creating Tables in ER Diagram
Generation tables
Create Empty Database
Restore Database
Restore Database
Created tables
gem
configure data
try out
schengen
creates associations too…
Advantages
• Migrating projects from other language to ruby on rails
is much easier now.
• Using few commands we can easily generate rails
models.
• Since model code is machine generated, code will be
flawless with uniform coding standard.
Thank you…

Reversengineering

Editor's Notes

  • #2 Reverse engineering is taking apart an object to see how it works in order to duplicate or enhance the object For example, when a new machine comes to market, competing manufacturers may buy one machine and disassemble it to learn how it was built and how it works
  • #5 consider a general scenario where you want to move database from other projects irrespective of language. that is where RE comes into picture
  • #6 consider a general scenario where you want to move database from other projects irrespective of language. that is where RE comes into picture