Thanks in advance, Ehsan
- It is very powerful, elegant, and extremely fun to use. - It has amazing resources and documentation. - It is written in Python. That's a major advantage because pyhon is used everywhere, and if you get good at it - you'll be able to easily experiment with other areas of programming.
The easiest way to start is to watch tuts+ Django Unchained course[1]. It's a great and easy to understand introduction that takes you through the process of creating a hackernews clone.
Then you should buy 2 Scoops of Django [2], it's the best resource to learn Django in more depth.
[1] http://code.tutsplus.com/courses/django-unchained [2] https://www.twoscoopspress.com/products/two-scoops-of-django...
From my experience there is a steeper learning curve for django than flask, but once there its fairly easy to use.
2 scoops is a good book - but it would be good to see fully worked example in the book. Its also got a learnign curve as its teaching you the authors approach to building django which may be different to other tutorials
At this point most mature frameworks all have the same abilities. The only differences you might see are speed, and even then, most people don't take that into account.
Pick the language you like or know the best, and have at it.
What I would recommend though is creating a webpage that is static and gets updated dynamically with angular/react/vue with a rest server like tomcat/flask/express with the database of your choise.
When i first found angular i loved it, I never really given react a fair chance and i have recently started to use vue.js which is great.
As a rest server i am using flask with flask-restplus because its simple and i like python.
As a database i use MongoDB because its easy to set up, i'm sure there's better alternatives but i don't runt anything on a bigger scale so I havn't put much thought into it.
Does this mean that the page won't load if the user has Javascript disabled? As in, you can't see the content w/out JS?
The fact that it's so unfriendly to those select about their browsing habits (i.e those who don't want to run any and all code thrown at them by a random guy on the web) is why I've been reluctant to use it. And if there's a fallback, why not just use that in the first place?
I don't think users ought to have to download JS, or have such a download to be the primary option, when really they're just there to see a blog post or something. It's as if we've gone back in time.
Like my lastest rant will be against Angular. First load is usually with ugly {BLABLA} everywhere, last version breaks everything, ugly performance compared to vanilla JS or react, unnecessary complicated, academic mindset...
It's been a while since I used angular (1.4) but from what I remember, ng-cloak handles this.
When I wanted to build my first big project, I looked for something like Rails in PHP but couldn't find anything. I did find Django, though, which looked cool. Since Python was more similar to PHP than Ruby, I learned Python and used Django.
Eventually I found Django too heavyweight and "batteries included" for what I wanted, so I moved to Flask.
Flask is awesome and if you like Python I still recommend it. But I think it gives you too much flexibility and there are too many ways to do one thing. Also, Python does not strike me as a language well suited to the web, primarily because everything is synchronous.
I'm now building a web app with expressjs, which has all the benefits of flask (minimal, include modules as you need them) with better defined best-practices and a larger ecosystem.
I'm using parse-server as the backend. At first I hated parse because of vendor lock-in, but now that parse-server is open source, that argument is moot. Installing it on my own server is very easy.
The best benefit of using parse-server is how easy it makes building components in different languages. Because there is a parse client library in almost every language, you can write each component of a project in the language best suited to do the job.
For example, the web app I'm building is an express server that talks to parse. But the billing and invoicing portions of the code, which happen mostly in background jobs, are all Python. They talk to the same parse backend as the web app, complete with all the beforeSave/afterSave triggers and cloud code functions.
Building the web app has been very fast because of built in functionality of parse server like email confirmation, forgot password, etc.
Building the billing code has been enjoyable because I'm more comfortable with Python, and I can offload any consistency worries into beforeSave/afterSave triggers and cloud code functions. This way the web app and Python code can call the same logic.
Having used many others, I would highly recommend this approach.
Since you've used it before, would you care to elaborate on what the Parse API does?
They provide a nice dashboard for creating Mongo collections (which they call Classes).
You write "cloud code" in JavaScript. You can write beforeSave and afterSave functions which are triggered before/after you save a document. You can also write "cloud functions" which execute within parse-server and interact with the database.
The result of this is that you can perform a lot of heavy lifting and consistency logic in one place, "the cloud." That way you can build clients in multiple languages (like an iOS app, Android app, web app) that only need to worry about their platform specific details.
Their original value prop was for building mobile apps, but since the ecosystem is pretty mature with a client in every language, I find the benefits extend to writing multiple clients for any purpose.
At the same time, you have to be aware the ecosystem is far from being mature. I am trying right now to use MongoDB and the last Ecto adapter seems to not be compatible with the other libraries.
Currently, pure java servlets serve json over REST-like API. The jar dependencies are servlet-api.jar, a couple of json-related jars and an sqlite jar. Multiple fine-grained sqlite files for data. Tomcat as the servlet container with no static content.
A nodejs reverse proxy forks the API and static web requests between tomcat and another nodejs static webserver. The static content is angualrjs + html + css with minimal and reusable js files mostly fetching json data. I also have a little bootstrap dependency for forms.
I have an apache ant build file that copies the ~60kb war file and static content directly to the production from my dev system. Tried maven before but Ant seemed much simpler and more than enough for my needs. The ant build does a lot other things also.
I use Eclipse for the easy navigability across the code and other nice refactoring features. Ant does all the build work.
Earlier I tried pure nodejs (no java), then JAX-RS and then Undertow container etc. Nothing seemed simpler than the current setup. By the way, the site is https://worktheme.com
Just curious why you don't use nginx here. It will serve static files and proxy to the API. I'm sure the nodejs proxy was easy enough, but adding in gzipping files, rewrite rules, SSL, etc and it seems like nginx would even end up being more simple.
A lot of people choose based on their primary preferred language, so if someone likes PHP they might use Laravel, if someone wants their stuff to be in Python they might use Django or Flask.
Go's ecosystem is not as mature yet and you'll have a harder time finding relevant resources or libraries.
Nowadays I prefer Javascript/React stuff because you can make much more "responsive" and nicer UI/UX with that setup as opposed to the way all those other frameworks work which is to push html back to the client that you "enhance" with some javascript.
If you want to learn something 'new', exciting and interesting and put yourself ahead of the pack of where web development might be heading, go with Elixir/Phoenix. That's what I'm currently doing anyway.
What I'm planing to make is a website where people could share their ideas and consult relating to their ideas. ( Actually much of the process will be like Stackoverflow with some major enhancements )
e.g. how experienced are you, which languages do you use already, if any, and what do you want to do (get a job, build a particular thing, build multiple CRUD sites, ...)
A) Which web framework (e.g. Rails, Django, ...) should I spend time learning on my own, because it will help me get my first job after my degree?
B) Which full web stacks, including front-end (e.g. React or Angular) and back-end (e.g. Rails or Django) are popular among my potential employers, and why?
Is it A or B, or something else?
Also:
- What is your level of experience in programming? Zero? Some projects as a minor during your degree? Several years writing your own pet projects?
- What language(s) do you already use?
In choosing a framework to learn, you're not making a lifelong commitment. If you intend to be a professional developer for the next 40 years, I doubt you'll use the same framework or type of language for the whole time.
The most important thing is to pick something which allows you to be productive early on. That will help provide motivation to keep at it, to learn more, and to get better.
If you are starting out, then trying to learn Rails and React at the same time seems like a steep path. Unless you have a lot of concentrated time, you might be better off learning one at a time. If you pick React first, then build a React app that consumes some existing APIs. If you pick Rails first, then build server-rendered sites first. Then learn to present the same content via APIs. Then add React.
For Ruby -> Rails
For JavaScript -> Node.js/Meteor (Quick dirty demos)
For Python -> Django
React is the most popular clients ide framework, Rails is still the most popular serverside.
Android: Kotlin (or React Native to use only Javascript)
Web app: Ruby + Rails >= Go > Python + Django > PHP + Laravel
Client-side app: React + Redux