Working with Ruby on Rails (a few architecture questions)
Long time PHP/Mysql developer (for better or worse!), have been working on a few small rails apps to get my feet wet with the language and quirks, so far have been enjoying it, however I have a few questions that I have regarding some supporting items - I've found a few answers after researching, but many articles seem to be rather outdated with respect to the speed at which new libraries and tools are developed.
Databases - Mysql/Postgres: I will likely be using one of these two databases for my projects. Are either one of them 'better' supported by ROR? Are there any particular libraries I 开发者_运维技巧should be aware of to incorporate into my projects (ie, something like mysqli or PDO for php/mysql).. or are the built in methods sufficient for these two database models?
Memcached - I've read in a few places that the built in memcached support is pretty poor with ROR, but there are a few other systems built by third party users that are better/faster. Any suggestions on this front?
Either way, thanks in advance, i am quite enjoying the foray into rails, and am looking forward to any thoughts you may have.
Both mysql and postgres are well supported in ROR. You might want to add some analytics gems but those are not functionality related.
ROR has a built-in caching which can use memcached as well. You can also use memcached to just store key/value pairs. Of course in both cases you get the advantages of memcached library. You have to run memcached daemon in your system though. The ROR gem is just an interface to it.
MySQL and PostgreSQL seem to be equally supported, from what I've noticed.
In either case, you'll need to install a gem to connect Ruby to your DB.
You didn't mention your development OS, but there are some gotchas when installing the MySQL gem on Mac OS 10.6 ("Snow Leopard"). The key is to make sure you have the 64-bit versions of MySQL and the MySQL gem and perform the right incantation on the command line when installing. This blog post is helpful.
精彩评论