Content Modeling 101

Bookmark

In today's world, it's no surprise that "Content is King". It helps in telling a story and helping you reach out to more people. Most of the time, developers aren’t the ones managing this content. Hence, modeling content efficiently becomes crucial. Doing it well makes the content delivery process smooth for the team. But how does one go on with modeling content? What are the things that one should take care of? I’ll answer such questions in this talk, and share my approach to content modeling as a JavaScript developer.

by



Transcription


Hey, everyone, and welcome to my talk, Content Modeling 101. Now, my name is Harsha Lagraval, and I am originally from India, living in Berlin for 15 months now, and I work as a developer advocate at Contentful. And one of the fun parts I love about my job is that I get to experiment a lot with different technologies and frameworks and share this learning with the wider community. So you can find about all these experiments and crazy stuff that I do on my website, or feel free to follow me on Twitter. Also, this is my first time in Amsterdam, so if you have any recommendations, please do let me know. So today, I am going to talk about content, because in the past two years, the amount of content that we have generated has been massive. I mean, almost everyone out there has been involved in creating content in some form or the other. And last year in November itself, during the Black Friday sale, we saw a massive amount of incoming requests being made to our Contentful APIs. The GraphQL API request increased by 550%, and the content delivery API, or the CDA, increased by 73%, and that was just in one month. And so I feel as a developer, it is our duty to make sure that we are creating an amazing experience not just for our end users, but for our team as well. And that is where content modeling comes into the picture. But the question is, what is content modeling? So a content model basically gives structure, and it helps you to organize your content. Now keep in mind that not all content creators and designers have the technical expertise like us. Hence, the goal over here is to create a content model that will support the needs of the entire team, from content creators, designers, to developers. Enough of the theory. Let's try to get into action and try to model a content for an app. And this is an app that I am working on and I want to create for myself, because I've taken cooking as a hobby recently, and I want to try out to build an app where I can store all my recipes and maybe share it with everyone else. And I want to build this because I am a programmer, and I have the superpower to do that. But anyways, there are a few things that I learned while I was researching for this, and I started working on it. And in the next couple of slides, I'll be talking about that. And one of the major things that I learned was about the top-down approach, because it helped me break down my content model. And I was able to simplify the content model and make it more reusable. So I started with playing around with the JSON schema, and I created this JSON schema. So I have a content model which has a recipe, which contains the title, a description, ingredients. Now if you see, ingredients is an array, and I'm going to come back to that. And then there are instructions, and then the images. Once I had the JSON schema and I kind of had the visual representation of what I wanted to do, I simply translated it into the content model in Contentful, and you can already see all this in Contentful. Now if you see or focus on the ingredients, it says references, many. So what I went ahead and did was I created a different content type for ingredients. So if we go one layer deep, this is what the ingredient JSON schema looks like. The ingredient has a name, and it has a type. Now I am vegetarian. I don't eat meat. So for me, I need to make sure what kind of ingredients I'm adding over there. It makes it easy for me to classify as well. So the type over here is, again, another content type. And I'm sorry I'm repeating types too many times. So this is how it looks like in Contentful, again. Now I'm not going to go into the ingredient type, because it's kind of similar. But I wanted to give you a quick view of how different content types are connected with each other. So there's recipe, which is referencing to ingredients. Reference is referencing to ingredient type. And recipe is also referencing to acid. So one of the important features of content modeling is reusability. Now taking this example of the cookbook, a lot of the ingredients are used in a lot of different recipes. And adding each of these recipes, sorry, these ingredients to each of these recipes individually does not make a lot of sense. And I personally believe that developers are kind of lazy, and they always want to find the quickest and the shortest way to do stuff. So that's where reusability comes into the picture. The next is a content model does not just store content. It also embodies the decision about how you want to render the content for the end user, how your team should publish and display the content. And we refer to this constellation of issues as content governance. And you also need to think about the platform. Where and how will the users interact with your content? Is it just going to be only on the web? Are you going to go ahead and build a mobile application? Are your users going to get this information on a voice-enabled application? So that is the other feature that you need to think about. And lastly, remember, nobody gets content modeled right in OnePass. It's a continuous process. So keep on iterating over it. Get the feedback from your team, from your users, and keep making changes. And if you want to learn more about content model or contentful, hop onto our learning center. We have some amazing courses where you can learn about them in much more detail. We also have a developer portal if you want to just get started, look at the developer resources that we have. That's the correct place to go. And we are here at the booth, and we have an interesting giveaway. So come say hi at the booth, grab some swag, and maybe participate in the giveaway. That's it from my end, and thank you for joining in, and have a wonderful time.
7 min
16 Jun, 2022

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Workshops on related topic