Recent

Author Topic: State management in Lazarus application  (Read 305 times)

tu

  • New Member
  • *
  • Posts: 12
State management in Lazarus application
« on: November 03, 2024, 06:47:45 am »
Hello everyone,

I come from "more modern" platforms. I'm using React and Flutter for my main job.

In React or Flutter, I'm using some "state management" library to pass data around application. In Lazarus/Delphi application how can I do that? I think there are some similar concepts with "state management" I'm using in React/Flutter.

Thank you so much  :)

Thaddy

  • Hero Member
  • *****
  • Posts: 16199
  • Censorship about opinions does not belong here.
Re: State management in Lazarus application
« Reply #1 on: November 03, 2024, 07:28:50 am »
React is like Pas2JS and flutter is similar to the ARM compilers. It is not quite clear to me what you mean with "state" in that context.
Freepascal has a full set of database options if you mean storing state in tha sense . I suggest you have a look at LAMW and examples. That will give you some insight of what is possible (although there is a lot more possible than LAMW shows!)
If I smell bad code it usually is bad code and that includes my own code.

PierceNg

  • Sr. Member
  • ****
  • Posts: 394
    • SamadhiWeb
Re: State management in Lazarus application
« Reply #2 on: November 03, 2024, 09:13:27 am »
I come from "more modern" platforms. I'm using React and Flutter for my main job.

In React or Flutter, I'm using some "state management" library to pass data around application. In Lazarus/Delphi application how can I do that? I think there are some similar concepts with "state management" I'm using in React/Flutter.

You could try the SAM pattern. I implemented the rocket launcher example in pas2js, albeit, in my view, rocket launcher is a toy example and does not speak much to whether the pattern works for Real World ApplicationsTM.

Oh, while playing with Flutter I implemented rocket launcher using the SAM pattern as an Android app too.
« Last Edit: November 03, 2024, 09:18:50 am by PierceNg »

 

TinyPortal © 2005-2018