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 |
Am 27.11.2013 um 13:21 schrieb Damien Cassou <[hidden email]>: Hi,Be my guest Norbert |
On Wed, Nov 27, 2013 at 1:42 PM, Norbert Hartl <[hidden email]> 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 |
Indeed, it is quite nice. Doru On Wed, Nov 27, 2013 at 2:03 PM, Damien Cassou <[hidden email]> wrote:
"Every thing has its own flow"
|
In reply to this post by Damien Cassou
Am 27.11.2013 um 14:03 schrieb Damien Cassou <[hidden email]>: > On Wed, Nov 27, 2013 at 1:42 PM, Norbert Hartl <[hidden email]> 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 |
Did you try to build JSON responses with this templating solution? Regards! Esteban A. Maringolo
2013/11/27 Norbert Hartl <[hidden email]>
|
No, I didn't. Only xml so far. Norbert
|
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 <[hidden email]> wrote:
"Every thing has its own flow"
|
Am 28.11.2013 um 10:37 schrieb Tudor Girba <[hidden email]>: 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
|
Free forum by Nabble | Edit this page |