Talking Drupal #356 - The Book Module

July 12, 2022

Welcome to Talking Drupal. Today we are talking about The Book Module with Chad Hester.

Listen: 

00:00
 

Watch: 

Topics: 

  • Book Module
  • High level overview
  • Unique about the module
  • Real world use cases
  • Why not entity reference
  • Should it be in contrib
  • Where does it not make sense
  • Future?

Resources: 

Module of the Week: 

Purge

The purge module facilitates cleaning external caching systems, reverse proxies and CDNs as content actually changes. This allows external caching layers to keep unchanged content cached infinitely, making content delivery more efficient, resilient and better guarded against traffic spikes.

Transcript: 

Transcript are generated with AI and lightly edited, therefore will not be 100% accurate.

Nic L  
Hi this is talking Drupal with a chat about web design development from a group of people with one thing in common. We'd love Drupal is Episode 356, the book module. welcome to Talking Drupal. Today we're talking about the book module with Chad Hester. Chad has recently moved to Vancouver immigrating from Baltimore with his wife, thanks to support from Image X. It was a beautiful drive with all his stuff across the country. Chad, welcome back to the show. And thank you for joining us.

Chad H  
Thank you very much.

Nic L  
Also joining us as CO hosts for the next four weeks is Ryan Price. Ryan is a Solutions Architect at FW, who has been involved in the Drupal community since 2006. He was the founding member of the Florida Drupal meetups in Drupal camp, and now lives in Portland, Oregon, where he helps organize the local meetups. He's frequently involved with mentoring activities such as Drupal Easy's Drupal Career Online Program. Welcome to the show, Ryan.

Ryan P  
Yeah, thanks for having me back. It's been a little while but I'm super excited to be here for whatever you for artists and residents. I don't know we call these

Nic L  
I think you've been calling guest hosts guest hosts

John P  
seat yet you got to fill it.

Nic L  
Well, I'm Nick Lafin it to my other co host is as usual John Picozzi

John P  
here I am everyone, here I am.

Nic L  
We have a new module the week this month, this is another one of those modules that you know, we you expect that we would have done over the past eight, nine years. The module week this week is Purge. The Purge module facilitates clean external caching systems and reverse proxies as well as CDNs. So it's something that the Drupal system uses to notify external systems when a cache expires, and make sure that you're not serving stale content. I use it most commonly with something like varnish, you know, it's used by I think, Acquia. You can use it with Pantheon, or if you have your own installed varnish, but it works with almost any reverse proxy. It's easy to set up. And if you have any external caching, it's completely essential.

John P  
Yeah, I actually use it with Cloudflare. There's a Cloudflare Purge Module. I think that that attaches onto it. So pretty helpful, pretty useful.

Nic L  
Yeah, I think usually when I work with CloudFlare, for some reason, I just hook right into the API. Directly. I'm not, not really sure why.

John P  
Yeah, I think the purge module uses purge to help alleviate, you know, obviously, purge caches. But I think it also has a ability to route IPS correctly or report IPS correctly, because I think of one of the issues that you have maybe with Cloudflare is that you can your Drupal site can often not often see the same IP as if it were because it's just coming from Cloudflare. I think there's something in there that mitigates that if I remember correctly.

Nic L  
I don't recall. So moving on from our module week, we're going to start with our usual softball question, Ryan, or Chad. Brother, can you tell us what the book module is?

Chad H  
Yeah, I think in its essence, it creates a hierarchy of different pieces of content. The idea comes from, you know, stitching together chapters or sections of a book. And it provides different navigation components to help people browse that content, as it goes through as well as some good penetrative tools to make it really easy to populate different books, just from a high level.

John P  
What are books typically populated with or they just nodes? That the idea there?

Unknown Speaker  
Yep, that's exactly. So it's, it's typically nodes, it will start off a lot of times when you first installed the module with a book node. So that can be the beginning of things you can kind of consider the first node to be the cover of the book, so to speak. So that's kind of like the subject matter, the introduction, whatever you may have, or it's just the first page after that, then you can start adding things to that book.

John P  
So I guess the question here is like I'm super unclear, I guess how I've used maybe the Book Module once in my entire Drupal career, so unclear on how it works, wondering like high level if you could give some use cases. So we have the idea of like a book, right. And like when you think of a book, like you think of a book, it has, you know, a table of contents, it has chapters, it has pages, right? My guess is that the same thing that the book module is going after,

Chad H  
it takes that concept and just extends it a little bit further into the digital world. So it's not just a flat list of things like chapters in a book, there is the idea of a hierarchy. So you can kind of build into it a little bit. So anytime we think back to earlier forms of the internet, a lot of times, you know, before the World Wide Web, this interlinking of pages that can kind of cross link think Wikipedia is a great example of cross linking things. It's just one big web of information. I wrote an article about, you know, the United States, and maybe there's a relationship to Abraham Lincoln and back back and forth. Well, that's not so much a serialized list. You, you have more of a stricter hierarchy. It's not a poly hierarchy, where you have multiple parents, multiple children, it's really opinionated to say this is just a list of things. So a great example of that might be a user manual, or something that is very well structured. So Ergo book really holds well as what is it ASCII amorphous, skeuomorphic sort of design concept. It's less visual, more structural in nature. So when you put things together with a book module, it offers you a little bit of things that seemed familiar from a Drupal perspective, you would think, hey, why not use menus, why not use fields to kind of stitch these things together. And you certainly could go that route. And we can kind of explore that a little bit. But the idea here is similar to I'd say, the form module is very opinionated. It has a very specific use case. But you can very quickly outgrow that use case if you're using a bit beyond what it's intended to do.

