Re: [go-nuts] Re: "html/dom" alternative to html/template for true separation of concerns?

2017-10-19 Thread jens . schoedt
@Karv Prime I was looking for a library for this but i have not been able to find any yet. Did you have any luck? I have worked with http://www.thymeleaf.org/ for Java extensively and I really enjoyed it. Its a lot easier to work with the front-end people with legal html. Dom manipulation

Re: [go-nuts] Re: "html/dom" alternative to html/template for true separation of concerns?

2017-09-14 Thread Marvin Renich
* Karv Prime [170914 13:16]: > I wouldn't agree on "there is not even a need for the wrapper" part. > If the HTML tags are produced entirely by code, it comes with its own > issues - suddenly there is a thing that wasn't in the markup - it would > probably reduce

Re: [go-nuts] Re: "html/dom" alternative to html/template for true separation of concerns?

2017-09-14 Thread Karv Prime
@Andy Balholm: Perfect. I've seen some other template engines where that didn't happen at all and the artifacts stayed. @Marvin Renich: Yet tags, classes and ids are HTML standard syntax and used for styling and scripting purposes. {{[...]}} is only a placeholder. It makes no difference per

Re: [go-nuts] Re: "html/dom" alternative to html/template for true separation of concerns?

2017-09-14 Thread Karv Prime
@Andy Balholm: Perfect. I've seen some other template engines where that didn't happen at all and the artifacts stayed. @Marvin Renich: Yet tags, classes and ids are HTML standard syntax and used for styling and scripting purposes. {{[...]}} is only a placeholder. It makes no difference per

Re: [go-nuts] Re: "html/dom" alternative to html/template for true separation of concerns?

2017-09-14 Thread Marvin Renich
* Karv Prime [170914 11:14]: > ... - yet > there's the disadvantage of the need to put artifacts into the markup which > then get replaced by the wanted content You have to do that anyway, you just use different artifacts. Each location where a substitution will occur

[go-nuts] Re: "html/dom" alternative to html/template for true separation of concerns?

2017-09-14 Thread Karv Prime
As it would get a little bit confusing if I'd reply to everyone with a single post, I'll answer in a single post. I hope you don't mind. At least now it's past 16:00 and not past 04:00 and I have a clearer mind. ^^ @Egon: I've read the whole article - yes, many coders sadly do forget about

[go-nuts] Re: "html/dom" alternative to html/template for true separation of concerns?

2017-09-13 Thread Egon
On Thursday, 14 September 2017 00:11:11 UTC+3, Karv Prime wrote: > > I don't know why it's unclear, what I'm proposing, but I'll try a 2nd time: > The devil is in the details :), but this makes it clearer. I just had few different ideas floating around in my head that could fit the first

[go-nuts] Re: "html/dom" alternative to html/template for true separation of concerns?

2017-09-13 Thread karv . prime
I don't know why it's unclear, what I'm proposing, but I'll try a 2nd time: Something similar to: http://php.net/manual/en/book.dom.php Or, even simpler: - Find Tags, IDs, Classes, etc. in an HTML document. - Something similar to Element.innerHTML to put content into these tags

[go-nuts] Re: "html/dom" alternative to html/template for true separation of concerns?

2017-09-13 Thread Egon
If you want to manipulate HTML files then there is https://godoc.org/golang.org/x/net/html, but it comes with all the dangers of potential injection attacks and so on... which "html/template" avoids. Writing something that injects into the specific nodes and afterwards encodes shouldn't be a