"Couldn't you write some standalone scripts to run from the commandline to insert new posts into your blog?"
As someone mentioned in the comments on that site, there's no need to write special scripts for this - using script/console does the job nicely with Rails.
script/console
post = BlogPost.new("title", "body", ... )
post.save
^d
You're modifying the database vs. in memory objects, but when you're scaling up via multiple app server instances, it's handy to store the info in the db.
You can certainly do something similar with other languages under the right constraints. For example you can fire up a copy of your application from the command line (or from within Emacs using IPython mode for example). The difference is that you're not connecting to the same instance as the web server so for example you can't change in memory constructs. But for an applications that uses a database for data storage you can certainly accomplish similar things.
I'm at the opposite end of the spectrum. I used Scheme to make ourdoings.com. I know how to open up a REPL on the server but I never have. To keep me motivated to implement features in such a way that anybody can use them, I maintain a strict discipline of not doing anything that I haven't made a user interface for. This keeps me motivated to implement new features for all my users.
"When I want to post a new model, I SSH to my server, fire up Emacs, connect to the Lisp running on my running server via local SLIME, and run an ADD-MODEL function. Simple. Lisp automatically timestamps my posts, and checks for empty-string model names, and all the other good stuff you'd want from a control panel. (Plus if it fails, I get a debugger.)"
I mean, that's great for him personally and all, but "Step 1: Use Emacs" pretty much makes this a non-starter for something like 95% of the people in the world who might run a blog or personal website.
15 comments
[ 3.0 ms ] story [ 47.8 ms ] threadDepends on the server. It's hard to find a Ruby webapp that runs non-persistently.
As someone mentioned in the comments on that site, there's no need to write special scripts for this - using script/console does the job nicely with Rails.
You're modifying the database vs. in memory objects, but when you're scaling up via multiple app server instances, it's handy to store the info in the db.I do appreciate the "lisp" approach though, for sure.
It sounds like Mr. Carper just likes what's familiar to him, which is the real benefit.
I do like the idea of a command line style interface to a blog.
yea sounds it...
I mean, that's great for him personally and all, but "Step 1: Use Emacs" pretty much makes this a non-starter for something like 95% of the people in the world who might run a blog or personal website.