Road map to RainTPL 3

87 views
Skip to first unread message

Rain

unread,
Jan 28, 2011, 5:37:40 AM1/28/11
to raintpl
Hi,
we are here, after just few couple of months that Rain2 comes out, and
we're enthusiast to announce that we are already preparing the road
map to RainTPL 3.

Few question probably will jump on your mind,
what will be the new features?
It will be compatible with previous version?
What about simplicity and speed?

Well, let's go answer all of this questions...

Rain3 will improve the security, by adding white-list and black-list,
to enable/disable the use of global variables and function. The
"sandbox mode" will allow to create application where, third part
designers, can uploads their templates directly without any supervisor
check. Great, that's the most important milestone we've to reach!

The syntax of Rain3 could get few small changes, but nothing drastic,
as we'll confirm small tags and remove the long one, {if="..."}
instead of {if condition="..."}, probably we'll use the modifiers
syntax for calling function,
so {|drawMenu} instead of {function="drawMenu"}. Could be that a good
idea? We want to mantain the retro-compatibility with all the others
tags.

Rain3 probably will load, optionally, PHP templates by just settings
".php" the template extension. ZendFramework, CodeIgniter, Savant and
few more framework and template engines, use PHP templates, so this
option could make happy many developers. By default Rain will always
load HTML template.


In conclusion, we want to keep it easy, fast and make it secure.

Feel free to give us suggestions, for any code contribute go on
https://github.com/rainphp/raintpl.

Thanks,
Federico

moneywasher

unread,
Feb 8, 2011, 12:20:03 PM2/8/11
to raintpl
Hi Frederico,
it's seems to me that all the users of RainTPL are very happy
with the version 2.x.x !!!
They don't need a 3.0 version. *laugh*
No one have any ideas for new features of Rain3 here. ;)

And I have no Ideas now .... I am very happy too. ;)
But I like your ideas to implement a "sandbox" - it's really GREAT !!!
I not to 100% can imagine myself how it will work correctly.
But I hope you will get us than a good example in the documentation,
when it's finished.

About the called function syntax: At first I thought: "Oooh it's maybe
not so good Idea to change from
{function ="name_of_the_Function"} to {|name_of_the_Function} "!!
Because with the first solution everybody will see always this
syntax in the Template as Function.

But now I think: "Why not .... a Variable have only a short syntax and
a Constant the same. So the new Function syntax would follow this
way. And new users must read the Documantation at
first, the same with or without the new Function syntax, to learn
the template language of RainTPL."

Performance, minimal filesize and innovative implements or solutions
are already now and will be the biggest advantage of RainTPL
against other Template engines.

moneywasher

unread,
Feb 8, 2011, 2:12:48 PM2/8/11
to raintpl
I forgot something before:
I am not sure is the modifier sign " | " the right sign to
be the new syntax for Functions in the Template.
I understand, you want use signs who are already defined
in the class file.
But the " | " looks near or the same like a lowercase " l " !
It's an l, the first letter of the word as example: " leave " !

So I guess it will bring some problems with reading for the
Developer itself, after a longer while in the
source code, if he used a Function with lowercase " l "
at the beginning.

