CentreForDigitalHumanities / cookiecutter-webapp-deluxe

BSD 3-Clause "New" or "Revised" License
1 stars 1 forks source link

Sample frontend-backend communication #11

Open oktaal opened 4 years ago

oktaal commented 4 years ago

Have some basic hello-world frontend-backend API call.

alexhebing commented 4 years ago

I will add this in from the testapp.

alexhebing commented 4 years ago

Hmmm, now that I am doing this, it feels wrong. I have to create a DELETEME_example_app in the backend, that has a very simple view, which is not at all representative of what views should / could look like. In this way, the example is most of all an invitation to start off on the wrong foot, and I don't want it to have that effect.

What I have done now is make a service in the frontend that returns some mock data. This should make for a nice example of how to do things (once reviewed and perhaps improved).

Is that sufficient for now @oktaal, or do we really need something at the backend (i.e. a much more detailed example implementing a Viewset and everything?)?

BeritJanssen commented 4 years ago

Hello all, for khatt I was experimenting with django-restframework and ran into Restangular. Does anyone have experience with this? It looks like it's formatting requests to the backend in a way that may be very compatible with django-rest.

jgonggrijp commented 4 years ago

I don't have experience with it.

oktaal commented 4 years ago

This is very interesting, I think it might be possible to combine it with something like django-typomatic to have the Django models available as interfaces in the Angular frontend.

BeritJanssen commented 4 years ago

In-te-resting!

jgonggrijp commented 4 years ago

It's a version 0.0.1, though. Maybe a bit early to adopt?