Ryan P  
So something I've used book module for in the past is like organizing a wiki. So you know, Drupal out of the box doesn't really come with like wiki, formatting things. But you can if you use like markdown for writing, wiki text, or if you wanted to get fancy and use Wikipedia syntax, there used to be modules that would do that in Drupal. But you can use the hierarchy of the book to create sort of like a wiki. And it comes with blocks, too, right, you can list like all the top level pages of the book and a block. And then as you drill down, listed on the page you're on, you can go to the parent page, or you can go to any of the child pages, that's like things that are sort of built in this is the navigation of navigating around the book to different sections of your document, whatever that happens to be this sort of like collection of information.

Unknown Speaker  
It's hard to visualize when just hearing about it, I think it's important to try these things out if you're interested in kind of a prototype sort of fashion. So if you're not sure about different Drupal solutions, really just create a sandbox, simplytest.me or something like that, go try out, adding a little bit of content, turn on the module. And there are a couple of guides. So drupal.org has its own book module overview that you can kind of just get into the basics of what it is it doesn't go into too much depth. But aqua and OS training also have more in depth information to kind of get you into here's how you actually use this module. It's real quick, easy to set up Acquia has a video. And illustrating has more of just an article that walks you through how to kind of set

Ryan P  
this that if you've ever used the documentation pages on drupal.org, particularly editing them, you're editing a book.

Nic L  
Yep. No, I think that's probably why it's still in core, if I had to guess. It's used extensively in drupal.org. I think.

Chad H  
And I think it's really good for intranet sites. So if you have just, you know, a normal marketing site or an organization site, you may not necessarily have a use case for it. But as you have lots of documentation that starts to have very deliberate structure, and you need to guide people in and out exactly like what Ryan said, you can not only create those structures, but it provides these navigation elements that make it easier to understand at a glance. What can I find? So you have the paging element at the bottom where just kind of goes previous page, next page and upper page. But you also have the other block that kind of gives you the Table of Contents, which you have a little bit of control over what that does.

Ryan P  
So Chad, maybe we can also talk about some of the things that make the book module unique. Like, what are some of the reasons why I would reach for the book module over just like sticking pages into a menu or maybe using taxonomy.

Chad H  
It doesn't use all of the same stuff that comes out of the box with things like fields and menus, what it does is, again, it's a little bit opinionated. So it provides you a couple of blocks that you can use. So a table of contents, the navigation element towards the bottom. And in that navigation element, not only does it have Previous Next up, it also has call to action links, if you have permission for it to add a child page. So if if you're managing that content, it makes it really accessible for you as a administrator, Content Manager, it also offers print friendly version. So the idea that you're producing this thing as a book, you might want to print out something like maybe this is the HR manual, and this is the list of holidays. Well, yeah, I want to print that out. Because I want to know when I have off and I can coordinate that my family. It does provide, you know, like that full hierarchy for sidebars, or even abbreviated versions, which is kind of nice. So you don't really have to build all of these different menus and views that kind of does a bit of that for you. And as soon as I want to add something new to the HR manual, I just go in the admin interface and just kind of piece that together.

Nic L  
I think that's kind of the primary thing is because when you generally think about it, you know, if you're, if you're referencing things together using it to reference and if you're looking at an hierarchy, you generally think taxonomy, right? Or maybe a menu. But the thing that this that the book module also provides aside from the hierarchy is embedded into the system is an embedded order. So if you're using a text, say you just had to do with a taxonomy because I've done this in the past with other projects where I've, you know, built a book light using taxonomies, you end up having to build a whole lot of other infrastructure to make sure that you're preserving the order of the pages, per se in the hierarchy. Whereas the book module kind of has that embedded, so you have that concept of like, what's the next page, and if you're going to the next page, and it's the last page at that level, and the next page is upper level up to levels or something, it just handles that. So it very much is one of those modules that not everybody has a need for it. But if you have a need for it, it does the job much better than anything else. So So let's kind of get back to you've mentioned kind of internet's you know, other other, I guess one of my questions for you is, how often do you use the book module? And what kinds of things like are triggers for you and your mind when you're talking about a project with somebody that, hey, maybe we should look at, maybe we should dust off the book module for this project? And then look at that, for the architecture.

Unknown Speaker  
Um, I'd say it's exceedingly rare. But when that one use case kind of comes along, it, it tends to be a strong use case, a solution for that use case. So I'd say, again, internet, that kind of is the easy go to when it comes to documentation that that is organized well enough by a collection of people that you can kind of have some sort of control over that it's not so much the free for all of of content, just like the forum a module is very opinionated in what it does. It has its specific use case, and you may not grab the forum module if you wanted to make a forum personally, I hate the the fighting of spam, if it's a public facing thing, but if you specifically want that structure, it's a really good solution.

