This is my first time creating a website using Umbraco and even after a long research I am very confused about something. I would be grateful if someone could give me a hand.
My data consists of 5 tables related to each other (Book, author, publishing house etc.). The data could grow up to a couple hundred rows max.
To manipulate this data I could use the Document Type interface in Umbraco backoffice, and using some custom datatypes I could make CRUD operations without any custom code. (If I understand correctly)
I could alternatively use the NPOCO framework, and the Web API to create a custom panel in Umbraco. (Keep in mind I am very new to Umbraco so I may be using the wrong terms.)
But I would lose the revisions feature, and the publishing workflow. (Which I need. In fact I picked Umbraco because of these features.)
In your opinion what is the correct approach in the scenario? At what point should I delve into a custom database, and if I do, can I keep the revision history and the publishing workflow features?
I know it's a long question but I really need some guidance.
It depends a lot on the context of the site / app you are providing, performance etc, and relations between the tables. Generally in this scenario, you 'might' use Umbraco Content nodes for content items, that don't change very often, and are changed by editors manually but very much use Database tables for transactional items, or daily automated imports of data.
so I can see having a Document Type for a Publishing House, and a section within which (set as a ListView) for them to be created, and I can see having a Document Type for an Author, and a section within which (set as a ListView) to create them, and then a Book Document Type, and a section within to create them (ListView again) - and the Book Document Type has a content picker that allows you to pick Author, or Multiple Author nodes, and another content picker to pick the Publishing House.
You'd then be able to have pages for each Book, Author, and Publishing House, and list out easily all the Books for an Author, all the Books for a Publishing House etc etc, and display on the 'Book' page the Author details or Publishing House details from the related nodes...
But if one of your tables tracks 'Orders' of books... then this would very much be a custom database table... because it doesn't make sense for this to be editable via the backoffice, and could grow exponentially over time...
... similarly if you are displaying a 'Stock' of the availability of the books, and everyday running an import of Book content into Umbraco, depending on sales, then again this would be better in a custom database table... essentially everytime you save, and Umbraco node you 'create' a version of it in the database table - this makes sense if editors have manually updated the node, so they can revert to a previous version - but if you are storing numbers such as 'Stock availability' it doesn't make sense to be able to roll that back to a previous version... and in fact breaks rolling back the content for other reasons...
that gives you a UI in the backoffice for updating CRUD on custom database tables...
Anyway a lot depends on what the aim is for the project and how the data will be utilised, as to what the best approach will be... and also how much this needs to scale over time - you are not building Amazon? right??
First of all thank you for your amazingly detailed answer.
And no, I'm not building anyting like Amazon :) In fact I don't expect any kind of growth for this particular project, and all the data will be edited by hand, so I'm hoping using content nodes should be fine for me.
I looked into Fluidity but seeing it wasn't supported in Umbraco 8 I thought it wasn't an option. In the case that I decide I need Fluidity, would you say it is still ok to use Umbraco 7?
There is, I believe, a version of Fluidity for V8 planned for later this year, but it 'may' become a paid for package, but that would be worth it giving the dev time it saves in these scenarios.
But as ever it depends about 'context' if you need to get this up and running in the next couple of weeks, and you find you need 'some' custom database tables edited manually... then V7 + fluidity is the path of least resistance!
V7 is still great and, again depending on context, battle hardened over several years. It will be supported for security patches for next couple of years...
But if you have a more relaxed timescale, and you like some of the new features in V8 (language variants etc) then starting with V8 means you'll avoid a migration step at a later date from V7 to V8... if you subsequently do decide to move to V8 at a later date ...
Other factor is where you are planning to create the project - Umbraco Cloud will steer you towards V8.
Thanks again for the great explanation. I think your answers set me on the right path.
I'm going to try my luck with Umbraco 8 and content nodes for now. If I need some custom database tables in the future I'm gonna have some learning to do :)
Content node vs custom database
Hi all,
This is my first time creating a website using Umbraco and even after a long research I am very confused about something. I would be grateful if someone could give me a hand.
My data consists of 5 tables related to each other (Book, author, publishing house etc.). The data could grow up to a couple hundred rows max.
To manipulate this data I could use the Document Type interface in Umbraco backoffice, and using some custom datatypes I could make CRUD operations without any custom code. (If I understand correctly)
I could alternatively use the NPOCO framework, and the Web API to create a custom panel in Umbraco. (Keep in mind I am very new to Umbraco so I may be using the wrong terms.) But I would lose the revisions feature, and the publishing workflow. (Which I need. In fact I picked Umbraco because of these features.)
In your opinion what is the correct approach in the scenario? At what point should I delve into a custom database, and if I do, can I keep the revision history and the publishing workflow features?
I know it's a long question but I really need some guidance.
Thanks.
Hi Burcak
It depends a lot on the context of the site / app you are providing, performance etc, and relations between the tables. Generally in this scenario, you 'might' use Umbraco Content nodes for content items, that don't change very often, and are changed by editors manually but very much use Database tables for transactional items, or daily automated imports of data.
so I can see having a Document Type for a Publishing House, and a section within which (set as a ListView) for them to be created, and I can see having a Document Type for an Author, and a section within which (set as a ListView) to create them, and then a Book Document Type, and a section within to create them (ListView again) - and the Book Document Type has a content picker that allows you to pick Author, or Multiple Author nodes, and another content picker to pick the Publishing House.
You'd then be able to have pages for each Book, Author, and Publishing House, and list out easily all the Books for an Author, all the Books for a Publishing House etc etc, and display on the 'Book' page the Author details or Publishing House details from the related nodes...
But if one of your tables tracks 'Orders' of books... then this would very much be a custom database table... because it doesn't make sense for this to be editable via the backoffice, and could grow exponentially over time...
... similarly if you are displaying a 'Stock' of the availability of the books, and everyday running an import of Book content into Umbraco, depending on sales, then again this would be better in a custom database table... essentially everytime you save, and Umbraco node you 'create' a version of it in the database table - this makes sense if editors have manually updated the node, so they can revert to a previous version - but if you are storing numbers such as 'Stock availability' it doesn't make sense to be able to roll that back to a previous version... and in fact breaks rolling back the content for other reasons...
If you were to use Umbraco Version 7 for your project, you can utilise a package called Fluidity: https://our.umbraco.com/packages/backoffice-extensions/fluidity/
that gives you a UI in the backoffice for updating CRUD on custom database tables...
Anyway a lot depends on what the aim is for the project and how the data will be utilised, as to what the best approach will be... and also how much this needs to scale over time - you are not building Amazon? right??
regards
marc
Hi Marc,
First of all thank you for your amazingly detailed answer.
And no, I'm not building anyting like Amazon :) In fact I don't expect any kind of growth for this particular project, and all the data will be edited by hand, so I'm hoping using content nodes should be fine for me.
I looked into Fluidity but seeing it wasn't supported in Umbraco 8 I thought it wasn't an option. In the case that I decide I need Fluidity, would you say it is still ok to use Umbraco 7?
Hi Burcak
There is, I believe, a version of Fluidity for V8 planned for later this year, but it 'may' become a paid for package, but that would be worth it giving the dev time it saves in these scenarios.
But as ever it depends about 'context' if you need to get this up and running in the next couple of weeks, and you find you need 'some' custom database tables edited manually... then V7 + fluidity is the path of least resistance!
V7 is still great and, again depending on context, battle hardened over several years. It will be supported for security patches for next couple of years...
But if you have a more relaxed timescale, and you like some of the new features in V8 (language variants etc) then starting with V8 means you'll avoid a migration step at a later date from V7 to V8... if you subsequently do decide to move to V8 at a later date ...
Other factor is where you are planning to create the project - Umbraco Cloud will steer you towards V8.
if that helps!
regards
Marc
Hi Marc,
Thanks again for the great explanation. I think your answers set me on the right path.
I'm going to try my luck with Umbraco 8 and content nodes for now. If I need some custom database tables in the future I'm gonna have some learning to do :)
Have a great day.
Burcak
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.