Giter Site home page Giter Site logo

Comments (3)

gautema avatar gautema commented on June 10, 2024 1

Sounds good. I'm closing this as I hope you got answers to your questions. Just reach out again if theres any more questions.

from cqrslite.

gautema avatar gautema commented on June 10, 2024

Hi.
If you are doing everything synchronous, the easiest is probably to return the new customer from the save action or do a get on the customer directly after the save has finished. You could just return the version number as well (or just increment version by one), but if there are side effects from the save, you often have to implement the same logic several places which I find to be more trouble than it's worth.

If things are asynchronous things get a bit harder. Then the client need to subscribe to events from the server. This can be done using websockets, signalr or similar tech to get updates as they happen.

I have used both options myself and giving events can be a nice way to notify that something has changed on the server by an other user as well. But it's more work.

Hope this helps a bit.

from cqrslite.

LockTar avatar LockTar commented on June 10, 2024

Thank you for the fast reply. We now implemented indeed the "refresh" option. So get the user again and update the field. Just like you would open the page. In this way you don't have to write client business logic for something that the server maybe already have done for you.

in example:
Update lastname of customer => dto object from server will return firstname, lastname and fullname/displayname (first and lastname combined)

We were also thinking about websockets or signalr but in a later fase of the application. Now first other priorities.

from cqrslite.

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.