0

I'm creating right now a new application which will be kind of start'up. User can register it and use many tools inside. I hope there will be at least thousands hits per day.

I'm sure that it will be using python & django because it's technology I work with. I'm not sure about project structure and communication in a projects like this.

I thought that i'll use django with tastypie as a backend to serv endpoints and another one app based by nodejs (using GULP for example) to host frontend only. (frontend will use AngularJS & ui router, it will be SPA).

Is it a better option to separate backend and frontend application or maybe i should keep whole frontend files (js, css, html) inside django as a static files?

Which solution is better for a potentially huge web application? Maybe both are bad ideas?

Thanks a lot for help!

tomeusek
  • 59
  • 1
  • 3

2 Answers2

2

It's a really good idea, first format your application as a restful api.

Afterwards, any platform or any front-end change won't be a big trouble to connect to your servers.

Use Django rest FW

Alvaro Silvino
  • 9,441
  • 12
  • 52
  • 80
2

If you're truly dealing with a scaling issue, you want to decouple every single component. That way you can pour resources into the part of your system under the heaviest load. That would involve things like spinning up multiple front-end web/cache servers, compute nodes, etc, etc.

That said, very few companies need to handle that kind of scale, and by the time you do, you'll have a team of developers to do all that for you. (As someone once said, "Scalability is a problem every developer wishes they had").

Until then, Have a front-end site and an Api. If you write the Api well, you'll be able to plug in desktop/mobile clients very easily at a later date. You may also consider making the api public (at least partially) in future to allow other developers to interact with your product.

Basic
  • 26,321
  • 24
  • 115
  • 201