简体   繁体   中英

How to move from Django to REST-API/Thin Client?

We are thinking to move away from Django and separate the backend and frontend. The backend is straight forward as I have done it plenty of times by exposing it as a Python RESTful API .

Whats new to me is the thin client part.

Theoretically I could just write HTML and plain javascript to talk to the API.

Is there a macro-framework that would help me to achieve that? Beside AngularJS , what other thin client frameworks could I utilise without reinventing the wheel?

If I understand what you're trying to do, you might be looking for something like jQuery. It's a subtle JS framework that will make it easier to talk to your Django API, especially using Ajax and JSON.

There are lots of alternatives out there. You really have to get your hand dirty to find the solution that suit you.

On one end, you have backbone.js that is famous for how small the code base is but you need to add core components such template engine using mustache or similar. On the other end, you have full fledge framework such as AngularJS and ReactJS .

Here are some material to get you started:

TodoMVC is specially interesting as it implement the same app in multiple frameworks so you have a comparison base.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM