[Pharo-users] Is there a template engine in Pharo

2013-11-27 Thread Damien Cassou
Hi,

I'm looking for a template engine for Pharo. What I mean by that is
the same as String>>format: but much more powerful.

Thanks

-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm."
Winston Churchill



Re: [Pharo-users] Is there a template engine in Pharo

2013-11-27 Thread Norbert Hartl

Am 27.11.2013 um 13:21 schrieb Damien Cassou :

> Hi,
> 
> I'm looking for a template engine for Pharo. What I mean by that is
> the same as String>>format: but much more powerful.
> 
Be my guest

http://norbert.hartl.name/blog/2013/10/03/mustache-templates-for-smalltalk/

Norbert




Re: [Pharo-users] Is there a template engine in Pharo

2013-11-27 Thread Damien Cassou
On Wed, Nov 27, 2013 at 1:42 PM, Norbert Hartl  wrote:
> Be my guest
>
> http://norbert.hartl.name/blog/2013/10/03/mustache-templates-for-smalltalk/


thank you Norbert, that's really useful.

-- 
Damien Cassou
http://damiencassou.seasidehosting.st

"Success is the ability to go from one failure to another without
losing enthusiasm."
Winston Churchill



Re: [Pharo-users] Is there a template engine in Pharo

2013-11-27 Thread Tudor Girba
Indeed, it is quite nice.

Doru


On Wed, Nov 27, 2013 at 2:03 PM, Damien Cassou wrote:

> On Wed, Nov 27, 2013 at 1:42 PM, Norbert Hartl  wrote:
> > Be my guest
> >
> >
> http://norbert.hartl.name/blog/2013/10/03/mustache-templates-for-smalltalk/
>
>
> thank you Norbert, that's really useful.
>
> --
> Damien Cassou
> http://damiencassou.seasidehosting.st
>
> "Success is the ability to go from one failure to another without
> losing enthusiasm."
> Winston Churchill
>
>


-- 
www.tudorgirba.com

"Every thing has its own flow"


Re: [Pharo-users] Is there a template engine in Pharo

2013-11-27 Thread Norbert Hartl

Am 27.11.2013 um 14:03 schrieb Damien Cassou :

> On Wed, Nov 27, 2013 at 1:42 PM, Norbert Hartl  wrote:
>> Be my guest
>> 
>> http://norbert.hartl.name/blog/2013/10/03/mustache-templates-for-smalltalk/
> 
> 
> thank you Norbert, that's really useful.
> 
I would be glad if you would use it. If the additional emitted whitespaces are 
annoying to you drop me a note. I now postpone the implementation of the 
whitespace for too long anyway.

Norbert 




Re: [Pharo-users] Is there a template engine in Pharo

2013-11-27 Thread Esteban A. Maringolo
Did you try to build JSON responses with this templating solution?

Regards!

Esteban A. Maringolo


2013/11/27 Norbert Hartl 

>
> Am 27.11.2013 um 14:03 schrieb Damien Cassou :
>
> > On Wed, Nov 27, 2013 at 1:42 PM, Norbert Hartl 
> wrote:
> >> Be my guest
> >>
> >>
> http://norbert.hartl.name/blog/2013/10/03/mustache-templates-for-smalltalk/
> >
> >
> > thank you Norbert, that's really useful.
> >
> I would be glad if you would use it. If the additional emitted whitespaces
> are annoying to you drop me a note. I now postpone the implementation of
> the whitespace for too long anyway.
>
> Norbert
>
>
>


Re: [Pharo-users] Is there a template engine in Pharo

2013-11-27 Thread Norbert Hartl


> Am 28.11.2013 um 00:21 schrieb "Esteban A. Maringolo" :
> 
> Did you try to build JSON responses with this templating solution?
> 
No, I didn't. Only xml so far.

