Permalink
Browse files

Merge remote-tracking branch 'hobodoc/master'

  • Loading branch information...
2 parents 778577f + 48adc1a commit f55c1c17015d4ec214242fc7ac04477f455a2b20 @bryanlarsen bryanlarsen committed Oct 29, 2012
Showing with 32 additions and 10 deletions.
  1. +31 −9 doc/manual/FAQ.markdown
  2. +1 −1 doc/manual/toc.markdown
View
@@ -58,14 +58,15 @@ Hobo in development mode is much slower than vanilla Rails, however in
production mode the speed should be comparable.
Optimizing a Hobo application is very similar to optimizing a Rails
-applications -- there are many resources available talking about how
-to optimize a Rails application.
+application, so many of the techniques and online resources which
+apply to Rails apps may help for Hobo apps too.
There are two major steps to optimizing a Rails application:
-optimizing database access and caching.
++ optimizing database access
++ caching
-Optimizing database access is a little bit more difficult in Hobo than
-it is in Rails because database access in Hobo is usually implicit. To
+*Optimizing database access* is slightly more difficult in Hobo than in
+Rails because database access in Hobo is usually implicit. To
optimize, we add an initial efficient explicit access. For example:
def show
@@ -76,15 +77,15 @@ optimize, we add an initial efficient explicit access. For example:
Make sure that your relationships have the :inverse_of option set on
both ends or this technique will make things worse rather than better.
-Caching a Hobo application is much easier than caching a Rails
+*Caching* a Hobo application is much easier than caching a Rails
application. Rails caching is described in the [Caching with Rails
Guide](http://guides.rubyonrails.org/caching_with_rails.html). Page
caching and action caching are identical in both Hobo & vanilla Rails,
but [Hobo adds several tags to make fragment caching much
easier](http://cookbook-1.4.hobocentral.net/api_taglibs/cache).
There will eventually be a blog post and/or manual page or something
-describing Hobo 1.4's caching support in more detail. Hopefully soon.
+describing Hobo 2.0 caching support in more detail. Hopefully soon.
# What's a good development cycle?
@@ -93,6 +94,27 @@ migration' pretty much anytime I'd changed a file. Eventually I've
worked out when I *should* do a "hobo g migration", but I wasn't doing
it enough to start with and that caused silly problems.
+This is a big question, since there are lots of opinions on how
+best to do development. But here are some thoughts:
+
+- work in small iterative loops, and test what you do at each stage
+- get the guts of your data model working first, eg company has many
+people, each person has many tasks etc.
+- use the vanilla Hobo app framework to verify that you've got this core
+plumbing working, before starting on your custom pages and controllers
+- migrations only need to happen when you change the data model
+(ie when you add/delete fields or indexes from files in the models folder)
+- use the rails console if you want to interrogate the database while
+running your
+app
+- run your app in debug mode if you're struggling to work out what's
+happening in the dryml, controllers, or specifically if you want to
+understand what "this"is at any specific point.
+- use Heroku or similar as a staging/test environment - this will
+force you to make sure your configuration, plugins etc are nailed down
+- use Firefox with Firebug or similar when working on tweaks to styles,
+layout, ajax etc
+
# What do you need to know about Rails to get started?
and where do you find out more about Rails (and why you'll need to do so)?
@@ -105,8 +127,8 @@ let us know of others!
# How do I deploy to Heroku?
One of the last questions asked by the setup wizard is whether your
-application will be deployed to Heroku. If you answer that in the
-affirmative, nothing should need to be done. However, if you answered
+application will be deployed to Heroku. If you answer yes to that, nothing
+more should need to be done. However, if you answered
it in the negative or if it isn't working, there are two changes you
can make to help you run on Heroku or anywhere else with a read-only
file system.
View
@@ -1,7 +1,7 @@
Hobo Manual
{.document-title}
-Welcome to Hobo, I'm sure you'll enjoy the ride.
+Welcome to Hobo, we're sure you'll enjoy the ride.
## Introduction

0 comments on commit f55c1c1

Please sign in to comment.