I'm creating a b2b application. The application itself is done. Now i need a public website to inform customers about the product.
The public website and the b2b application might share some data. Since it should be possible to registered and choose a payment plan on the public website and create a user in the b2b application in the same process. So it seems i need to use a shared database.
Is it best to put the public website inside the existing application or is it better to seperate them?
In my opinion, you should separate the two completely and remotely create users through an API in your B2B app.
I actually wrote a blog post on using an API if you want to learn more: http://davidsulc.com/blog/2011/04/17/consuming-a-public-rails-api-with-jquery/