Hi all,
I’m planning to bring a new app. to market, and I’m more the designer
and business manager than the programmer for this project. We are
deciding that technologies to use, and so I asked my programmer to
take a look at RubyOnRails. Below are his first impressions. Could
anyone with more experience on these matters kindly offer any response
to the issues he raises?
much appreciated!
PROS
1.Is a good framework that allows you to rapidly deploy an application
that uses table databases in the basic table operations: Create,
Delete, Search and Modify.
2.Also allows you to deploy Master-Slave Tables structures.
3.It was designed based on OO complete. Complies with orthogonal
design, where everything is an Object.
4.It could be DB Independent.
5.Allows you to deploy database changes within the code, so the other
users can update de Database just in the part it has changed through a
mechanism called migrations.
6.If you have a Ruby Web application, I think is the natural
evolution.
7.Has Test Cases from the begining.
8.You can reconfigure and overload almost all of their methods.
9.It
is easy to implement Web services that access the database tables
and I bet some queries (I have to check it more).
CONS
1.Have a lot of rules about the database fields. Even though you can
overload it, if do It, you have to change the code in many places to
make it work. For example I normally use a Database graphic designer
that works perfect with Mysql standard tables and the id standard is
different from the ID standar name used by Rails. Does not support
standard table design, for example the tables shouldn’t have plural
names. It’s a long discussion between OO purist and DBAs. Also I found
many samples of the developer that showed not Normalized Tables
(duplicated fields) in order to make it work quicker I bet.
If you follow the conventions then yes everything is pretty easy. You can vary from the conventions but takes extra configuration. Pluralization is one of the things you can turn off if you don’t want to use it. It is best to choose your field names wisely up front since they will be used through out (there is no extra aliasing/mapping layer). You can normalize or denormalize depending on your needs, Rails accommodates things nicely. I have not seen any db framework that does things as elegantly and easily as Rails and ActiveRecord.
Once you learn to use migrations you might just give up your db designer, it is very simple, cross platform, allows things to be upgraded and downgraded over time and is very easy to source control. You can easily go to any version of the db with a simple command.
- It feels heavy, not so quick. I think is because it adds lots of
layers in order to make transparent the database use and some other
stuff.
It is a full stack framework so most everything you need is there, making it heavier for some things, but for any decent size app you’ll end up using much of what is there over time. It has been plenty fast for my applications, but there is also a variety of caching mechanisms to allow it to scale up greatly.
3.It is not easy to use an html editor like Dreamweaver. I normally
use Dreamweaver templates and Smarty, that allows you to design in GUI
without interfere in the code.
There is a plugin for Rails which I started called MasterView which allows you to work more in the fashion you mentioned. You can take a pure HTML prototype, sprinkle in some tag attributes to make it live and continue to round-trip WYSIWYG edit the templates throughout the life cycle of the project. It also leverages all the power of Rails layout, partials, and helpers without giving up WYSIWYG editing.
Check out this video to see it in action:
http://masterview.org/media/html-to-live/screencast.html
This open source project is hosted on Rubyforge and the main website is here
http://masterview.org/
4.If you change the database configuration, you need to restart the
server. I do not know how it works in a shared server.
In development mode, you would not have to restart the server, the db config is re-loaded on each request, but in production mode it is cached on startup. Usually these sort of changes are done as a unit, you make changes to your tests, create migrations for your db, change your views and then you would want to deploy these things as a unit, rolling back if anything failed or tests didn’t work. Capistrano makes this whole process dead simple and can be done consistently across an array of servers.
Also it is fairly easy to trigger a graceful reload of the app using mongrel or fast cgi. With mongrel you can signal the apps to restart after they finish what they are doing, so you can do this without taking site offline if you want to do a quick update.
5.The best editor is for Mac. The Windows´ one is based on Eclipse,
but as far as the test I made with the last version, not all the code-
complete options were implemented, which force you to remember many
things of the rails syntax and make it error-prone.
Many do like the Mac, but there are tons of Linux and Windows users as well. I prefer emacs myself, but Eclipse/RadRails is also a very popular (and cross platform) choice. Tons of work is being done in the IDE department, most every vendor is working on their own versions. Code completion is one of the hot topics that many are working on and are in various stages of development. However Rails is pretty straight forward and simple once you get into it, you really don’t need that code completion stuff as much as you do in other environments and frameworks. I wouldn’t develop Java without a fancy IDE helping me, but with Ruby and Rails I just don’t need it.
6.The debugger is not as user friendly as the PHP debugger (with Zend)
or Java debugger are. It remembers me the first version of gdb I used
for debugging c in Unix.
There are various ways to debug an app, I have even run my Rails app in several of the IDE’s to have full debugging support in GUI environment, but you just don’t usually need this very often. The combination of things being simpler in Rails along with having good test suites to catch things at unit level, you just don’t end up needing debugging as much. It is there in various forms if you need it, but you just don’t need it is often in my experience.
7.I think is easier to find a PHP or Java servlet host provider.
I’d agree that it might be easier to find PHP provider (most any hosting company provides that), but there are plenty of options out there (and you only need one at a time
If you are wanting to write something that should work in absolutely at every hosting company then PHP/Mysql is your best option, but personally I would think long and hard about that requirement before I would give up the power and productivity of Rails.
Someone else mentioned that the convention of things helps when you bring others into the project, and I would whole heartedly agree. If you bring additional developers into an existing PHP project or even a Java project, it may be quite a while for them to figure out where things are at and to become comfortable, but with Rails, most any good Rails developer can sit down with a project that followed the normal conventions and be instantly at home and ready to contribute. And the nice thing is that most of these conventions do really make our lives simpler and easier if we follow them not only in terms of dealing with Rails, but even in terms of code layout and structure.
Hope that helps some! I would suggest that at some point you give Rails a try for a project, if not this one then another project. I think you’ll be happy you did. There is a reason Rails is the fastest growing web application framework, and that wouldn’t be the case if there weren’t significant advantages, because PHP, Java, and .Net were already entrenched in the market but now are being displaced rapidly.
Blessings,
Jeff