umco / umbraco-ditto

Ditto - the friendly view-model mapper for Umbraco

Home Page:http://our.umbraco.org/projects/developer-tools/ditto

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

XPath Processor?

leekelleher opened this issue · comments

It was discussed a while ago on our Gitter channel that we could have an XPath processor...

re: https://gitter.im/leekelleher/umbraco-ditto?at=5880a4676c1635643c4bb83e

... the question is, do we think it would be suitable for the main Ditto project, or something to put into the lab?

@leekelleher: I could see it working in the core but it's definitely an niche idea.

@leekelleher I think it's useful enough to be a core one. If/when XPath is removed and a suitable replacement added, we can deprecate it then, but until then, it's a nice processor to have.

OK, I've been using the XPath processor on one of our projects quite extensively... I've gotta say, it's impressive - and (weirdly) fun to dev with! 😃

I'm starting to prepare a PR for this. One question... what to name it?

XPath, UmbracoXPath, ContentXPath?

My concern for the naming is that it's not a generic XPath processor; ultimately it's a call to Umbraco's content cache GetByXPath method... should the name reflect that?

I think the name should probably reflect that or you'll get developers trying to use it for other methods and raising support tickets. Heavy documentation will help there also though.

I'm currently going with UmbracoXPath, but totally open for discussion.

Closing this ticket, we can continue the discussion on PR #209 😎