|[ANN] goats-html 0.1.0 - GO Attribute-based Template System for HTML||linux...@gmail.com||9/29/13 12:18 PM|
Hi, Go web developers
After over 10 weekends' hard work, goats-html 0.1.0 is ready for public under LGPL. It's a Template Attribute Language (TAL - http://en.wikipedia.org/wiki/Template_Attribute_Language), inspired by Zope Page Templates and Chameleon but not a simple clone of them.
Different from traditional HTML template languages like Apache Velocity, Freemarker, or Jinja, TAL does not introduce customized tags or directive. Instead, it uses customized attributes to express the rendering logic. Templates written in TAL is more readable and maintainable than traditional template languages.
Different from most of other HTML template languages, goats-html doesn't have a run-time rendering engine (AST). Instead, goats-html processor translate the templates directly into GO code and the templates logic is compiled into the ultimate executable! It makes goats-html render pages very fast and its deployment is inherently bounded with the binary. Meanwhile, it makes development harder because even a one-character change of the template will incur a rebuild of the whole binary. To solve this problem, goats-html introduces a developer server and provides a proxy mechanism so that your server in develop mode does not need rebuild/restart when the templates are changed. Of course, if the interfaces of the templates are changed, you still need to rebuild and restart your server.
Download goats-html at https://github.com/linuxerwang/goats-html.
Do not run "go get" to fetch goats-html. Instead, in your go souce path (such as, ~/go/src) run git clone to fetch souce code (folder goats-html should be directly put under $GOPATH). The folder goats-html contains a Makefile to build the tool. You can also install goats-html from the prebuilt debian/ubuntu package (for amd64).
Example templates can be found in "examples" and "tests/templates" folders.
goats-html consists of two parts: the goats command line tool and a runtime library which will be compiled into the executable. "goats" command generates GO programs from templates and is also a developer server. The run-time library should be put into a read-only folder and should not be installed to go/pkg. That is because "goats" depends on a flag "goats_devmod" to compile either dev mode or prod mode of the runtime library. If you install goats-html from the debian/ubuntu package, the installed files are like:
Install the deb package is installed and setup the environment:
$ sudo dpkg -i goats-html_0.1.0_amd64.deb
$ export GOPATH=/usr/share/goats-html/go:~/go
See instructions on how to use goats command in examples/README.
linuxerwang (linux...@gmail.com): Created the original system.
nwlearning (nwlea...@gmail.com): Implemented most of the built-in template functions.
**Call for volunteers:**
There are still much work to do for goats-html, we welcome volunteers to work on:
* i18n/l10n translation mechanism
* security enhancements (csrf token, and review the whole security of goats-html)
* performance tuning and optimization
* documentation: user guide and references
* implement "|" filters in expression, like in Django templates
* more builtin functions.
* bug fixes
|Re: [go-nuts] [ANN] goats-html 0.1.0 - GO Attribute-based Template System for HTML||Krzysztof Kowalczyk||9/29/13 1:20 PM|
Licensing nit: currently Go only does static linking (of Go code), so
LGPL effectively becomes GPL which means that someone using your code
in their app has to release their whole app under LGPL as well.
If you meant to use more permissive license, BSD or Apache are what
people use more often for Go code.
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
|Re: [go-nuts] [ANN] goats-html 0.1.0 - GO Attribute-based Template System for HTML||Benjamin Measures||9/29/13 2:19 PM|
On Sunday, 29 September 2013 21:20:00 UTC+1, Krzysztof Kowalczyk wrote:Licensing nit: currently Go only does static linking (of Go code), so
Not so- the LGPL permits static linking via clause 4d0:
d) Do one of the following:
You need to provide enough so that your application can be relinked against a (user) modified version of the library. For static linking, object code is sufficient.
|Re: [go-nuts] [ANN] goats-html 0.1.0 - GO Attribute-based Template System for HTML||Hiroaki Nakamura||9/29/13 2:37 PM|
Also you need to allow that users modify or do reverse engineering your application.
4. Combined Works.
You may convey a Combined Work under terms of your choice that, taken together, effectively do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications, if you also do each of the following:
2013/9/30 Benjamin Measures <saint....@gmail.com>
中村 弘輝 )Hiroaki Nakamura)
|Re: [go-nuts] [ANN] goats-html 0.1.0 - GO Attribute-based Template System for HTML||Benjamin Measures||9/29/13 2:42 PM|
On Sunday, 29 September 2013 22:37:31 UTC+1, Hiroaki Nakamura wrote:
Is not the same as:
modification of the *portions of the Library contained* in the Combined Work
|Re: [go-nuts] [ANN] goats-html 0.1.0 - GO Attribute-based Template System for HTML||linux...@gmail.com||9/29/13 4:28 PM|
Thanks everyone. I changed the license to BSD.
|Re: [go-nuts] [ANN] goats-html 0.1.0 - GO Attribute-based Template System for HTML||Hiroaki Nakamura||9/29/13 5:55 PM|
Thanks for correction! I must admit licenses are hard to understand correctly.
2013/9/30 Benjamin Measures <saint....@gmail.com>
|Re: [ANN] goats-html 0.1.0 - GO Attribute-based Template System for HTML||Andrew Gallant||9/30/13 7:35 AM|
Is there any particular reason why goats-html isn't go-gettable? I quickly looked through your code base and couldn't figure it out.
|Re: [ANN] goats-html 0.1.0 - GO Attribute-based Template System for HTML||linux...@gmail.com||9/30/13 7:39 PM|
The main reason is that for most users they only need to install the deb package instead of downloading the full source code and build from scratch. I also want to keep the package name shorter.