Norbert
> Regards!
> 
> Esteban A. Maringolo
> 
> 
> 2013/11/27 Norbert Hartl 
>> 
>> Am 27.11.2013 um 14:03 schrieb Damien Cassou :
>> 
>> > On Wed, Nov 27, 2013 at 1:42 PM, Norbert Hartl  wrote:
>> >> Be my guest
>> >>
>> >> http://norbert.hartl.name/blog/2013/10/03/mustache-templates-for-smalltalk/
>> >
>> >
>> > thank you Norbert, that's really useful.
>> >
>> I would be glad if you would use it. If the additional emitted whitespaces 
>> are annoying to you drop me a note. I now postpone the implementation of the 
>> whitespace for too long anyway.
>> 
>> Norbert
>> 
>> 
> 


Re: [Pharo-users] Is there a template engine in Pharo

2013-11-28 Thread Tudor Girba
Hmm. What exactly does it mean to build XML/JSON responses out of the
template?

Doru


On Thu, Nov 28, 2013 at 8:13 AM, Norbert Hartl  wrote:

>
>
> Am 28.11.2013 um 00:21 schrieb "Esteban A. Maringolo" <
> emaring...@gmail.com>:
>
> Did you try to build JSON responses with this templating solution?
>
> No, I didn't. Only xml so far.
>
> Norbert
>
> Regards!
>
> Esteban A. Maringolo
>
>
> 2013/11/27 Norbert Hartl 
>
>>
>> Am 27.11.2013 um 14:03 schrieb Damien Cassou :
>>
>> > On Wed, Nov 27, 2013 at 1:42 PM, Norbert Hartl 
>> wrote:
>> >> Be my guest
>> >>
>> >>
>> http://norbert.hartl.name/blog/2013/10/03/mustache-templates-for-smalltalk/
>> >
>> >
>> > thank you Norbert, that's really useful.
>> >
>> I would be glad if you would use it. If the additional emitted
>> whitespaces are annoying to you drop me a note. I now postpone the
>> implementation of the whitespace for too long anyway.
>>
>> Norbert
>>
>>
>>
>


-- 
www.tudorgirba.com

"Every thing has its own flow"


Re: [Pharo-users] Is there a template engine in Pharo

2013-11-28 Thread Norbert Hartl

Am 28.11.2013 um 10:37 schrieb Tudor Girba :

> Hmm. What exactly does it mean to build XML/JSON responses out of the 
> template?
> 
It is the same as for any other template, too. You have a prepared document at 
hand where you can replace the placeholders with real values. Doing this for a 
structured response is surely not a good idea. Generating the response in a 
structured way is more reliable and has less potential for the usual traps.
But there is a threshold when the complexity of the response structure is far 
bigger then the needed diversity of requests/responses. In those cases building 
a structure that can properly generate a request or response if you only need a 
simple things would be overkill. 
I generate SOAP requests. SOAP is utterly complex and the ratio of 
gain/complexity is really really small. The API we have to deal with is 
complex, too. And we need only a handful calls from the whole API. So I hope 
you can see that there are reasons to take a less clever approach. And it is a 
approach I can do with pharo ;)

Norbert

> On Thu, Nov 28, 2013 at 8:13 AM, Norbert Hartl  wrote:
> 
> 
> Am 28.11.2013 um 00:21 schrieb "Esteban A. Maringolo" :
> 
>> Did you try to build JSON responses with this templating solution?
>> 
> No, I didn't. Only xml so far. 
> Norbert
> 
>> Regards!
>> 
>> Esteban A. Maringolo
>> 
>> 
>> 2013/11/27 Norbert Hartl 
>> 
>> Am 27.11.2013 um 14:03 schrieb Damien Cassou :
>> 
>> > On Wed, Nov 27, 2013 at 1:42 PM, Norbert Hartl  wrote:
>> >> Be my guest
>> >>
>> >> http://norbert.hartl.name/blog/2013/10/03/mustache-templates-for-smalltalk/
>> >
>> >
>> > thank you Norbert, that's really useful.
>> >
>> I would be glad if you would use it. If the additional emitted whitespaces 
>> are annoying to you drop me a note. I now postpone the implementation of the 
>> whitespace for too long anyway.
>> 
>> Norbert
>> 
>> 
>> 
> 
> 
> 
> -- 
> www.tudorgirba.com
> 
> "Every thing has its own flow"