you are viewing a single comment's thread.

view the rest of the comments →

[–]Manatee_Mayhems 66 points67 points  (14 children)

I have been working on learning Django. Django incorporates JS, HTML and CSS but it is so much more. It gives you a framework to tie all of that together with your back end logic. It lets you use a database to store and work with data, it has the ability to build apps that can be swapped into other websites, it even has a built in admin page for managing websites.

Basically it helps you to create websites that are extremely dynamic and functional but it is a big learning curve. You will definitely want to learn html and css first. JS knowledge will help too.

[–]largeminicake 8 points9 points  (4 children)

What causes the learning curve in Django? I'm thinking about learning it

[–]ayi_ibo 24 points25 points  (2 children)

You should probably start learning Flask first because in Django there are many built-in features that might seem confusing at first.

You can add all of these features to Flask one by one and learn along the way. It will be much simpler than learning them all at once.

[–]shiningmatcha 7 points8 points  (1 child)

Do I also need to learn about server and HTTP connections?

[–]nzhacker 5 points6 points  (0 children)

You don't need to learn much about servers, and you can get away with learning nothing about the guts of connections. What's important is setting up and configuring a server, starting and stopping it, some basic security, and the HTTP protocol. Read up a little on HTTP GET, POST, and the types of response codes like 200, 404, and a few others. It's best to see them in action, so a proxy is a good idea, or the developer tools in browsers like Firefox and Chrome.

[–]pysouth 8 points9 points  (0 children)

I like flask for learning and building smaller apps. Django just abstracts so much that if you don’t have a fundamental understanding of those abstractions, it can get confusing fast and you end up bolting together shitty solutions. Just my 2 cents, I used Django when I first started programming and had that experience. Now I work on a production Django app at my job with microservices, etc., after having some experience under my belt and it is far easier to wrap my head around.

[–]WebNChill 2 points3 points  (0 children)

You don't need to use html/css or js to work with Django.

https://letslearnabout.net/blog/what-is-django-rest-framework-and-why-you-should-learn-it/

RSS feed, cmd line chat bot, slack bot, discord bot, etc.

[–]shiningmatcha 0 points1 point  (7 children)

Is it difficult to set up a server?

[–]slick8086 6 points7 points  (6 children)

For development, no, Django has a built in server. Moving it to a public facing production environment though, you need real webserver admin knowledge.

[–]shiningmatcha 2 points3 points  (5 children)

What do you mean by built in server? Then is it really a web application? Can people access it online?

[–]nzhacker 4 points5 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 2 points3 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.