Nic L  
Yeah, I think that's one of the things too that it does really well is it makes it very easy for a content admin to add stuff, rearrange stuff and edit stuff. Whereas if you're if you're building kind of a homegrown I mean, obviously, the book modules course was the Drupal way. But if you're building a quote unquote Drupal way, book light, then there's a lot of training that has to be added on how do you add something? How do you order it? How do you rearrange it? I have used the book module a few times over the years. I think the two best use cases I've had for one was when I built a city government site. They needed the ability to post some bylaws. And bylaws are pretty naturally segmented into different sections and said section. So it was a really easy way for them to keep them up to date. You know, make changes when they when they happened or add new sections when they needed to be added. And they use that, you know, very successfully for years. And then the the other time that I used it, or a couple of times they've used it, they've been really effective have been trainings or like courses. So somebody wants to provide access to some training materials, just like drupal.org documentation, when you need to break up, break up the documentation and multiple levels book module really excels. Where we're building it yourself will be painful.

John P  
Chad, I'm curious, do you have like a, do you have a real world use case where you've used the book module recently that like, you're like, Oh, well, we use it, or, you know, I don't know, this, this thing or that thing.

Unknown Speaker  
So I do, I can't say the name because the site hasn't launched. But I can at least talk generally about a church, we had a Drupal six site. So pretty classic example, something that needs to get off the old version of Drupal. And it had a lot of medical text, things, things about I can be big enough not to tip off what this might be. But it's about things like poison control. So if you have a collection of different things that need to help a population, you know, having that in a structured format, can make things a little bit easier to find. And that's sometimes well, that's the number one thing as a, you know, an information architect that we always see in websites that have some sort of a frustrating user point, which is, I can't find what I'm looking for. So we look for solutions that kind of tackle that problem head on. And if you have very structured content, like, here's a very concise list of different things that well can harm somebody and what to do about that. You know, that that I think is good. And I think Nick actually had a strong use case, too, with the whole legal documentation. I've read enough, Baltimore City and Baltimore county code to know that that stuff is so structured. Yeah, the book module would actually be a very excellent solution for just being able to easily manage that. Yeah. So this migration from Drupal six to Drupal nine, it was just a natural solution, because it was already using the book module. And and what would we move it into some new structure? Or do we keep what's familiar, because they only have like two or three people that are managing this website, if we build something new, that's more training, it's less familiar and will work as well.

John P  
So I'm going to go down a rabbit hole here. But first, I'm going to I'm going to finish that last use case scenario, we keep talking about the book module. And I keep thinking of like, like, like an onboarding, text or like an HR manual, which I think somebody already managed, right? Like those seem like good use cases for that. So you talked about, you're talking about this Drupal six to Drupal, eight, nine, migration? So you're using the builder? Did you actually migrate content from six to eight using migration API and the book module? Or was it just like, manually moved over the stuff?

Chad H  
Yeah, it was it was through the Migrate API, that with some other content that they had. And there was some change to content type, taxonomy, things like that in transit. But the thing that stayed mostly the same was the the book content, I mean, that that didn't change much at all. So

John P  
I think overall, I was like an easy experience.

Chad H  
Out of all the things that we migrated, that was probably one of the easier things that we did, it's sort of like trying to migrate a menu, from six to nine. So it kind of keeps a bit of that sort of structure for you. Again, you're using core components. And I think there's something to be said about, not so much the Drupal way. But the fact that you're using a core component gains a lot of more popularity. So you're going to have a lot more documentation support for not just how to use the thing, but how to migrate it from version to version.

Nic L  
I will say one thing, though, about because I've, I've run migrations from Drupal six to Drupal eight. And, you know, it's been about two or three years. So things have improved, but I do remember when I did that, I did have to write a couple of custom plugins to get the hierarchy to move properly. The migration module API hadn't been like fully fleshed out at that point for book. And the documentation was just downright wrong in a couple of places. But, but again, it's you know, because its core, it does most things the core way so it's a lot easier to kind of figure out what you need to do or where the gaps are. You can find analogues elsewhere. For example, I think, you know, if I recall, it's been a few years. But if I recall, some of their key stuff that wasn't fully documented, it just looked at how the taxonomy stuff worked and was able to figure that out. I will say the one thing about book is, it is one of those modules. It's not like taxonomy or node, where every single site that uses Drupal uses that module. So it doesn't get as much coverage or doesn't get looked at as much. But as Ryan pointed out, it is used by drupal.org. It is used by a lot of these really big institutions, like, you know, for their HR documentation or for medical tech. So it's, it is one of those modules that I don't It's not like the color module that's getting removed from Core i don't i don't see book module being being removed from core anytime soon. So if you're, if you're using it, you can probably rely on it.

Chad H  
I don't, I don't know what that book module originally came out. And I would love to kind of dive into what brought that about, I would imagine that it's a lot like other modules, again, like the forum module, things like that it came out of a popular need. And I'm kind of curious, has that popular need changed over the course of time, I could consider almost any type of more complex website, like maybe you have an event website, and I think code of conduct and other sort of documentation could easily go in there to help, you know, organize information in a concise place, make things easier to find.

