Presentation_Neetha_Maria_Sebastian

Download Report

Transcript Presentation_Neetha_Maria_Sebastian

GWT and Ruby on Rails
A Comparison
April 2, 2010
Presented by:
Neetha Sebastian
Spring 2010
CS 6125
[email protected]
Team Name : S
Team Memebers : Monal Sanghvi, Neetha Sebastian
Looking At A Framework As A Product
Who are the consumers?
Does it simplify?
• Developers of the application.
• End users of the application.
• Is it easier to develop a solution when
usingthe framework?
Framework
As
Product
Does it enhance productivity?
• Does it reduce the overall time required
to complete developing an application?
Xxxxx-xx/Footer
Is it easy to adopt?
• Does it have too big a learning curve?
• Does the developer have to invest too
much time figuring out how to do some
things with the framework?
1
Looking at Dev Experience
Multiple elements make a good tool
Xxxxx-xx/Footer
Good
development
environment
Easy
debugging
Easy transition from
development to production.
Availability of
other tools
2
GWT and Rails : Development Environment
GWT
Rails
Plugin available for Eclipse
NetBeans introduced a bundle for Ruby
and Rails.
Range of tools offered in Eclipse
•Intellisense
•Detecting compile errors.
•Code Completion
Many tools offered by NetBeans.
•Type inference needed because Ruby is
dynamic
•Intellisense, code completion
GWT seems built with IDE use in mind.
•Many tools that it provides seem to be built into
the IDE
Rails was developed without initially
offering IDE support.
•Many features assume command line
development
•No special functions for watching elements etc.
•Special functions available for watching
elements. Etc.
Good Development Environment for both available.
Xxxxx-xx/Footer
3
Debugging : GWT vs Rails
1
Interactive Debugger is available for both in Eclipse / NetBeans.
2
Easy to watch elements, step through code, look at stacktrace etc.
GWT
Dev Mode
•Code still in Java,
so full debugging
capability of Eclipse
for client side as
well as server side
code
Rails
Production
Mode
• Mostly for
testing.
Spl.
Functions
ruby_debug
•comes as a
gem, installed
separately,
can only be
used with
WEBrick or
Mongrel as
web server
Logging
•to_yaml,
inspect
methods
available to
view the state
of a variable
while running
Easy Debugging possible in both.
Xxxxx-xx/Footer
4
Other tools available in GWT and Rails
GWT1
Speed
Tracer
•Performance data
of an application
shown as
sluggishness graph
and network graph
•Shows details of
how much time is
taken by each part
of an application
Rails1
Code
Splitting
Rake
•Certain parts of
an app are
specified as
“async”
•Common
admin tasks
•Loading async
parts of an app is
done after
application
startup time
•rake doc:rails
•Like “make”
•rake
test:integration
Generate
•A tool to
automatically
generate code
for repeating
tasks
•Generate a
whole
application.
•Greatly improves
performance
1. Not all tools shown here; only 2 examples each
Xxxxx-xx/Footer
5
Performance Testing Tools Output: A Comparison
Easy to
understand
graphical output
GWT
Rails
Absence of graphical
output makes it difficult to
understand
Xxxxx-xx/Footer
6
Comparison of Database Access in GWT and Rails
Importance of
Database access in
web application
frameworks
Database Access : Repeating piece of code, frameworks can offer prebuilt
functionality.
When doing so, a framework should be sufficiently flexible:
• Provide database independent functionality.
• Familiar looking syntax for database connectivity
GWT
Built in
functionality
Configuration /
Mapping
Database
Independence
Ease of Use
Rails
Absent; hence Interop with hibernate
Built in, Use ActiveRecords
Detailed and not automatic
No configuration most of the time
• Hides details of the database
Generates SQL calls on its own.
Application portable to all supported
databases
No use of SQL
Even for schema definition, portability is
good.
Need experience with Hibernate
Hibernate Query Language
Easy to learn and use.
Rails has more easy to use database connectivity; GWT
packs more power
Xxxxx-xx/Footer
7
Comparing Testing in GWT and Rails
GWT
Rails
2
Check performance in
different browsers
Unit testing
No modifying databases
in undesirable ways
2
1
1
Testing in
Rails
Testing in
GWT
3
3
Automatically generated
test cases
4
4
Interfaces with free Java
code coverage tool
Xxxxx-xx/Footer
Generate test data
automatically
Generate skeleton test
code automatically
Separate functionality.
availbable for unit,
functional , integration
testing
8
Conclusion
GWT
Rails
Users Targeted
GWT seems to be aimed at the power
user, with sophisticated tools being
provided for development
Suitable even for novice users, the
stress is on writing less code and
automating writing of code.
Application
Development
Large scale applications are easily built
Favors Rapid Application development
Productivity
Enhancement
Designed to increase productivity by
giving developer more power, not by
reducing number of lines of code
Designed to increase productivity by
eliminating amount of code to be written
by dev.
Learning curve and adapting to the use
of GWT might take longer
Suitable even for people who don’t have
much web development experience
Ease of Use
Xxxxx-xx/Footer
9
Bibliography
[1] The Google Web Toolkit Devleoper’s Guide,
http://code.google.com/webtoolkit/doc/latest/DevGuide.html
[2] 5 Question Interview with Twitter Developer Alex Payne, Radical Behavior, Blog by
Josh Kenzer, March 29, 2007.
[3] Ruby on Rails Bible, Timothy Fisher, Indianapolis, Ind, Wiley, 2007.
http://cliobeta.cul.columbia.edu:7018/vwebv/holdingsInfo?bibId=7138803
[4] SpeedTracer, Google Web Toolkit Documentation pages, Google Code website.
http://code.google.com/webtoolkit/speedtracer/
[5] Hibernate Community Documentation
http://docs.jboss.org/hibernate/stable/core/reference/en/html/queryhql.html
Thank You!
Xxxxx-xx/Footer
10