11

In terms of expansion of my knowledge, I would like to try to make an SaaS application. I dont really care of app funcionality, but I would like to learn about technology behind it. So my question is, would be someone so kind and show me where to start? some good reading, tutorials, articles or books? I am most interested in:

  • every user, after registration, has its own playground at username.domain.com
  • app should use some kind of master script which will generate content for all users
  • what are pitfalls of such app?
  • what technology backend is needed?

I am open to Ruby on Rails solution. Sorry for my bad english, hope I make it clear. Thanks

Ivan
  • 121
  • 1
  • 4
  • 1
    First of all, is not "Software as a Service" a business model, that can be implemented with various techniques? I heard about just installing OpenOffice on one machine and enabling a few hundred users to work on it from remote machines. Read more here: [Wikipedia](http://en.wikipedia.org/wiki/Software_as_a_service) – Tadeck May 21 '11 at 13:29

4 Answers4

8

You want to build a multi-tenant solution.

Some things to consider:

  • Each one of your users should have an isolated database. This means you need to choose a database driver that can switch the database at run time. The id of database could be based on the user-part of the domain.

  • You can use Devise+cancan for registration. But you will need to redefine some Devise controllers so that they take in consideration the database.

  • You may consider reading Service-Oriented Design with Ruby and Rails by Paul Dix. It has a lot of interesting ideas that you can use to build an efficient service oriented app, which undoubtedly is the kind architecture that you should strive to create.

  • I suggest that you use Heroku to host your application. MongoHQ would be very nice for the databases - and they have an api to make CRUD on databases programatically.

  • And finally, remember to fully test your application. Capybara plus Steak for integration testing, RSpec for models and controllers and Jasmine for Javascript.

  • Also, don't implement your own payment system. There are a lot of providers that you can use like http://recurly.com/.

Nerian
  • 15,901
  • 13
  • 66
  • 96
1

Check the page SaaS application development using PHP in Zend Framework it provide details about building a SaaS appliation in PHP Language.

1

You may want to take a look at the Rails kit at http://railskits.com/saas/

If you prefer to build it your self, take a look at http://www.chargify.com to handle your payments.

Scott
  • 1,105
  • 1
  • 7
  • 17
  • +1 for the Rails kit. I made the purchase and it was probably one of the best purchases I've ever made. Saved so much time! – Trevan Hetzel Apr 20 '13 at 23:00
0

Have a look at this tutorial. It's exactly what you are asking for:

http://anantgarg.com/2013/06/10/build-a-php-saas-app-from-scratch/

This is for PHP, but you can easily adapt it to RoR.

Alec Smart
  • 94,115
  • 39
  • 120
  • 184