Skip to content
redsun82 edited this page May 15, 2012 · 26 revisions

Welcome to the marcus wiki!

Doc and development in progress!

What is marcus?

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.

The highlights of marcus 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, released with an MIT licence. You can use the --sizzle option as a shortcut to using the sizzle javascript selector library.

Download current marcus javascript compiler here

The javascript marcus compiler allows for browser-side templating. The javascript code produced is not really smart, but it is a pertect target for post-optimization. Personally I use Google's closure compiler. The -e option is quite useful for that.

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)

And why is it called like that?

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.

Index

Clone this wiki locally