Agile Web Development with Rails: A Pragmatic Guide by Dave Thomas

By Dave Thomas

Rails is a full-stack, open resource net framework that permits you to create full-featured, subtle web-based purposes, yet with a twist... an entire Rails software most likely has much less overall code than the XML you'll have to configure a similar software in different frameworks. With this publication you will use ActiveRecord to attach enterprise items and database tables. not more painful object-relational mapping. simply create your enterprise items and permit Rails do the remainder. you are going to the way to use the motion Pack framework to direction incoming requests and render pages utilizing easy-to-write templates and parts. See how one can take advantage of the Rails provider frameworks to ship emails, enforce net providers, and create dynamic, user-centric web-pages utilizing integrated Javascript and Ajax help. There are large chapters on checking out, deployment, and scaling. you will see how effortless it's to put in Rails utilizing your net server of selection (such as Apache or lighttpd) or utilizing its personal integrated internet server. you may be writing purposes that paintings together with your favourite database (MySQL, Oracle, Postgres, and extra) very quickly in any respect. you will create an entire on-line shop program within the prolonged educational part, so you will see how a whole Rails software is constructed - iteratively and swiftly. Rails strives to honor the Pragmatic Programmer's "DRY precept" through warding off the additional paintings of configuration records and code annotations. you could improve in real-time: make a metamorphosis, and watch it paintings instantly. omit XML. every little thing in Rails, from templates to regulate stream to company common sense, is written in Ruby, the language of selection for programmers who prefer to get the activity performed good (and depart paintings on time for a change). Rails is the framework of selection for the recent new release of net 2.0 builders. Agile internet improvement with Rails is the e-book for that iteration, written via Dave Thomas (Pragmatic Programmer and writer of Programming Ruby) and David Heinemeier Hansson, who created Rails.

Show description

Read or Download Agile Web Development with Rails: A Pragmatic Guide PDF

Best client-server systems books

ASP.NET 1.1 Insider Solutions

As an previous announcing is going, "it's now not what you recognize, it truly is who you recognize. you recognize what ASP. web is and also you understand how to strengthen web content utilizing it. yet what you do not know is who to visit for strategies, assistance and tips to utilizing ASP. web. this is the reason Sams has assembled a group of authors who're ASP. internet specialists to convey you ASP.

Official Samba-3 HOWTO and Reference Guide

You have deployed Samba: Now get the main out of it with trendy definitive consultant to maximizing Samba functionality, balance, reliability, and gear on your construction setting. Direct from contributors of the Samba staff, The reliable Samba-3 HOWTO and Reference consultant, moment variation, deals the main systematic and authoritative assurance of Samba's complex positive factors and services.

Monitoring and Managing Microsoft Exchange 2000 Server

Top practices and leading edge daily thoughts for operating the hot model of trade Server for home windows 2000. This authoritative e-book teaches IT pros liable for trade messaging structures the right way to successfully deal with the program's many and complicated method functions and contours. as soon as you will have designed and applied a messaging process, the majority of the day by day paintings comprises tracking to make sure an optimal site visitors circulation, comprehensive by means of constantly reviewing and fine-tuning dozens of method requisites and parts.

Additional info for Agile Web Development with Rails: A Pragmatic Guide

Example text

52 H ELLO , R AILS !
Lift off! There’s one last ERb feature. %> contain less-than and ampersand characters that are significant to HTML. To prevent these from messing up your page (and, as we’ll see in Chapter 26, Securing Your Rails Application, on page 600, to avoid potential security problems), you’ll want to escape these characters. Rails has a helper method, h, that does this. Most of the time, you’re going to want to use it when substituting values into HTML pages. email>" ) %> In this example, the h method prevents the special characters in the e-mail address from garbling the browser display—they’ll be escaped as HTML entities.

At this point, we have a new application running, but it has none of our code in it. Let’s rectify this situation. 2 Hello, Rails! I can’t help it—I just have to write a Hello, World! program to try a new system. The equivalent in Rails would be an application that sends our cheery greeting to a browser. As we saw in Chapter 2, The Architecture of Rails Applications, on page 22, Rails is a Model-View-Controller framework. Rails accepts incoming requests from a browser, decodes the request to find a controller, and calls an action method in that controller.

Rhtml would point the other way. ...

Say Hello!

... This approach would certainly work, but it’s a bit fragile. If we were to move our application to a different place on the web server, the URLs would no longer be valid. It also encodes assumptions about the Rails URL format into our code; it’s possible a future version of Rails might change this. Fortunately, these aren’t risks we have to take. Rails comes with a bunch of helper methods that can be used in view templates.

Download PDF sample

Rated 4.84 of 5 – based on 48 votes