Git Product home page Git Product logo

backendtest's Introduction

BackendTest

Author: Zuofu Li

if you have anything do not understand, please let me know. thanks

Instructions:

  1. git clone https://github.com/Chrisfufu/BackendTest.git
  2. virtualenv env
  3. env\Scripts\activate
  4. cd BackendTest
  5. pip install -r requirements.txt
  6. python manage.py runserver

there is already a user for you to test on it. id = 1, it is admin user

username: admin, password: admin

it has three urls

Follow Up Question

for the cloud-scalable problem, first of all, I suggests we stored procedures. I used "with transaction.atomic()" to make sure if part of the data is trying to to the database and occurs an error, then abort the whole process. The technology I am using for backend is called Django Rest Framework. it can support cloud-scalable requests. For example, Instagram, YouTube are using Django as part of their backend, process requests and backend logic. we also could expand the application horizontally or vertically, which will make the application faster. Vertically means that we could change a more powerful machine. horizontally means that we could split the application by different machines. Of course, there are libraries that allows us to use Django on a cloud-scalable application, like Django Storages.

Follow Up Question

  1. it is well tested
  2. there is a file call "mockdata.json", when you go to link 2, copy from the json file, and paste to the json block on the page, then click post.
  3. yes, the data stored efficiently.
  4. The nice thing about Django Rest Framework is that it does give the status code automatedly.
  5. Yes, the code is deployable on Heroku. I did set it up.

Idea:

Personally I created a Template for any website project. frontend is using React & Redux, Backend is using Django Rest Framework. https://github.com/Chrisfufu/DjangoReactTemplate.git This template allows user just fill in the blank. it took me a long time to configure it. I used my Template to create this backend test, and removed the frontend part.

database design:

Based on the sample log, I do believe that I only need 3 more tables to store the information that frontend send back. the ER diagram is shown below.

backendtest's People

Watchers

James Cloos avatar Zuofu Li avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.