Best Approach to Create Your Own 'Library'? Options
VirtualRichard
Posted: Tuesday, October 07, 2008 12:40:33 PM

Rank: Fanatic

Joined: 9/17/2007
Posts: 265
Location: London, UK.
I'm having a good day today, so I'm feeling dangerously adventurous.

Say I'm creating a component that will be accessed via a Macro. All well and good.

But what if I realised it would be really cool to create some properties in a complimentary class with properties populated at run time and be able to access them using XSLT just like umbraco:library for finer-grained control?

Is it possible to have one custom control fit both cases?

Also, it occurs to me I might not want all this happening on every hit on a page, so perhaps some element of caching of the class per user session could be employed?

Richard

P.s. Ideally, I'd like the class to be dynamically constructed but I guess that's a question for another forum.

2 * 3 * 3 * 37 : The prime factorisation of The Beast.
hoehler
Posted: Tuesday, October 07, 2008 1:11:30 PM

Rank: Addict

Joined: 7/19/2006
Posts: 608
Location: Bad Homburg, Germany
IMHO I would do an own ClassLibrary project whitch will give back the properties. So you can use the library via xslt and UserControl.

The caching is a good point, but it depends on the usage adn if you want to instantly react on changed properties.

I also wouldn't do a dynamically construction because of typesafety and serialization.

I am using the serialization with my ClientTools, so if you have questions just contact me (th at thoehler dot com)

Cheers,
Thomas

• 2007/2008 MVP • www.thoehler.com • Bad Homburg, Germany
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.