Using rails or ASP.NET for website on Windows - ruby-on-rails

I need to create a site that interact with some windows applications.
Currently this is done through direct calls so I would like these to run on the webserver.
This means that the site will have to run on a Windows based system.
I have been doing some ruby lately and am very keen on using rails for the site, but have at the same time seen plenty of discouraging posts regarding this.
Should I rather use ASP.NET (MVC) for a windows system or is rails stable enough to handle this?

Ruby on Rails on Windows is not ideal, but it does work, and works just fine for most purposes. The biggest issue you will likely run into is that the community of people running RoR on Windows is very small, so the issues you do run into which are specific to RoR+Windows may be harder to get help on.
If leveraging existing community is very important to you and/or your project, then I do recommend going with ASP.NET MVC. The community there is much larger and easier to connect with than RoR+Windows, which is fairly niche. Although it's difficult to put an objective value on the added benefit of having a community of support, it's clearly one of the biggest selling points for any platform - the RoR community in general, for example, is a huge part of its continuing success.

I would add to Rex's answer that RoR+Windows is fine for development, but i would not use that as a production setup. In my case i do a lot of work in Flash/Flex/Photoshop while working on the backend at the same time, and of course running those graphics heavy apps on Linux is not very ideal, but the server i deploy to is Linux which is the only part that really matters.

Related

Alternative to Windows and cloud for Ruby on Rails

I'm starting to learn Ruby on Rails and after a week I still cannot get the installation right. I've since moved to a cloud bases system, but it is extremely slow and rather a waste of time.
I do have a website and saw there's Ruby on Rails. Is it perhaps possible to set it up in a domain or sub domain and start and start learning/programming that way?
Any other alternatives is also welcome. I do now own a mac or Ubuntu, which makes it a little difficult.
Looking forward to your responses. In the meantime I'm installing/uninstalling and trying to see if I can somehow make it work on Windows.
Doing RoR development on Windows is a pain. I would suggest just uninstalling Windows and going for some Linux distribution if you are serious about learning RoR. Linux is free software so the only thing holding you back from having it on your computer is your self.
Developing with Ruby on Rails is say'd to be really easy for beginners but I would disagree with it. Developing on this framework requires you to actually understand the whole stack. The server, backend, client, database and ofcourse a new weird language called Ruby. Now most of this stuff is learnable and doable on every OS. But once you start messing with more advanced databases and servers, you will need some GNU utils from Linux.
For instance if you have made your first deployment to some external server, you will often need to know what is going on in there. The only way to do this is usually by going in that server with SSH and reading the logs. But doing that is difficult without a nice GUI. So now you have to learn some stuff like the tail and grep commands and Linux piping to find your info easily.
Also if the computer you use is not completely yours and you cannot do it on it, then try installing a virtual machine software like Virtual box.
With that you can install Ruby on a Linux that sits on your VM and use it like that. It will still be a bit slower but if your computer has decent hardware in it, you will still be happy with it.
Here is a guide on how you could do it: Guide for VM development

Developing Ruby and Rails in Windows? Or Linux VM

I've been doing front end web work for a while. I maintain several company websites and etc, mostly on Joomla. I'm getting bored with it and I really want to expand in to development. I have a few web app ideas for the company and some personal stuff I'd like to do.
Ive decided I want to learn Ruby and Rails and have been pursuing it for about a month now. I read a lot of tutorials and work through stuff I find online. I'm also diving in to git and trying to use it more.
I feel like Windows is not going to be conducive to me getting efficient at this. I know that you can, and some do, develop in Windows but I'm wondering if its time for me to move past it.
I picked Ruby to be my first real programming language because of the simplicity I read about. For both Ruby and RoR and I want to be able to learn a language that will let me build apps and web apps that are cross platform.
On to the problem, I can't immerse myself completely in a linux world. I have to have photoshop and indesign for part of my job. So I'm thinking maybe I should just do a live usb key install and take it back and forth between work and home. Is that a better solution than dual booting for what I want to do? I also realize that a mac would give me the best of both worlds, but I am budget constrained and I can't make that leap yet.
Also, is there a good place to hang out to learn more? I have paid codeschool and tutsplus accounts. Should I be back on IRC? What do you think? I'm looking for guidance more than anything I guess. I feel kind of lost on where to go how to not waste time and start developing real skills. Thanks.
You should also checkout the vagrant project which creates headless (non-gui) VMs and makes it easier to work with your files, etc in Windows while the code actually gets run on the Vagrant VM. Also, since its headless, the graphical UI isn't eating up resources and has less impact on your host machine.
Check out these resources:
http://www.vagrantup.com/
http://blog.dcxn.com/2013/07/12/introduction-to-vagrant-for-rails-developers/
http://railscasts.com/episodes/292-virtual-machines-with-vagrant
*Also if you're learning Rails, you MUST checkout Railscasts http://railscasts.com/
The last thing I knew about this is that:
In Linux you can use RVM which handles pretty well everything about your Ruby environment. In Windows I tried pik, but it does not have support to install newer Rubies.
Also, Linux console is much friendlier than Windows one, regarding appearance and functionality. I have explored console2 for Windows, but it did not feel so comfortable that time.
In Linux you have plugins like oh-my-zsh which allows you to speed up your development. But maybe there are kind of this plugin for Windows.
Other than those, I don't know why you should choose Linux VM.
I've developed a Rails app under Windows, and it turned out to be a huge mistake. Near the end of the development, I had to make my webapp multithreaded. The default Rails server does not allow multithreading, and all the alternative servers are either Linux-only, or I couldn't get them to work.
I also considered using JRuby(because Java threads), but by then my app was too big to convert to JRuby(there are some syntax differences that I couldn't track, and I relayed on some gems that don't work on JRuby). However, if you go for JRuby from the beginning, you might be able to pull it off.

