spapali / Blue-Economics

3 stars 11 forks source link

Views and template system #28

Open jakubzapletal opened 10 years ago

jakubzapletal commented 10 years ago

Hi, I would like to ask you if were you thinking about using some template system? I see there are only HTML views and many parts of them are repeated. Of cource, there is also an option to use classic PHP files but it's not so clear.

I would recommend http://twig.sensiolabs.org/. It's easy to learn, use and doesn't let you write any PHP logic into views, because it's pretty ugly to use some logic in vews.

What do you think?

If you agree, I can import it into the app and also rewrite current views to see how work with it.

jakubzapletal commented 10 years ago

@innls @jemuelyoung @dasibre @rosebery19 @obraafo

I forgot to mention you in the main post above :-)

obraafo commented 10 years ago

:+1: to twig, looks simple enough.

jakubzapletal commented 10 years ago

@zbirmingham if you agree too I will replace all current views with templates in Twig so you can see how can be used. @zbirmingham Please let me know, on Sunday I'll have a time.

zbirmingham commented 10 years ago

@jemuelyoung what do you think?

young commented 10 years ago

I agree a template system is a good idea but I think it's better to use Handlebars as it's well supported and very well known by most Frontend Engineers.

jakubzapletal commented 10 years ago

@zbirmingham I don't know template systems for pure HTML,... only for PHP background. @jemuelyoung is maybe right that we should use some template system dedicated for frontend engineers because our views don't contain any PHP logic. In this case it would be better if @jemuelyoung could implement it, I suppose he knows it.

young commented 10 years ago

I can implement it but I'm going to be busy for a while as our cycle is ending and I have to prepare for an AngularJS talk I'm giving on Thursday. @zbirmingham if you want to take a crack at in a new branch I can jump in and help when I have more time.

zbirmingham commented 10 years ago

@jemuelyoung, sure I'll go a head and take a look at it.