I'm writing a helper class to wrap the functionality of JQuery Taconite plugin. The plugin enables you to process multiple DOM updates in a single Ajax call.
The class simply enables you to construct the appropriate xml structure that is sent back to the client. I'm trying to wrap this functionality in a fluent interface. The basic example looks like this:
FluentTaconite ft = new FluentTaconite(writer);
ft
.Select("#id1").ReplaceContentWith("Hello World!").FadeIn("100")
.Select("#id2").AppendWith("<div>Another div</div>")
return ft.Output();
What I'm worried about is this, what structure would you expect be created after a call to this:
ft.Select("#A").AppendWith("<div id=B/>").AppendWith("div id=C/>")
Is your expectation to build:
<div id=A>
<div id=B>
<div id=C/>
</div>
</div>
Or:
<div id=A>
<div id=B/>
<div id=C/>
</div>
The question is - are you expecting context to shift to a newly added content or remain at the selector?
Update The project in question is uploaded to code.google. Hope you find it useful.
Thanks for the input!