John P  
So I'm still a skeptic, then. And maybe that's because I haven't, I haven't, like I said, I've used the book module maybe once in my entire Drupal existence. And I remember it being a little bit frustrating. But anyway, I'm just wondering, like, why not use like a system of like entity references, or, you know, as we talked about taxonomy, and whatnot to kind of like build this yourself, like is the book module providing like a certain permission layer and a certain organization layer that you're just not going to get? Or you'd have to reproduce yourself out of Drupal core? Is that where the ease of use or the the requirements come in?

Chad H  
Yeah, one, one of the things that stood out to me as considering kind of a similar sort of architecture using entity reference fields, was one where you're trying to create this structure, and then you're trying to depict it. We even thought about this during the migration, like could could we do this without book is things like circular references, or things that start to dive down a little bit. So say, for example, I have a parent, and I have an entity reference that points to a child, and then we keep going down the line? What's to say that a grandchild doesn't point back to the parent? And what if I'm trying to depict that in a list of things? Does it start to create a circular reference where it's starting to go down the line, and it's doing it repetitively trying to produce that so as long as you have safeguards that avoid that scenario, which the book module does, you can't add a child page more than once, and you can't add it to more than one book. So in that sense, it's very opinionated. Like it, even in the menu system, you can add an item more than once, if you so wanted to. But you can module kind of pulls that back a little bit.

John P  
Yeah, but you can reference right. So like, for example, if I had I don't know, if I had a sub item under, you know, parent A, and then, you know, it needed to also appear under parent D. Like, is there a way to reference from one to the other?

Chad H  
Aside from using a link in texts? No, my understanding my my experience is added to a place and that's the place that lives you, it doesn't give you an option to pick an alternative. So

John P  
you essentially add another another page to that book saying like reference this here.

Nic L  
Yeah. Good.

Chad H  
So if you think if you think of it, it's kind of like legal text, you have sections subsections, things like that, you will have subsections kind of point back to different code of law and things like that, but it won't duplicate something that exists because, well, you don't want to maintain two locations for the same information.

John P  
I definitely try not to think of legal text.

Nic L  
I mean, the good, right.

Ryan P  
Oh, I've got I've got a really good advantage of the book module also. I mean, you know, John, you you mentioned permissions but the administration, the creation, the hierarchy, you know, setting up everything to do with book is all done through the content menu and the front end. Whereas as soon as you talk about taxonomy, if you want to edit the taxonomy term, you're now going to the structure menu, which is, you know, entering the Batcave is what I call it sometimes. And, you know, as soon as you have a certain level of technical user, or non technical user, let's say, and you say, Okay, now go to that black menu up at the top, some of them don't want to learn how to do those things. But it's all the UI is sort of extant and available to you, you know, the menu link to add a child page, you, you can set that up. So you can say, whenever I hit that link, I want to create this content type. So So you sort of have this like built in UI that you can use to your advantage. And then one really cool thing, I was actually going to an old site that is like a personal wiki that I have, because I had to remind myself some of the features too, there's a page you can go to, you can edit the hierarchy of the entire book. And you can have multiple books on your site. So just one book at a time. But and you can edit the title of every node in the book with a single button press,

Nic L  
I forgot about that. That's that, I

Unknown Speaker  
think, is the only place that I've ever seen in Drupal core where you can update multiple nodes at the same time without checking some boxes, basically.

Nic L  
There's also another hidden feature there that you're talking about. Like when you're adding a page, you're adding it contextually. And of course you can build this stuff with with custom code to but for example, you know, if you're looking at training, many times different subsections will have the same title. Like you might have, let's just say you have a you have a wiki that talks about all the different local development environments for Drupal , Lando , DDEV Docksil, etc. Right? Drupal console, each one of them might have an installation page, right? You're gonna call that installation. If you're using a normal entity reference, you have to like you enter installation, you have to know which of the 15 installation pages is the one you're trying to put it under. Whereas in in the book module, you just say, oh, I need to update something under installation, and Lando, you click on that, no click on installation, click Add page here. And it's going to reference it automatically. So, so there's, it's one of those modules that's deceptively complex, and, and solves the problem that you know, some people might go their entire career and not encounter it. Like if you don't work on sites that organize their data in this way, you're not going to think at the book module.

John P  
It's actually interesting, because right, as we're talking about this, I have a real world scenario where I may need to add like documentation to Drupal. Right? And I'm like, Huh, well, being able to kind of like easily add, you know, sub pages to certain sections, right, with like, would be helpful. So like, yeah, like, I can see a use case there. I think I'm going to think I'm going to take Chad's suggestion from the top of the show and possibly play with the book module more to understand it better.

Ryan P  
Just start thinking about when you're talking about that, John, even, you know, they're talking about the new concept in future Drupal course of having these sort of like, starter kits, I forget what the official name for them is, but not installation profiles, but like a starting point, like a default. Yep. I think of Commerce Kickstart as an example of something like this, where it's like, it doesn't just come with the structure, it also like adds a couple of T shirts to your store and stuff like that, to sort of like get you going, but like, almost like Administration section of your site, because there's the help pages. I don't know, who actually visits the help pages, but some sort of like a system where there's, you know, content about your site, like, what content types do we have, you know, what taxonomies do we have? How do I like to edit, you know, layout builder page, and you could sort of customize that to the site that you're working on. That would be a great sort of, like recipe to build that you could use as a starting point for a bunch of projects. And then the website documents itself and you're not like sticking things off into a separate internal wiki site or something along those lines. Yep.

