Hacker News new | past | comments | ask | show | jobs | submit login

1) Are you sure Doctrine is the best choice?

2) Why not simply use PHP for templating?

3) Using YAML would be just as bad, if you want to use something use something standard for localization like gettext or XLiff.




1). I'm not an ORM lover in general but, yes, if you're going to use an ORM and are basing your project on PHP, Doctrine is generally accepted as the best.

2). See: http://twig.sensiolabs.org/ (Why yet another template engine?)

3). Personal preference I guess but I hate gettext. I much prefer the pattern of using labels in your template (e.g. menu.item1) and then looking up that label in the desired language file e.g. messages.en.yml. And I've never had a problem with translators working with YAML files (i.e. the syntax is easy for them to grok)


2). I really don't understand why we should use Twig : Smarty is older, why using yet another template engine ? Or I've got a better idea : we could use the template engine used in phpBB2 : he's older !

I'm agree that standardization would be just fine(c), and I like the Twig syntax, but I think the "YATL, we should use Twig" argument is not relevant.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: