summaryrefslogtreecommitdiff
path: root/_posts/2011-10-20-going-for-jruby.markdown
blob: 51b1589c6bc54162c44262f2153fd9440615fc9d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
layout: post
title: Going for JRuby
tags: [ development, ruby ]
published: true
---

The company I work for uses Java for all of its projects. Based on that, I have
been considering looking into JRuby and giving it a try. Every piece of advice
is greatly appreciated.

Context
-------

I play the Interaction Designer role and digging deeper to Struts and Java
servlets, more than just HTML/CSS/jQuery, is becoming quite the challenge. I
happen to love Rails and would love to try it out. My main goals are:

* Take advantage of Rails' controllers, routes and views;
* Use Haml with Markdown and Sass with Compass;
* Take advantage of REST.
* Finally use Rspec and inject some proper testing and specification practices.

All of this while the rest of the team can still code the models (aka the
business logic) the way they prefer. I think it's a good cause and it's a great
opportunity to improve development happiness and systems integration.

The challenge
-------------

Here is a list of the things I know:

* I can use [RVM](http://rvm.beginrescueend.com) to quickly install
  and use JRuby.
* Gems with C extensions are a bit difficult to use inside the JVM.
* There are alternative gems to the ones above.

I also need to get in touch with these concepts:

* Web application development in Java: .jar's, war's, etc.
* [Tomcat](http://tomcat.apache.org) or [Glassfish](http://glassfish.java.net)
  as servers.
* Importing Java code into a Rails or Sinatra app.
* (optional) Using Ruby code from Java.

I guess the main question would be: _Where do I start?_ What am I
supposed to know to begin developing some sort of Rails app, using it under
Tomcat or Glassfish and reusing Java code from the rest of the team? Thanks for
helping me, guys!