Switch to ActiveRecord
Add dispatch router.
Switch to ActionController
Use ActionView.
Use url_helpers