Si Dunn

Archive for the ‘Ruby’ Category

Jump Start Sinatra – With this book and a little Ruby, you can make Sinatra sing – #programming #bookreview

In Book review, Book reviews, CoffeeScript, How-to, JavaScript, Kindle, Paperback, Rails, Ruby, Ruby on Rails, Ruby programming, Sinatra, SQL, Web apps on April 19, 2013 at 10:57 am

Jump Start Sinatra
Get Up to Speed with Sinatra in a Weekend
Darren Jones
(SitePoint – Kindle, Paperback)

Many Ruby developers love Rails for its power and capabilities as a model-view-controller (MVC) framework. But some of them don’t like Rails’ size, complexity, and learning curve.

Meanwhile, many other Rubyists love Sinatra for its simplicity and ease of learning, plus its ability “to create a fully functional web app in just one file,” says Darren Jones in his new book, Jump Start Sinatra. “There are no complicated setup procedures or configuration to worry about. You can just open up a text editor and get started with minimal effort, leaving you to focus on the needs of your application.”

Jones does not temper his enthusiasm for Sinatra, adding that “there isn’t a single line of bloat anywhere in its source code, which weighs in at fewer than 2,000 lines!”

His 150-page book covers a lot of ground, from downloading and installing Sinatra to building websites, working with SQLite, Heroku, Rack, jQuery, and Git, and even using some CoffeeScript (to avoid “getting our hands dirty writing JavaScript…”). He also shows how to create modular Sinatra applications that use separate classes.

“Sinatra makes it easy–trivial almost–to build sites, services, and web apps using Ruby,” the author states. “A Sinatra application is basically made up of one or more Ruby files. You don’t need to be an expert Rubyist to use Sinatra, but the more Ruby you know, the better you’ll be at building Sinatra apps.”

Jones adds: “Unlike Ruby on Rails, Sinatra is definitely not a framework. It’s without conventions and imposes no file structure on you whatsoever. Sinatra apps are basically just Ruby programs; what Sinatra does is connect them to the Web. Rather than hide behind lots of magic, it exposes the way the Web works by making the key concepts of HTTP verbs and URLs an explicit part of it.”

Jump Start Sinatra is a well-written, appropriately illustrated guide to getting started with this popular free software. Ruby newcomers may wish for a few more how-to steps or code examples. But the counter argument is, if you’re brand-new to Ruby, save Sinatra for later; focus on getting learning Ruby first. 

Darren Jones does not buy into a common assessment that’s often heard when developers are asked their views of Rails vs. Sinatra. “Opinions abound that Sinatra can only be used for small applications or simple APIs, but this simply isn’t true,” he argues. “”While it is a perfect fit for these tasks, Sinatra also scales impressively, demonstrated by the fact that it’s been used to power some big production sites.”

Some of those “big production sites,” according to Wikipedia, include such notables as Apple, LinkedIn, the BBC, the British government, Heroku, and GitHub.

Si Dunn

Learning Rails 3 – It’s not easy, but this good how-to guide definitely can help – #bookreview

In Book review, Book reviews, How-to, Kindle, Rails, Ruby, Ruby on Rails, Software, Web development on September 8, 2012 at 2:09 pm

Learning Rails 3
Simon St.Laurent, Edd Dumbill, and Eric J. Gruber
(O’Reilly,
paperbackKindle)

Ruby on Rails frequently is hailed as an “outstanding” or “powerful” or “amazing” tool for creating web applications.

But beginners often dive into it, quickly go off the rails, and give up in frustration.

“Building a Ruby on Rails application requires mastering a complicated set of skills,” the authors of Learning Rails 3 concede. Indeed, you may encounter several “problems and confusions” just getting everything installed, configured and running the right way.

Fortunately, Learning Rails 3 shows how to make the installation, configuration, and initial testing go fairly smoothly. I didn’t know (or understand) Rails and had only a smattering of Ruby experience. But I was able to accomplish an easy installation on a Windows XP machine, using railsinstaller.org. Then I was able to follow the instructions in Learning Rails 3 and get it all running.

