Fidev-io / framy

A convenient code generator for app styleguide, gallery, wireframes and/or storyboard.
https://framy.dev
GNU Lesser General Public License v3.0
148 stars 16 forks source link

Consider splitting the main.framy.dart file #121

Open nateshmbhat opened 4 years ago

nateshmbhat commented 4 years ago

From what i have understood , all the code is being generated into that single main file which can cause performance problems in future.

So why not add a framy folder that contains all the framy generated code ? 🤔

MarcinusX commented 4 years ago

Hey @nateshmbhat!

Thanks for pointing this out 🙂

The biggest advantage of having everything in one file is that it's much simpler to handle all the imports. It could get a bit complicated if we had to remember which file needs which imports. The other reason is that I was worried that people may get discouraged to use Framy when they hear that a lot of files are being generated, an "another main file" sounds much smaller to me (even though it's not 😀 ).

which can cause performance problems in future

Do you have anything specific in mind?

nateshmbhat commented 4 years ago

Agree with what you said :)

In future as the main file grows in size , every time the user adds a new annotation to the code base , the main file will be deleted and rewritten again.

If there were multiple files , only few files could be deleted.

This may impact on the time user would need to wait before he sees the changes in the framy ui when running "build_runner build watch"

But ya , as of now i don't see any issue in having a single main file 😀

MarcinusX commented 4 years ago

Oh, right! Yeah, so I believe once it gets slowish, we could extract all the static pages like typography, color scheme, material components etc to another file as they are pretty self-contained. That would be a good start.

I will leave this issue open for any future discussion. Thanks for your contribution!