In
many cases, the work required to integrate such a high-level component into an
existing application outweighs the benefits of not writing the component from
scratch.
In short, engines are best seen as a way to structure plugins that need controller
and view code, rather than a drop-in replacement for high-level features.
In this respect, engines are amazingly powerful; they allow plugins to augment
an application??™s models, views, controllers, helpers, and even routes and
migrations.
Internationalization and localization
There are many valid approaches to the problems of internationalization and
localization. We discuss several solutions in Chapter 8. ActiveSupport??™s Multi-
Byte standardizes the low-level operations on Unicode text, but there are still
many valid ways to localize an application at the high level.
Authentication and authorization
Again, there are many application-specific ways to authorize users that authorization
does not belong in Rails. Authorization can range from a simple ???admin???
Boolean flag on a user??™s record to a complete role-based access control system,
and there are plenty of plugins available for authorization in Rails.
Similarly, there are many valid ways to authenticate users. The only authentication
method in Rails proper is HTTPBasic authentication, because it is very simple.
However, the most popular authentication solutions descend from the
acts_as_authenticated plugin by Rick Olson (which has its roots in Tobias
L??tke??™s original Login Generator).
Pages:
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441