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

HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Looking for opinions on which framework to use for implementing templatesLooking for opinions on which framework to use for implementing templates
Previous
 
Next
New Post
11/5/2008 1:24 PM
 

Hi,

To summarise I need to create a categorized list. In adding items to the list the user has an option to select a customized template to display the list item.

In designing the list I am looking at the various ways to implement the architecture.

The two frameworks I am looking at are:

  • Token Replacement : With layout stored in a html file that is cached for reuse.
  • Loading Controls : With layout stored as controls in a ascx file.

In the Token Replacement model when the ItemBound event is called it loads (if not cached) and parses the template and replaces the various tokens.

In the Load Controls model I implement Itemplate, Load the control, Use FindControl to update the values of the controls if there are found.

I was wondering if any of you have any opions on the usage of these models, performace etc.

Cheers,

Colin

 


Colin Mulcahy
E: colin_mulcahy@hotmail.com
 
New Post
11/5/2008 1:31 PM
 

the question is, how do you expect your users to configure the template / control? if this shall be done via UI, TokenReplace should be your preferred option, since it is used in DNN core and a growing number of modules, i.e. users might be familiar with it. besides Tokenreplace provides you with built in formatting options and access to various existion object properties. Since TR is cached, it has a reasonable performance and is easily extensible.


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
11/5/2008 1:51 PM
 

Hi Sebastian,

Thanks for your reply.

Just to answer your question, I will be implemeting a Rich UI Template Editor which will allow admin users to edit the templates and set default templates for list items.

Theses default templates then can be overriden by selection from a dropdown when adding/editing items to the list, this purpose is to enable site editors to highlight specific items in the list (different css).

Lets take the presumption that the documentation is clear and of high quality. Do you think its better to implemet Token Replacement syntax instead of control syntax in an editor due to the growth of TR throughout the DNN framework?

Do you know of any good examples of loading a html file, parsing the tokens, replacing them with controls and storing the template in cache? 

Thanks for your input.

Colin

 


Colin Mulcahy
E: colin_mulcahy@hotmail.com
 
New Post
11/5/2008 8:45 PM
 

Good question. I am using a hybrid solution depending on where I use it.

For example - the core Token Replacement is awesome for templating language strings (e.g. on my StoryFeed view (see What's Happening on HomePage) - these can be changed/Templated in the Lanugage editor with the standard interface that is becoming more familiar.

I then use my own custom token replacement solution (based roughly on Scott/Ventrians (used with permission of course ;) - for more complex stuff like the Event templating screen (coming soon - Group Detail templating) and of course the Smart-Thinker UserProfile template. The reason is that the core token replacement is really good for string manipulation but not for loading controls. I load many different type of controls and language strings. I am looking at using a mixture of both - ie. run the core one over the template first and convert all the simpler objects/strings and then run it through my one and do the remaining more complex objects). The core is a lot more efficient than mine as it uses Regex, but definitely has limitations...


Entrepreneur

PokerDIY Tournament Manager - PokerDIY Tournament Manager<
PokerDIY Game Finder - Mobile Apps powered by DNN
PokerDIY - Connecting Poker Players

 
New Post
11/5/2008 10:05 PM
 

What's your timeline? The Repository4 module is not quite ready yet, but it sounds like the work I'm doing around extensible templates is exactly what you're looking for.

http://www.dotnetnuke.com/Community/Blogs/tabid/825/EntryId/1807/The-Repository-4-0-Template-engine-overview.aspx

http://www.dotnetnuke.com/Community/Blogs/tabid/825/EntryId/1809/The-Repository-4-0-New-Token-Architecture.aspx

http://www.dotnetnuke.com/Community/Blogs/tabid/825/EntryId/1536/Repository-Module-4-0-Sneak-Peek-2-Custom-Repository-Controls.aspx

I had planned to have the first preview release available at OpenForce next week. I am probably a week behind schedule but I would almost surely have a public preview release by Thanksgiving.  I will probably be posting another video blog entry tomorrow demonstrating the workflow engine which I am just finishing up

 

 
Previous
 
Next
HomeHomeDevelopment and...Development and...DNN Platform (o...DNN Platform (o...Looking for opinions on which framework to use for implementing templatesLooking for opinions on which framework to use for implementing templates


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