Caution: Read and follow the book’s steps very carefully, in the correct order. Pay close attention to the text and code examples. At several different points, I glanced past a step or skipped an important character as I typed. And, no surprise, I ran into puzzling error messages or code failures until I backtracked and figured out what I had skipped. Also, a lot of stuff happens or appears to happen when you create a new Rails application or do some other tasks. Long lists of status notifications, warnings, and miscellaneous cryptic messages will stream by. But don’t panic.

“The only mandatory technical prerequisite for reading this book is direct familiarity with HTML and a general sense of how programming works,” the authors emphasize. “You’ll be inserting Ruby code into that HTML as a first step toward writing Ruby code directly, so understanding HTML is a key foundation.”

Once you get past the initial shock of installing Ruby on Rails, working at the command line, and modifying some bits of code deep within a few subdirectories, you will start discovering the power and possibilities of Rails.

If you’ve never worked with Ruby, the authors offer, in Appendix A, “An Incredibly Brief Introduction to Ruby.” (Appendix B is “An Incredibly Brief Introduction to Relational Databases,” and Appendix C provides “An Incredibly Brief Guide to Regular Expressions.”) You won’t need to be a Ruby expert; just have some basic knowledge of how to work it.

The remainder of the 387-page book is organized into 20 chapters:

  1. Starting Up Ruby on Rails
  2. Rails on the Web
  3. Adding Web Style
  4. Managing Data Flow: Controllers and Models
  5. Accelerating Development with Scaffolding and REST
  6. Presenting Models with Forms
  7. Strengthening Models with Validation
  8. Improving Forms
  9. Developing Model Relationships
  10. Managing Databases with Migrations
  11. Debugging
  12. Testing
  13. Sessions and Cookies
  14. Users and Authentication
  15. Routing
  16. From CSS to SASS
  17. Managing Assets and Bundles
  18. Sending Code to the Browser: JavaScript and CoffeeScript
  19. Mail in Rails
  20. Pushing Further into Rails

The book mercifully does not dump you head-first into the middle of Model-View-Controller (MVC) architecture. You begin by gently nibbling at its edges and using a few things you likely already know. Once you feel comfortable and can find your way around some of the subdirectories, then the real fun begins. The authors offer a rich array of how-to discussions, code examples, screen shots and “Test Your Knowledge” quizzes (with the answers conveniently available).

Learning Rails 3 is an excellent guide for Ruby on Rails newcomers. And those already working with Rails can learn from it, too.

Si Dunn

Build Awesome Command-Line Applications in Ruby – #programming #bookreview

In Book reviews, How-to, Linux, Macintosh, Programmer, Programming, Ruby, Ruby programming, Software development, UNIX, Windows on August 28, 2012 at 5:24 pm

Build Awesome Command-Line Applications in Ruby
David Bryant Copeland
(Pragmatic Bookshelf,
paperback)

The word “awesome” now is grossly overused in contemporary culture. And I hate it in book titles.

That being said, Build Awesome Command-Line Applications in Ruby is an excellent how-to guide, particularly if you have a little bit of UNIX and some basic Ruby programming in your background.

The book is “aimed at both developers and system administrators who have some familiarity with Ruby and who find themselves automating things on the command line (or wish they could),” David Bryant Copeland writes. And he adds: “Writing command-line apps in Ruby is also a great way to really learn Ruby and become a better programmer, since you can apply it directly to your day-to-day tasks.”

Mac and Linux users will have the easiest time with this book’s code examples. Things get a little bit more complicated for Windows users, especially those with no UNIX experience and not much programming background, either. The author, fortunately, lays out some workarounds.

For example, on UNIX systems, the first line of code commonly is called the shebang. In a piece of Ruby code, the shebang might look something like this: #!/usr/bin/ruby. (That example tells where the Ruby interpreter is installed.) But, at a Windows command prompt, if Ruby has been installed correctly and is in the path, the # character simply will be interpreted as the start of a comment line, and the rest of the shebang will be ignored when code is run directly, such as: ruby hello_world.rb.

