mootensai / yii2-enhanced-gii

Enhanced Yii2 Gii (generator) that generates related Models & CRUD
MIT License
203 stars 98 forks source link

Switch to twig or another templating engine? #175

Open optmsp opened 2 years ago

optmsp commented 2 years ago

I have been using yii2-enhanced-gii extensively to build and rebuild both my base models, controllers, and views in a new project. I have also extensively updated yii2-enhanced-gii so that it provides a lot more features -- mostly around being able to constantly rebuild existing code instead of being used for initial generation of code.

That said, it's very difficult at times building it out because the use of php templates to build php files can be very tricky to walk through and debug.

Thoughts on shifting the templates to twig, smarty, or another templating engine to really help split out the business logic from the code generation templates?

If so, I'd be happy to put in some time myself on that if that would be folded into this branch. Optionally, I could fork yii2-enhanced-gii, but that may be counter-productive long-term. Let me know your thoughts, thanks!

optmsp commented 2 years ago

Examples updates I've done:

image

But, again, I've found that as I add features, it's getting more and more difficult to debug things because of the way that the code is blended in with the templates.