Nic L  
Yeah, even if it was just like, here's how you add a content. Here's how you find a content type. Here's how you find content. You know, just like things that are fairly generic and

John P  
yeah, like, our use cases specific to like, building out pretty complex layout builder pages. So like having that documentation in there of how you use like different, different components to do that would be would be super helpful, I think,

Ryan P  
announcing a new feature of the next version of the webform. Module, it's going to come with its own book. Because webform does everything. Yeah.

John P  
I don't know if that's fake news or real news. But I wouldn't be surprised.

Chad H  
And there are a lot of different tools like if if we always come back to the fact that these are just solutions. And it's up to you to decide whether or not your problem matches this solution very well. And whether or not it will scale because you have to think about the longevity? How will our use cases potentially change? How will our information evolve? How will our structure grow with it? And how will this migrate to something else? How is it you know, portable, with not just what we need structurally but informationally. So I think it's very easy for some to also consider other tools, depending on their use case, menus are completely adequate for what you're trying to do. Even custom block types where you're just creating structures that are necessary for your specific use case. entity. Queues are Another popular way of getting something into a list that's very specifically sorted. I've seen people do crazy things with taxonomy, because that's just how they wanted to try to structure things. And it's not a matter of right and wrong, it's a matter of what's effective, what helps people manage these things. Another kind of user experience type of thing that I always want to bring to the forefront is, your end users can have a terrible user experience if your admin user experience is terrible. So if these are tools that are very intuitive, if there's plenty of documentation, if it's easy to train, if when you use it, it's not like pulling teeth, then people are going to use it. But if you create something super custom, even if it's really complex, and caters to your use case, and it's beautiful, from a development standpoint, if the admin user experience is terrible, well, it falls flat on its face.

Nic L  
there's, there's another benefit to using the book module when you're when you're doing that, because like you said, Chad, you can certainly build these experiences custom. And that's the the test coverage. Right. So, you know, the taxonomy module has test coverage entity references have test coverage, you know, the menu has test coverage node has test coverage, but but it's not, there's not test coverage for a unique combination that's essentially recreating the book module, like your Do you have, unless you're writing tests yourself, which to be honest, a lot of people don't fill out fully functional tests for their for their projects. If you're, you know, you might not be testing Kinect raise circular references adequately, you might not be testing, you know, is the RFU producing the order correctly, whereas the book module, because it's in core has full test coverage. So you know, that if there is a change introduced into core somewhere, that breaks how that relationship works, those tests will fail. And the core team will fix it before they push out whatever update they're pushing out. Where's those changes may not take into account your custom solution, you may you may burn for an extra hours fixing that. So you know it even though the book module isn't something that gets a ton of attention and updates, I think that's really because it solves the problem, it solves really well. And it hasn't needed to be tweaked all that often. But you do get those tests so you can be confident that the way that it works now is the way it'll work in the future.

Chad H  
Yeah, I think that just one one thing to tackle on there, because you're saying through the test coverage, it's it has maturity, it's existed for a long time in core, I think, if you needed support for it, or if you have a problem, you're more likely to find a solution than something custom.

Ryan P  
And am I right, Chad, like from a pure like low level perspective book stores its data in its own table.

Chad H  
I believe that's the case, I believe it's similar to like a menu or an entity queue or something like that. It creates its own tables for the sake of kind of saying here are the beginnings of the book. So like a vocabulary for taxonomy, something like that. And then here's the children the weight of those things and kind of the parental structure of each one of those items. Yeah, it's been a few years since I've looked at the table so forgive me,

Ryan P  
as it is part of ye oldie Drupal All like the form module, like as far as I can remember book module existed since time immemorial. Like, I've been doing Drupal for 16 years. And I think it's just always been there. But it was the era before fields were in core. And I don't know that a lot of people even remember that time anymore. But um, so so this is done in a sort of like, let's say the way that you might do it, if you were just a PHP programmer approaching a problem and not a Drupal developer approaching a problem

Chad H  
that has some performance gains, too. Like if if you need to index the contents of the entire book, that should be a very fast query, versus trying to pull that from entity reference fields. I imagine that is a lot of stitch together queries.

Nic L  
Yeah. Yeah, once you once you nest down, I mean, I remember I built a I forget why couldn't use the book module. But there was a, there was an online learning system that I use, where I built a pseudo hierarchy. And once you get down to like, three or four levels deep, those pages just for not performing whatsoever. But like, all my clients, you know, the clients that use it, especially for like, you know, city bylaws and stuff, those sometimes next time, six 810 levels, I mean, because they just, they just keep adding subsections to subsections. And, you know, they, they never had any performance problems whatsoever. So yeah, there's I remember the first time I started using book, or somebody suggested I use a book, and I think that might have been the first case was was that the bylaws? I remember installing it and starting to use it and be like, Why does this even exist? Right? For that very reason, because it's basically menus, taxonomy and nodes rolled into one. And I was like, why don't you just build this. And then, as I started to use it, I was like, oh, it just works out of the box, it's performing. And it's really easy to add content, and I don't have to teach them anything like, these. These are clients that will email me, you know, at the time would email me every month, like, oh, how do I update this content? And I have to remind them hit the Edit tab. But for whatever reason, the book, whenever they had, they never once asked me a question on how they had to update or edit the, the bylaws. So other than giving somebody new permission to be able to do it. But yeah, it's a it's a great little module, I think it's been, you know, it's been around as long as I can remember. But I highly recommend people give it a give it a look. If they haven't before.

