Will combining cakephp with web templates like Smarty or Twig make front-end coding easier?

2014-01-20 Thread Sam
Cakephp is good for back-end work. Web templates like Smarty or Twig is 
used for front-end work. Will combining cakephp with web templates like 
Smarty or Twig make front-end coding easier? Is this advisable and has it 
been done before?

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Will combining cakephp with web templates like Smarty or Twig make front-end coding easier?

2014-01-20 Thread José Lorenzo
It helps to some extent, specially keeping the views safe from XSS attacks. 
Some would argue that it does not make your views more readable, I think it 
is a matter of preference. Here you have a CakePHP plugin for working with 
Twig:

https://github.com/WyriHaximus/TwigView

On Monday, January 20, 2014 4:32:03 PM UTC+1, Sam wrote:

 Cakephp is good for back-end work. Web templates like Smarty or Twig is 
 used for front-end work. Will combining cakephp with web templates like 
 Smarty or Twig make front-end coding easier? Is this advisable and has it 
 been done before?


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Will combining cakephp with web templates like Smarty or Twig make front-end coding easier?

2014-01-20 Thread Carlos Javier Baeza Negroni
Hello Sam,

As far i know, CakePHP has a Smarty helper, so in theory you will had no
problem with it.

*Sorry for my bad english

REF:
http://bakery.cakephp.org/articles/HyperCas/2008/06/11/the-cakephp-blog-tutorial-with-smarty


2014/1/20 Sam lightai...@gmail.com

 Cakephp is good for back-end work. Web templates like Smarty or Twig is
 used for front-end work. Will combining cakephp with web templates like
 Smarty or Twig make front-end coding easier? Is this advisable and has it
 been done before?

 --
 Like Us on FaceBook https://www.facebook.com/CakePHP
 Find us on Twitter http://twitter.com/CakePHP

 ---
 You received this message because you are subscribed to the Google Groups
 CakePHP group.
 To unsubscribe from this group and stop receiving emails from it, send an
 email to cake-php+unsubscr...@googlegroups.com.
 To post to this group, send email to cake-php@googlegroups.com.
 Visit this group at http://groups.google.com/group/cake-php.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
*Carlos Baeza Negroni*
+56985644026
http://carlosbaeza.net
@cjbaezilla
http://cl.linkedin.com/in/cjbaeza
http://cl.linkedin.com/in/cjbaeza

-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Will combining cakephp with web templates like Smarty or Twig make front-end coding easier?

2014-01-20 Thread Sam
I am doing some reading. Here is one thing that puzzles me. One advantage 
of web template engines is that they separate presentation and logic. The 
same can be said about MVC frameworks like Cakephp. Then, why do we combine 
both together since any single one can do the separation? Did I miss out 
something? What are the pros and cons? 

On Monday, January 20, 2014 11:45:33 PM UTC+8, José Lorenzo wrote:

 It helps to some extent, specially keeping the views safe from XSS 
 attacks. Some would argue that it does not make your views more readable, I 
 think it is a matter of preference. Here you have a CakePHP plugin for 
 working with Twig:

 https://github.com/WyriHaximus/TwigView

 On Monday, January 20, 2014 4:32:03 PM UTC+1, Sam wrote:

 Cakephp is good for back-end work. Web templates like Smarty or Twig is 
 used for front-end work. Will combining cakephp with web templates like 
 Smarty or Twig make front-end coding easier? Is this advisable and has it 
 been done before?



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Will combining cakephp with web templates like Smarty or Twig make front-end coding easier?

2014-01-20 Thread Reuben
It depends on who's programming your View layer.

If the developer, who is also programming the Controller and Model layers, 
is doing the View, then go with your preference.  I already know PHP, so 
using the FormHelper doesn't scare me, and sometimes learning another 
syntax for the sake of it gets annoying.

However, your Viewer layer coder may be a designer who is used to working 
with Smarty or Twig, and may not be familiar with the PHP.  The designer 
may have used a platform agnostic template engine from other languages like 
Ruby or ASP.NET MVC, so for them, using Smarty or Twig or any other 
template engine may be best.

And then you've got the case of the client side UI that just uses REST/JSON 
from the MVC, and uses Javascript UI and MVVM for client side generated UIs 
only.  That's a solid case for a view template engine that doesn't care 
about the server technology at all.

On Tuesday, 21 January 2014 09:30:00 UTC+10, Sam wrote:

 I am doing some reading. Here is one thing that puzzles me. One advantage 
 of web template engines is that they separate presentation and logic. The 
 same can be said about MVC frameworks like Cakephp. Then, why do we combine 
 both together since any single one can do the separation? Did I miss out 
 something? What are the pros and cons? 

 On Monday, January 20, 2014 11:45:33 PM UTC+8, José Lorenzo wrote:

 It helps to some extent, specially keeping the views safe from XSS 
 attacks. Some would argue that it does not make your views more readable, I 
 think it is a matter of preference. Here you have a CakePHP plugin for 
 working with Twig:

 https://github.com/WyriHaximus/TwigView

 On Monday, January 20, 2014 4:32:03 PM UTC+1, Sam wrote:

 Cakephp is good for back-end work. Web templates like Smarty or Twig is 
 used for front-end work. Will combining cakephp with web templates like 
 Smarty or Twig make front-end coding easier? Is this advisable and has it 
 been done before?



-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Will combining cakephp with web templates like Smarty or Twig make front-end coding easier?

2014-01-20 Thread Marush Denchev
Why you want to over complicate your views with Twig or Smarty? In your 
views you have native PHP code - you just have to put the right HTML code 
there.

On Monday, January 20, 2014 5:32:03 PM UTC+2, Sam wrote:

 Cakephp is good for back-end work. Web templates like Smarty or Twig is 
 used for front-end work. Will combining cakephp with web templates like 
 Smarty or Twig make front-end coding easier? Is this advisable and has it 
 been done before?


-- 
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP

--- 
You received this message because you are subscribed to the Google Groups 
CakePHP group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to cake-php+unsubscr...@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php.
For more options, visit https://groups.google.com/groups/opt_out.