b. .NET
c. Ruby on Rails
d. Turbo Gears
e. Google Gears
f. AJAX framework
Answer:
For web development, I would like to compare and contrast Java Framework with Ruby on Rail Framework. Vohra (2009) explains ...
1. Ruby is an interpreted scripting language, but Java is a compiled programming language.
To run a Ruby script, we can simply run by issue the command - "ruby helloruby.rb" where helloruby.rb is the script file name.
To run a Java program, we need to first compile the program to byte code, namely, "Java Virtual Machine". To compile the program hellojava.java, we can simply issue the command - "javac hellojava.java". After hellojava.class JVM is created, we can issue "java hellojava" to run the program.
2. Ruby and Java are both object-oriented languages.
3. Both are strongly typed. Whereas, Ruby is dynamically typed and Java is statically typed. That is,
In Ruby, to declare variables, we can issue "str="Hello Ruby" (Ruby does not need type declaration)
In Java, to declare variables, we can issue "String str="Hello Java"; (Java needs type declaration)
4. Both Java and Ruby provide inheritance and have public, private and protected methods.
5. Ruby is simpler than Java and run faster than Java.
6. Although Ruby is similar to Java and has parallel features, Ruby is not a replacement for Java. Just as Java EE is the enterprise framework for developing Model-View-Controller applications with Java, Ruby on Rails is the Model-View-Controller framework for Ruby.
I was a PHP developers 5 years ago. I also studied Java to write some simple programmes but I am not familiar with Ruby on Rail. However, personally, I feel the syntax of Java is more complex than PHP's and Ruby on Rail's. For this reason, Ruby on Rails is suitable for beginners to develop applications.
Sans-Serif (2007) compares PHP with Java and Ruby on Rails in terms of Scaling, Development Speed, Developer Tools and Maintainability.
Scaling -
For Web apps, Sans-Serif has given PHP the edge, because Sans-Serif thinks building scalable PHP is a little easier. By default, PHP gives you a “shared-nothing” (or at least “shared very little”) architecture, which means you’re going to scale out pretty well until your database hits the wall. Java is a much richer system and assumes you’re smart enough to know whether a shared-nothing architecture is appropriate or not. The effect is, you have to be smarter to get the same kind of scaling out of Java.
As for Rails, Sans-Serif thinks it’s probably the case that you can build a Web-scale app, just like Java and PHP, but we don’t know because nobody’s done it yet. Also, we have to penalize Rails a bit because most apps end up having a little computing in them, and Ruby is quite a bit behind the alternatives in that department.
After all, Java runs EBay while PHP runs Wikipedia and Yahoo! Finance. Both clearly scale “well enough”.
Development Speed -
The question is “All other things being equal, how fast can Sans-Serif gets my Web app on the air?” Sans-Serif thinks Rails has set a new benchmark here; you keep hearing astounding stories of serious applications going up in days rather than months and weeks rather than years.
PHP’s original claim to fame was that it was the quick-and-dirty way to get a Web app on the air. There’s no point trying to sweep the “dirty” bit under the carpet; a lot of those quickie PHP apps are butt-ugly. One of the reasons Rails is interesting is that it’s quick and clean. Java seems most difficuit comparing to PHP and Ruby on Rails.
Developer Tools -
Java is the obvious winner here. If you look at the recent NetBeans 5.5, the amount of automated support for Web-app development is astounding; if Sans-Serif ’d been graphing NetBeans instead of Java, I suspect it’d have equaled or passed PHP in the development-speed department.
Maintainability -
Good apps, once built, tend to be in production for an astonishingly long time. Which means that they have to be maintained for an astonishingly long time. Which means that maintainability is important. There are a lot of things that go into maintainability, but Sans-Serif suggests that the biggies are object-orientation, MVC architecture, code readability, and code size (less is more, a lot more).
This is PHP’s Achilles’ heel, of course. Yes, it is possible to write clean, object-oriented, modular, MVC-style PHP applications. But most people don’t...
Sans-Serif’ has put Rails ahead of Java just because there’s so much less code. The maintenance cost of code is strongly related to its size. Clearly, Java’s excellent developer tools make a difference, but still, Sans-Serif thinks that this is another area where Ruby and Rails are teaching lessons the rest of the industry would do well to learn from.
To sum up, we have the Diagram-8 extracted from http://www.tbray.org/ongoing/When/200x/2006/11/10/Comparing-Frameworks. From the Diagram-8, we will know then Ruby on Rails is easy enough that the programming beginners can develop web application fast and clean with Object-Oriented and MVC architecture.
Reference:
1. Vohra Deepak (2009). "Java vs Ruby: A comparation of Key Elements". The developer.com, Retrieved Mar-15th-2009 from URL - http://www.developer.com/open/article.php/10930_3716356_3
2. Sans-Serif (2007). "Ongoing. Comparing Frameworks". OnGoing, Retrieved Mar-15th-2009 from URL - http://www.tbray.org/ongoing/When/200x/2006/11/10/Comparing-Frameworks
No comments:
Post a Comment