Working on a new project in umbraco (4.6.1). I've already written some asp.net user controls, that worked with the existing umbraco node-type data to give me the custom rendering Ineeded.
But now I want to add some client specific data that will be updated thru an asp.net custom controlform and saved to a database for later publishing and/or creating printed reports down the road.
The question is, if you are trying to be true to the umbraco way of doing things, should I be attempting to store all my custom data items directly into the umbraco data tables, or should I simply create my own custom table(s) and treat them like just like I would if the code was not running under umbraco?
Hope my question is clear - I think the answer is technically I could do either and both would work, but I am trying to not accidentally do things that will have adverse side-effects down the road.
I have seen instances where people create their own custom tables in the umbraco db but have also seen people creating separate databases to store custom data i have tended towards the first instance but thats just me being lazy.
I'd appreciate a simple package that adds a CustomData table with just key - value columns and some crud functionality. I'd write one myself if I just got myself started.
I think would go for the method of just creating a custom table inside the Umbraco database. Then we have everything in one place, and don't have to take care of more than one DB.
This is an interesting topic...I think it requires some deep thought. If it's something that is customized for only one particular installation then it's probably the most easy and maybe best to just add another table in the Umbraco database.
But what if what one is doing is a plugin that can be used in other situations as well outside of Umbraco? And what if it's something that needs to be reused on multiple umbraco installations? Would'nt it then make sense to keep it in it's own database?
i'm with jonas! a generalized package installer would be great, but i suspect that the reason a dev would need to go this route is because the data objects and relationships that need to persist are too funky for generalized methods.
i personally feel much more comfortable using my own data access layer that i've developed over the years. granted i'm 1 week new to umbraco, but the xlst make my head spin. so long as i have (read only... i'm okay with that) data access to important properties on the current page in the correct context, my user control can then take those values and do whatever i want it to do on the insert/update and i can juggle and join that data with other data in a very traditional ado.net way. it's probably not the umbraco way but it's the way i'm honestly most comfortable in. but that's why this cms is so great... we can both be right! i just hope i never have to work on your stuff :)
If the database tables are only needed for your Umbraco site, I would create them in your Umbraco database. I always use a prefix for my custom tables so you can easy identify the custom tables.
As an example, where would you put a property that count the number of time a node as been fetched?
Personnaly I would like to simply add it to the document type and update it in code, but I have to publish it and then the node history will grow endlessly...
Where to store custom data?
Working on a new project in umbraco (4.6.1). I've already written some asp.net user controls, that worked with the existing umbraco node-type data to give me the custom rendering Ineeded.
But now I want to add some client specific data that will be updated thru an asp.net custom controlform and saved to a database for later publishing and/or creating printed reports down the road.
The question is, if you are trying to be true to the umbraco way of doing things, should I be attempting to store all my custom data items directly into the umbraco data tables, or should I simply create my own custom table(s) and treat them like just like I would if the code was not running under umbraco?
Hope my question is clear - I think the answer is technically I could do either and both would work, but I am trying to not accidentally do things that will have adverse side-effects down the road.
I have seen instances where people create their own custom tables in the umbraco db but have also seen people creating separate databases to store custom data i have tended towards the first instance but thats just me being lazy.
Regards
Ismail
I'd appreciate a simple package that adds a CustomData table with just key - value columns and some crud functionality. I'd write one myself if I just got myself started.
I think would go for the method of just creating a custom table inside the Umbraco database. Then we have everything in one place, and don't have to take care of more than one DB.
/Kim A
This is an interesting topic...I think it requires some deep thought. If it's something that is customized for only one particular installation then it's probably the most easy and maybe best to just add another table in the Umbraco database.
But what if what one is doing is a plugin that can be used in other situations as well outside of Umbraco? And what if it's something that needs to be reused on multiple umbraco installations? Would'nt it then make sense to keep it in it's own database?
/Jan
i'm with jonas! a generalized package installer would be great, but i suspect that the reason a dev would need to go this route is because the data objects and relationships that need to persist are too funky for generalized methods.
i personally feel much more comfortable using my own data access layer that i've developed over the years. granted i'm 1 week new to umbraco, but the xlst make my head spin. so long as i have (read only... i'm okay with that) data access to important properties on the current page in the correct context, my user control can then take those values and do whatever i want it to do on the insert/update and i can juggle and join that data with other data in a very traditional ado.net way. it's probably not the umbraco way but it's the way i'm honestly most comfortable in. but that's why this cms is so great... we can both be right! i just hope i never have to work on your stuff :)
Hi,
If the database tables are only needed for your Umbraco site, I would create them in your Umbraco database. I always use a prefix for my custom tables so you can easy identify the custom tables.
Just my 2 cts
Richard
Hi,
As an example, where would you put a property that count the number of time a node as been fetched?
Personnaly I would like to simply add it to the document type and update it in code, but I have to publish it and then the node history will grow endlessly...
Benoit
is working on a reply...