SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 257 | Next

Jonathan Snook, Aaron Gustafson, Stuart Langridge, and Dan Webb

"Accelerated DOM Scripting with Ajax, APIs, and Libraries"

If you find that you??™re writing two totally separate applications for
browsers with and without JavaScript, it??™s worth having a major rethink. There??™s normally
a better way.
CHAPTER 9 n A DYNAMIC HELP SYSTEM 190
Figure 9-1. A diagram showing the basic and enhanced flow of the help feature
Preparing the Project
I assume that you have Ruby and Ruby On Rails installed on your machine. If you don??™t, you
can visit the Ruby On Rails site to get full instructions on its installation (http://rubyonrails.
org/download). After you have Rails installed, download the example code from
www.apress.com and unzip it to your working directory (I also listed it at the end of this chapter
for quick reference). This gives you a Rails application with some of the donkey work done for
you so you can concentrate on the UI.
The only files you??™ll need to manipulate are those in the public directory (which contains
the style sheets and scripts) and those in app/views (the HTML templates, with .rhtml extensions).
Notice that the library files you??™ll use are placed in public/javascripts. In this project
you??™ll use Prototype (prototype.js), Low Pro (lowpro.js), and finally, for visual effects, Moo.fx
for Prototype (moofx.js). You??™ll be taking a closer look at these later??”now you can start writing
some HTML.
Writing the Markup
Although this is not a book about HTML, it??™s worth stressing that writing the HTML for an
application should be a considered process instead of an afterthought.


Pages:
245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269