4 ms·
If the developers are reading this: please for the love of god get a real view/templating engine in there. While you certainly _could_ use raw PHP for your view
by Pewpewarrows 16y ago
If the developers are reading this: please for the love of god get a real view/templating engine in there. While you certainly _could_ use raw PHP for your views, it opens up a lot of security concerns and just doesn't have a lot of the features you'd come to expect when coming from other frameworks.
Go look at something like Twig (http://www.twig-project.org/ http://www.twig-project.org/) from the Symphony devs. That's step one I would take before using your project, is to hack it to use Twig templates instead of your views.
- philfreo 16y agoSidenote I guess, but the variables in the templates are automatically HTML-escaped.
- jschreuder 16y agoThere will be a Parser lib in v1.1 which will allow you to plugin pretty much any templating engine. Also you won't need to "hack" anything to use Twig with Fuel, the Views aren't loaded when not used. Just use Twig to create your HTML output.
- dhorrigan 16y agoAnd you can't simply throw the Twig classes in app/classes why? Oh ya...no reason. Why should we lock people into a specific templating system? We are working on something for v1.1, but it will still not be core...it will be a package. You could add Twig into Fuel in the time it took you to write that comment.
- datasink 16y agoI've been using Fuel for a number of weeks now, and I'm generally really liking it. I agree with the Twig recommendation though, and did drop Twig in almost immediately. To answer your question specifically: it would be smart to use Twig by default, rather than developing your own custom Fuel template engine, because you would need to spend a significant amount of time to get something with the same feature-set, build quality and documentation coverage. Would this time not be better spent elsewhere? As a pretty content Fuel user, I should also mention that your tone doesn't benefit the project.
- deleted 16y ago[deleted]
- philsturgeon 16y agoThere is no reason for us picking a specific templating engine as default. I will eventually (when I find the time) complete my parser package which will make thighs very easy to use a template "parser", with drivers for various engines. Sure you may like Twig, but I might think it sucks. Somebody else might want Dwoo, Smarty, Mustache, etc. Why would any of us be more correct than anyone else?
- Pewpewarrows 16y agoSure, and you could provide zero abstractions to the database (with an ORM) and tell people to grab their own library. For one of the core pieces of MVC, I would hope that you'd actually develop into the V part more. Your replies to any not purely positive comments or criticism in this thread or elsewhere come off as very abrasive and rude by the way: not the kind of attitude HN expects and is certainly not the way to attract more of a community. Your framework looks very neat and I'm interested in seeing what it turns into in the coming months/years: don't spoil your reputation before you even leave the gate.