|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
|
|
#1
|
|||
|
|||
|
Hi, I've just been browsing to learn more about php frameworks and my interest sidetracked to ruby and since i already heard so much good of it and it's framework ruby on rails.
But is this a good time to go for ruby? Because i see only two threads in the ruby section and i heard not many hosts support ruby. If you are using it; what are your experiences? And what would you say are the cons and pros of switching from php to ruby? |
|
#2
|
||||
|
||||
|
You posted to the Perl forum. This thread should be moved to the Ruby forum but maybe you posted here b/c you said there are only 2 threads on the Ruby forum (though why not the PHP forum?). Ruby is a nice language and Rails is a decent framework. Here are some thoughts:
Last edited by Conundrum : October 16th, 2006 at 01:09 PM. |
|
#3
|
||||
|
||||
|
My $.02. Forgive the stream-of-consciousness nature.
I like Rails a lot. The biggest things that bug me about it are: 1) The community doesn't take the database seriously, and treat it like a glorified flat-file storage engine. I blame the fact that most Rails folks seem enamored with all the crappiness that is MySQL, and emulate stuff in code that Postgres has done for almost a decade. Fortunately you can ignore this idiocy and use Postgres (and triggers, functions, views, foreign keys, constraints, etc.) to your hearts content, even in the new and very cool "migrations" stuff. 2) gems != CPAN. Not even close. ![]() 3) ActiveRecord doesn't prepare statements. It just throws together strings of SQL and executes them. It does make surprisingly good SQL, though. 4) There seems to be a dearth of strong engineers in the Rails community, probably because it's young in all senses of the word. There are MANY fanbois to be ignored. 5) The scaffolding suxors. Hugely. But the generators are quite cool. But I really dig it - the benefits far outweigh the drawbacks, in my mind. It makes many best practices easy to just do right: testing, caching, different needs at different stages of development, logical separation of code, logic and presentation, and ruby is a quick learn with good documentation. You can use composite primary key models in Rails in some cases - "linker" tables for has_and_belongs_to_many relationships are one example. But generally - yes, tables should have a single primary key. You can still throw in column-spanning unique keys at the database level to enforce integrity. I'm at the end stages of a pretty complicated Rails project I started early September, and I've not found that I've been fighting with it too much. I'd say that the "sweet spot" is larger than one might think at first. And a good database schema is a good database schema no matter what language you're using to manipulate it. Centralize your logic/checks/triggers in your database like you should and you can easily use Perl to do stuff Rails lacks. The assumptions you need to make modeling your data with Rails apps aren't THAT limiting. I really dig the apache 2.2/mongrel backend deployment- lightweight apache servers host static files and proxy back dynamic content to mongrel servers. And these mongrel servers can run as any user, so you've got an easy way to separate virtual hosts by user accounts WITHOUT suexec. Very nice. If/when Rails gets threadsafe, it'll be even cooler. If only Rails had been built by developers with a solid Postgres background. . . Learn Rails. You won't regret it. It's not a cureall, but it's an excellent tool in your toolbox. |
|
#4
|
||||
|
||||
|
Quote:
37 Signals, the corporate backer of Rails, has an interesting blog post called Growing In vs. Growing Out where they say they prefer their Basecamp customers to grow out of their products and move on to other solutions as opposed to adding features for their more sophisiticated customers and thus making their products more complicated. I've been wondering if this philosophy also applies to Rails and ActiveRecord. Rails is a nice framework but I'm not convinced that the sweet spot is as large as I want. I do agree it's a good tool to have in the toolbox and as always, use the right tool for the job. Last edited by Conundrum : October 18th, 2006 at 01:58 AM. |
|
#5
|
||||
|
||||
|
Thread moved to ruby forum (I know the orig. poster posted two threads), because this thread really has some top notch pertinent info.
__________________
Up the Irons What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home. "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest Down with Sharon Osbourne Puzzle of the Month solved by sizeablegrin, etienne141 and L7Sqr, superior C/C++ programmers of the month |
|
#6
|
||||
|
||||
|
Quote:
Rails has an architecture that can scale quite nicely, given that you can front it with apache boxes and sessioning can be done in the DB. I can't see that scaling a rails app would be all that different than scaling any other app. Given clever sysadmins, it should be easy to throw more iron at the problem. I'm really not worried about it scaling to whatever I need it for. The 37 Signals post is about growing out of the feature set provided by a third-party web app, not the framework. I don't think you can extrapolate "We'll only let Rails get *this* good, and no better" from that posting. They want to build Basecamp around a core of features. Makes sense to me. Besides, 37 signals isn't the only set of interests here - Rails is OSS. On prepared statements - it's being worked on, like many other things. Is rails perfect? No. It's young. But it's maturing quickly. Is it productive? Yes. Can it scale? Yes. Is it intuitive? More than I thought it would be. Is it "well designed?" Mostly, besides the application-level data integrity checks/triggers forced by MySQL's idiocy. |
|
#7
|
||||||
|
||||||
|
Quote:
I'd say scaling is an unknown. I've been looking at presentations for MySQL Alexa top 100 sites and wondering if they can be done with AR. LJ runs a multi-master MySQL setup with composite PKs. Mixi runs 100+ MySQL servers. I don't feel comfortable with potential artificial schema limitations in scenarios like those but maybe there's nothing to worry about? When you say Rails can scale, are you saying AR is known to work in these scenarios? I'm actually not even sure PostgreSQL is a good alternative for Alexa 100 sites as I haven't run across one that runs on Pg yet. As an aside, do you know of any? I've also used Oracle to build sites when scalability and Oracle features were needed but ActiveRecord's not handling of prepared statements, more than just being an inconvenience, seems to make using Oracle a non-starter. Quote:
Quote:
Quote:
I agree that Rails is still very young and features are being worked on. I also think Rails is a huge improvement over traditional ways web apps are created. However, I really want AR to handle the things I've dicussed natively. I'd prefer AR to handle any schema I can come up with. It seems that our main difference of opinion is that I'd like to wait a little longer. I'm also more skeptical of AR's ability to scale but you don't seem to have any doubts. Last edited by Conundrum : October 22nd, 2006 at 12:50 PM. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Ruby Programming > Ruby?? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|