John Joyce
3/23/2007 12:05:00 PM
Yeah, SQLite is a good choice for speed especially, but it isn't
nearly as well documented as MySQL or PostgreSQL so if you go with a
database, start with something well-documented and with a good book
so you don't get lost.
For small site (like 10 pages or less) that doesn't change often,
just avoid a database for the site as a whole. If you need a news
page that gets updated regularly, then you might want more, but an
easy solution is to use a blog for news and customize the appearance.
Lots of Rubyists and Rails people use WordPress because it works so
well and is well documented and proven as a solution. Never mind that
it is PHP driven, that's not a bad thing. If you're planning to use
Ruby for web sites, it might be good to learn about PHP too, you can
see a lot of cool ideas there and good functionality. You can always
recreate it in Ruby!
A good tool for this kind of comparison are the OReilly books PHP
Cookbook and Ruby Cookbook. They focus on little code solutions to do
specific things. (though I must say the Ruby Cookbook is slightly
better because it goes into greater detail of explaining what and
why). The Ruby Cookbook is also good for building muscles, because
it's not lightweight.
If your muscles get too big, you'll have to switch to Python, because
many Python books are just very thick and heavy.
(?)
On Mar 23, 2007, at 8:38 PM, Phillip Gawlowski wrote:
> John Joyce wrote:
>
>> That's it basically. It can be more complex and sophisticated,
>> like Rails or WordPress.
>> For simple sites, templates are an easier way to maintain much of it.
>> For bigger sites with more complex systems behind them, you find
>> that templates are still there!
>
> And this is where CSS comes in: the division of "Website logic" and
> Website layout. You can use that to great effect, especially with a
> server-side scripting language.
>
> At least, in theory, but I have no experience on how to do this
> kind of stuff.
>
>> The only parts that would be different for any page are the content.
>> As you can start to see for bigger sites, content and title and
>> link variables start to be obvious targets for a database, if the
>> site is big enough. Don't bother with a database unless you know
>> you have a lot of stuff for a site.
>
> Or use a small one, like SQLite, which has a very nice Ruby
> interface (either via sqlite3-ruby, or ruby-dbi). Very good to
> practice with databases (as it is very, very small), at least, and
> supposedly used for websites, too, with medium traffic (around 1M
> per day, AFAIK).
>
> --
> Phillip "CynicalRyan" Gawlowski
>
> Rule of Open-Source Programming #15:
>
> If you like it, let the author know. If you hate it, let the author
> know why.
>