Needs advice
on
GraphQLGraphQL
and
XStateXState

Hey, I'm new and I've come here because right now, I am so overwhelmed by all the available technologies and solutions that I have no idea where to start.

What I need is to create a very specific application for developers in my workplace. The workflow looks something like this: User enters his variables --> app creates a configuration --> Run a 'test' based on that configuration. I am talking about a lot of variables. The point of the application is to take in all that information and configure it. For example, one of the variables could be a file from which I take information by parsing its content. Now the user can run a test based on the configuration. The test itself is not my responsibility, it's in python and something I need to feed my configuration.

Things I am pretty sure about:

  1. Split the app up to frontend and backend

  2. backend needs to be Python 2.7 -> thinking about utilizing Django

  3. frontend is going to be web-based ->thinking about React (TypeScript, HTML, and some CSS framework like Bootstrap)

  4. Use WebSockets for bi-directional conversation between frontend and backend

  5. Run both server and client on the user's PC.

The problem I am facing is how to connect the different 'states' of the independent server and the client, in a programmatically correct way, with so many variables, tabs, components, etc.

I use WebSockets to move information between server and client. Let's say the user entered a new value in the client GUI, now I want to update the server so it can do its part. But I don't want to send a whole snapshot of the current state of the GUI to the server since this is not efficient. Is GraphQL the right solution for this job? After the GUI updates the server, the server parsed a few things and wants to send this back to the client. How can I take what the server sent, which could be a very deeply nested value, and update the corresponding part in the GUI? Is XState (or other state managers) the solution?

I know this is a very specific question, and I might be lost, but I would like to hear your advice because this is a new subject for me, and I am just learning right now.

READ LESS
8 upvotes·7.6K views
Replies (1)
Backend Dev at Nimap·

GraphQL and DRF both has their pros and cons, its up to your requirement, just try to play with code you will find which is better for your requirements. GraphQL has smaller learn curve, but has multiple things to play with DRF has same functionality as Django

READ MORE
3 upvotes·2.4K views
Avatar of Royi Levy