What you would think about another sign??
Here signs again for:
{$var} = Variable
{#cons#} = Constant

What else could go for Functions?!!
Maybe " & ", " § " or only one " # " in the Function tag,
like: {#func} or at the end {func#} ???
> > Federico- Zitierten Text ausblenden -
>
> - Zitierten Text anzeigen -

Federico Ulfo

unread,
Feb 8, 2011, 2:13:10 PM2/8/11
to rai...@googlegroups.com
Hi Siegbert,

thanks for your feedback.

The sandbox, could permits to create a CMS where users can upload their templates, in a not intrusive way.
I imagine 2 variables $black_list and $white_list=null, to allow or deny the use of functions.
eg. $black_list=array('exec','unlink','rmdir');

The others change are just minimal fix, so yes, probably it will not necessary to jump on a version 3.

By the way, today we published the version 2.5.5, that implements the possibility to loads Views:
http://www.raintpl.com/News/2011/02/08/RainTPL-2.5.5---PHP-Views/

Best,
Federico

2011/2/8 moneywasher <siegbert...@googlemail.com>
>
> Thanks,
> Federico

--
www.RainTPL.com

group at  http://groups.google.com/group/raintpl

to post write at rai...@googlegroups.com

unsuscribe at raintpl+u...@googlegroups.com

Federico Ulfo

unread,
Feb 8, 2011, 2:18:05 PM2/8/11
to rai...@googlegroups.com
I just read the new mail about the function.

Yes I agree with you, not a good idea to use " l ", and I don't think {&func} or {^func} could be a good syntax neither,
so for function we'll probably just mantain {function="..."}. Thanks for sharing your idea.

Best,
Federico




2011/2/8 Federico Ulfo <rainel...@gmail.com>

moneywasher

unread,
Feb 8, 2011, 2:45:06 PM2/8/11
to raintpl
Now I have understand how you meant this with the "Sandbox".
Thank you for this good example !! :)

And Yes, the possibility to use Views instead of Templates
it's one another good way to use Rain, for those users, who always
used PHP Templates.
And I know that many PHP-Gurus only use PHP Template style.
They are Enemies with real Template Engines. :D

But for me it will be never the syntax which I like. It's difficult to
read for
Designers, if you need many Variables and Loops in the Template.

On 8 Feb., 20:13, Federico Ulfo <rainelemen...@gmail.com> wrote:
> Hi Siegbert,
>
> thanks for your feedback.
>
> The sandbox, could permits to create a CMS where users can upload their
> templates, in a not intrusive way.
> I imagine 2 variables $black_list and $white_list=null, to allow or deny the
> use of functions.
> eg. $black_list=array('exec','unlink','rmdir');
>
> The others change are just minimal fix, so yes, probably it will not
> necessary to jump on a version 3.
>
> By the way, today we published the version 2.5.5, that implements the
> possibility to loads Views:http://www.raintpl.com/News/2011/02/08/RainTPL-2.5.5---PHP-Views/
>
> Best,
> Federico
>
> 2011/2/8 moneywasher <siegbert.redl...@googlemail.com>
> > unsuscribe at raintpl+u...@googlegroups.com- Zitierten Text ausblenden -

Hernan Lozano

unread,
Feb 8, 2011, 7:45:26 PM2/8/11
to rai...@googlegroups.com
I would wait for PHP 5.4 to release the RainTPL3

Since there will be new cool features to play around with and maybe some performance improvements. 
Check this out

PHP 6 Cancelled, PHP 5.4 Will Have APC Built In

Another big news story in the PHP world is the announcement that the PHP team has put off PHP 6 and instead are working towards PHP 5.4. This decision doesn't mean all the new features we wanted in PHP 6 are dead. Instead they are rolling some of those features into 5.4, and most notable, they will be bundling the highly popular APC caching engine with the release.
What really gets me excited about this news is that we may see better support for APC in projects like Drupal and Wordpress. Imagine not having to go through the hassle of installing and configuring another plugin, but rather just download and install your favorite CMS and get the benefits of APC's user cache right out of the box. Not only that, but having the op-code caching benefits "out of the box" will be a big boost to the PHP project as a whole.
So we have some really exciting times coming up and I can't wait to see where we are at in the next four years.

Federico Ulfo

unread,
Feb 9, 2011, 5:17:47 AM2/9/11
to rai...@googlegroups.com
That's a great news, I already wanted to wait PHP 6 for the version 3, but yes,
now definitely we'll wait the new upcoming feature of PHP.

Caching methods and functions with APC could improve drastically the speed, especially for website with high load users!

Thanks for your great news Hernan!

2011/2/9 Hernan Lozano <hern...@gmail.com>

Stephan Krauß

unread,
Feb 10, 2011, 12:33:10 PM2/10/11
to rai...@googlegroups.com
Hello !

Sorry for my bad english :-( .
For some time I read your mails.
I have a question to the rainTPL engine.
In the moment i works with the zend framework.
The business logic is organiced in models.
I will take a model with a function in the templat.

For example:
I have a model for a 'booklist'. The model can be initialised
with a singleton pattern. I will build a function for the templat.
This function should make an instance of the class.
And the second step. The function make an return with this object.
Now i will use the object in the templat.

Is there an way ?

Sorry for my bad english !

Your sincerly

Stephan Krau�

Federico Ulfo

unread,
Feb 10, 2011, 3:50:25 PM2/10/11
to rai...@googlegroups.com
Hi Stephan,

yes, you can assign an object to the template and access to all public variables and functions,
eg. {$obj->function()} and {$obj->variable}

hope is what you need, in case feel free to answer again.

Best,
Federico


2011/2/10 Stephan Krauß <in...@suppenterrine.de>
Stephan Krauß

wp1001733-suppe

unread,
Feb 11, 2011, 2:36:32 AM2/11/11
to rai...@googlegroups.com

Hello !

Thank you for the quick quick response.
Do you have an example of the integration RainTPL in Zend ?
I would like an example.

I have a new question to RainTPL.
I will make the instance of the model in RainTPL.
For example:

I have an function:

{$bookObject = function="getObject('main_model_booklist')"}

In this function i build an instance of my class with the singleton
pattern.
The function became an parameter.
This parameter is the place where you can find the model.
The instance of the model is saved in the variable '$bookObject'.
I will use the bookObject in this way.

{$bookObject->getBookList()}

Is this correct ?

On the weekend i will test the attached version of RainTPL.

Sorry for my bad english.
Your sincerly

Stephan Krauß

Federico Ulfo

unread,
Feb 11, 2011, 4:36:48 AM2/11/11
to rai...@googlegroups.com
Hi Stephan,

I'll send you an example soon.


Yes you can assign the result of the function, this is the syntax:
{$bookObject = getObject('main_model_booklist') }

and than you can use it with
{$bookObject->getBookList()}


best,
Federico

2011/2/11 wp1001733-suppe <in...@suppenterrine.de>
Reply all
Reply to author
Forward
0 new messages