On Thu, Jan 8, 2009 at 2:04 PM, Joel Truher <[email protected]> wrote: > I'm curious about this topic, Rahul, since I encountered it as well. > > The solution you suggest seems to me to be external to SCXML, and it > made me wonder if this sort of templating ought to be supported more > natively, or if there's a design argument to exclude it? > > I searched for a way to avoid templating, since it does seem foreign > to the state-chart idea (as well as other implementations of it, e.g. > Boost.Statechart). I eventually succeeded, and I think my design is > better for it. So maybe the exclusion of templates is a good design > choice. Is that how you see it? > <snip/>
It has been a conscious design choice so far to say that ensuring the uniqueness of IDs is the responsibility of the document author in all cases. Some solutions were considered IIRC to automatically introduce some sort of scoping or ID-munging to get around this issue of src'ing in the same document multiple times, but none were found to be satisfactory. Given that SCXML will very likely be used to design systems that are distributed, reactive and heterogeneous it was considered that its not a stretch to say use a dynamic URL here. The advantage of the example approach outlined here is that it gives the author complete control over how the IDs will be treated every time, and these are therefore predictable at design-time. I'm not sure if you are saying you avoid templating or use some other authoring pattern (if you'd like to share with all users, you can create a wiki page if you want). The wiki is here [1] and open to all (after a quick registration). -Rahul [1] http://wiki.apache.org/commons/SCXML/HomePage > > Joel > > > On Thu, Jan 8, 2009 at 10:41 AM, Rahul Akolkar <[email protected]> > wrote: >> On Thu, Jan 8, 2009 at 8:37 AM, Lee, Cheryl - ES/RDR -Gil >> <[email protected]> wrote: >>> Thanks for your response. >>> >>> I'm not familiar with using a JSP (assume are we talking Java Server >>> Pages?) in the context of my application. Mine is a stand-alone Java >>> GUI application using Swing with the state machine to respond to user >>> actions and other system actions. Is there a way to use a dynamic >>> resource without using JSP? If so, what would an example look like? >>> >> <snip/> >> >> It doesn't have to be a JSP, it was used for illustration. All we're >> saying is use a dynamic URL to tweak the IDs as needed. If everything >> has to be local (no servlet container, web server or any type of >> remote service access), then it may not be straightforward to create >> such a dynamic URL (custom protocol handlers for the java.net.URL >> architecture or other fancy footwork perhaps). >> >> -Rahul >> >> >>> Thanks a bunch, >>> Cheryl >>> <snap/> --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
