Advanced Rails - Building Industrial-Strength Web Apps in Record Time

(Tuis.) #1

126 | Chapter 4: Database


rescue ActiveLDAP::AuthenticationError
return false
end
end
end

Authentication is then very simple:


LdapUser.authenticate "my_username", "password" # => true or false

Further Reading


Chris Date’sDatabase in Depth(O’Reilly) is a very accessible introduction to rela-
tional theory aimed at software developers who are experienced in the use of relational
databases. Itreintroduces readers into the technical foundations behind the rela-
tional model.


Theo Schlossnagle’sScalable Internet Architectures(Sams) is a short but comprehen-
sive treatment of ways to accomplish scalability (both high availability and load bal-
ancing are covered); it covers ground from the smallest two-server failover cluster up
to global server load balancing.


Both the MySQL manual (http://dev.mysql.com/doc/) and the PostgreSQL manual
(http://www.postgresql.org/docs/) have a wealth of information about general data-
base topics, as well as specific information pertaining to the use of those DBMSs.

Free download pdf