# Rails + .NET (feasible?)

**URL:** <https://www.ruby-forum.com/t/rails-net-feasible/112023>\
**Category:** Rails\
**Created:** [August 14, 2007, 12:01pm UTC](https://www.ruby-forum.com/t/rails-net-feasible/112023 "2007-08-14T12:01:21Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![GlennNZ](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/7c8e57/32.png) [@GlennNZ](https://www.ruby-forum.com/u/GlennNZ)\
**Post date:** [August 14, 2007, 12:01pm UTC](https://www.ruby-forum.com/t/rails-net-feasible/112023/1 "2007-08-14T12:01:21Z")

</div>

Hi. I’ve got the task of creating a prototype for a web based project.  
We started with PHP using absolutely no framework and it has finally  
got to the point where is is insanely messy.

The question was whether we should move to a PHP framework, .NET, java  
or Rails.

What we need is something that allows for rapid development but with  
the capability of adding reporting, charts and other services at a  
later date.

The problem is each technology/language have their strengths and  
weakness. Rails is allows for faster development and enforces some  
coding conventions but has no good third party support when it comes  
to reporting compared to .NET.

The question is, is it feasible to have a primarily Rails front end  
and then have separate .NET applications to handle things such as  
reporting and web based charts? How do the Rails and .NET applications  
communicate with each other? Is it through SOAP and/or ReST.

This has all come about because it was suggested that we just use .NET  
but I’m concerned that the dev time is going to be too long, thus I  
want to go with Rails. But I can also see some of Rail’s limitation so  
was wondering if it can be overcome with using some web protocols.

I’m still getting to grips with all this so please fire away with  
comments and suggestions.

Cheers

(NB: If this post looks familiar, it’s because I also posted it to  
[devshed.com](http://devshed.com))

---

<div class="post-metadata">

**Author:** ![GlennNZ](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/7c8e57/32.png) [@GlennNZ](https://www.ruby-forum.com/u/GlennNZ)\
**Post date:** [August 14, 2007, 5:18pm UTC](https://www.ruby-forum.com/t/rails-net-feasible/112023/2 "2007-08-14T17:18:28Z")

</div>

> The question is, is it feasible to have a primarily Rails front end  
> and then have separate .NET applications to handle things such as  
> reporting and web based charts? How do the Rails and .NET applications  
> communicate with each other? Is it through SOAP and/or ReST.

I don’t see a problem with using both. Find a MySQL [ADO.NET](http://ADO.NET) adapter  
and off you go. If all you want .NET to handle is reporting, there’s  
no need for any communication between applications.

Depending on the load and amount of data you are reporting on. If it’s  
so big you are worried about performance and bringing in .NET, I  
wouldn’t recommend reporting on your model tables any way. You should  
denormalize the database and report using that data.

---

<div class="post-metadata">

**Author:** ![GlennNZ](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/7c8e57/32.png) [@GlennNZ](https://www.ruby-forum.com/u/GlennNZ)\
**Post date:** [August 15, 2007, 1:23pm UTC](https://www.ruby-forum.com/t/rails-net-feasible/112023/3 "2007-08-15T13:23:16Z")

</div>

I think GlennNZ is refering more to the graphical part than to the  
calculations because here Ruport does a pretty good job once you get  
used to it. But getting pretty charts isn’t the strength of rails and  
tools such as Crystal Reports and many others are quite important in  
the business context.

As we have to deal with exactly the same issues here I am interessted  
in the topic as well. Unfortunately we are quite busy and still  
couldn’t find the time to look into the topic. But my personal  
favorite is a combination of JasperSoft and Rails. As I read somewhere  
there seems to be a webservice bundled to Jasper which can deliver  
reports based on XML (or other formats) input and returns the graphs  
and documents. So this seems to be a really nice combinaton as they  
offer a free version of their tools as well. So I would recommend to  
have a look at that tool as well.

It would be nice if you could share your experience with us as soon as  
you found a solution 😉

Max

---

<div class="post-metadata">

**Author:** ![GlennNZ](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/7c8e57/32.png) [@GlennNZ](https://www.ruby-forum.com/u/GlennNZ)\
**Post date:** [August 15, 2007, 8:29pm UTC](https://www.ruby-forum.com/t/rails-net-feasible/112023/4 "2007-08-15T20:29:24Z")

</div>

IMO, the best thing that can happen to your graphs is Flash and XML 🙂

Alex G  
[http://www.noobkit.com](http://www.noobkit.com) - RDoc on steroids.

---

<div class="post-metadata">

**Author:** ![GlennNZ](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/7c8e57/32.png) [@GlennNZ](https://www.ruby-forum.com/u/GlennNZ)\
**Post date:** [August 16, 2007, 3:05pm UTC](https://www.ruby-forum.com/t/rails-net-feasible/112023/5 "2007-08-16T15:05:02Z")

</div>

The main things I’m concerned about (other than dev speed) are the  
ability to

1. allow users to populate the database with their own data (i.e. an  
asset register)
2. allow the users to generate reports and charts
3. perhaps have the system integrate with other tools, such as asset  
management software and the like

This is all an issue because we are starting to lean towards .Net.  
However, I’ve done little of either of .Net or Rails. This project is  
about to take on a learning curve no matter what direction we take,  
but I’ concerned that either one might result in me shooting myself in  
the foot.

However, I wonder if much of this functionality is done by interacting  
directly with the database, or is there some kind of convention  
whereby you go indirectly through the application itself i.e. Rails  
or .Net.

---

<div class="post-metadata">

**Author:** ![GlennNZ](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/7c8e57/32.png) [@GlennNZ](https://www.ruby-forum.com/u/GlennNZ)\
**Post date:** [August 17, 2007, 8:09am UTC](https://www.ruby-forum.com/t/rails-net-feasible/112023/6 "2007-08-17T08:09:02Z")

</div>

On 8/16/07, Alex G [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> IMO, the best thing that can happen to your graphs is Flash and XML 🙂
> 
> Alex G  
> [http://www.noobkit.com](http://www.noobkit.com) - RDoc on steroids.

I looked into this, but they don’t print so they wern’t any good to me.

---

<div class="post-metadata">

**Author:** ![GlennNZ](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/7c8e57/32.png) [@GlennNZ](https://www.ruby-forum.com/u/GlennNZ)\
**Post date:** [August 17, 2007, 12:04pm UTC](https://www.ruby-forum.com/t/rails-net-feasible/112023/7 "2007-08-17T12:04:30Z")

</div>

Thanks. This was exactly the type of reply I was after.

I was in discussions today with the people I’m working with. The  
arguments for swaying towards .NET are two fold. The first one is  
interfacing with existing .NET tools. I think they have a content  
management system (or something) that is in .NET. Also, because of a  
foreseen pressure to get the product to market, we are looking at  
outsourcing and .NET is apparently the thing that many developers  
know. That being said, we haven’t actively sought out Rails  
developers.

I was trying to get the best of both worlds by doing user interface  
elements with Rails and the more specialist tasks with .NET. I’ll look  
further into SOAP and REST then.

If anyone else has some insight into a Rails + .NET world, I’d be  
interested to know.

Cheers

---

<div class="post-metadata">

**Author:** ![GlennNZ](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/7c8e57/32.png) [@GlennNZ](https://www.ruby-forum.com/u/GlennNZ)\
**Post date:** [August 17, 2007, 8:01am UTC](https://www.ruby-forum.com/t/rails-net-feasible/112023/8 "2007-08-17T08:01:00Z")

</div>

In my company we’ve migrated away from 100% .NET to using:

- Rails on front-end administration apps (what the users see)
- .NET on back-end for reports (crystal) and legacy apps where it  
would take a big investment to convert
- Rails sends SOAP messages to .NET when it needs .NET apps to do  
something
- .NET interacts with Rails REST API when it needs to interact with  
Rails app
- We’ve built a sort of “task queue” in .NET to handle dependent tasks

The goal is to eventually eliminate 100% of reliance on [ASP.NET](http://ASP.NET) which  
I believe to be quite inferior to Ruby on Rails on many levels. And  
the long-term goal is to completely eliminate .NET in favor of Ruby  
but I’d need a report writer with features \> Crystal Reports before I  
could do that – and it would take a long time to move that  
programming over.

So for now we’re content with the plan to have .NET apps be a “black-  
box.” Presently we’re still popping some .aspx pages in our  
architecture (for example, pages that generate Crystal reports, save  
as PDF, then present link to user in real-time).

So we have a slice from SliceHost running RoR w/ MySQL, and a trio of  
Windows machines (web, app, db w/ SQL2000) running the .NET stuff. The  
databases don’t communicate to each other, only the apps.

-Ryan

* * *

Ryan Walker  
VP, Technology  
The Devine Group, Inc.  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![GlennNZ](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/7c8e57/32.png) [@GlennNZ](https://www.ruby-forum.com/u/GlennNZ)\
**Post date:** [April 4, 2008, 7:41am UTC](https://www.ruby-forum.com/t/rails-net-feasible/112023/9 "2008-04-04T07:41:25Z")

</div>

Hi there,

Don’t think that there is anything in the rails space that will give you  
printable web reports quickly. As time to market is your priority, then  
you should probably leverage what you have.

You can then migrate away from .Net without the pressure.

To my way of thinking, there is not a lot of difference between  
communications between 2 Rails apps, a Rails app & a .Net app, or any  
other system.

You agree upon an interface, send messages back & forth, & there you go.  
It should not matter what lies behind the interfaces.

For example, your rails app could query your .Net app for graphing data,  
then render the view, with Google charts providing the graphs. Just two  
services at the end of an interface.

Keep in mind that using external services will add additional time to  
Rails servicing a request; this will have scaling implications.

It’s been a year now since I used [ASP.Net](http://ASP.Net), but here are some Rails &  
.Net ramblings…

From a business point of .Net lowers the risk of project because it:

- has a large pool of developers
- has been proven to support large commercial applications
- has the backing of a major corporation whom you can have reasonable  
confidence will still be around in 5 years.

These are all good things & it looks like a rational decision to  
recommend .Net. Particularly if your not involved in Rails as closely as  
most people on this list would be.

My feelings on .net

- C# & [VB.NET](http://VB.NET) are a right bitch to programme in compared to ruby -  
so.much.code.to.do.simple.things. Yes, there is intellisense in Visual  
Studio… things would be close to impossible without it.
- .Net is a mammoth framework. There are so many libraries. Even after  
coding for a year, I still spent almost 50% of my time reading  
documentation. Socket programming is a complete nightmare.
- Visual Studio produces rubbish html view code. If IE is your only  
target browser, then you can get away with it. But your designers will  
probably use mac’s & keep asking you why their lovely design now looks  
pants; oh dear… more css tweaks. Its amazing how much time disappears  
this way.
- executes quite fast and is really stable, as long you have not done  
something really, really stupid.
- has well proven upgrade paths.
- you have to make a concerted effort to do things in an agile way [BDD,  
code testing, etc], its just not as natural as rails & there is no MVC  
[coming in [ASP.Net](http://ASP.Net) 3.5, but even that looks like hard work]. Although we  
intended to do some automated code testing, due to rapidly approaching  
deadlines we skipped this bit; leading the first few weeks of release  
being plagued by lots of bugs.
- is easy to recruit for

Having said all this… you won’t go wrong going 100% .Net. Your job is  
safe.

My feelings on Rails

- after the 2-3 month learning curve, I was 3-4 times more productive -  
not just not looking at documentation - ruby is just faster to get  
things done.
- Ruby is optimised for programming rather than computer performance.
- is easier to produce well tested code [the MVC nature of rails really  
does make Agile processes easier to implement].
- is not difficult to host & scale, just different & I think involves  
much less brain power than scaling out .Net. The framework is just one  
small part of the whole. Look at [www.joyent.com](http://www.joyent.com) & [www.engineyard.com](http://www.engineyard.com) for  
examples of how to do things.
- If anyone says to you that they have heard “Rails does not scale” you  
immediately know that they have not done any independent research, put  
very little intellectual effort into this thought, and have probably put  
just as much intellectual effort into everything else that they say.  
Treat their advice with caution.
- can happily talk to legacy databases - its just a bit more work
- does not need visual studio [w00t…!!] I use Netbeans on Vista &  
Ubuntu.
- Major vendors, Sun, Oracle, IBM, & Microsoft all have projects to  
bring ruby & rails into their product suite.
- resourcing is a problem; there are some really dodgy contractors &  
companies who say they do Rails out there trading on their names [yes…  
I mean you… you know who you are]. Reference check - more than once.
- I think its fair to say that 2 very good rails guys [they all seem to  
be guys with longish hair, goatees and very pale skin…why is that?]  
will build you a web app at about the same speed as 4-5 average .Net  
guys [I know its a horrible and unfair comparison] - but my point is you  
should think of it as a higher cost per resource, but each resource will  
give you much higher value. Problem will come when you need to resource  
your team permanently & you may have to recruit & train.

A great symbol of the differences between managing .Net & Java, and  
Rails developers is the kind of conversations you have. With .Net, &  
Java, it tends to be very technical, what’s the best way to structure  
this, what is affected with this change, which library should we  
use…etc. With Rails developers almost 100% of the time talking about  
business logic.

Rails is great for building and maintaining SEO friendly web apps. It  
works really well. And if your programmers are good, you will get to  
market faster than .net & Java with equivalent resources. To me these  
are the reasons to choose rails.

In a corporate environment, It still seems slightly irrational to  
recommend Rails. The management challenges are definitely higher;  
resourcing, convincing risk adverse management, then continually  
defending your choice from interested parties.

I think that was more for me than for you… I feel better now.

---

<div class="post-metadata">

**Author:** ![GlennNZ](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/7c8e57/32.png) [@GlennNZ](https://www.ruby-forum.com/u/GlennNZ)\
**Post date:** [April 4, 2008, 12:19pm UTC](https://www.ruby-forum.com/t/rails-net-feasible/112023/10 "2008-04-04T12:19:30Z")

</div>

If you can arrange it that the sole point of contact between the rails  
app and the .net code and even the reporting code is the database then  
you will be way ahead. Even if you have to put somewhat more data  
into the database than you had planned.

Second most desirable configuration is software-as-a-service where  
everything that needs to communicate does so by REST.

Learning R. well enough, from scratch, takes more than a few days,  
depending on who you are, what you’ve done…

I’m skeptical that you can currently do your .NET coding in Ruby. If  
you can, you’re way ahead. But I’d guess another year is needed for  
that.

Once you get your data in the database okay, you will be generating  
reports for the screen using HMTL, even if only as a test. Your  
customer might like reading it on the screen rather than wading  
through all that paper. Rails is really good at this.

You may find that building a crystal reports system and producing a  
ton of paper results in reports that nobody reads. This is normal in  
a big IT shop.

The quickest way to get the users access to the data is to dump it  
from the database to the screen. This is a quicker way to find bugs  
in the app; Some that only the users will see, as they have the  
domain knowledge to know.

Rails has some database conventions (the primary key is named ‘id’  
and is numeric) that are not requirements, but it takes an extra line  
of Ruby or two to work around when not followed. You’d like to avoid  
that extra line if you can.

There are also pathological personalities in this world. I mean the  
kind of person who will change the database schema the day before the  
deadline, to break your software. When you have teo groups, say one  
Rails and one .NET, somebody might get to feel threatened and act  
out. It isn’t a normal expectation, but I’ve seen stuff like it. So  
keep backups and such.

---

<div class="post-metadata">

**Author:** ![GlennNZ](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/7c8e57/32.png) [@GlennNZ](https://www.ruby-forum.com/u/GlennNZ)\
**Post date:** [April 4, 2008, 8:55am UTC](https://www.ruby-forum.com/t/rails-net-feasible/112023/11 "2008-04-04T08:55:32Z")

</div>

Matt S.1 wrote:

> My feelings on Rails

> - Major vendors, Sun, Oracle, IBM, & Microsoft all have projects to  
> bring ruby & rails into their product suite.

> I think that was more for me than for you… I feel better now.

* * *

Hi Matt,

Very well said.

In fact this should be published as a blog… so that maximum can  
advantage of your explanation. If you already own a blog… then pl.  
blog it for mass. This will spread knowledge about Ruby and Rails as  
well.

Since IronRuby is flowing to version 1.0 soon, it would make Ruby work  
as easy as Rails, on .Net too.

I think the IronRuby team would most likely giving a demo of IronRuby on  
rails at the Rails Conference next month on May 29th.

With Ruby you can enjoy best of three worlds.  
(1) Rails  
(2) Java via - Jruby and  
(3) .Net via IronRuby.

Stick to Ruby… thats the golden rule.
