tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Howard Lewis Ship <hls...@gmail.com>
Subject Re: Tapestry IoC depends on Tapestry JSON
Date Tue, 26 Jul 2011 23:04:37 GMT
Good catch ...

On Tue, Jul 26, 2011 at 3:07 PM, Tom van Dijk <tom@tvandijk.nl> wrote:
> Hello list,
>
> I find it odd that IoC depends on JSON. I discovered this was done in patch
> TAP5-1362 (April 1st) whenere there was a coercion from String to JSONArray
> and to JSONObject added to "Tapestry"

I may have added it twice.

>
> It would be better if these coercions were added by, for example,
> tapestry-core instead. Now, this is the case! TAP5-1457 adds coercions from
> String to JSONArray and to JSONObject (July 2nd). It is a mystery why these
> coercions were added twice, but they are.

The issues are:

1) tapestry-json should not be a dependency of tapestry-ioc
2) tapestry-core requires the tapestry-json library
3) The automatic coercions are useful in both tapestry-core and tapestry-ioc

(in tapestry-ioc because I often use JSON as a message format with JMS
and elsewhere)

I think that by making tapestry-ioc a "provided" dependency of
tapestry-json, we could create a JSONModule class that adds the
coercions.  The module class would only be used when tapestry-ioc is
present, but would not create a dependency between tapestry-ioc and
tapestry-json otherwise.

>
> My suggestion is that commit 8a26fb1b...  is partially reverted so
> tapestry-ioc no longer depends on tapestry-json.
>
> I have created a JIRA issue for it.
>
> You can use the patch from JIRA (TAP5-1591) or pull from
> git://hetdiana.dyndns.org/tapestry5.git branch 1591
>
> To be honest, it might be worth it to wonder: shouldn't the coercion be
> added by tapestry-json, rather than tapestry-core or tapestry-ioc? But I
> leave that question to people with more experience than me.
>
> Regards,
> Tom.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

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


Mime
View raw message