I have a few general questions for the CheckVist makers:

I have a few general questions for the CheckVist makers:

1. Do you get a user's task list as:
A. Nested data (with children tasks inside parents)
B. Flat data (like an array of task-objects)
C. both (nested data for building the DOM, flat data for editing and moving around tasks etc.)
If it's 'C' where do you keep your single source of state?

2. Do you use a "nested set" database? (https://en.wikipedia.org/wiki/Nested_set_model) or do you only have one column for parent_id and one column for task dept?
If you do not use a nested set model, how do you calculate the dept of a tree?

3. If you make a task a child of another by pressing 'tab', do you get that one task back from the server again after sending it through Ajax? Or do you only update the DOM manually after sending the changed parent_id to the server?

Comments

  1. Hello,

    Checkvist uses parent_id + position in the database to build the tree structure. To obtain data, we get an array of task objects and the tree is built in runtime. When doing UI operations, we usually perform DOM change first, update model in memory, make Ajax call and after that re-update data in memory upon response from Ajax call.

    May I ask you, why do you need this information?

    Regards,

    ReplyDelete
  2. Wow thanks!! It's because im learning Vue.js and laravel now, and i'm trying to build a similar app to checkvist because i just love it so much!!

    ReplyDelete
  3. Dear +Kirill Maximov (KIR)
    I'm wondering: In the case of adding a task, you do not know with which ID it would be added right? So in this case if I'm not mistaken, you'd have to first send the data to the server, get back newly added ID and then update the DOM according to that.
    But in CheckVist adding tasks is such a breeze. What's the flow for adding a task?

    ReplyDelete
  4. When adding a task, we update UI immediately, based on the data user entered, but it is shown in gray, until we get AJAX response from server, and at this point we re-draw UI with the actual data. You can try to see how it works if you disable internet access when adding a list item.

    ReplyDelete

Post a Comment

Popular posts from this blog

I'm really enjoy using checkvist, you are adding great features very quickly.

Hello friends

Hello friends!