Why I implemented Snippetory
I'm working on a business system as a developer. As most developers I'm not really happy with the technologies used. Especially HTML rendering where I tend to be somewhat picky with since I developed Shower. There are about 200 JSP pages, though, migration needs a bit planning. As I had a co-worker pretty happy with the combination of JSF and Seam we tried JSF 1.0 for a little new front end. It was a disaster. I was aware, that it is not a simple tool. And I didn't expect to find the most efficient way to build simple HTML pages. But when I started work I just thought "They did it again. They didn't learn a bit. Like EJB 1.0. Not useable." To us this meant to update our minimal outdated jBoss 4.0.3. We chose 4.2.3 which at least allowed us to use JSF1.1. It worked, but to me JSF felt still like a bunch of technologies forcing each other to quirk. There is a validation technology for single field validations. All other are handled in java. By expression language I'm forced to name my commands get... wherever the JSF guys forgot one. Some component may contain HTML to format their content, others not. No warnings or errors just strange behavior. So on. That's not my point here. Just I was massively frustrated.
At the end of the work flow we send an email with all the data entered from a page with the same data. It's a matter of course, that this takes new code and another technology. I decided jByTE which I wanted to try for a long time. It was like ... coming home. A single class with three methods. That's way of API, I really, really like. And the markup, just region, and positions. And the location of template code is abstracted very well. By using my first metaphor repository I got a small template and had the opportunity to structure my java code. But there where a number of things I didn't like that much.
- I saw me omitting HTML escaping
- To me visual properties like escaping are well suited in template code
- I was not really happy with some details of the syntax
- A region can't be put to a single line, but there was a line for start and another for end needed.
- Writing the region markup to own lines led to additional line breaks
- I don't think to escape or not, is a sufficient model. Though, I decided to use annotated containers to model the encoding.
And I wanted try how it feels working with it. Now anyone who is interested is able to try.