Let me preface my question by saying, I'm a total newb to Umbraco ( 2 days). So please forgive my ignorance.
I'm trying to use umbraco to develop websites for a group of clients. The information for each client ( Name, address, phone numbers, email addresses, etc) are all available to me through a web service by passing the clients ID.
I'm a .NET Web Developer. I use custom built objects to hold data and methods. I have custom objects already built to hold the client information that is retrieved from the webservice. If I were building this outside Umbraco I would get the client information on session start and load my custom object saving it as a session variable so that I can retrieve the information any time I need it.
How would one accomplish this within the Umbraco framework? I've been searching for examples of using custom objects in Umbraco but I'm not finding anything. And the only thing I'm finding on session involves using xslt to retrieve the value from session. But unless I'm mistaken that only allows retrieval of primitive datatypes, not custom build objects or properties of objects.
Am I completely missing the boat here (likely). Please give me some direction and remember I've only been speaking Umbraco for 2 days now, talk slowly.
If you're creating a custom component it doesn't need anything to do with Umbraco, you can run and .NET code via a UserControl or a custom ASPX or any other .NET component you want.
This can interact with anything in the ASP.NET pipeline (session, runtime cache, etc), an external data store (using LINQ, NHibernate, etc).
Using Custom Objects in Umbraco
Let me preface my question by saying, I'm a total newb to Umbraco ( 2 days). So please forgive my ignorance.
I'm trying to use umbraco to develop websites for a group of clients. The information for each client ( Name, address, phone numbers, email addresses, etc) are all available to me through a web service by passing the clients ID.
I'm a .NET Web Developer. I use custom built objects to hold data and methods. I have custom objects already built to hold the client information that is retrieved from the webservice. If I were building this outside Umbraco I would get the client information on session start and load my custom object saving it as a session variable so that I can retrieve the information any time I need it.
How would one accomplish this within the Umbraco framework? I've been searching for examples of using custom objects in Umbraco but I'm not finding anything. And the only thing I'm finding on session involves using xslt to retrieve the value from session. But unless I'm mistaken that only allows retrieval of primitive datatypes, not custom build objects or properties of objects.
Am I completely missing the boat here (likely). Please give me some direction and remember I've only been speaking Umbraco for 2 days now, talk slowly.
Thanks in advance for your help
You can create your own xslt library to use in umbraco, or you can try look at base, or you can use c# and your objects in templates.
Some links to help you start
http://www.090978.org/umbraco-screencasts/xsltExtensions.html
http://our.umbraco.org/wiki/reference/umbraco-base/programming-a-class-for-the-base-system
http://farmcode.org/post/2010/07/13/TheFARMe28099s-guide-to-Macros.aspx
Petr
Thanks for you quick reply, Petr.
So correct me if I'm wrong but from what your links are telling me:
Can I create an xml representation of my custom object and save it in the XML Cache to be accessed when needed?
If you're creating a custom component it doesn't need anything to do with Umbraco, you can run and .NET code via a UserControl or a custom ASPX or any other .NET component you want.
This can interact with anything in the ASP.NET pipeline (session, runtime cache, etc), an external data store (using LINQ, NHibernate, etc).
I've got a view resources on my site for different things to do with Umbraco development: http://www.aaron-powell.com/umbraco
You CAN store your custom objects, I do it :-)
In your static method is easy to access session etc.
is working on a reply...