synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Fremantle" <pzf...@gmail.com>
Subject Re: Simplifying the use of Quartz
Date Mon, 06 Aug 2007 18:02:08 GMT
Roland

Thanks for the input. i was being lazy - this is the format that the
existing Quartz code uses and it parses that string for you. However,
I agree - from an ease of use aspect, that isn't helping.

So I will use your idea. Now I think about it, I might also change the
count="-1" to be a forever="true" | count="1 or more".

Paul

On 8/6/07, Roland Weber <ossfwot@dubioso.net> wrote:
> > Here is a proposed XML:
> >
> > <job class="org.my.synapse.job">
> >    <property name="stringProp" value="String"/>
> >    <property name="xmlProp">
> >       <somexml>config</somexml>
> >    </property>
> >    <simpletrigger count="-1" interval="1000"/>
> >    <crontrigger expression="0 * 1 * * ?"/>
> > </job>
>
> I did some research on XML design guidelines for
> a presentation last year. While the element vs.
> attribute decisions are somehow tricky, there
> is one rule for which I found no contradiction:
>
> > Don't put structured content into an attribute.
>
> Based on that rule, the <crontrigger expression="..."/>
> looks pretty bad. So if you prefer the attribute
> approach to keep handcrafting of the XML files
> simple, I would suggest to split the expression
> into separate attributes:
>
> <crontrigger minute="0" hour="*" dayofweek="1"
>          dayofmonth="*" month="?" />
>
> This would also allow users to specify only
> the relevant attributes, like:
>
> <crontrigger hour="*" dayofweek="1" />
>
>
> For what it's worth, the best rule on element vs.
> attribute I found was:
>
> > Put data into elements, metadata into attributes.
>
> But if the rest of your XML schema favors attributes
> over elements, it's better to keep it consistent.
>
> cheers,
>   Roland
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: synapse-dev-help@ws.apache.org
>
>


-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com

---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org


Mime
View raw message