In this book, David Bryant Copeland’s focus definitely is code. “There is a lot of code,” he says, “and we’ll do our best to take each new bit of it step by step.” As the book progresses, two command-line applications are developed, enhanced, and improved. One is a database-backup app, and the other is a command suite, “an app that provides a set of commands, each representing a different function of a related concept.”

This is not a Ruby primer, so get some experience in that language first before tackling this book. But if you are now reasonably comfortable with Ruby coding on a graphical user interface (GUI) and want some new challenges, consider moving to the command line and use this excellent book as your guide.

The requirements are minimal: a free Ruby download and a text editor or a UNIX-like shell. But the payoff is very good.

In his 10 chapters, the author discusses and illustrates “every detail of command-line application development, from user input, program output, and code organization to code handling, testing, and distribution” while the two example applications are created, tested, and enhanced.

There is plenty to learn, and Build Awesome Command-Line Applications in Ruby does a fine job of  leading you through the process in short-chapter steps.

Si Dunn

Introducing Regular Expressions – Finding your perfect match…in strings – #bookreview

In Book review, Book reviews, C#, How-to, Java, JavaScript, Kindle, PayPal, Perl, Programmer, Programming, Python programming, Regular expressions, Ruby on August 20, 2012 at 12:51 pm

Introducing Regular Expressions
Michael Fitzgerald
(O’Reilly, paperbackKindle)

“Regular expressions are specially encoded text strings used as patterns for matching sets of strings,” Michael Fitzgerald writes in this example-rich new book that focuses on learning by doing.

Veteran programmers who work with Perl, Java, JavaScript, C# and a number of Unix utilities often consider regular expressions to be an important part of their toolkit. Ruby 1.9 and Python 3 also support regular expressions.

“Regular expressions have a reputation for being gnarly,” Fitzgerald notes. However, using the online Regexpal JavaScript regular expression tester, he shows you how to dive right into the very basics and start working your way up.

He introduces several other applications that let you work with regular expressions. And his chapters smoothly take you from matching single digits to matching text strings, number strings, boundaries such as the beginnings or endings of words, character classes, and beyond, including white-space patterns and Unicode. He also shows how to perform some fairly esoteric operations such as “negative lookaheads,” where you verify that a certain pattern of text or digits does not appear in a string ahead of certain other text, numbers, or other qualifiers.

The 136-page book has ten chapters:

  1. What Is a Regular Expression?
  2. Simple Pattern Matching
  3. Boundaries
  4. Alternation, Groups, and Backreferences
  5. Character Classes
  6. Matching Unicode and Other Characters
  7. Quantifiers
  8. Lookarounds
  9. Marking Up a Document with HTML
  10. The End of the Beginning

An appendix provides a regular expression reference, listing such items as control characters, Unicode whitespace characters, metacharacters, and others. There is also a glossary of regular expression terms, such as “greedy match” and “zero-width assertions.”

Fitzgerald recommends his book for those who are “new to regular expressions or programming…the reader who has heard of regular expressions and is interested in them but who really doesn’t understand them yet.”

Those who are a bit beyond the beginner level, however, likewise can benefit from Introducing Regular Expressions and its handy examples and how-to summaries.

Si Dunn

The Data Journalism Handbook – Get new skills for a new career that’s actually in demand – #bookreview

In Book review, Book reviews, business, Data journalism, Data science, Data scientist, Google, Graphics, How-to, Journalism, Kindle, Microsoft Office, Programming, Python programming, R programming, Rails, Ruby, Social media, SQL on August 17, 2012 at 9:54 am

The Data Journalism Handbook: How Journalists Can Use Data to Improve the News
Edited by Jonathan Gray, Liliana Bounegru, and Lucy Chambers
(O’Reilly, paperbackKindle)

Arise, ye downtrodden, unemployed newspaper and magazine writers and editors yearning to be working again as journalists. Data journalism apparently is hiring.

Data journalism? I didn’t know, either, until I read this intriguing and hopeful collection of essays, how-to reports, and case studies written by journalists now working as, or helping train, data journalists in the United States and other parts of the world.

Data journalism, according to Paul Bradshaw of Birmingham City University, combines “the traditional ‘nose for news’ and ability to tell a compelling story with the sheer scale and range of digital information now available.”

