Code Monkey home page Code Monkey logo

Comments (2)

phalt avatar phalt commented on July 27, 2024

I'll give it a read and give my opinion. From a brief glance I can't see what more it provides than a Django model, but it does provide a way to make a typed object nicely.

from django-api-domains.

simkimsia avatar simkimsia commented on July 27, 2024

Thanks. I have a related follow up question.

Which is that how do you handle certain "types" or "status"? Do you store them in database as standalone tables? I posed a similar question to the cosmicpython team as well at cosmicpython/book#288

But I want to hear your thoughts as you're more familiar with Django whereas they're more familiar with Flask.

An example

let's say you have a Batch Django model, needs to have an attribute of string type called state with the following values: fulfilled, partial, unfulfilled, cancelled as the only possibilities. Do you have the state as its own individual data table and therefore Django model? If so, do you use the primary key inside Batch table or simply the value itself?

What happens if two entities (in the DDD sense) share the same state field?

Thank you. Looking forward to your reply :)

Awesome style guide by the way 🙏 I think it's great especially the part abt the philosophy on how Django should focus on being a great REST or GraphQL server. That's what attracted me to your styleguide. i.e. the two big problems in the intro. https://github.com/phalt/django-api-domains#introduction

from django-api-domains.

Related Issues (20)

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.