nimblehq / flutter-templates

A repository contains Flutter templates that are used by Nimble developers
MIT License
23 stars 4 forks source link

[EPIC] Restructure the flutter_templates #58

Closed manh-t closed 1 year ago

manh-t commented 2 years ago

Why

Currently, the flutter_templates repository is a mix between the template and Flutter project. It could confuse a new-dev (ex. why do we have Makefile inside a Flutter project?), and it's hard to maintain when the template stuff grows.

As discussed in the Flutter-guild meeting, we came to an agreement to re-structure the flutter_templates with the following:

Please let me know if I'm missing something. I welcome comments for improvement πŸ™‡

More tasks will come for this epic πŸš€

Who Benefits?

Developers, maintainers.

sleepylee commented 2 years ago

@manh-t I'm a bit concerned with the last idea:

The team decided not to create an example project to present our MVVM structure but implement it directly to our .project. WHY?

The main concern to me is NOT about enforcing us to have it, but rather the later phase that might make us fall in the same trap as before:

present our MVVM structure but implement it directly

There are a few things we need to reconsider:

Now back to the example:

we have to implement the features in more detail (List screen, detail screen).

If you are still unsure about it, I recommend NOT taking the example/ idea into it yet, but rather, just cleaning up the project and getting everything ready at first with architecture as a feature option (mvvm or default == None).

@markgravity @doannimble @luongvo please feel free to debate πŸ™‡

manh-t commented 2 years ago

@sleepylee your concern is valid πŸ€— we already discussed the structures used in flutter_templates too, then it comes to challenges which are:

If you are still unsure about it, I recommend NOT taking the example/ idea into it yet, but rather, just cleaning up the project and getting everything ready at first with architecture as a feature option (mvvm or default == None).

Okay, I will not take the example idea into the project until the idea becomes possible to me πŸ™‡ perhaps I'll create a PoW first 😁

sleepylee commented 2 years ago

If the mvvm has a piece of code that need to append/ modify an existing file (e.g., change network_module.dart to add service class into this), we need to build a script (or find a third-party lib) that can update the existing file properly

I think if the change is small, we should just update it to the current example repo.

How to verify the code we added into mvvm is correct via CI/CD.

If you do it manually as above, then you can verify it. The idea is that CI/CD should only verify a project init from the template but NOT committed to the vcs.

So, what happens if there are more updates that you can't bring to the example repo we already had? πŸ‘‰ create a new example from the latest state of the template. Adding the same small demo features that can ensure you will have the latest example code.

manh-t commented 1 year ago

@luongvo I think we can close this epic, since the project was re-organized in 1.0.0. What do you think?

luongvo commented 1 year ago

@manh-t I'm planning a short flutter-templates meeting every 2 weeks or 1 month to discuss the plan & backlog. I think we can have decisions from that meeting, I will send you guys the invitation for the first one soon πŸ‘‹