
Ask HN: Is there codegen framework for business logic? - 1337n008
I have been working on a big project for quite some time now and I am finding myself rewriting and optimizing&#x2F;duplicating the code quite often and not finishing the damn thing as a whole(this is not just the programmer&#x27;s strive for perfection but the mostly sheer size of the project). And I am getting really tired of writing the same stuff over and over again. I work with Go which does not have generics but I would not say that is the issue here(I actually do not miss generics, maybe once or twice a year tbh).<p>In essence, over the years, I grew tired of writing so much code. It&#x27;s not that I do no like writing code, it&#x27;s just that I clearly see how much code I need to write in order to implement the business logic. And I&#x27;m just tired of it.<p>So I want to create a code generator that would take my business logic and generate the full implementation out of it so I can truly focus only on that and not the code itself. I have wrote code generators before, usually for event-sourcing stuff and repositories(db), so this is nothing new. But I am after more abstraction, less time spent writing code, more time spend developing the application as a whole. Imagine something like terraform but not for infrastructure but for the code.<p>So before I attempt to write something on this scale I was wondering if maybe there already is something out there?
======
PaulHoule
It's a holy grail. Like quite a few advanced technologies there is a gap
between something the creator of the system finds comfortable to work with and
something that other people can pick up and that is one reason why this tech
hasn't diffused.

What do you think about tools like

[http://www.clara-rules.org/](http://www.clara-rules.org/)

or

[https://www.drools.org/](https://www.drools.org/)

?

~~~
1337n008
thanks for the links. the clara rules gives me some ideas.

------
matijash
I feel the same problem! I've been writing web apps in various technologies
(from backbone to react, php to Node) and always felt I had to reimplement the
same common features (while using a lot of code + tests, ...).

Thinking similarly as you (terraform for code), together with my brother I
started working on [https://wasp-lang.dev/](https://wasp-lang.dev/) \- it is a
DSL for building full-stack web apps. We are still very early but have some
initial functionality.

Would love to hear if that resonates with what you had in mind.

We also did a quite extensive research of other solutions so happy to share
what we discovered here as well.

E.g. From the purely code-generators:

[https://divjoy.com/](https://divjoy.com/) \- generates react code

[https://bullettrain.co/](https://bullettrain.co/) \- Ruby on Rails starter

~~~
stoavio
This looks great, even though it is new it looks polished. I am not a web
developer but would like to be able to create web interfaces for APIs and
other small projects I've built. This seems like it would be a great tool for
things like that. Keep up the good work!

~~~
matijash
Thank you very much! That definitely sounds like the good use case. If you'd
like to support us feel free to star our repo at [https://github.com/wasp-
lang/wasp](https://github.com/wasp-lang/wasp), that is currently the best way
for us to show that other people are excited about Wasp too :).

------
trilinearnz
Workflow engines might be worth considering. Options from the Microsoft world
include PowerApps, BizTalk and (historically) Windows Workflow Foundation.

