First, I just want to say that this is a fantastic plugin! It goes a long way in empowering site editors.
1. Are there performance implications in using Shortcodes pretty heavily? For example, a wordpress style grid system ( http://wordpress.org/extend/plugins/easy-columns/installation/ ). I have a pretty large site with a whole slew of template needs and 100's of site editors with variable skill levels. I'd expect that shortcodes would be for the more savvy editor. I'm also thinking about using the RTE Templates button to build out the shortcodes. Thoughts?
2. Are there any plans to support named params? Would it be possible to support both unnamed and named?
1. Performance-wise, the filter code itself isn't too heavy, it applies a RegEx against the HTML response output and parses any matches. The performance hit comes with what the matches will do. Thinking about the /Base (Rest) extensions, there is some Reflection taking place, so that could be an issue.
2. Named params - I'm all for it... if only I knew how to write a RegEx for it! Actually I don't think the /Base extensions support named params, so might be a non-starter. However I'm no longer keen on Shortcodes being closely bound to /Base extensions ... future version could change that?
As with all my packages, it's completely open-source. So any ideas, suggestions, forks, pull-requests... please be my guess!
Thanks. I'll take a look at the src. Unfortunatly, my .NET skills are pretty weak (coming from PHP) and it's hard to find time to invest in improving my skills.
What was the reasonging to for binding it to /Base? Any ideas how to approach separating it?
PHP is cool... used to do a lot of it myself - was previously into WordPress before getting heavily involved with Umbraco - so all good!
Reason for /Base was that Shortcodes started off as a concept/idea - so in wanting to get it coded/released as quickly as possible, I chose the /Base extensions as a way to customise/extend the shortcodes functionality. Could also be seen as my laziness - still it serves its purpose.
Forgot to say that I dig the idea of an RTE button - makes perfect sense! (Again only reason I didn't make it was that I didn't know enough about TinyMCE plugins) :-)
Sure, /base supports named params via the Request collection. Here's an example of how you could accept parameters in a RestExtension:
namespace Base.Example { [RestExtension("Example")] public class Example { [RestExtensionMethod(returnXml = false)] public static int MaxWithParams(string parameters) { var request = HttpContext.Current.Request; return Math.Max(int.Parse(request["val1"]), int.Parse(request["val2"])); } } }
Couple Questions
First, I just want to say that this is a fantastic plugin! It goes a long way in empowering site editors.
1. Are there performance implications in using Shortcodes pretty heavily? For example, a wordpress style grid system ( http://wordpress.org/extend/plugins/easy-columns/installation/ ). I have a pretty large site with a whole slew of template needs and 100's of site editors with variable skill levels. I'd expect that shortcodes would be for the more savvy editor. I'm also thinking about using the RTE Templates button to build out the shortcodes. Thoughts?
2. Are there any plans to support named params? Would it be possible to support both unnamed and named?
Thanks for the great work!
Dan
Hi Dan,
Thanks for your feedback, much appreciated.
1. Performance-wise, the filter code itself isn't too heavy, it applies a RegEx against the HTML response output and parses any matches. The performance hit comes with what the matches will do. Thinking about the /Base (Rest) extensions, there is some Reflection taking place, so that could be an issue.
2. Named params - I'm all for it... if only I knew how to write a RegEx for it! Actually I don't think the /Base extensions support named params, so might be a non-starter. However I'm no longer keen on Shortcodes being closely bound to /Base extensions ... future version could change that?
As with all my packages, it's completely open-source. So any ideas, suggestions, forks, pull-requests... please be my guess!
https://bitbucket.org/vertino/shortcodes-for-umbraco/src
(Actually with my other commitments on Umbraco core and uComponents, I'd welcome any help!)
Thanks, Lee.
Thanks. I'll take a look at the src. Unfortunatly, my .NET skills are pretty weak (coming from PHP) and it's hard to find time to invest in improving my skills.
What was the reasonging to for binding it to /Base? Any ideas how to approach separating it?
-Dan
Hi Dan,
PHP is cool... used to do a lot of it myself - was previously into WordPress before getting heavily involved with Umbraco - so all good!
Reason for /Base was that Shortcodes started off as a concept/idea - so in wanting to get it coded/released as quickly as possible, I chose the /Base extensions as a way to customise/extend the shortcodes functionality. Could also be seen as my laziness - still it serves its purpose.
Forgot to say that I dig the idea of an RTE button - makes perfect sense! (Again only reason I didn't make it was that I didn't know enough about TinyMCE plugins) :-)
Cheers, Lee.
Sure, /base supports named params via the Request collection. Here's an example of how you could accept parameters in a RestExtension:
You'd then call it as http://domain/base/Example/MaxWithParams/?val1=10&val2=11. Unfortunately, /base doesn't accept method overloading...
is working on a reply...