TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Is there codegen framework for business logic?

9 pointsby 1337n008over 5 years ago
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?

3 comments

PaulHouleover 5 years ago
It&#x27;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&#x27;t diffused.<p>What do you think about tools like<p><a href="http:&#x2F;&#x2F;www.clara-rules.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;www.clara-rules.org&#x2F;</a><p>or<p><a href="https:&#x2F;&#x2F;www.drools.org&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.drools.org&#x2F;</a><p>?
评论 #22384441 未加载
matijashover 5 years ago
I feel the same problem! I&#x27;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, ...).<p>Thinking similarly as you (terraform for code), together with my brother I started working on <a href="https:&#x2F;&#x2F;wasp-lang.dev&#x2F;" rel="nofollow">https:&#x2F;&#x2F;wasp-lang.dev&#x2F;</a> - it is a DSL for building full-stack web apps. We are still very early but have some initial functionality.<p>Would love to hear if that resonates with what you had in mind.<p>We also did a quite extensive research of other solutions so happy to share what we discovered here as well.<p>E.g. From the purely code-generators:<p><a href="https:&#x2F;&#x2F;divjoy.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;divjoy.com&#x2F;</a> - generates react code<p><a href="https:&#x2F;&#x2F;bullettrain.co&#x2F;" rel="nofollow">https:&#x2F;&#x2F;bullettrain.co&#x2F;</a> - Ruby on Rails starter
评论 #22388571 未加载
trilinearnzabout 5 years ago
Workflow engines might be worth considering. Options from the Microsoft world include PowerApps, BizTalk and (historically) Windows Workflow Foundation.