Traditional journalists should view that swelling tide of information not as a mind-numbing, overwhelming flood but ”as an opportunity,” says Mirko Lorenz of Deutsche Welle. “By using data, the job of journalists shifts its main focus from being the first ones to report to being the ones telling us what a certain development actually means.”

He adds: “Data journalists or data scientists… are already a sought-after group of employees, not only in the media. Companies and institutions around the world are looking for ‘sense makers’ and professionals who know how to dig through data and transform it into something tangible.”

So, how do you transform yourself from an ex-investigative reporter now working at a shoe store into a prizewinning data journalist?

A bit of training. And, a willingness to bend your stubborn brain in a few new directions, according to this excellent and eye-opening book.

Yes, you may still be able to use the inverted-pyramid writing style and the “five W’s and H” you learned in J-school. But more importantly, you will now need to show you have some good skills in (drum roll, please)…Microsoft Excel.

That’s it? No, not quite.

Google Docs, SQL, Python, Django, R, Ruby, Ruby on Rails, screen scrapers, graphics packages – these are just a few more of the working data journalists’ favorite things. Skills in some these, plus a journalism background, can help you become part of a team that finds, analyzes and presents information in a clear and graphical way.

 You may dig up and present accurate data that reveals, for example, how tax dollars are being wasted by a certain school official, or how crime has increased in a particular neighborhood, or how extended drought is causing high unemployment among those who rely on lakes or rivers for income.

You might burrow deep into publically accessible data and come up with a story that changes the course of a major election or alters national discourse.

Who are today’s leading practitioners of data journalism? The New York Times, the Texas Tribune, the Chicago Tribune, the BBC, Zeit Online, and numerous others are cited in this book.

The Data Journalism Handbook grew out of MozFest 2011 and is a project of the European Journalism Centre and the Open Knowledge Foundation.

This book can show you “how data can be either the course of data journalism or a tool with which the story is told—or both.”

If you are looking for new ways to use journalism skills that you thought were outmoded, The Data Journalism Handbook can give you both hope and a clear roadmap toward a possible new career.

Si Dunn

Exploring Everyday Things with R and Ruby – An entertaining & challenging guide to learning 2 languages – #programming #bookreview

In Book review, Book reviews, How-to, Kindle, Paperback, Programmer, Programming, R programming, Ruby, Software on August 12, 2012 at 9:43 am

Exploring Everyday Things with R and Ruby
Sau Sheong Chang
(O’Reilly, paperbackKindle)

Sau Sheong Chang has embarked joyfully on Mission Next-to-Impossible. With his new book, he wants to inspire everyone to recapture at least some of their childhood passion for exploring and discovering.

“For many professional programmers,” he writes, “coding is a job. It’s drudgery, low-level work that brings food to the table. We have forgotten the promise of computers and the power of programming for discovery. This book is an attempt to bring back that wonder and sense of discovery.”

His new book is indeed full of opportunities for exploration and discovery. If you have a basic understanding of computer programming, a playful curiosity, and a willingness to learn new things, you can have some real fun with this entertaining, well-written how-to guide.

Exploring Everyday Things with R and Ruby provides a basic introduction to both programming languages and shows how to use them in simulations that can create solutions to several practical problems.

A few examples:

  • You must set up a new office with 70 employees. How can you accurately determine the number of restroom stalls that will be needed?
  • How can you do data mining and pattern analysis within your own email, accumulated over years? (Caution: You may discover things about yourself that you haven’t yet realized.)
  • What is the process for building a homemade stethoscope and extracting useful data from a WAV file of your heartbeat?

Author of two previous books on Ruby, Sau Sheong Chang is director of applied research for HP Labs in Singapore. In this new work, he shows how to use “simulations to create experiments, isolate factors, and propose hypotheses to explain the results of the experiments.” And you learn how to work with both Ruby and R in the exercises.

In his view, “…Ruby is a programming language for human beings. Yukihiro “Matz” Matsumoto, the creator of Ruby, often said that he tried to make Ruby natural, not simple, in a way that mirrors life. Ruby programming is a lot like talking to your good friend, the computer. Ruby was designed to make programming fun and to put the human back into the equation for programming.”

