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

Bring back the old templates 🙏 #84

Open
pythops opened this issue Nov 13, 2024 · 1 comment
Open

Bring back the old templates 🙏 #84

pythops opened this issue Nov 13, 2024 · 1 comment

Comments

@pythops
Copy link
Contributor

pythops commented Nov 13, 2024

The old templates has some advantages that I miss in the current one:

  1. The code is split in modules that makes it easy to work with especially when the application code is growing.
  2. Having control on the app: terminal settings and the drawing loop.
@orhun orhun changed the title Bring back the old templated 🙏 Bring back the old templates 🙏 Nov 13, 2024
@joshka
Copy link
Member

joshka commented Nov 22, 2024

It's worth reading through #74 to get an understanding of why the changes were made. There's a lot of discussion. There were a lot of problematic bits about the previous simple template that have been ironed out, but I can see how if you were used to those idiosyncrasies, you might miss them.

In particular regarding the modules approach, it's easier to go from no modules to modules as rust-analyzer has an extract module refactoring built-in. It doesn't however have easy move-code-to-module refactorings (yet). I previously wrote:

I have a strong (evidence based) opinion against pre-emptively organizing a project into horizontal layers. Having worked on many projects small and large, horizontal segmentation leads to poorer long term maintainability for a variety of reasons. Doing this would be pre-emptive. Put another way, if I was using the simple template personally, having the extra file would be an annoyance that I'd always want to revert. Reverting would be annoying. Refactoring in the other direction is fairly simple though - highlight code, extract to module, done.

There's definitely room for different templates to be added here. I'd suggest building it up from practices you're using in your apps, perhaps as a pythops/ratatui-template or something.

Having control on the app: terminal settings and the drawing loop.

Can you expand on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants