Live data from Hacker News

Getting Started with Django REST Framework and AngularJS, Part 2

engineroom.trackmaven.com

21–30 of 34 posts

Re: Getting Started with Django REST Framework and AngularJS, Part 2

#21

Earlier quoted context omitted.

There's a book called Django by Example by Antonio Mele that I think is pretty good. People love Two Scoops of Django as well. The former consists of a series of tutorials and the latter explains best practices to consider when writing Django apps.

Do either of those talk about Django and scalability/duplication? The two biggest problems I've run into looking for other resources are: 1. Versions -- a lot of printed materials are just old by the time they come out. 2. None of them talk about large-scale projects, only smaller-scale personal blogs etc. as a first project. Or, put another way, many of the resources I find target beginners instead of intermediate/a…

Scalability--not so much. If you were really interested in building a highly scalable service (5M+ concurrent users) you probably would want to look at a different tool/language. But, chances are, Django works just fine for your initial/early use cases (before what you're building goes "viral" lol) and for most web app use cases on the internet. Duplication--yes. If you are talking about duplicating project boilerplate, Two Scoops gets into this topic specifically (using a neat package called cookiecutter). If you mean replication (e.g., horizontal scaling via replication of instances of your app), then that's more of a dev ops thing and depends on your deployment setup. I would suggest digging into literature about AWS, or whatever PaaS you choose.

1. Versions -- both books target Django 1.8+ (Django 1.9 is the current, stable release), so I would consider both relevant for now.

2. I suggested both books because both are current and different. Django By Example includes examples of projects beyond a simple blog (I think that's chapter 1 or 2). Each chapter introduces more and more complexity with a totally separate project example. Whereas, Two Scoops of Django provides general recommendations for how to best manage common Django tasks/flows. I think both are appropriate for intermediate/advanced users.

Re: Getting Started with Django REST Framework and AngularJS, Part 2

#22

Earlier quoted context omitted.

There's a book called Django by Example by Antonio Mele that I think is pretty good. People love Two Scoops of Django as well. The former consists of a series of tutorials and the latter explains best practices to consider when writing Django apps.

Do either of those talk about Django and scalability/duplication? The two biggest problems I've run into looking for other resources are: 1. Versions -- a lot of printed materials are just old by the time they come out. 2. None of them talk about large-scale projects, only smaller-scale personal blogs etc. as a first project. Or, put another way, many of the resources I find target beginners instead of intermediate/a…

Check out https://www.codingforentrepreneurs.com/

Re: Getting Started with Django REST Framework and AngularJS, Part 2

#23

Earlier quoted context omitted.

Do either of those talk about Django and scalability/duplication? The two biggest problems I've run into looking for other resources are: 1. Versions -- a lot of printed materials are just old by the time they come out. 2. None of them talk about large-scale projects, only smaller-scale personal blogs etc. as a first project. Or, put another way, many of the resources I find target beginners instead of intermediate/a…

Scalability--not so much. If you were really interested in building a highly scalable service (5M+ concurrent users) you probably would want to look at a different tool/language. But, chances are, Django works just fine for your initial/early use cases (before what you're building goes "viral" lol) and for most web app use cases on the internet. Duplication--yes. If you are talking about duplicating project boilerpla…

Thanks for the in-depth response! I'll check them both out. :)

Re: Getting Started with Django REST Framework and AngularJS, Part 2

#25

Aww, what a tease. This is exactly what I'm diving into right now. Since part one was written in November, I'm guessing part three might show up around March? Anyone have any worthwhile Django learning resources to share? (Other than Django's own docs, which are great.)

two scoops of django is decent, but it doesnt talk about the DRF. I am going to be adding a blog post about this in a few days, Ill send you a link when I am done - drop me an email if you want me to email it you.

It would be really helpful to have that.

Re: Getting Started with Django REST Framework and AngularJS, Part 2

#26
post #4

It's shocking to me how something that should be so easy becomes so complicated. Why does the file structure need to be re-configured? What the heck are the __init__ files?? Virtual environments? I sort of know the answers but remain unsatisfied. And then the author sets up a needlessly overcomplicated data model situation.

can I ask a serious question? are you possibly not the intended audience of this article? have you done any non-beginner work using Python and/or Django in a production environment?

I'm slightly past this article but not much further. I check out a lot of "getting started" tutorials because I'm still frustrated with the "getting started" experience of a lot of frameworks/approaches. I just don't see why it's so complicated to do things that seem like they would be pretty easy.

Re: Getting Started with Django REST Framework and AngularJS, Part 2

#27
post #4

It's shocking to me how something that should be so easy becomes so complicated. Why does the file structure need to be re-configured? What the heck are the __init__ files?? Virtual environments? I sort of know the answers but remain unsatisfied. And then the author sets up a needlessly overcomplicated data model situation.

With all due respect, this tutorial might be a little over your head, but a little bit of research will get you up to speed. __init__ files and virtual environments are not specific to Django or DRF. These are typical patterns used in python development. For example, using a virtual environment allows you to have a self-contained python environment (your choice of version) with package management through pip. This is…

As I mentioned, I know the answers. But that doesn't quell my dissatisfaction.

Re: Getting Started with Django REST Framework and AngularJS, Part 2

#28
post #4

It's shocking to me how something that should be so easy becomes so complicated. Why does the file structure need to be re-configured? What the heck are the __init__ files?? Virtual environments? I sort of know the answers but remain unsatisfied. And then the author sets up a needlessly overcomplicated data model situation.

pretty standard stuff if you're familiar with python...

That's the scary part. How having blank __init__ files in every folder is "standard stuff" is beyond mortal comprehension.

Re: Getting Started with Django REST Framework and AngularJS, Part 2

#29
post #27

Earlier quoted context omitted.

With all due respect, this tutorial might be a little over your head, but a little bit of research will get you up to speed. __init__ files and virtual environments are not specific to Django or DRF. These are typical patterns used in python development. For example, using a virtual environment allows you to have a self-contained python environment (your choice of version) with package management through pip. This is…

As I mentioned, I know the answers. But that doesn't quell my dissatisfaction.

Write your own article ¯\_(ツ)_/¯

Re: Getting Started with Django REST Framework and AngularJS, Part 2

#30
post #26

Earlier quoted context omitted.

can I ask a serious question? are you possibly not the intended audience of this article? have you done any non-beginner work using Python and/or Django in a production environment?

I'm slightly past this article but not much further. I check out a lot of "getting started" tutorials because I'm still frustrated with the "getting started" experience of a lot of frameworks/approaches. I just don't see why it's so complicated to do things that seem like they would be pretty easy.

How else would you suggest a python interpreter know to treat a directory as a module?
Post reply on HN