Meanwhile, “R offers a powerful and appealing interactive environment for exploring data, and using that interactive environment is part of its appeal. The other reason why R is getting increasingly popular is that it is free [like Ruby]. The existing batch of tools for data analysis—S, MATLAB, SPSS, and SAS—can be quite expensive, and R is a cost-effective way to achieve the same goals. Also, R has a very vibrant and active community of domain experts and developers, including statisticians and data scientists who contribute many very useful packages that enhance its overall capabilities.”

The 233-page book is nicely organized and adequately illustrated. There are, however, two minor dings that may briefly irritate some beginners.

First, in his introduction to R, Sau Sheong Chang describes the virtues of using a graphics package known as ggplot2 and states that it will be used extensively in the book’s exercises. But he doesn’t, at that point, specifically instruct readers how to get it—install.packages(‘ggplot2’)—and verify that it has been downloaded and installed—installed.packages(). So a teaching moment is missed. Instead, you have to remember to turn back about 20 pages to the “Installing Packages” discussion and figure out that you now need to download ggplot2. (But that’s just part of “discovery,” it could be argued.)

Second, a few of the code examples in Chapter 2 require tedious amounts of command-line typing. You don’t get code you can download from the author’s site until Chapter 3—just a nitpick.

You won’t become an R or Ruby expert by reading Exploring Everyday Things with R and Ruby. But this excellent book can show you how to install the software, learn the basics of using it, and actually put it to work in some practical ways.

From there, you can launch your own journeys of exploration and discovery—and use R and Ruby as you go.

Si Dunn

Rails Recipes: Rails 3 Edition – Solutions to 70 Problems & More – #bookreview #in #rails #programming

In Book review, Book reviews, Books, Developer, How-to, Paperback, Programmer, Programming, Rails, Ruby, Software, Web designer on June 28, 2012 at 8:24 am

Rails Recipes: Rails 3 Edition
Chad Fowler
Pragmatic Bookshelf, paperback, list price $35.00)

Chad Fowler’s Rails Recipes: Rails 3 Edition is aimed at developers who need to solve tough problems while using Rails. But Rails beginners also can learn plenty from the 70 “recipes” in this excellent guide.

The 280-page book is divided into seven parts. Busy Rails developers can jump directly to any part that deals with their latest vexation. Those new to Rails also can read the book in any “recipe” order, or they can take it straight through like a textbook.

The seven parts are:

  1. Database Recipes
  2. Controller Recipes
  3. User Interface Recipes
  4. Testing Recipes
  5. Email Recipes
  6. Big-Picture Recipes
  7. Extending Rails

The author uses a simple problem-solution approach. For example, in Recipe 28, the problem is: “You notice a recurring pattern in your application. You’re writing code for the same actions over and over again in your controllers.” The solution Fowler presents involves learning how to use the Rails versions of macros to create “code that writes codes for you….” by taking “advantage of Ruby’s metaprogramming capabilities.”

He then shows how, noting that “Ruby, like Lisp and Smalltalk before it, allows programmers to easily write code that writes and loads code at runtime.” He adds: “This is a really deep topic, and we’re not going to attempt to dig too deep into it here. Instead, we’ll focus on the details necessary to implement our own Action Controller macros.”

Each recipe spans only a few pages but is presented clearly and is well illustrated with code examples.

Anyone working with Rails or still adding it to their programming capabilities should consider getting Rails Recipes: Rails 3 Edition and keeping it within easy reach.

Si Dunn

Ride Some Rails with The Rails View – #bookreview #in #rails #programming

In Book review, Book reviews, Cascading Style Sheets, How-to, HTML5, Paperback, Programming, Rails, Ruby, Software on June 27, 2012 at 11:48 am

The Rails View: Create a Beautiful and Maintainable User Experience
John Athayde and Bruce Williams
(Pragmatic Bookshelf, paperback, list price $35.00)

Rails was created in 2004 “and the web discovered the MVC (model-view-controller) pattern in earnest, which brought a whole new level of productivity and fun to a world of developers and designers,” the authors of this “very ambitious” book declare.

