Our state of the art Gantt chart


Post by farfsd23 »

In https://bryntum.com/products/gantt/docs/guide/Gantt/integration/react/data-binding

project : {
    transport : {
        load : {
            url : '/server/load/url'
        },
        sync : {
            url : '/server/save/url'
        }
    },
    autoLoad : true
}

Is there any nodejs demo I can use that implements server side sync functionality?

Including Database migration and CRUD logic


Post by tasnim »

Hi,

We don't have any demos using nodejs but there is a demo in ASP.NET backend with a database.
You can find it locally here Gantt\examples\frameworks\aspnetcore


Post by tasnim »

I've created a feature request for that to make a demo of CRUD with a NODE JS backend. Here it is https://github.com/bryntum/support/issues/6564


Post by farfsd23 »

tasnim wrote: Fri Apr 07, 2023 1:04 pm

I've created a feature request for that to make a demo of CRUD with a NODE JS backend. Here it is https://github.com/bryntum/support/issues/6564

Thank you for your prompt response. Does the Sync feature need to be used? Do you think it's the best practice? Front-end developers could focus on tweaking configurations while Bryntum Gantt would handle the heavy lifting? What are the pros and cons of that for GraphQL stacks?


Post by alex.l »

Hi farfsd23,

There is no sync feature. We have built-in CrudManager to work with backend. We recommend to use it in your apps. Here is full guide how to set it up https://bryntum.com/products/gantt/docs/guide/Gantt/data/crud_manager
Also examples For ASP and PHP that you can find in /examples folder of sources you downloaded.

You also can use own manager/lib and save data by your own. For that please use events such as https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#event-change
and trigger server API to save data.

So, on change event you have all changes, save it by your own, and after that commit all changes
https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#function-commitAsync

If change event triggers to often for you, try to specify buffer in your listener config, docs here https://bryntum.com/products/gantt/docs/api/Core/mixin/Events#typedef-BryntumListenerConfig

All the best,
Alex


Post by alex.l »

We will add guide to describe how to interact with server without our CrudManager, here is a ticket https://github.com/bryntum/support/issues/6571

All the best,
Alex


Post by farfsd23 »

alex.l wrote: Mon Apr 10, 2023 11:16 am

Hi farfsd23,

There is no sync feature. We have built-in CrudManager to work with backend. We recommend to use it in your apps. Here is full guide how to set it up https://bryntum.com/products/gantt/docs/guide/Gantt/data/crud_manager
Also examples For ASP and PHP that you can find in /examples folder of sources you downloaded.

You also can use own manager/lib and save data by your own. For that please use events such as https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#event-change
and trigger server API to save data.

So, on change event you have all changes, save it by your own, and after that commit all changes
https://bryntum.com/products/gantt/docs/api/Gantt/model/ProjectModel#function-commitAsync

If change event triggers to often for you, try to specify buffer in your listener config, docs here https://bryntum.com/products/gantt/docs/api/Core/mixin/Events#typedef-BryntumListenerConfig

I may not have explained my question very well. In https://bryntum.com/products/gantt/docs/guide/Gantt/integration/react/data-binding,

Configuring project with transport is the simplest way of binding data to the Gantt project stores as seen from the client side, but it does require following a specific protocol on the backend.

. I want to learn more about the specific protocol, because it will save us a lot of time.

Thanks!


Post by alex.l »

Hi,

This means you'll need to support API and request/response format that CrudManager required. All is described in the guide here https://bryntum.com/products/gantt/docs/guide/Gantt/data/crud_manager

All the best,
Alex


Post by psohal@corval.io »

Can you provide a link to the ASP.NET Core example? I tried navigating to https://bryntum.com/products/gantt/examples/frameworks/aspnetcore/ but it's forbidden.


Post by ghulam.ghous »

Hi Psohal,

Please always open a new thread for a new question. You will need to download this example. See here how to download and access the sources https://bryntum.com/products/gantt/docs/guide/Gantt/download. You will find it inside the examples/frameworks/aspnetcore category.

Regards,
Ghous


Post Reply