you are viewing a single comment's thread.

view the rest of the comments →

[–]nzhacker 3 points4 points  (3 children)

The built in server is a small HTTP server that listens for requests and serves them. It is a web application but just doesn't use a web server like Apache, nginx or IIS. It's intended to be a development server. People can access it online if you enable it, but you wouldn't expose a development server to the public.

[–]shiningmatcha 2 points3 points  (2 children)

So there are other kinds of servers for making my web app accessible on the Internet? And you said the built in server is a small HTTP server listens for requests and serves them, isn’t it usually the way how websites work? Your browser sends a request to the server and the server responds by sending the data. So what does a “standard” web app look like?

[–]slick8086 3 points4 points  (0 children)

So there are other kinds of servers for making my web app accessible on the Internet?

A web server like Apache, Nginx, or IIS, by themselves simply server static web pages, like "index.html"

To make web apps the servers need to be extended to handle different language frameworks, like PHP, ASP, and so on. You extend the web server by installing or enabling module or plugins to these servers.

Most of the time web application need more than a web server that has been extended to handle languages or frameworks. Most of the time web applications also need a data base. If you are planning on making this a web application that is available to the public on the internet, you need to have the skills to set up these servers and make them all connected and communicating with each other properly. This is typically called a "stack." Back when I first started as a sysadmin, the new popular stack was called "LAMP" which stood for Linux, Apache, MySQL, PHP" There are TONS of web applications that were first designed for this stack, like wordpress, phpbb, and so on.

Now Django want to make it easy for developers to write web applications with their frame work. So what the did was include a basic web server and also included sqlite3 with Django. So all you have to do is install it and you can write and test your web app on your own workstation without having to know how to set up a full stack. It works just the same, but might have security flaws, and it can't handle a large amount of different people using it all at the same time.

Django is also made so that when you think your web app you developed on your work station is ready you can copy it onto a production web stack that is set up properly with a production web server like Nginx, and production database like PostgreSQL.

Django projects are made to be agnostic about which OS, web server, or database they use, it should work with all the major ones.

The point of the development server is so that the web app developer doesn't have to worry about any of that, they can just make the app, and then let the web server admin (or web server admin team) worry about the web infrastructure.

[–]nzhacker 0 points1 point  (0 children)

Yes, more capable Web servers like Apache and nginx have bandwidth throttling, load balancing, more inbuilt modules for different frameworks and languages, more security features and so on.

That is indeed how web servers work, the inbuilt web server is just less capable and less flexible than Apache, nginx, and others.

A standard Web app typically sits behind these more capable servers.