ASP.Net MVC on Linux/Mono

I am thinking of developing a website using the ASP.Net MVC framework on Linux. I would like to know:
what are the best practises for developing such a site (are they any different for mono/ Windows)?
any gotchas I should be aware of
any (material diffeences) - e.g. missing/proprietary libraries/componenst between Mono and .Net
are there any special directives, modules required to run Mono with Apache?
Are there any performance differences between a site hosted on Windows/IIS and Linux/Apache?
I intend to do most of my development using VS Studio - can the site be developed using VS and then deployed on Linux?
I am aware that this question has been asked several times here on SO. However, most of the questions date back to 2008 or 2009 - which is a very long time in internet time. Things may have moved on since those answers - so those answers may no longer be relevant.
I have to state that I am NOT interested in hosting the site on a Windows server - so I am only interested in what works for a Linux server deployment.
I'am currently working on a MVC 4 app and we are using Mono. If you are just planning to have a basic website, you should go for it. But for more complex flows, honestly, I think you should do a little bit of research first, to see if the features you want to implement are supported in Mono. Things you should consider:
only a set of restricted libraries are supported on mono ( for example, right now we are having some issues due to the fact that the mono libraries (Novell and DirectorySearcher) for LDAP do not support pagination)
the developing environment will be different than your server env ( I am using Visual Studio, we managed to pass this limitation by adding a lot of logs)
we do our publish using FTP, so yes, you can deploy it from VS, using a publish profile set up for FTP
it's free, but it will take a lot of time to research & do special thinks just for the sake of Mono
not a lot of documentation available, because not a lot of people use it, so if you have a specific problem, it will be more difficult to solve
My experience is from 2011, but I am pretty sure you will have to experiment to see works and what doesn't - that's my experience with Mono.
Most of your questions are extremely broad and I think your question will be soon closed.
As for your last question this was the way I did it and it worked (develop in VS->deploy to Linux), but you must be aware that:
just because your code will work in the VS debugger it doesn't mean it will work when deployed;
there is no one-to-one mapping between Mono and .Net. Even when things work it doesn't mean they will work the same way. For example the implementation of the encryption code used for http cookies was very different between mono and .net.

Choice of platform for running web site on Amazon EC2 Linux instance using Solr

I'm a Microsoft guy feeling pretty confident building ASP.Net sites running on Windows. That's basically what I do for a living.
Now I'm considering building a Facebook web app on my own and started looking for hosting solutions. I found the Amazon Web Services Free Usage Tier offer pretty compelling. And having the web site in the cloud also seems like a good idea if it becomes popular.
The problem with the offer is that it's only for Linux instances and I don't know squat about that platform.
I've planned to use Solr as my search engine (and perhaps the only data store) since I'm familiar with it and it's just great from a performance and feature standpoint.
Right now I can see two alternatives that both have pros and cons.
Ruby on Rails
I don't know the platform or language but it seems to have pretty good integration with Solr. It would be fun to try something completely different and RoR seems very popular right now.
Mono
I would be familiar with the platform and the language but it seems to lack in Solr integration.
Any thoughts or pointers to resources would be great. Like I said, I feel a bit lost stepping outside of my comfort zone.
It's really hard to advise someone with completely different background. First you have to forget for a minute all that you know about Linux :)
I would try heroku.com
You don't need to know Linux to deploy to heroku. They have a free plan and they have a Solr add-on, $20/month though.
Be warned: If you go RoR route you may never come back to ASP.NET again. No kidding.

Setting up Ruby on Rails beginner netbeans

WOW. Setting up is complicated, can anyone recommend a link or provide me with some advice.
I have two options, a Linux Hosting server with it pre-installed or through NetBeans.
Sorry for the generic question.
I think that you are going to want both of your options. You will want to have a hosting server with Rails installed on which you will deploy your Rails application. You will want to use NetBeans on your development machine to develop the application in the first place.
It is good to note that using NetBeans is not mandatory; you can -- and many others do -- use any random text editor for building Rails applications. However, I use NetBeans for Rails development, as I find that it greatly increases my productivity.
Don't let yourself get overwhelmed by the feeling of complexity at the beginning. While getting on to the learning curve can be tricky for any system, I believe that climbing the curve with Rails is easier than with many or most other web application frameworks.

Resources