Welcome Guest, Not a member yet? Register   Sign In
Template Engine
#1

I hope in CI 3 there will provide default template engine. As we know CI 2.x doesn't have it

Regards

projack89
Reply
#2

Why people always need a template engine? navie php its much faster and within template engines you need also coding with a non native macro language you have to learn. And think about every Engine must be parsed and loaded .... takes performance.

Anyhow you can easy extend CI to work for e.g. with Smarty, etc. .. there are many e.g. arround like
http://jenssegers.be/blog/25/codeigniter...te-library


There are also a few solutions arround:

https://philsturgeon.uk/code/codeigniter-dwoo
https://github.com/philsturgeon/codeigniter-template
http://edmundask.github.io/codeigniter-twiggy/
http://www.grocerycrud.com/codeigniter-simplicity
http://www.coolphptools.com/codeigniter-smarty

Reply
#3

(This post was last modified: 10-23-2014, 02:30 AM by projack89.)

As a framework more complete features is better. As we know by default Codeigniter doesn't have it. If some body want to use another template engine no problem with that but provide default template engine is better
Reply
#4

In Codeigniter you can all do inside a view with nativ php .. anything you need.

Reply
#5

(This post was last modified: 12-23-2014, 06:20 PM by Mohammadhzp. Edit Reason: typo )

Rufnex has a point,Why would someone use Template engine which slow down performance while the same thing can be done in native PHP as fast as it can get,for security ? not worth it,plus adding more unnecessary feature means to ruin framework
when it comes to scale and performance, I will not even use template engine for my small projects and I really hope BCIT keeps the principle that Ellislab used in this manner too
Reply
#6

I honestly don't see the point of a template engine. It doesn't add any benefit at all. I never understood the need for it.

Cons:
1. Slower performance
2. Odd limited language that's less intuitive than PHP. I would understand if php was a messy nasty language, but it's a very nice language.
3. Makes code look very messy and harder to read.
4. Makes me want to poke my eyes out with a fork soaked in iodine. (That's never a good thing)

Smile
PurdyDesigns Website Design, Development. Also Including Web Hosting. Print Media, server deployment and management, and more!
Reply
#7

(10-23-2014, 12:50 PM)Shawn P Wrote: 4. Makes me want to poke my eyes out with a fork soaked in iodine. (That's never a good thing)

Sounds realy nasty .. Wink

Reply
#8

I don't see CodeIgniter ever coming with a true template engine, honestly.

I could see the existing parser being expanded a bit as a decent option for those shops that don't want the designers touching the PHP code, though.
Reply
#9

Template engines are useful for one thing, and one thing only: proper automatic XSS filtering. For anything else, PHP itself is a damn good templating engine.

That being said, there are a few good templating engines out there and you can easily use them in CI. I see no reason to bundle one with the framework. In fact, that would even have some disadvantages.
Reply
#10

I think that a template engine is usefull. Here in my projects i work with Webdesigners, and i dont want that they change my php codes Tongue
Reply




Theme © iAndrew 2016 - Forum software by © MyBB