Hello Simon and Steve,

  So, I sent you a link to code that would not build without a non public maven 
repository.  Sorry about that.

  I have cleaned up the codebase for the XChain project 
(https://github.com/ctrimble/xchain), so it will now build publicly with Maven 
3.0.3 or later.  I also pruned the documentation and published that on GitHub 
Pages (http://xiantrimble.com/xchain/).  The documentation isn't great, but I 
included some deep links on the index page into both the documentation that 
does exist and the code base.

  I also took a look at the current trunk for the Apache Chain package.  You 
may want to consider opening up the type of the context object.  Combining 
expression languages with chains is very powerful.  Forcing the type of the 
context object restricts use to simple key/value based logic.  If you can find 
a way to separate the chain of responsibility pattern from the context type, 
the general usefulness of Apache Chains will be greatly improved.

  I hope the code on GitHub is of use and I wish you all the best with Chain 
2.0.

- Christian Trimble


On Apr 4, 2013, at 9:33 AM, Christian Trimble <christian.trim...@meltmedia.com> 
wrote:

> Hello Simon and Steve,
> 
>   Here is a brief overview of the XChains package up on GitHub:
> 
> High Level Overview:
> 
>   We fused the Chain and JXPath projects together with some XML bindings to 
> create a light XML driven programming language.  This let us do some 
> interesting model driven programming with XSLT.
> 
> Main Differences:
> 
>   1) The Commons Chain package mandates the type of the context object.  This 
> type was changed to JXPathContext in our version of the Chain classes.
> 
>   2) The type of the child list in Chain was changed to a List.  This aided 
> in composition and binding.  Basically, it added an extra point to insert 
> indirection if needed.
> 
>   3) Annotations were added to define the binding between an XML Element and 
> a Command/Chain.
> 
>   4) Some code engineering was introduced to manage the JXPathContext as the 
> chain executed.  So, if there were xmlns bindings in the XML, those 
> namespaces would be properly reflected in the JXPathContext.  This is done by 
> writing abstract classes for the Commands/Chains and then loading them from a 
> factory to get engineered instances.
> 
> Other interesting features:
> 
>   1) The XML documents that are loaded can declare an XSLT document that they 
> should be run through.  This is done with a processing instruction like this:
> 
>   <?xchain-stylesheet system-id="…"?>
> 
>   where the system id is relative to the current document.  These are 
> processed when the chain is loaded, so you only get the performance hit once.
> 
>   2) All of the dependencies of an XML document are tracked, so that they can 
> be reloaded when the file, or any of its dependencies change.  This helps in 
> development.
> 
>   3) There is some lifecycle management code in there, to aid in setting up 
> and tearing down applications that use the project.
> 
>   4) The project engineers custom classes for text/XML content that will be 
> output, much like JSPs.  However, this code generates SAX events, instead of 
> byte streams.  This makes it well suited for runtime XML templating.  
> Unfortunately, there were not any free streaming XML processors at the time.
> 
> I believe that the maven site for the project contains some very quick 
> tutorials about using the project.
> 
> - Christian
> 
> -- 
> Christian Trimble
> Software Architect
> meltmedia.com | @meltmedia | @xiantrimble
> c: 480.430.2854       | w: 602.340.9440
> -- 
> meltmedia
> We are Interactive Superheroes
> 
> On Mar 20, 2013, at 3:21 PM, Simone Tripodi <simonetrip...@apache.org> wrote:
> 
>> Hi Christian,
>> 
>> thanks a lot for sharing those info, much more than appreciated!
>> 
>> In commons-chain 2.0 we are basically trying to revamp the old chain
>> 1.X, providing the same features, but keeping in mind a bottom-up
>> approach (people are interested on using chain even outside the web
>> context), strong modularization (no more god-jar containing
>> everything), support of generics, new EDSL APIs, versatile
>> configuration (XML, JSON, ...) and web support (Servlet/Portlet).
>> 
>> I'd like to invite you to have a look at current /trunk and encourage
>> to contribute back to commons - you would be much more than welcomed!
>> :)
>> 
>> Have a nice day, all the best!
>> -Simo
>> 
>> http://people.apache.org/~simonetripodi/
>> http://simonetripodi.livejournal.com/
>> http://twitter.com/simonetripodi
>> http://www.99soft.org/
>> 
>> 
>> On Wed, Mar 20, 2013 at 8:22 PM, Christian T Trimble
>> <christian.trim...@meltmedia.com> wrote:
>>> Hello,
>>> 
>>>  I am not sure where you are looking to take the commons chain project, but 
>>> you may be interested
>>> in some code that meltmedia has open sourced.  The project is called xchain 
>>> and it fuses the
>>> Commons JXPath project with Commons Chain to be used as a web framework.  
>>> You can find the code up
>>> on GitHub.  This is a dump of the head of our repository, so unfortunately 
>>> it
>>> does not contain history or much documentation.
>>> 
>>> Project on GitHub: https://github.com/ctrimble/xchain
>>> Core Package: 
>>> https://github.com/ctrimble/xchain/tree/master/core/src/main/java/org/xchain
>>> 
>>>  If anyone is interested in this code, let me know and I will put some 
>>> effort into the documentation.
>>> 
>>> -Christian
>>> --
>>> Christian Trimble
>>> Software Architect
>>> meltmedia.com | @meltmedia | @xiantrimble
>>> c: 480.430.2854     | w: 602.340.9440
>>> --
>>> meltmedia
>>> We are Interactive Superheroes
>>> 
>>> 
>>> 
>>> On Mar 15, 2013, at 5:53 AM, Steve Westwood wrote:
>>> 
>>>> Hi Simone,
>>>> 
>>>> Thanks for the response;
>>>> 
>>>> My first thought on commons-chain relate to the other 2.0 issues apart from
>>>> CHAIN-76 that have been delivered (which is a lot I notice - 
>>>> congratulations on
>>>> getting to this point!). Are the changes in your view stable and do they 
>>>> need
>>>> further tests/samples to ensure all is good (I haven't looked at test 
>>>> coverage
>>>> yet). I notice cookbook sample changes (CHAIN-66)  but do we need to 
>>>> provide
>>>> more (plus amend documentation) to provide certainty going forward?  I 
>>>> guess my
>>>> thinking relates to whether work such as CHAIN-76 is a 2.0 or 2.1 issue.  
>>>> I have
>>>> no strong view on this although a move away from XML-centric configuration 
>>>> is
>>>> certainly desirable.
>>>> 
>>>> For CHAIN-76, I will apply the prototype patch to a copy of the 2.0 over 
>>>> the
>>>> weekend and take a closer look at what you submitted. I need to refresh my
>>>> memory on commons-chain (its been a while...) but I like to think I can 
>>>> get up
>>>> to speed fairly quickly here.
>>>> 
>>>> Thanks again,
>>>> 
>>>> Steve
>>>> 
>>>> -----Original Message-----
>>>> 
>>>> From: simone.trip...@gmail.com [mailto:simone.trip...@gmail.com] On Behalf 
>>>> Of
>>>> Simone Tripodi
>>>> 
>>>> Sent: 13 March 2013 20:01
>>>> 
>>>> To: Commons Developers List; Steve Westwood
>>>> 
>>>> Subject: Re: [Chain] Any future plans for commons-chain?
>>>> 
>>>> 
>>>> 
>>>> Hi Steve,
>>>> 
>>>> 
>>>> 
>>>> very nice to hear there is someone willing to put new energies on Chain! :)
>>>> 
>>>> 
>>>> 
>>>> So, the latest step IMHO before to cut the first chain RC, is CHAIN-76[1] 
>>>> where
>>>> some work has already been done but far to be completed.
>>>> 
>>>> If you want to give a help here, there's enough space to get involved
>>>> 
>>>> - I would be more than pleased to revamp my interest in Chains :)
>>>> 
>>>> 
>>>> 
>>>> I hope to read from you soon!
>>>> 
>>>> All the best!
>>>> 
>>>> -Simo
>>>> 
>>>> 
>>>> 
>>>> [1]<https://issues.apache.org/jira/browse/CHAIN-76>
>>>> 
>>>> 
>>>> <http://people.apache.org/~simonetripodi/><http://simonetripodi.livejournal.com/><http://twitter.com/simonetripodi><http://www.99soft.org/>
>>>> 
>>>> 
>>>> 
>>>> 
>>>> 
>>>> On Wed, Mar 13, 2013 at 5:50 PM, Steve Westwood 
>>>> <steve.westw...@hexsaw.org.uk
>>>> <mailto:steve.westw...@hexsaw.org.uk> > wrote:
>>>> 
>>>>> I wanted to get a sense of what (if anything) is planned for
>>>> 
>>>>> commons-chain. I used this in some years ago, and for various reasons
>>>> 
>>>>> I now find myself returning to it. In examining the SVN trunk things have 
>>>>> not
>>>>> stood still:
>>>> 
>>>>> - Discussions (and subsequent work) in 2011 to accommodate work as a
>>>> 
>>>>> precursor to a chains2 from of CHAIN-53
>>>> 
>>>>> - A fair bit of rework to accommodate Generics/Java 5 support
>>>> 
>>>>> - DSL like capability introduced
>>>> 
>>>>> - Refactoring
>>>> 
>>>>> 
>>>> 
>>>>> Of course, the last release was 2008 (1.2), hence is 2.0  imminent, or
>>>> 
>>>>> are there other issues that require addressing prior to its roll-out?
>>>> 
>>>>> I have looked at JIRA, and I am aware of some debates via this list
>>>> 
>>>>> back in 2009 regarding the incorporation of aspects of  Robust-Task
>>>> 
>>>>> from  Min Cha (this has morphed into Whitetask - see
>>>> 
>>>>> <https://code.google.com/p/whitetask/> ). In addition I note guice/spring
>>>>> integration has been raised in some form.
>>>> 
>>>>> 
>>>> 
>>>>> Hence what are the next steps for commons-chain? I am more than happy
>>>> 
>>>>> to get involved with this.
>>>> 
>>>>> 
>>>> 
>>>>> Regards,
>>>> 
>>>>> 
>>>> 
>>>>> Steve Westwood
>>>> 
>>>>> 
>>>> 
>>>>> 
>>>> 
>>>>> 
>>>> 
>>>>> 
>>>> 
>>>>> 
>>>> 
>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> 
>>>> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
>>>> <mailto:dev-unsubscr...@commons.apache.org>
>>>> 
>>>> For additional commands, e-mail: dev-h...@commons.apache.org
>>>> <mailto:dev-h...@commons.apache.org>
>>>> 
>>>> 
>>>> 
>>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
>> For additional commands, e-mail: dev-h...@commons.apache.org
>> 
> 

Reply via email to