One of the major changes include in OpenQuote 2.0 is the use of velocity templates to drive the product user interface. I'm pleased, and not a little relieved, to say that the job is now done. It's been a long haul.
The advantages of implementing UI widgets as velocity templates are enormous in terms of flexibility, especially as it is implemented an intrinsic part of OpenQuote's product structure. This means that you can use the base templates if they do what you need, or override them in your product if they don't. And, you do it all in the product's CMS store. No need to hit the code or redeploy or any of that nonsense.
For example, let's say that you don't care for the look of the default proposer page. There is a single widget that takes care of collecting proposer details (name, address, etc.). This makes implementing that page in your PageFlow very simple, but what if you don't like the way that the default page looks, or you need to implement it for a request type other than the default text/html? The question actually comes up quite a bit in the forums, and in the past the only answer was to not use that widget. You had to create what you needed from basics using Question widgets, QuestionSections etc. All rather painful.
Velocity templates come to the rescue!
As of 2.0, you can now simply edit the template in the base product. You have control right down to the HTML (our other markup), so you can do exactly what you want. Also, by virtue of product inheritance, your change applies to all of the products on the system, instantly. Of course, you could as easily change it for just one product or for a product suite.
This applies to all widgets. From proposed details, to question, to broker summary; all the widgets work in the same way.
Party of the reason that this had been such a long haul to develop, and it has been a long haul, is testing. The testing of UI widgets, and indeed of UIs themselves is frequently left to system testing if it is done at all. However, these new templates were meant to be plugin replacements for the existing widgets, so that wouldn't really cut it. We've created a set of selenium tests which cover every widget and a WidgetShowcase product to test them from. This has had the nice side effect of creating a widget reference for product developers.
OpenQuote 2.0 isn't distributed as a binary yet, so you'll need to grab the source if your want to play.
No comments:
Post a Comment