Ryan P  
So I think was Nick who said something about taking color module out of core. One reason why when I saw that this subject was coming up, I was thinking, Oh, are they taking book module out of core? Like, I think is that true forum forum is moving out of core? Or there's at least talk about it. But um, yeah, it was what I was wondering is like, is his book, his book being sunset? Or like, put out to the pasture? Like, it's still useful, but not part of core anymore?

Chad H  
That's a good question. I think that'd be an even better question for the core maintainers at this point, but I think that's the, the area where we can all get really opinionated. And I don't know I I like kind of the the two different possible directions that Drupal as, as a platform as a framework, whatever label you really want to put on it kind of kind of takes it could lean, lightweight, and just have the bare essentials to start building kind of that toolkit, if you will, or it can be a little bit more flexible, like I think umami, or like you said, Commerce Kickstart those sort of things. It's a bit more feature rich, but at what point do you say this parts core this parts? contrib Yeah, and I think that's where the the community opinion and the steering of things kind of deviate. So there are benefits to things to being in core there are benefits to things being in contrib Where does footfall

John P  
the lack of use in my Drupal career if the book module leads me to think that contrib space would be a great place for this because I don't I don't need the overhead when installing Drupal. I mean granted it's probably not much overhead but like one more thing on the module screen when when you know searching for through 50 modules is one too many of you asked me

Nic L  
I mean yeah this surprise surprise you John because I'm a huge fan of Lean core. But it like I'm in favor of form moving out I'm in favor of color moving out.

John P  
Don't do it `Nic. Don't do it module belongs in court yet to hear.

Nic L  
I really do.

John P  
We can't audit here. How many like over the last three years? How many times if you use the bookmark Well,

Nic L  
I mean, I have three or four clients using it right now. But I think more importantly, I also think it's one of those ones that like Brian said, drupal.org uses it extensively. And I think that's a good. I think on some level, that's a good enough reason. I'm

John P  
not saying they can install it via contrib and use it

Nic L  
Yeah, I mean, I think it just solves. I think it's one of those modules that bedrock to a lot of people. But if it wasn'tin core it wouldn't get the attention that it needs?

John P  
I mean, I don't know. I just don't think it I don't think it suits a use case for a large number of sites, right. When I pulled Drupal off the shelf, like most of the time, I'm not looking to use the book module. I think one thing Ryan did say that was that is interesting, right? Is a starter kit built around book where you can say like, Hey, you need a documentation service, or you need a documentation, you know, library wiki or something like that. Okay, well, books gonna be in there, because hey, it's it. It's really good at that. But yeah, I mean, we could debate this for the next hour and a half to two hours, if we wanted to. And it would still be in core when we wake up tomorrow morning. So one thing I don't know that we've covered, or if we have I don't think it's been clear to me is Chad, where do you think the book module kind of falls flat? Or, or doesn't make sense in a use case, right? Like, if I'm like, building something, and I'm seriously considering book like, what are some pitfalls I may find? Or an area where I might have to say, nope, nope, don't want to use that because of XY and Z.

Chad H  
Yeah, it's the I grabbed the hammer and I looked for nails problem, even though I just found the screw. And now I'm using a hammer. First, a screwdriver, you know, the little claw part, I think the book module is going to be one of those things that falls very flat, as soon as you have the entire content of your website mutating, growing, changing over the course of time, and the book module isn't necessarily capable of keeping up with either the structural needs or the navigation needs. That's when it really is just the menu system, or just a collection of a little bit more clever things that you need to portray on individual pages, versus this repetitive sort of use case. And you can start grabbing a lot of these different ideas, that it's not about the problem that you have today. It's about the foresight of the problems that you may have in the future as well, it's a bit of both. So if you don't have a use case, right now, for book module, just leave it on the shelf like any other tool, just leave it on the shelf, know what it's good at. Notice, notice not good at, but there are a couple of things that it doesn't do. So a node can exist in two books. So if you have that use case, module is going to frustrate you. The first book page is the beginning of the book. So you can't if you haven't published that page yet, you can't add children to that book. It just saw something that happens with the book module like so if it's you have started a new book and you want to start it but you don't want it to be published until you have a few pages. Well, you can't do that you have to publish that first page. And the last one is that at least I was able to glean is reordering the book. If you move some stuff around, you're gonna have to clear the cache for that to be reflected to users, which isn't, in my opinion, that big of a deal. But you need to be aware of that if you have a really complex caching, setup, which some Drupal sites are like House of Cards when it comes to caching.

Nic L  
Yeah, I think there's kind of two other cases, too, that you have to keep in mind. One is similar to a page can exist in more than one book, you can't have those circular references. So sometimes you have a page that does need to show up in two different locations. You just can't do that with book, which is kind of a corollary of it can't be in two books, but you also can't do it in a single book, easily. The second thing, and this isn't something that I personally experienced, but I do remember, you know, it's one of those things that kind of stored in the back of my mind, and maybe it's not true anymore. But I do remember hearing about performance issues if we have a lot of little books or just a lot of books. So for example, if you try to if you have 200 books on your site, and you try to have a view that shows the list of books, I think it builds the hierarchy behind the scene. And so if you visit that view, you're going to bog down your site, you'll, you'll run into trouble. Like I said, This is it. That's one of those facts, that kind of vague memories of running into that issue when I was testing some stuff, so like

