Directives

A typical challenge regarding how presentation strategies avoid creating yet another embedded language is “How do you minimize the Java code's pre-knowledge about the markup template that it's manipulating?” This is particularly important if your presentation code is setting out to support a range of devices.

One solution is to embed logic in the markup itself, playing a role in the generation of content dynamically. But then we're back to square one, putting a layer of JSP-isms on top of XMLC.

Barracuda directives are an attempt at being realistic and seeking a middle ground. Yes, as we've just seen, Barracuda directives influence the behavior of the code, but they do not represent code themselves. Instead, they're smart classes

Get Enhydra XMLC™ Java™ Presentation Development now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.