-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the marcus wiki!
Doc in progress!
Marcus is a language for writing directives with which DOM documents (html, xml, ...) can be populated or morphed according to dynamic data. In this way templating can be achieved by using pure html templates without scattering them with spurious code.
Marcus' highlights are:
- shackle-free encapsulation of CSS selectors and "native" code bits which are treated verbatim externally, so that selectors and code are powerful exactly as much as the (parameterisable) selector engine and programming language used under the hood;
- python-like indentation sensitive syntax for clean, readable directives.
For the moment the only compiler is a python program that outputs javascript code.
Download current marcus' javascript compiler here
This allows for browser-side templating, but more languages will be added in the future. The javascript code produced uses a lot of variable copying, but it is a pertect target for post-optimization, which may be for example performed by Google's closure compiler.
Marcus is in a quite early development: the language specs might change, and bugs are bound to be out there. Bear patience.
Get started with some examples!
Someone arguing better than I could why separating html and templating might be a good idea (yes, maybe a bit harsh, and yes, according to that author marcus would be spaghetti code)
Marcus is from Marcus Tullius Cicero, the author of the text that was deformed to the well known lorem ipsum stuff. I thought about naming it lorem, but a quick google search for "lorem template" made me reconsider. And alas, Cicero is already taken. It's a temporary name, but it might just stick.