Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Custom TokensCustom Tokens
Previous
 
Next
New Post
11/8/2013 9:33 AM
 

 

Wes,
thank you for sharing. I wish I had more time to answer, because there are tons of interesting things here!

Processing tokens anywhere, and not only in modules instancing the current token-replace engine, is what I think we are addressing here. I recently had the opportunity to work on a WordPress project, and I could appreciate its smart tags system: I don't have a deep knwowledge of the architecture, but they are available (almost) anywhere and I like this.
But that's a different system, so let's talk about something useful to us. Hopefully ;)

I understand the performance problem... yet replacing tokens only when the full page is ready to be rendered appears to be the only possibility, if we want to process tokens anywhere. We could improve the token-replace engine (which btw already allows you to add custom tokens if I remember well), but a real win would only to find a way not to modify existing modules, and let tokens be processed anyway and anywhere.
BTW does your implementation present serious performance issues? That site where you process tokens anywhere, in containers also (yes I'm asking! ;)) is performing so bad? Do you use data-caching apis to improve performances?

If performance is a problem there, why don't we try to do this in another way?
I'm thinking about processing tokens in another moment, and not when HTML is ready for rendering. For example at the data-provider level: could we ask the SqlDataProvider to process tokens on content data it gets from the database, before it gives data back to the controller?
A problem is we don't know if tokens are to be processed on all data, just to begin with. Module controller should be able to enable or disable token-replace... what about a new ITokenReplace interface to be optionally implemented, like we do for ISearchable and IPortable for example, at module level?

Yes this is not "tokens anywhere" and would mean modifying our modules, but would this kind of approach improve performance? Or is it just a stupid idea?

 

Regards,

al.


 
New Post
11/8/2013 5:00 PM
 
The complex way that different modules are generated would make implementing this sort thing at the data provider level not very practical ... for example. some modules handle or process lists of data - others handle data that comes from portalsettings or modulesettings and different modules also use different data provider models. Even if they didnt all work differently - there would actually be more performance overheads in doing things this way.

With regards to the performance overheads that we were seeing - performance is all relative - as the processing power of servers increases it becomes less of an issue for many portals - a site with 100-1000 page requests an hour would barely notice the impact - depending on the complexity of the replaces - it might add few thousands of second or so to the render time.

In terms of caching of data - DNN is already very helpful in this area - all hosting, portal, roles ,security and user info is already heavily cached into memory - and given that the dnn default.aspx page is already extending the render module some of the possible overhead already exists.

Westa


 
New Post
11/8/2013 11:55 PM
 

One thing we did find that gave us a lot of performance improvements was to mask out the session cache variable before starting our replaces = basically = copy then remove the session cache variable from the stringbuilder - do all our macro replaces and then put the session cache variable back in.  On pages that made extensive use of global macros this represented a large Improvement in performance.

The other area which is problematic is ajax and client site rendering - modules that do a lot of client side rendering - say like the journal module - wont work with this sort system - since they are not rendering their CONTENT as part of the asp.net lifecycle - instead the content is being rendered on the HTML browser side based on data returned from AJAX requests.

Westa

 
New Post
11/11/2013 11:38 AM
 

Westa,

thank you for sharing such precious info.  Patching the core actually seems to be the way everybody does token-replace, if you want it to be anywhere. I just found what appears to be an interesting implementation at   http://www.dnnsharp.com/dnn/modules/m..., but I'm missing something when they say:

 

"Well, if you want to extend support to all modules that already support standard token replacement, then you can configure My Tokens to patch the DNN core."

"If you don't patch the DNN core, My Tokens will still work with a lot of standard and commercial modules."

 

 and they cite  some core modules like Text/HTML. I miss how they can do that, without patching the core... maybe I'll give it a try. Looks like very different from your implementation?

Thank you,

al.


 

 
New Post
11/11/2013 4:10 PM
 

The dnn sharp tool is worth a look ... But may not do exactly what you are expecting in some cases ... Exactly how it works is for its owners to discuss ... But there is patching the core and patching modules in its skill set ... Out of the box it is able to patch known core modules and utilise hooks that developers have added to their commercial modules.

Patching modules it regards as different to patching the core ...   Patching the core usually involves a change to the dnn .dll library's .... Patching a module on the other hand can be achieved by make changes to a module itself.

From what I know about their module however it is still ... Module level replace based ... Pit can't do a global replace at the page /skin level without a skin object being added to the skin 

westa

 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Custom TokensCustom Tokens


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out