Ryan P  
the book was 200,000 pages or something?

Nic L  
Or vice versa? Yeah. If you haven't, I think that's probably less of a problem. I think it's a going wide problem rather than going.

John P  
Isn't that although, yeah, at any site, like if it has 200,000 pages, like you may have a problem when you try to get a query of all of them?

Nic L  
Yeah. Or if you try it as pages of other books, what you can do, I think, if you break some rules, I think that also runs into problems,

John P  
Break some rules. Oh, dear. So it sounds to me like you have to have pretty, pretty well organized data structure in order to use book effectively, right? So like, the book part of the site has to be like maybe like documentation or a wiki or something very specific. And then like, you can have other pieces of that site, like other content types for pages and, and things that are more like, outside of the like, kind of structure of that. Is that Is that a fair assessment?

Chad H  
It does work with any content type, though. So as you're not relegated to just the book content type. You can start with that. And you can kind of mix and match what what can be used by the book module. Right.

John P  
So I guess, I guess I was more talking about like, overall site structure.

Chad H  
Yeah. And I think that when it comes to some of the challenges that you might face with performance, like I could see using like a solar index or something like that, for the collection of books to kind of like, overcome that huge list. Again, you need to reindex and deal with caching and whatnot. But I think, you know, we have strong use cases for book where it obviously makes sense. And then you just deal with the challenges. Sometimes that might include installing some custom modules like, or contrib. Modules, like the layout builder kit, is one. So if you use layout builder, extensively, you want to be able to place those pieces within your layout, or the custom book block was another module that I came across that was really popular to kind of extend on those use cases. But then you might also have a really poor use case for book. So I don't think that you need to necessarily chase it. If it's a good fit, if it's a good fit for a lot of the reasons that we've identified, if not,

Nic L  
yeah, I will say it's one of those things that if I have a website that had a use case for book, in the book module that did not exist, it will be one of those things that will be deceptively difficult to build custom. It's just one of those things that you think about, like, Oh, it's just a content hierarchy. That's easy. I can build a view for it. And, and there's just so many little edge cases that the book module has solved and solved really well. That it's just a deceptively, I think it's one of those things where it solves the problem so well, that people think it is it isn't a difficult problem. And in that type of hierarchy, that type of relational data, or relationships is difficult. It in it, it takes on a heavy load. So as we as we get towards the end of the show, I think we're getting to another prediction. What do you guys think the future the book module looks like?

Chad H  
Think that if you look at how old it is, because of its age, it comes saddled with a lot of expectations from the community as to how it will continue to exist. And it's really hard to change that sort of precedent when you have such a large community backing Drupal. However, if something like the four modules coming out, and going to contrib, I could still see a bit of an argument to doing that. That the hesitation that I have there is forum doesn't need nurturing, it has enough usage and popularity that I think as contrib it would thrive and and be fine and the contrib community would be a okay with it. When you have modules like book, I don't know if it would necessarily thrive. I think it would need to be nurtured to maintain a level of health in later versions of Drupal. So that's, that's kind of where I land a little bit with where it might go.

John P  
It like that kind of begs the question for me, right? Like, if it moves to contrib and like nobody nurtures it, right? Is that okay? Like, is it something where like, you know, and this just kind of what this whole show has been about, is there a better solution to book like, it has a very specific set of, of use cases and tools? I just, I just wonder if that's like the, the, the next evolution of it right is like, hey, it's been kind of dragged along with, you know, Drupal six, Drupal seven, Drupal eight, Drupal nine, right? Like, if we put it out into contrib. And it it it, you know, it does flourish, and we see, hey, you know, there are like, 600,000 10,000 sites using this thing, like, okay, there's a spate, like there's a place for it, let's like, you know, keep it going. Or the reverse happens, right, like, we see like, A, there are two sides using it, you know, next and Chad site, are both using it, that's great. Like, maybe there isn't that much of a use case? So I, you know, I think that's a natural evolution. And, you know, I think as, as somebody who, again, has not used it very widely, I think, you know, I after the show, I see a use case for it. But I think I like to see it in in contrib, as opposed to in Drupal core.

