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

How does it compare to plop? #1

Closed
feimosi opened this Issue Jan 30, 2018 · 6 comments

Comments

Projects
None yet
2 participants
@feimosi

feimosi commented Jan 30, 2018

I'm a big fan of code generators. I've been using plop for quite some time. Now I came across hygen and I'm wondering if it has any benefits over the competition?

@jondot

This comment has been minimized.

Owner

jondot commented Jan 31, 2018

Hi Marek,
Happy to meet a fellow enthusiast!
I would first say - try it and see, both are open source and both deserve the respect for the time invested. But, to not leave you hanging I do have a long and a short answer.

The long answer first. While not strictly a comparison here's the hygen announcement blog post - https://medium.com/@jondot/hygen-the-scalable-code-generator-that-lives-in-your-project-a8e163c42869. In this post you can get a good sense of the 'whys' and the core values of hygen and a little bit about how to build great software products.

The short answer is this. Hygen was built to support a large number of teams, large number of developers and/or a big code base, so that it scales and evolves with your project and team. One difference between the two is that plop will make all these people, and activity share a single file which is a pain in merges, conflicts and code reviews. In addition hygen is contextual, so it will automatically understand where it is in your code base and what generators are relevant for each part (think about monorepos) and use only those.

But it's much more than that. A design goal for hygen is to be instinctive - the amount of effort to make a generator and meet your goal from a developer experience perspective should always go to zero. So then you have generator generators, helpers, a familiar logic-full templating engine, and maybe a little bit surprising, but I think attention for details is super important - for example, there's someone (me) watching your back and making sure hygen is always fast. I've used many generator toolkits and frameworks that were grinding to a halt as I used them more fully. Slow developer tools fall out of love eventually and become that "something someone played with" in your code base.

Some immediate next milestones:

  • Since the hygen codebase is very modular, I'll be adding types of actions. A shell action (where you can run a shell command with a generator, or just a shell command generator) is due to be out today or tomorrow.
  • I'm designing how a hygen ecosystem would look like (would love feedback/help!) where people can share their generators. This is a very sensitive topic, because so many generators have failed here. The key to do it right is to be exposed to as many use cases as possible.

Hope that helps

@feimosi

This comment has been minimized.

feimosi commented Jan 31, 2018

Hi Dotan!
Thanks a lot for your comprehensive explanation! I read both, the comment and the blog post and everything's clear now. I really like the idea of keeping the config inside template files. Definitely I'll give it a try.

Sharing generators may be very tricky though, as hygen or plop keep them rather tightly coupled to the project architecture (in comparison to external, more universal generators). Nonetheless having a library of example use cases is certainly a good thing.

I have to admit I'm really surprised hygen didn't break through in the community. Hopefully that changes.

@jondot

This comment has been minimized.

Owner

jondot commented Jan 31, 2018

Thanks! I hope you find it useful
The reason it didn’t break through yet is that it is just freshly open sourced - and I simply didn’t yet bother pushing it in any channel, although it’s been in use for almost a year now.

Part of open sourcing it is making sure the code base looks somewhat familiar to an outsider, which is what I’m working on right now. Simplifying it so that it’s easily hackable and extendable.

I regarding shared templates - you’re completely right. Any experience you can share will help solving this!

@feimosi

This comment has been minimized.

feimosi commented Jan 31, 2018

Totally understood, good luck with the project then!

I'd love to share some templates after I already create them. When it comes to shared templates ecosystem I don't have a good solution for that in my head. If something comes up I'll definitely let you know!

@jondot

This comment has been minimized.

Owner

jondot commented Feb 8, 2018

Hey Marek,
Wanted to let you know your question now appears in the FAQ section - thanks for asking!
The site is now revamped, check it out - http://www.hygen.io/faq

I'll be closing this issue but feel free to ask more questions :)

@jondot jondot closed this Feb 8, 2018

@feimosi

This comment has been minimized.

feimosi commented Feb 8, 2018

Great! Looks good, keep it up! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment