Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a new ToDo MVC example #5363

Open
1 of 7 tasks
FloVanGH opened this issue Jun 6, 2024 · 2 comments
Open
1 of 7 tasks

Add a new ToDo MVC example #5363

FloVanGH opened this issue Jun 6, 2024 · 2 comments
Assignees
Labels
a:demos Demos and examples (mF,bO)

Comments

@FloVanGH
Copy link
Member

FloVanGH commented Jun 6, 2024

I'm working right now on a new version of the Todo example with a much nicer design (still usable with all styles) and based on the Model View Controller pattern.

First goal of this in first place is to have a small example with two views to show how work with the MVC pattern on Slint for all supported languages (Rust / C++ / Node / Python). I first will start with the Rust version. And want to add additional languages with following PRs. With the Python support I would need @tronical 's help ;-). But after first PR is finished.

Second goal is to has a good looking example for a lightweight real live application, that works also good on mobile.

Tasks

@FloVanGH FloVanGH added the a:demos Demos and examples (mF,bO) label Jun 6, 2024
@FloVanGH FloVanGH self-assigned this Jun 6, 2024
@tronical
Copy link
Member

I suggest to replace pub due_date: i64 with std::time::SystemTime as data type instead. That way you have a data type that chrono supports (implements From<SystemTime> for chrono::DateTime) and you can make it relative to the epoch if necessary. But for example if you end up backing your model with a database, you wouldn't store an i64 in the database, you'd use the database' date time data type anyway.

@tronical
Copy link
Member

Another suggestion: replace unwrap() in main with Result.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:demos Demos and examples (mF,bO)
Projects
None yet
Development

No branches or pull requests

2 participants