Ryan P  
One thing I think about, you know, in my job when I'm doing solutioning, is like, we always have to ask this question, do we build it with Drupal? Do we build it with some other tool? Or do we take an off the shelf product, and there are a lot of off the shelf projects that do have this use case. But they also tend to be integrated into a larger hole. Right. So like, you know, Microsoft has their SharePoint thing. There's Confluence that, you know, I use on an everyday basis. You know, I'm sure if you go to any major supplier of business software, maybe, you know, Google Drive is really one of those weird exceptions where it's like, you manage it like a file, you don't managing it like a wiki. But, you know, and there's obviously there's Wikipedia, but how many, how many? Real, like robust installations of Wikipedia are there in the world? It's, it's a small number, but the ones that do use it are gigantic, right, and use it very well. And the ones that don't use it very well probably shouldn't have been on Wikipedia, they probably could have gone to something where they're like Octo press, like generating a static site out of markdown files. So you know, is does it make sense for it to be in Drupal? is it's a really good question. Like, I don't know that I have the answer right. Now. One thing I remember, I've used it for in the past, we're talking about like intranet sites, was actually there was an intranet site I worked on. And it also had organic groups. So it was like, organic groups would make a book for each group. I think maybe that's also how groups on drupal.org maybe has a functionality kind of like that as well, where you can sort of, like, have documentation related to each group. You know, it's like, if you have a really specific case like that, and you need to do it for I know, for example, like, let's say, Nvidia is a giant developer website. And they have 1000s and 1000s of people that have to go and use the NVIDIA documentation to figure out like, how do I make a graphics card dance? And how do I make it like calculate, you know, 10 billion calculations in a minute, or whatever the thing they need to do, you're getting to really robust documentation. But you don't want to know about any of the other documentation that's related to something else, because I'm just looking for this one thing right now, like,

Nic L  
or another driver version?

Ryan P  
Yeah, like, I don't know, in this particular case. Yeah, that's a really good, right versioning of things. I want to I just want to look inside this hierarchy. So there might be some some really, really good use cases for it. Does it belong in core? You know, that I think it's a maybe at this point, an existential question. We can't answer on this on this podcast. But it's a really good question. One of the things I think about too, is like, interactivity, you know, one reason why would we want to pull form out into contrib, is because the other solutions for forum cost money, right, and one of the huge advantages of something like Drupal is, if I have the time to manage it, I can. So if I want to manage my own forum and write my own forum software, and hack Drupal core, there's an open source way to do that. You know, if I want to have a monolithic site that has all my documentation in it, book is a really good solution for that. So I think it should exist. Should it exist in court? I don't know.

Nic L  
up with a lone champion from book staying in core, this episode, which is a departure because like I think form shouldn't be in core. I think that's a good move. I think it's and I think one of the reasons is that it just there are better other open source like there are some paid projects, but there's better open source systems for managing a form that you can integrate with Drupal. And form just doesn't get maybe if there was a team that developed form and added features and maintained it like maybe it, maybe it would do better in in the Drupal world. But as it stands, I think form is another one of those projects, it's really complex, very difficult to solve Spam. Spam is a major issue when you're managing that through Drupal. And it just doesn't get the time and attention that it needs to flourish in the Drupal ecosystem. But yeah, I mean, the most spam I've ever seen on a site is the one of the only sites ever use the forum module on an advanced form. And I remember that battle was that battle was lost before it began. But But yeah, I mean, the book module, if it's not something that you've used, if you're looking at documentation for a site, or some kind of some sort of article content, then definitely, definitely explore the book module, whether it stays in core moves to contribute it, the problem that it solves, it solves really well. So make sure that you keep in mind that it's a tool in your tool belt. Chat, I would like to thank you for joining us again, from from a new location and sharing which notebook module it's been a pleasure having you back.

Chad H  
Yeah, likewise, thank you very much for having me. I don't think that my wife and I would have been able to as easily move out to Canada. I think we were really ripe for change from from Baltimore. Image X has been a fantastic company to work with. worked with a lot of Ukrainians so if anybody's interested there's a donation link as well to help the Ukrainian image X team support them through what's what's going on over there. But it's, it's always fantastic to talk to you guys. I really love just ideating a little bit about how we can make Drupal better as a community and how we can learn and teach other people.

John P  
Do you have questions or feedback? Reach out to talking Drupal on Twitter with the handle talking Drupal or by email at show at talking drupal.com You can connect with our hosts and other listeners on Drupal slack in the talking Drupal channel. If you're interested in show news, upcoming Drupal camps local meetups and Chad Yes, this Chad book corner. Sign up for our newsletter at talking drupal.com/newsletter

Nic L  
you can promote your Drupal community event on talking Drupal. You can learn more about this at talking drupal.com/tvpromo.

John P  
And thank you patrons for supporting talking Drupal, your support is greatly appreciated. You can learn more about becoming a patron at talkingdrupal.com and choosing the become a patron button in the sidebar.

Nic L  
Chad if our listeners want to get in touch with you what would be the best way?

Chad H  
Yeah, so a couple of different easy places. I'm on drupal.org ChadHester, simple enough. I'm on Twitter, ChadkHester, and I'm on LinkedIn. You can find me there and what? Let me know what you want to chat about.

Nic L  
And Ryan, how about you?

Ryan P  
Yeah, I go by Liberatr with the web 2.0 spelling. So you have to take the last vowel out. That definitely was a time and place for trying to get reserved keywords. So usually, I'm that drupal.org, Twitter, Instagram. I do exist on LinkedIn. Also small plug the funding module, something that I've been working on as a community project to try and get the button to make donations to a project on drupal.org. We're kind of waiting for drupal.org to upgrade off of Drupal seven, but hopefully that will be coming soon.

Nic L  
Very cool. And John, how about you?

John P  
Awesome. I'm John Picozzi. You can find me on all the major social networks at JohnPicozzi as well as drupal.org and you can find out about epam@epm.com

Nic L  
You can find me online pretty much everywhere at NICXVAN

John P  
and if you've enjoyed listening, we've enjoyed talking. Have a good one everyone