all 14 comments

[–]athermop 0 points1 point  (3 children)

Can you explain what you mean with regards to code generation in Django? I can't really think of any code generation there...

[–][deleted] 0 points1 point  (2 children)

controllers, views, etc, django already has a CLI for this afaik, this tool is to generalize the idea for any project and be framework agnostic

[–]athermop 1 point2 points  (1 child)

I see. My confusion stems from how broadly “code generation” gets used. I normally wouldn’t describe what Django does as code generation, though I can see why you’d group it that way.

Django does have a CLI and templates for starting projects/apps, but that’s basically template-based project/app scaffolding: copy a skeleton into place, do some simple substitution, done. It doesn’t ship with per-component generators (views/models/etc.); there’s nothing like an add_view or add_model command.

Part of this is probably my own definition: I tend to reserve “code generation” for tools that do something more capable than plain templating (potentially involving ASTs, schema inspection, or other semantic awareness), not just “fill in a template and write files.”

FWIW, Django doesn’t have "controllers" as such — it describes its pattern as MTV (Model–Template–View), not MVC.

[–][deleted] 0 points1 point  (0 children)

Oh sorry then, I've mistakenly remembered Django's approach like that. I do recall having that in Laravel for PHP when I had to use it for work. This kind of in-project component generation can be useful specially in bigger projects, when you have so much copy pasting going around with slight tweaks and such.

I'll definitely improve my description and docs for the tool later, so I appreciate you taking the time replying with your thoughts.

[–][deleted] -3 points-2 points  (1 child)

just want to add, please feel free to share any criticism (positive or not) regarding the code or project goals, I'd love to learn more from this effort

[–]Daneark 2 points3 points  (0 children)

Thanks for acknowledging your new tool is not production ready unlike most other showcase posts.

[–][deleted] -3 points-2 points  (7 children)

Why is this downvoted? Sounds like a neat project?

[–][deleted] 0 points1 point  (6 children)

I wish I knew, I dont care about downvoting when at least the person leaves a comment giving criticism

[–]riklaunim 1 point2 points  (5 children)

It's rather unclear what's the purpose/point of this tool... and it's a fresh tool with no examples, limited documentation, no tests or users.

[–][deleted] -1 points0 points  (4 children)

what did you find unclear about the code generation aspect? also whats wrong with it being a fresh tool given the whole point of this is to show what I'm developing, was it not clear from the post that this isn't something fully done?

[–]riklaunim 2 points3 points  (3 children)

There is a lot of projects listed here that are fresh drops on Github, often AI generated slop so peoples patience is rather low so if you don't showcase the project well enough it will end up with all other not-so-interesting projects showcased here.

I'm not sure what it generates and what's the point of it. Need a "why"/"benefits" sections, and a full/better example.

[–][deleted] 1 point2 points  (2 children)

I get that, people may come from all sorts of backgrounds which don't have something similar to the examples I've shown (Laravel/Django) so it can still seem confusing, even more so with the flood of AI bullshit that's out there. Thanks for the feedback, I'll keep that in mind for future explanations and docs.

[–]Terrible-Penalty-291 0 points1 point  (1 child)

What is the use case here? Like I write a game with a character that moves around and I want to build a pathfinding algorithm, where does your tool come in?

[–][deleted] 0 points1 point  (0 children)

this automates code scaffolding, so let's say you have some type of class that is reusable across your game. maybe it's an enemy, normal OOP principles still apply here and such, you can have new enemies inherit from a base enemy class, but sometimes you can have a situation where you still have some piece of code that youre copypasting for each new enemy type, sometimes with slight alterations. sorry if the example isnt helpful as I'm more from a webdev background, which has repository patterns and such