A Java programmer's Ruby on Rails experience

Source: Internet
Author: User
Tags ruby on rails

Http://developer.51cto.com/art/200610/33171.htm

Ror is Ruby on Rails. Ruby is a well-known dynamic language. It's a dynamic
Language. Simple and
Easy. Dynamic Language is interpreted and executed, but the performance may be discounted, but not absolute, because the application is complex and the performance is comprehensive, this was responded to in a circulating test.

1. installation and configuration are surprisingly simple

(I really want to remind you that all Java communities are filled with various frameworks. Didn't you even think of install? Everyone forgot to make
Install? No install is available for J2EE, spring, hibernate, struts, and so on. All Apache's
Neither of Jakarta's projects is installed. Struts only has one war, like a demo. This tough environment will make Linux
Fans laughed. Both ant and make are the same, so it cannot be called install .)

After ruby182-14.exe is installed, use gem to install rails.

GEM is Ruby's install. Gem install rails. Select y when answering the question.

2. It is easier to generate a web application

Ruby rails <Directory Name>

A set of web applications are generated. Configure the database. Config/database. yml. Check the configuration.

Prepare MySQL and create a data table.

3. Code Generation

Ruby script/generate <type> <Name>

MVC can both be created in the framework and webserviceshttp: // rubyonrails.org/show/generators, and a generator can be downloaded, Which is chilling.

When hibernate3 and ejb3 were still around, while spring and hivemind were still hiding there, While MDA and UML were still in the fog of the cloud mountains, Ror was actually working.

Code Generation is supported. Crud only needs one sentence. It can be said that the demonstration is very convenient, the amount of generated code is very small, and it is very convenient to change. After using it for a while, I feel very close to the business idea or human syntax. The presentation layer is similar to most embedded scripts and JSP class. However, because it is a dynamic language, it is very streamlined and actually looks much more streamlined than labels.

Disadvantages:

◆ Are large applications supported?
◆ How many people are supported?
◆ Performance?

In general, people worry about ror: Can it last for a long time? Is the program stable? Performance?

There is a performance test. It is said that ROR> hibernate + spring + Struts has more than 15-20%. Dare to say this is always a bit of a head-on, and the development speed is more than 10 times faster. However, I forgot the URL. I can check it on Google.

After suffering from various frameworks for a long time, I suddenly found such a fresh thing and never got used to it. How can this happen? Dao always needs to define a base, and write 10 for the same find function.
Now, how can it be so simple. Is find_all enough? Find (@ Params [: Id]) directly query the object from the parameter? Slave
Tapestry is more oo than hibernate, and it is simply a devil. It can also interface with C and put key services in C. More MVC than MVC.
The problem is that the artist cannot separate the code because the code artist cannot handle it.

The connection between objects and databases is more natural, which reminds me of Delphi. Because only Borland is in control, Object Pascal is very elegant, VCL is complete, and Ruby is also like this?

It seems that Ruby has absorbed a lot of Java Community ideas, which is also a dynamic expression. If this kind of momentum persists, it will infect the internet like PHP. Although PHP is already old, it has survived since the fresh air in the beginning.

Ror is very suitable for applications and quick applications. This does not mean it is not suitable for large applications. Currently, it is not easy to talk about large applications, and you have no idea. The underlying applications do not know whether they are suitable, because the underlying applications are generally in the world of intermediate languages. For example, Ruby should also be able to port in, but it is unlikely to directly implement the underlying layer!

Think of the previous description of Perl, glue, very apt, itself seems to be unable to do anything, but can quickly stick up something, if the glue strength is enough, or even stick out a building. Ruby is also like this glue, and is now more powerful than Perl in terms of web.

(Responsible editor fire phoenix sunsj@51cto.com Tel :( 010) 68476636-8007)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.