They note that many books “provide a firm foundation for writing controllers and models (which benefit greatly from being written top-to-bottom in plain Ruby), but when it comes to views—that meeting place of Ruby, HTML, JavaScript, and CSS (not to mention developers and designers)—what’s a disciplined craftsman to do?”

Athayde and Williams have written this views-centric book to help “widen the discussion of Rails best practices to include solid, objective principles we can follow when building and refactoring views.”

They add: “Many developers are uneasy around the view layer” and frequently in a hurry to just get out of it, leaving it “easy for the view layer to become a no-man’s land that no one owns or adequately polices or a junkyard that no one feels safe to walk through.”

The 245-page book’s nine chapters are well-written and adequately illustrated with code examples, screen shots and other illustrations, including highlighted tips.

The book follows a structure where chapters build upon the content of the previous chapter. The chapters are:

  • Creating an Application Layout
  • Improving Readability
  • Adding Cascading Style Sheets
  • Adding JavaScript
  • Building Maintainable Forms
  • Using Presenters
  • Handing Mobile Views
  • Working with Email
  • Optimizing Performance

One of the appendices is titled “The Rails View Rules.” It is a handy list of 10 “rules of thumb” when doing development work.

The book is aimed mostly at designers working with Rails and Rails developers working in the view layer. But newcomers curious about Rails or just getting started with Rails can learn from it, too.

The Rails View was built on top of Rails 3.2.1 and Ruby 1.9.3 and should be compatible with future stable releases for quite some time,” the authors say.

If you try to use earlier versions, you may run into some problems, they caution. “Much of the content and code would need to be modified to work with some earlier versions due to our coverage of the Rails 3.1+ asset pipeline and use of the new Ruby 1.9 Hash literal syntax.”

Si Dunn

The dRuby Book – A fine new intro to distributed Ruby – #bookreview #in #ruby #programming

In Book reviews, dRuby, How-to, Paperback, Programming, Ruby, Software on May 30, 2012 at 7:53 am

The dRuby Book: Distributed and Parallel Computing with Ruby
Masatoshi Seki (translated by Makoto Inoue)
(Pragmatic Bookshelf,
paperback, list price $35.00)

Looking to expand your Ruby horizons? Distributed Ruby, or dRuby, may be precisely the challenge you are seeking. And this new how-to book can get you started.

The author, Japan’s well-known Ruby master, Masatoshi Seki, previously has published two books (in Japanese) involving dRuby: Distributed Object Programming with dRuby and Distributed Web Programming with dRuby.

The dRuby Book from Pragmatic Bookshelf, is an updated and expanded translation of Seki’s Distributed Web Programming with dRuby.

Do not let the word “translation” stop you from considering this new how-to guide. Makoto Inoue has done an excellent job of rendering Masatoshi Seki’s text into clear, smooth English, with editing help from Susannah Davidson Pfalzer.

Seki has rewritten his book to include “the latest dRuby information and new libraries.” He notes: “Stateful web servers are a core concept of dRuby. dRuby lets you pass normal Ruby objects and call their methods across processes and networks seamlessly. With dRuby, you’ll experience the world of dirtributed computing as a natural extension of Ruby.”

He adds: “You don’t need to know much about distributed systems as a prerequisite for reading this book, but you should know the basic Ruby syntax, know the standard Ruby classes, and be able to write some simple code.”

dRuby is “one of the standard libraries that comes with the Ruby core code, and you can use it to write distributed programming apps without the hassle of installing and configuring additional components,” the author points out.

But be sure you have worked with Ruby a bit before jumping into this 253-page book. Its requisite “Hello, world” example – with no preliminary how-to instructions – shows (1) how to create a server that prints out strings and (2) how to code a simple client that can make the server print “Hello, World” – and each process is run from a separate terminal window. Code-wise, it’s not a big deal, but don’t try this at home without learning the basics of Ruby first.

Seki’s book is organized into four major parts:

  • Introducing dRuby
  • Understanding dRuby
  • Process Coordination
  • Running dRuby and Rinda in a Production Environment

The 12 chapters utilize short, to-the-point paragraphs and offer numerous short code examples.

If you thinking of diving into distributed systems, client-server network programming, or concurrent programming, or maybe just seeking “a more lightweight alternative to Ruby on Rails or Sinatra,” definitely check out The dRuby Book.

Si Dunn

#

Web Development Recipes – To make life easier for you & your users – #programming #bookreview #in

In Book reviews, Books, How-to, Internet, JavaScript, Programmer, Programming, Ruby, Software, Uncategorized, Web, Web development on February 13, 2012 at 4:37 pm

Web Development Recipes
By Brian P. Hogan, Chris Warren, Mike Weber, Chris Johnson, and Aaron Godin
(Pragmatic Bookshelf, paperback, list price $35.00)

“It’s no longer enough,” this book’s authors state, “to know how to wrangle HTML, CSS, and a bit of JavaScript. Today’s web developer needs to know how to write testable code, build interactive interfaces, integrate with other services, and sometimes even do some server configuration, or at least a little bit of backend work.”

Their handy, helpful new work offers more than 40 “practical recipes that range from clever CSS tricks that will make your clients happy to server-side configurations that will make life easier for you and your users. You’ll find a mix of tried-and-true techniques and cutting-edge solutions, all aimed at helping you truly discover the best tools for the job.”

Web Development Recipes is organized as seven chapters and two appendices:

  • Chapter 1: Eye-Candy Recipes – Covers a few ways to use cascading style sheets (CSS) and other techniques to improve the appearance of web pages.
  • Chapter 2: User Interface Recipes – Focuses on techniques to make better user interfaces, including JavaScript frameworks like Knockout and Backbone. Also shows ”how to make better templates for sending HTML emails.”
  • Chapter 3:  Data Recipes - Explores ways to work with user data. Shows how to create a simple contact form and gives “a peek” at using CouchDB’s CouchApp to build a database-driven application.
  • Chapter 4: Mobile Recipes - Shows ways to work with mobile computing platforms. Focuses on jQuery Mobile, handling multitouch events and helps you “dig a little deeper into how to determine how and when to serve a mobile version of a page to your visitors.”
  •  Chapter 5: Workflow Recipes - Focuses on improving your processes, including using Sass to “make your life easier when managing large style sheets.” Also introduces CoffeeScript, “a new dialect for writing JavaScript that produces clean, compliant results.”
  • Chapter 6: Testing Recipes – Using automated tests to help you build “bullet-proof” websites. Also, “how to start testing the JavaScript code you write.”
  • Chapter 7: Hosting and Deployment Recipes – Building a virtual machine to be used as a testing environment, so you can test before moving to a real production environment. Also covers setting up secure sites, doing redirects properly, and automating website deployments “so you won’t accidentally forget to upload a file.”
  •  Appendix A1:  Installing Ruby - Several of the web development recipes require having the Ruby programming language installed on your computer.
  • Appendix A2: Bibliography – Lists six works for further reference.  

Along with Ruby, there are a few other prerequisites:

  • HTML5 and jQuery
  • Working with command-line prompts in a shell on a Windows, OS X or Linux machine.
  • QEDServer (can be downloaded from the book’s website).
  • A virtual machine (either set up with help from the book or downloaded already configured from a website link in the book).

The source code for the book’s projects also can be downloaded from the book’s website.

In many of the recipes, the authors assume that you have “a little experience with writing client-side code with JavaScript and jQuery.” But if you don’t, they contend you can still learn a lot by reading the recipes and studying the source code they’ve provided.

Each recipe is presented in a straightforward problem, ingredients and solution format, with clear explanations, code examples, illustrations, tips and links to more information.

If you are doing web development work or wanting to move into that arena, Web Development Recipes could be a very good book to keep handy.

#

Si Dunn is a novelist, screenwriter, freelance book reviewer, and former software technical writer and software/hardware QA test specialist. His latest book is a detective novel, Erwin’s Law. His other published works include Jump, a novella, and a book of poetry, plus several short stories, including The 7th Mars Cavalry, all available on Kindle.

Follow

Get every new post delivered to your Inbox.

Join 1,349 other followers