Let's talk about Drupal 8. That's what we're doing today. So who's got this kind of attitude? Wow, nobody? This is gonna be really easy. Okay, a few people, yeah. It sounds like it's gonna be so different than what we're used to. How am I ever gonna learn that? But from everyone else, this is what I'm hearing. Finally, not weird. Does this mean I can actually learn it? Finally, can we actually get non-Drupalers working on Drupal? And I'm happy to say that the answers to both of these questions is yes, and I'll take care of the first half of this today. The key thing is that the more things change, the more they stay the same. Quite simply, the concepts are still Drupal. The idea of nodes, of views, of fields, of pages, of blocks are all still there. A lot of the code for it has changed, but the concepts that make Drupal Drupal are all still there. There's only an hour-long talk and we're starting a little bit late, so I'm gonna be focusing on broad strokes. Don't try and look at specific API syntax I show you. Please focus on the concepts and themes behind them. You can look up the APIs later. That's what documentation is for. The goal here is to get a feel for the modernized architecture and see the consistency in the APIs so that when you then go to learn things yourself, Drupal 8 makes sense to you and it'll flow naturally. So let's start with just enough theory. This is how any PHP 4 application was built. In the back, it might be a little hard to see. You start off PHP boots, you've got a bunch of superglobals and you have your code that does stuff and stuff is a fan theory of saying I'm gonna print a bunch of strings and call the header function to generate HTTP headers and hope I do it in the right order, otherwise PHP is gonna break. And that's how PHP 4 applications are written and that's how Drupal is written despite its version requirements is fundamentally a PHP 4-based system. Whereas HTTP, as in the web, actually works like this. A request message comes in, your server does black magic of some kind and a response goes out. These requests and response are messages. They are structured objects. They are not just blob of string. There's a very clear pattern to them. And that's the model used by the symphony HTTP kernel components, which is now the core of Drupal 8 as well as about two dozen other systems where you've got a request object that you never touch superglobals again in Drupal 8. If you use a superglobal in Drupal 8, you're doing it wrong. Instead, we've got this request object that comes in that represents the incoming request and then we have an object called a kernel. HTTP kernel that does black magic and outputs a response that gets sent back to the browser or to the client application or whatever. And everything Drupal does is inside here. That HTTP kernel interface is very, very simple. This is the entirety of that interface. It's a single class with one method that takes a request and returns a response. And a few other things we can ignore for right now. That's it. So we're done. Go home. Okay, not quite. You can have any implementation of this interface you want and, in fact, as of about three weeks ago, you can stack them in Drupal 8, which is awesome. The main one we're using that is that the main core pipeline of Drupal is the symphony stock HTTP kernel implementation, which, again, might be a little hard to read here. If you've got a request, comes in. The first thing that happens is a request event is fired. An event is basically the symphony version of a hook or, rather, hooks are an event system written for PHP 4. So you can kind of think of the request event as hook request alter. Same kind of idea. And various things happen there. Most importantly, routing and access control. And we'll cover those a little bit. And the job of routing is to determine a controller. We used to call those page callbacks. Now we call them controllers. Same idea. Then there's a controller event that fires, which hook controller alter, essentially, which, in practice, I doubt you'll ever use. I mentioned it for completeness, but in practice, it can be extremely rare for contrib developers to have to use that hook or that event. And then your controller fires. The controller is the callable thing that is responsible for this request. There's a standard terminology from other web architectures. If you feel like talking in MVC terms, it's the C from that, but don't talk in MVC terms because that's wrong on the web. But that's another story. Your controller can return a response. And then you're done.  Or it can return something that is not a response. Then a view event fires, which is things registered like a hook that will take whatever that is and try and turn it into a response.  And that's where all of the page rendering happens. Either way, then get a response event. Think hook response alter. This is where we can add cash tags to headers to the response. This is where we can do a lot of other black magic there, take care of standardizing response codes and that sort of thing. Then the response gets sent. And then we have a terminate event. Hook exit, essentially. So conceptually, it's not that different than what we've been doing. It's just structured in a much cleaner fashion. Instead of a whole bunch of steps that are hard coded together, it's a framework into which we can put steps. And those steps are very similar to what we've been doing before. It's just a much neater organization for them. So controllers, I mentioned that a couple of times. We used to call these things page callbacks. In Drupal 7 and earlier, we had a function that was responsible for the body of a page. Now we have any callable thing. Callable in PHP is basically a thing you can stick parentheses after and PHP won't complain. So a function, a method of an object, a static method of an object, an anonymous function, and so on. In practice, in Drupal 8, you will 99% of the time be using a method of an object. So here's an example. Controllers do not need to get any more complex than this. The method here is the controller. Again, the method is the controller, not the class. And we return a new response object. And we give it the body that we want to turn. Which is the entire HTML page. Who's run into the problem in Drupal 7 where to take control of the page, you have to print something yourself and then call exit or return null and the system somehow magically knows that it's not supposed to actually then try and theme... No, forget that.  You're in control. You will rarely do that, but you can. You can also... There's various other response objects you can send. They're just subclasses. Like in this case, we're returning a JSON response. So we build up an array that is something we want converted to JSON. Doss it into a JSON response and that gets sent. It gets converted to JSON. The correct HTTP headers are set so that the content type of the response is set to JSON instead of HTML. All that stuff gets taken care of for you. And again, note, two methods in the same class, separate controllers, totally cool. We can get a bit fancier with it.  And we want to create a streamed response. A streamed response is something that will send data incrementally. So rather than, say... In this case, we want to send a CSV file back. We could take 10,000 records out of the database and build up a gigantic string that is their entire CSV file and pass this gigantic string around and chew up tons and tons of memory and finally print it. Or we could say, on this streamed response, it's gonna be a CSV file. And we set our callback that will get run when we send the response. It's an anonymous function. We have access to that data and just print out the data for that CSV one row at a time. This way, we still have access to the view event, the response event. All the caching still happens correctly. Drupal still takes care of all of the HTTP handling for you, but you can stream out two gigabytes worth of data without having two gigabytes worth of memory usage. Anyone else think that's cool? Someone does, okay. So you can do a lot of things like this for more esoteric cases that used to be crazy hard, now they're crazy easy. You can, of course, just return a string. If you return a string, then that is the body of the page. Thank you, goodbye. Go home. Just like returning a string from a page callback. What you're most likely to return, however, in the majority case, is a render array. We have not completely destroyed render arrays in Drupal 8. I apologize. They're still around, but hopefully you can use them much more simply. So in this case, we return a render array that has a theme key and whatever the other values are going to be for it. We'll cover this in a bit more detail in a bit. And that render array will get rendered and there's your body of the page. This is what you'll do most often. And most often, your controllers will not be much more complicated than this. Your controllers should not have significant logic in them. You can also pass parameters in. In Drupal 7, in hook menu, you would specify, you know, percent, percent, percent, percent node, whatever. And you have to match things up in order. In Drupal 8, we're doing things the symphony way, which is we have our controller, which has these two parameters, and the request. So the request will just get magically passed in to us. We'll have access to the request object if we want it. If we don't need it, it won't get passed. Magic. And then we just return, you know, a render array for some template we define with those values. And then we hook it up to a routing system, which replaces hook menu, by saying, all right, we've got this route, which is mapping from incoming request to controller. We're going to call it Hello World. We're going to say it's at the path Hello World curly braces from curly braces to. This is actually an IETF standard for doing URI templates. So this is not a symphonyism. This is an internetism. And you can specify, you know, the content callable is that method of that class. You need the access content permission to get to it. And these have to be strings. You can restrict them with regular expressions. Say these have to be strings. Now, one thing to note here. I've got the order here as from to, and here is to from. Does that matter? Is that a bug? No. It matches on name. You can put your parameters in whatever order you want. You line up the names, which makes the code a lot more self-documenting. All right. Larry, stop talking. Tell me something useful. No one's going to laugh at that? I thought you were going to be thinking that by now. Anything you do in Drupal, or most things you do in Drupal, are going to come down to a two-step process. Build some kind of tool and then wire it into the system. You don't solve a problem directly. You build a tool that will solve it and then wire it into the system. You connect it in. In practice, that generally means you're going to implement an interface and tell Drupal about it. That's it. That's everything you do. Is that. Create a class, extend a base class, and tell Drupal about it. So how do we start off? How do we define a module? Well, use to have an info file. Now we've got an info YAML file. YAML is a widely used text format. So it's no longer proprietary Drupalism. This is a standard format used by hundreds of projects. The information in it is pretty much the same. We have a module called Hugs because this is me we're talking about. We have a description for it. We have to specify the subtype module. That's really the only thing that's changed. Specify its core version. There's various other properties here, exactly the same as in Drupal 7. There's short talks. I won't go into those in detail. And that's it. It now shows up on the modules page, which means for the first time in Drupal history, the .module file is not required. And now we have a module. Great. Four lines of YAML and we have a module. Done. So how do we make a page? Well, as we said, extend the base class, wire it up. So let's start by creating a controller. We're going to create a Hugs controller here. It's going to go in our module slash source, SRC, controller, Hugs controller. That's the name of our class, which maps one-to-ones the namespace of it. Drupal, our module name, controller, and the classical Hugs controller. This is using the PSR4 auto-loading standard, which means this class will magically become available to PHP the interpreter when it needs to, and you never have to think about when you need to call require or include again. It's all just taken care of for you. Just put things in the right place. We're going to extend this base class, which gives us some nice utility methods, and we have our controller. It's going to take two parameters, two and from, and we're going to return a translated string. That says, from sends Hugs to, to. Great. Notice we're not calling the T function. We're calling a T method, which is a method on this controller base class. It's exactly the same way, but because it's a method, it's abstracting out some logic behind the scenes to wire things together, which makes code testable. And then we tell Drupal about it. We have a routing file. We say, all right, at the path, hug slash from to, we want that controller we just defined. We want the page to have a title of hug, and you need to have permission to access content. You can't get hugged unless you can access content. And boom. Done. We have our site slash hug slash Larry slash Drupalcon, and it says, Larry sends hugs to Drupalcon. Is there a Drupalcon here I can hug? Okay. Done. We've just created our first page. One class, one YAML file. Create a class, tell Drupal about it. Of course, we want to make it themeable because we don't want Morton DK angry at us, at least I don't. So hooks are still there, but they're far less used. So we have got hook theme. We're going to define a theme item. And it works essentially the same way as it did before. We're going to create a theme key called hug page. It has two parameters to it, from and to. And if not specified, they just get null as value. And the template file is hug page. And so we stick this in our .module file. Okay, fine, whatever. The template, however, looks like this. So we're putting it into a template directory for organization. And it's called hug page.html.twig. Who's heard about twig? Anyone who doesn't have your hand up, there's plenty of twig sessions for this conference, please go to them. This is another, it's a third party template language used by a number of PHP projects. It's written by the same lead developer as symphony itself. And you can do string translation in it natively. It's awesome. So we're going to make this a section tag. And we're going to make this string translatable, just as if we had called t on it. And we just plug in our parameters. And then change our controller to say theme hug page from two. We're just returning a render array. This is it. All of the display logic happens at the display layer. Where it belongs. Where your themeer can modify it without coming back to harass you, the module developer. And everyone is happier.  We've got a strong and an italics. Great. The themeer wants to change it, change the markup, add classes, do whatever. They don't have to override the template. They're good. They never have to talk to you again. I like talking to my themeers, but they don't always like talking to me. All right. Forms. How do we make a configuration form? What do we say? Extend a class, tell Drupal about it. We first have to define our configuration. This is the new configuration management system. In Drupal 7 there was no configuration system. We had variable get and variable set and variable set. In Drupal 7 there was no actual configuration system. Sometimes people use them as such. But it wasn't really. Beyond that, you were on your own and had to make your own SQL tables. This was bad. Anyone who has wasted more than 100 hours of their life with the features module? Gone. Problem solved. Instead, there is a standard config system with configuration objects. We have a file in our config install sub directory. It has one property in it. Default count of three. We're providing our default values right there. When you install the module, this file gets copied into Drupal's active storage and never touched again. Now you've got your default present in the system as soon as you install the module. You also need to define a schema for it. There is actually a standard YAML schema format. I'm not familiar with it in detail. This describes your config file. This is mainly for translation. You can tell Drupal which strings in my configuration are supposed to be translatable, which means if you turn on your translation modules, of which there are only three, your configuration becomes translatable too, unlike in every version of Drupal ever. All right. Now we've got our configuration defined. So let's set up a config form. There's a number of base classes. For this one, we want config form base. So instead of using a callback function, it's now a class. So we've got config form, extends config form base. We specify our form ID explicitly. And then we've got a build form function, which works pretty much exactly the same way as form builder functions worked in the past. So, you know, form array definitions are pretty much the same. Except, oh, yeah, number. We now support all of the new HTML5 fancy form elements. They're supported in FAPI. So in this case, we're going to create a number element. We're going to give it a title of default hug count. And the default value for it is going to be our current configuration hug.settings, default count. Hug.settings, that's the file we created just a moment ago. So we're loading up that config object to our system. And we're setting that as the default value. Just like you would use variable get in the past. And then there's a validate form method, optional, and a submit form method. On submit form, you get the form object, just like you have in the past, and form state. By the way, form state is now an object. It is no longer a gigantic array of who knows what. It is a defined object with methods on it, and your IDE will auto-complete it for you. Thanks, Tim Plunkett, for that. So we let the parent form do what it's going to do. We load up our config object. We set our value on it off of form state with this nice get value method, so you don't have to guess where things are going to be. And then we save it again. Done. Almost done. We find our class, we tell Drupal about it. In our routing system, we said, all right, hugs.config, that's the name of our route. I'm going to put it at admin config system hugs, just, you know, nice place in the admin section somewhere. And we're going to say it's a form with this underscore form, and that's the class. This is the equivalent of, you know, page callback is Drupal get form and page arguments is the name of the form. This is a much more direct way of specifying that. And so we're saying this form, we're going to shove at this URL. And you need this configure hugs permission for it. Oh, yeah, permissions. You can define those in YAML now, too. So we've got our permission machine name, which has a title and a description. Just like it did in the past, it's just in a YAML file instead of in PHP code, which means it doesn't need to get reloaded on every single page request. And we also put it into the menu. This is yet another YAML file to tell a different subsystem about something. In Drupal 7, HookMenu did about nine different things. And so, you know, it was impossible to deal with menu links, but not the menu routing system and, you know, to have actions and why were those in there. We had far too many things integrated together. Those have all been pulled apart to separate systems now in Drupal 8. So we create a menu link. We have the same name as our route, that's fine. And it has a title, description. The route by name that it applies to. And it's parent. We explicitly specify what the parent is rather than trying to guess based on the path. So a couple of the lines of YAML. And here we go. There's our new menu link that points to our configuration form and has that one form field on it that we specified before. And it has the default value we gave it. And a save button. Great. Push save, we're done. Just like, you know, system settings form in the past. One other note. This is an HTML5 number field, which means if you're in Chrome, you will not be able to enter a string. If you're in Firefox, they still don't actually support the number field. I don't know why, but when they eventually do it'll work. In the meantime, that'll still get enforced on the server side. So let's go ahead and use HTML5 elements all over the place. Use the new form elements. Now we modify our controller to say, all right, we're gonna take a to and from and a count. And if there's no count or if it's zero, then we're going to pull out of, we're gonna load that config object we had that we defined before. And we're going to get that default count value. Same thing as doing a variable get, same concept, and make that the default. And then hug page, we just pass three values to. Again, all display logic goes in the template. We modify the route for that to say, all right, it's at hug from to count. And we do these two other things. Under defaults, we can provide a default value. If count is provided in the URL, it has whatever value that is. If not, its value is gonna be zero because we said so. Anything in this list here and anything from here are what you can get passed to you in your controller. We're also gonna say count has to be a digit. It has to be a number. It has to match that regular expression. So if you go, you know, slash hug, slash larry, slash duplicon, slash hi, you'll get a 404 because there is no such page that accepts a string there, only an integer. You can do other regular expressions there too. So if you've only got two or three legal values, you can specify those just pipe the limited. It's a regular expression. And then only those three values will ever get routed. You don't need to check out for that in your controller anymore. The routing system takes care of it. So we modify our theme. Just add another property. And, oh, my God, we can handle plurals in the template too. So if there's one, if count is one, then we use this string. If count is plural, we use that string. In this case, all I'm doing is adding an s on the end because that's all I need to do. If you want to do something different, have fun. For far more on this capability, go talk to Morton. He's giving a session. And now we go to slash hug, slash larry, slash duplicon. We don't specify any count.  We get an s on the end. If we do specify one, specify only one time, because I'm in a bad mood today, I'm only going to hug duplicon once. Then we get one time. And again, all of that logic is overwriteable, including not having plural handling. It's entirely up to the theme. Blocks. The other major thing. Who has worked with the block system in Drupal 7? Who understands the block system in Drupal 7? A lot fewer hands. Okay. We need to back up a little on this one. Definition. A plugin. We've heard about the plugin system in Drupal 8. A few people. There's a session on that, too. I love going as the first slot from Joe Schindler. It's an excellent session. Go to it. It's all about plugins.  User-defined meaning a user configures it to work rather than it just magically being part of the system. A plugin type is a category of interchangeable plugins. So think views. You have style plugins. View style plugin is a type. A plugin is an individual implementation of that. And then discovery is the concept of getting a list of all the style plugins. Figuring out what modules are providing. Put another way. Plug-in type is an interface. A plugin is a class that implements that interface. And discovery is find me all instance of. It's a little bit more complex than this. But conceptually, this is all it is. We're just abstracting good OO practices to make them easy. In Drupal 7, if you wanted to have an extensible system, sometimes you had info hooks, which may or may not have magic callbacks. Otherwise, every system did it differently. You want to add a new text format? It was different than how you added a new block. It was different than how you added a new... I don't know, what other things are extensible. Image style. Everyone reinvented the wheel themselves. If you were lucky and contrib, someone used the Ctools mechanism, which, ugly as it was, meant to integrate with features, you hope. You know, Ctools plugins, they work is about the only thing I can say about them, and I'm quoting the Ctools plugins team. It's old PHP 4, you know, insanity. Nothing in common between these different systems. In Drupal 8, if you want to expose user configurable logic, as in users can configure which of these things to use, you want plugins. That is your answer. That is the answer you want, always. You define an interface that is, you know, your plugin, how you want it to work.  That's what you do every single time. It's very consistent. Learn once, apply everywhere. I love this line. If you want to expose user configurable stuff in your modules, you use plugins. That is the answer. If you want to plug into some other system, you use plugins. That is the answer. What's plugins, Drupal 8? Almost everything. Anything that users can configure should be a plugin. The important part is that you're going to minimize the number of products and your current time for beta, not because it shouldn't be. So, actions, blocks, text formatters, everything in field API. Who knows all seven field API callback functions? Because not actually hooks. They're callback functions. Who knows all seven? Exactly. For the recording, nobody raised their hand. Now, plugins, which means you're going to look at the interface So conditional logic can be done with plugins. Editor extensions for the new in-place editor. Entity reference selections, rest resources, all of these things, the new tour system, views. All of these are using the same underlying system. Learn once, apply everywhere. So what does this look like in practice? So this is our block. We're gonna put it in the plugin namespace, and it's a plugin of type block, and hug status is our class thing. The location matters. In most of these cases, there's a convention around where you put things, but it doesn't actually matter. In the case of plugins, it matters. Just put the file in the right place, and Drupal will find it. So we've got hug status, extends block base. We've got a base class, extend it. And we've got a build method, where we return a render array that is the body of the block. Cool. That's the sense of our code. And we have to tell Drupal about it. In this case, we don't use YAML. We use an annotation. An annotation is metadata about the code put into a comment, because PHP, the language, doesn't have support for annotations natively, because PHP sucks like that. The number of languages do in PHP, we have to do it in the comment. This is not documentation. This is definition. Essentially, it's the same information that the language would go in an info hook. We're defining an ID, so we have an at block, specifies what type of thingy this is. Our ID is hug status. We give it a label, it's a translatable string. We give it a category, which is a translatable string. And that's it. This is the entirety of what you have to do to make a block. It now shows up on the block admin page right over here, in the system category, you create a new one of those, because you're instantiating it. You put it into the sidebar, hit save. You now have a new instance of that object, new instance of that block that will show up in the left sidebar. Guess what? You can make two or three or four or twelve of them. You can finally, for the first time in Drupal history, place a block multiple times. It's fascinating the things people actually are plotting for. So you care about not using features, and you care about placing blocks multiple times. Got it. All right, let's make that block configurable. Add a couple more methods. These are in the base class. They've got default implementations. It should be familiar. We have a default configuration where we've got an enabled property, which is a value of one, or true. Block form works exactly like a form build. And so, all right, here's our form-enabled checkbox field. We give it a title, and we get our configuration out of the disconfiguration array. That's the default. This is the current value. So first time, it'll be enabled by default. Block submit. We save it back as a boolean to configuration enabled. And actually, it'll save automatically for us. And then we modify our build method to say, all right, if the block is enabled, then we say now accepting hugs. If not, we say no hugs. Sad face. And we return that markup. And then on the configuration form, we now get that additional checkbox. It is, in fact, possible to override this entire form. Don't do so. Most of the time. You may occasionally need to do so, but most of the time, you shouldn't. But you could by just extending the right, and that's all you need to do. Everything for that block is in one small class. Right there, and if you look at the parent class, it'll tell you exactly what you can do and what you need to do with it. That's just good object-oriented code. Services. Services, what's that? Are we talking about web services? No. We're talking about service objects, which is an object that does something useful. And it is stateless, which means if you call it once, you call it 100 times, you get back to the same results for the same input. Think of it as a, you know, a pure function that's been in any of my functional programming talks. Okay, no one gets that reference then. But it's a class that you can reuse as a tool over and over again. Generally, there'll only be one of them, but it's not a singleton because it does not enforce that there's only one of it itself. The system takes care of that. So let's create a service called HugTracker. We're gonna keep track of how many times something's been hugged or what's been hugged. And we're going to take, you know, as a constructor parameter, the state system. What's the state system? The state system replaces variable get. Variable get, variable set are no longer there. If you want to just store key values, use the state system. If you want to store configuration that you want to be pushed forward from dev to stage to production, use configuration. If you want information that does not get pushed and is not part of deployment and, you know, changes on live and it's supposed to change on live, like last time Cron ran, you don't want to deploy that. Or the number of times someone's been hugged, you don't want to deploy that. That's state information for the system itself. It's just a key value store. And so we've got on our service a method add hug and we record to the state this key and that value. Hugs last recipient and whoever we just hugged. And then we've got to get last recipient where we get that value. Note this means we're abstracting around the state system. This is a good thing because this service, this object means something to our module. Someone reading the code, looking at this class being used, can understand what it's trying to do rather than just, oh, it's reading something out of state. What does that mean? We can't say, oh, I'm getting the last recipient hugged. And then we tell Drupal about it. Notice a pattern emerging. Hugs.service.yaml. This is where we wire up all of our services. It can get fairly involved. This is using the symphony dependency injection container. So there's a lot of functionality in here. Basics for now. We've got a services key. You can also specify parameters. Our service is hugs, our module name, not whatever you want. Name, space, or periods. It's a class called Drupal HugsHugTracker and takes as an argument the state service. And that tells Drupal when I ask for the hugged service, also go instantiate the state service and pass it in. And you just take care of that. I don't want to deal with it. Drupal, you do it. Then in our controller, this gets a little bit more verbose. In our controller, we have a constructor which takes the hugged service, the hugged tracker service, and saves it to a protected value. Same way. But how do we tell Drupal we need that? Well, controllers are not registered in the container because there's way too many of them to do that. So instead, there's this static method called create, which if you define it, that gets called to create your controller class. We do this in a number of places, blocks through it too, works on forms as well. And so it gets passed the container and you can just return new instance of this class, that's what static means, and get that service out of the container. There's no actual magic happening here. This method gets called, it's a factory, it gets given the container. We pull a service out, we pull a value out of the container, create a new instance of this class, and return it. And then Drupal will dutifully call the hug method on that object. Great. So every time we get hugged, we add the two person to the hug tracker. Whatever that username is, whatever that string was, we save that. And then same code we had before. If, you know, except that it falls from the end of the thing and so on. Then in the block, we can do the same thing, except this case we have to implement another interface for it, which lets us do exactly the same thing. So plug-ins have a couple more parameters to pass through, just pass them through and ignore them. It's part of the internals of the system. And we pass the same service in, save it to a property. And then in our build method, we can say, all right, if the block is enabled, then get the last recipient's name out of that hug service and make that part of the message. And now our block says, Drupalcon was the last person hugged. And if I went to some other page, it'll say that it'll keep saying that until I come back here and hug someone else. So that's the architecture part. That's all Drupal framework-y stuff. But Drupal is a CMS. How do I actually work with content? What happened to nodes? Well, I started about entities in Drupal 7, but they were kind of half-baked if I'm being generous. An entity is simply storable content with an ID. Storable content with an ID is an entity. Content entities are fieldable. Those are the kinds we're used to, like nodes. You can put fields on them. There's also configuration entities which are not fieldable. They're a useful shortcut. We talked about those directly, but the configuration we were talking about inside of a block, that's a configuration entity. Again, probably not going to deal with those directly, mostly just through plugins. And the actual API works now. So if you work with the entity API in core in Drupal 7, I apologize. If you work with the entity API module in Drupal 7, I apologize a bit less. If you work with the entity API in Drupal 8, awesome. So content entities are the things we're used to being entities. Nodes, users, taxonomy terms, comments, and so on. So let's go ahead and create an article node. We're going to give it a title of my post. It's an article. We're going to give it a nice body. Hey, look, a wissy bag built in. We're going to give it a couple of tags, Drupal Symphony and PHP. Cool. All right. Save that. Let's make a new controller. We're going to put it at slash node slash node object slash hug.  We're going to say our controller for it is this hugs controller node hug. Need access content permission. Great. All right. Whatever. And because our parameter is called node, and because we have the node, we're type hinting the parameter, it'll get automatically upcast to an actual node object. Same kind of parameter conversion that we have in triple seven is still there. It's now triggered by an interface on the entity. So, boom, you have your node. Node is an object. It's a class object. All entities are class objects. They're no longer arrays that happen to use arrows, which means they are structured. There are methods on them that mean something. So on nodes, we can say, is this node published? No. Rather than remembering the name of the property and hoping that it's set correctly, no. There's a method for it. There's a method to the madness. Oh, you want fields?  Everyone who's actually tried to do so. Do you remember actually you're supposed to use field get item or field get items? Who actually remembers to do that? My hand is not up. You just access it directly. Node, body, and grab the value off it. Body's the name of the field. Value is the individual property out of it. Oh, which is the same as body zero. What is going on here? How does that syntax make any sense? We're using the PHP magic get and set methods to dig in and grab these objects. So body here is an object. Whoa. Sorry. There we go. Yeah. Body here is an object. Actually, it's an object that also implements array access. So if you want a specific index out of a field because all fields are multi-value, specify it. If it's a single-value field, you don't need to specify the zero it's assumed. So those are exactly equivalent. This makes the code way easier to read. But you don't want the raw value because that's unfiltered. Print that and you've got a security hole. And then you've got a text. So just access that. And that gives you, on the fly, the processed value for that text field. You want to, you know, field tags, let's say, that's a reference, iterate over that. For each one of those, because it's an entity reference field, there's an entity property that gets you the actual object. And it does some fanciness behind the scenes to make it not slow. And we can get the label off of it. What's label? No title or comment subject because all of the different names, they're all called label. Any entity you're being pointed at, label is the method to get the human readable name. Nice and consistent. So let's just build up a list of the title of all those terms. Great. Then we create, you know, string. Everyone get hug name because reasons. Our reasons, so let's implode those terms. The name, node getOwner. We could do node arrow, what is it? Author is the field name? I don't know. But to node, we know that property is going to be there always. So we've got a method that makes it easier. GetOwner, we know it's single value. And we can get the label. This is the username of the user that authored that node. Nice and compact. And build up a string. Give it a title. And a markup. And we return that. If it's not published though, we just send it back a message. This is horribly contrived. Don't actually do it this way. Use a template. I just wanted to show off the entity API. Because the entity API is really nice. It's worth showing off. I believe Fago is doing a session on that later as well. Yeah. Put that in a template in practice. But here we go. We've got our title. And we've got our body that we created. And we're good to go. And notice it's living at node slash one slash hug. Awesome. So let's review. Drupal in two steps. Build a tool. Wire it up. That wiring will either be YAML or an annotation. When do you use which one? Here's a tip. If you are telling Drupal what something is, that's probably an annotation. If you're telling Drupal where to put it, that's a YAML file. That's not a hard rule. That wasn't even deliberate. But I found that's a pretty good approximation of what you're supposed to do. If you're describing the thing, if you're telling Drupal what this thing is, annotation. If you're telling Drupal where to put something, YAML file. General guidelines to keep in mind. Keep your classes small. Keep your classes single purpose. Keep your classes focused. And your methods should be even more focused. Your code should read nicely. Just looking at the code you should be able to tell, this does one thing and does it well. I'm not doing two things. I'm not doing four things. I'm doing one thing and doing it well. That's the job for a method and for a class. Break things up, wiring them up in the service container makes it easy to break things apart and then assemble them on the fly as needed.  All the logic of your module belongs in a service. The controllers are simply glue code. So if you're used to having a 300 line page callback, please stop. Don't do that. Move that logic into services so it can be reused and then have a controller that simply takes parameters, calls a service, passes stuff off to the template. That's all your controller should do. Your business logic belongs in your services. That's where the actual meat of your module is. Blocks too. You should just be dealing with putting stuff on screen. Templates and services should handle your display logic and business logic. One other thing. I spent probably $1,000 in Drupal 7 building a nice new, complete, easy to use database layer. And I'm going to tell you in Drupal 8, please never use it. In Drupal 8, there is almost never a reason for you to touch the database yourself. If you want to store information, you've got entities. You've got configuration. You've got state. Your odds of needing something other than those are really, really slim. If you don't want to use the state system, you can use any key value set, actually. So you can have your own key value index independent of the core state system. That's fine. Configuration, entities, and key value. Why? All of those are pluggable. You can change the backend on them if your code doesn't break. If you touch the database yourself, I can't run your code on MongoDB. If you just use entities, configuration, and state, someone can use your module on MongoDB without ever talking to you and it just works. They can move portions of the system to Cassandra. They can use a mixture of SQLite and Postgres if they want. Your logic should not depend on the storage engine. 98% of the time, if you're writing an SQL query yourself in Drupal 8, you're doing it wrong. Please do not use my API. And also, if you find yourself trying to unit test your code, and when I say unit test, I mean PHP unit, which is worth a whole session on its own, not simple tests, and it's hard to do, that probably means your code is too entangled. Refactor it. Break it out in separate classes. If it's hard to test, you are doing it wrong. It's a good guideline to have. And that is Drupal 8. Thank you. Once again, my name is Larry Garfield. I'm a senior architect with Palantir.net. You can stalk us on Twitter. We do have a newsletter. It's very lightweight. These slides will be online very shortly. I'll be tweeting them from at Krill and from at Palantir. Please do review this session on Drupal.org and on joined in. We have a joined in account. This session should be listed on joined in. Please go review it there, too, or there instead. And I think this is the end of the session, but if you have questions, I'll be hanging around up here for a while. Thank you.


Alginate is a natural polysaccharide that has been used extensively in biomedicine due to its excellent biocompatibility and biodegradability. It can be processed into three-dimensional scaffolds such as hydrogels, microspheres, microcapsules, sponges, foams and fibers, making it suitable for drug delivery and tissue engineering applications. Alginate-based biomaterials can also be modified by chemical and physical reactions to achieve desired properties, such as tuned degradation rates, mechanical strength, gelation properties and cell affinities. Recent advancements in the use of Alginate and its derivatives in biomedical applications include wound healing, cartilage repair, bone regeneration and drug delivery. These applications have potential in tissue regeneration and could lead to improved treatments for patients. This article was authored by Changin Sun and Huaping Tan.


Hello, I'm your host Alex Freeberg and this is the Alex the Analyst show. Thank you so much for joining me today We have a really good topic or at least I think so We're gonna be looking at kind of some paths that you can take to become a data analyst And those are self-learning boot camp and getting a degree now when I say self-learning I don't just mean that you don't have a degree at all. Maybe you are also Transitioning from a different degree that is completely unrelated similar to mine boot camp, which is either an online boot camp or you know An in-person boot camp or getting a degree and that's either a bachelor's or a master's and I'll kind of talk about that Once we get there. I want to say up front before I start this All of my kids are asleep and so I have my monitor right here and I may have to run they have been kind of restless Tonight for whatever reason so just wanted to throw that out there before we get started Let's take a look real quick at the really high level pros and cons of each one right, so for the self-learning one it The that really good thing about it is that it's cheap. It's super cheap. You can do it basically for Free if not very minimal costs like under $200 which is insane if you consider how much money You could be earning as a data analyst. So if you spend $200 To learn all the skills to become a data analyst and you land like a even a $50,000 job That is an insane Return on your investment like absolutely insane the difficult thing about it is sometimes it can take a long time, especially if you're not somebody who is very good at Progressing and making sure that you're learning the correct things I think another thing that's difficult about it is you sometimes you just don't know what you're supposed to know Like you don't know what to learn you're learning kind of random bits and pieces of different programs or softwares or you know coding Program I said that already Programming languages is what I was trying to say, you know You're kind of scattered and you're not really focused on what you should be learning and that's a really difficult thing and a difficult Thing to overcome to really get a good grip on the skills that you need and get a job The other hard thing is it's hard to get noticed by jobs if you don't have any experience and you don't have a degree That's related to it, right? So in in essence the best thing about Self-learning is just that it's cheap That is the best thing about it. I can attest to this. It is cheap It just takes it takes a while takes some dedication. It takes, you know, a lot of investment in time Okay, so for the boot camp two things that are I guess one thing that's really good about it Is that it's extremely fast or at least the path can be a lot faster than self-learning and it can be a lot faster than getting A degree so it's probably the fastest path to becoming a data analyst Another thing that could be a positive is some have job placement programs basically built into their You know their program and so if you're doing something like an in-person one where, you know It costs like 10 or $15,000 But they offer a job placement or you get your money back that could be a really good deal So that could be a positive The downside to most of that is that typically they do not write and they're expensive So the cheaper ones are about three to five thousand. Those are the ones that you're gonna get online like springboard or thinkful Those are ones that a lot of people take but You know, they don't offer job placement They offer job like help where they help you search for a job, but I don't believe they offer Job guarantees basically The other thing is, you know, it doesn't necessarily open up a ton of jobs, right? If you have a boot camp on your resume and that's really only only experience you have like I'm imagining each of these scenarios You're starting out with nothing you either go the self-learning route the boot camp route or the degree route You have no experience. Everybody's starting at the same level a boot camp it might open up some jobs, but You know, it depends on I guess the boot camp itself all the skills that you learned the exact industry So I don't know if it even opens up that many jobs Right. So then you have the degree The thing about this one is it takes a very long time Four years for a bachelor's degree or about two years for a master's so, you know, if you're coming into it with a bachelor's degree and You know, you really want to change careers like a hundred 180 your career You get a job and let's say like data analytics or computer science or something like that That takes two years So compared to the self-learning route or the boot camp route this one by far takes the longest Like app just blows them out of water. It's like three to four times as long It's extremely expensive Some of these programs for master's degree run like in insane amounts like $30,000 a year and that's just You know, that's a huge investment in time and money. Just huge. And so if you do an online You know that could make it a little cheaper or if you have your company Partially pay for it or pay for the whole thing that can make it a lot cheaper still a huge investment in time But it is gonna open up by far the most jobs The other ones, you know, especially the self-learning is not gonna probably open up any jobs in and of itself You'll be able to put the skills on your resume The degree is gonna open up by far the most jobs because you are getting an education. It's accredited It shows employers that you took the time which could be you know years and you took years out of your out of your time to Basically learn these skills. Excuse me for a second So You know, you can get degrees and things like computer science, IT Information systems, those are just some of the ones that I wrote down You could also get things in like finance and you get an MBA with a concentration in data analytics There's lots and lots of options honestly for somebody who wants to be a data analyst Which is fantastic So, you know, what do I think about these because I know a lot of people who have done All of these options And I'm actually starting to meet a lot more people who have done boot camps Especially once I came out with that video about why you should not take a boot camp A lot of people have been messaging me even people that I know and like, hey, I took a boot camp I was like, sorry. I feel I feel bad for saying that but you know, thanks for letting me know I was very polite about I was like, I was like, I mean that's super cool You obviously are successful. So it worked out for you, but it's not gonna be a perfect for everybody So that was just my my opinion, but You know, I kind of want to walk through my thoughts on each one real quick, which is the self-learning route, which is By far the cheapest, you know, you can do it in your spare time at night after you get home from your regular job And I think that for me, this was the perfect thing to do, right? I did not have a relevant degree I did not have the money at I didn't I didn't even have anything remotely close to being able to afford to go back to college and get a master's in analytics But the reason why I liked self-learning so much for myself was that I wasn't a hundred percent sure if that's the route I wanted to go and so I didn't want to invest a lot of time and money and everything to really see If this was for me because if I made that huge investment and I didn't like it Well, then, you know, I'm kind of screwed, right I'm out, you know, let's say ten thousand dollars just for either a bootcamp or a degree or something like that I'm just out a ton of money And into putting into perspective like I spent two hundred dollars I would say I'm at max spent two hundred dollars on self-learning for like four months Maybe maybe a little more than that I'd be shocked But that's about how much I spent to be when I am now and I've taken more courses since then On things a little more advanced things, but self-learning is You know a hundred times cheaper than anything any of these other options, right? So that's kind of the benefit of self-learning is that you can do it in your own time You can see if you like it you can, you know, there's no huge obligation By any means unless you're signing up for you know, like a nano degree from Udacity, which some which some people do And they cost like three thousand dollars. They're expensive And and I have a whole another I can make a whole another video on what I think is worth it and not worth it I don't think those nano degrees are worth it personally, but You know the difficult thing about self-learning is you are not going to get noticed for jobs It's not going to help you get noticed for jobs You have to take that upon yourself to do personal projects credit portfolio You know call recruiters make it known that you are a data analyst and you want to you want to Get a job as a data analyst, right? It's very much on you to present yourself as a data analyst So I think for the self-learning the the people who fit in this category The absolute most are people that are trying to transition careers, but they aren't a hundred percent if it's for them And if you are really not sure Self-learning is going to basically give you the option of an out at any time if at any time you find out that Python or sequel or or You know, whatever skill right are I'm blanking on data analyst skills. This is um slightly embarrassing But you get my point you can just bail right you can just stop and you don't have to take any more Go on with your regular career and be happy Right, but if you take a if you take a boot camp and you invest like ten thousand dollars into that boot camp And then you figure out that you don't want to be a data analyst You will not be very happy, right? So it's probably the least The least investment both with money time and risk because you're not risking a ton So I think that is for for that kind of person the boot camp Is going to be a very very very small group of people And I say that because I just don't like boot camps and that's just my personal opinion And I've made this disclaimer that if it is for you, that's fantastic And that's amazing and I'm I'm jealous because I wish Boot camps were for me, honestly because I think boot camp sounds super cool like if I could go for six months and Don't not work and just completely learn everything about data analysis It sounds like the best time to me. I would I would love that like right now if I could do that and You know, I quit. I don't want to quit my job But I keep getting my salary, but they send me to some boot camp to learn all these things I would have an absolute blast would be the best time in my life to be honest But you know, I don't think that's for everyone and here's why I Don't think that you are gonna be as job-ready as you think you are at the end of these boot camps And that's what I've heard from a lot of people who have taken boot camps. That is not my own bias, right? I said that in the video when I made the disclaimer that you know, I had not really talked to a lot of people I talked like a couple people, but I didn't have any personal experience with boot camps But now that I have a ton of people reaching out to me telling me their experience I have a lot better understanding of what people got out of it And to be honest the biggest feedback that I was getting was after they got out. They did not feel job-ready They didn't learn all the skills as in depth. They didn't feel As prepared as they thought they should have been so like take sequel for example, which is a huge one that they teach at these courses You know a lot of people were like well, I know how to write queries I don't know how to use it in a business setting and so people who got jobs as Data analysts after those boot camps are like, oh man. Yeah, they did not prepare me Like they did not prepare me as well as they should have prepared me And so that's the that's the feedback that I kept getting One second. Let me check the time. Cool So that's the feedback that I kept getting which was you know, I learned a ton. It was awesome I felt you know going out of it. I felt awesome once I got into my job I realized how little I actually knew and so I wish I had learned a ton more before actually getting into a job Which is interesting. I think somebody a lot of these people's expectation was really high, right? They thought they were gonna learn basically everything they need to know to be job-ready Whereas they give you they give you the tools to be job-ready But you know a job setting is very different and every job is different, right?  Yeah, I promise you it's not gonna happen As for the cost, you know, I personally do not think that the cost Is as good, you know, let me let me rephrase this I don't think that you are getting your return on investment at a boot camp Unless they are offering the job placement guarantee, right? So if you're spending $5,000 and you don't get a job, that's a huge investment. I just I don't recommend it Also, I you know, I've seen boot camps on resumes and I I personally don't particularly care that much I feel bad saying that for all the people who've taken boot camps out there It's just not something that I personally look on a resume and I'm like, man this guy's job ready, right? I look at it as an accelerated self learning slash Mentorship where you learned a lot of the skills and that's fantastic and that's amazing, but can you prove it? Right? It's the same thing as self learning just in a quicker pace with with a little mentorship You have a little bit more guided Courses you have some projects that you're probably doing in the course And so you have a little bit more experience, but honestly everything that you're doing in a boot camp you can do by yourself Every single thing. There's nothing special about a boot camp that you can't do on your own I know I'm focusing on those two right now. I'll get to the degree in just a little bit. I just want to really I don't know Not dissuade you but make you not want to do a boot camp I do that's just that's 100% My personal opinion 100% You know, I and I I never thought about it like this I'm thinking about it while I'm recording this and so I'm not cutting it out But I'm just gonna talk you through it may be that I'm jealous And hear me out when I first started I was poor and I mean dirt poor like It was it was rough like when I was first in this self learning time I was super super poor did I had no money? Is there any other way I can say that I'm I was broke And I maybe I'm just a little bit jealous of people who do the boot camps because I wish I could have done that I wish I had $6,000 sitting around ready to be used to make me become a data analyst faster I maybe I just wish I had that and so I just kind of trash talk it because I want to make others people not take it It's very possible and and I'm not gonna get in to my whole psychology But it's very possible, but I just I personally don't like it Enough about boot camps because good night. I just talked about that for way too long Let's get into degrees because I think that degrees are really interesting. I think that The timing of it the degree that you get the reason you get the degree are all really important So for example, if you are right out of high school, you're going into college And you're like man what I could take computer science and become a data analyst do it 100% you know Go for it. I think that if I could have done that I would be if I could have realized what I wanted to do when I grew up at a younger age I would be So even further along in my career than I already am right it could have only done good things So I really wish I would have done that and If you have the ability to do that it start early and start young that is that is gold if however You are somebody like me Or maybe not even someone like me someone who's older someone who's 25 30 years old already has a bachelor's And you're wanting to transition. You're in a very tough spot, right?  It can be difficult. I Think that The younger you start the younger that you get into especially with a degree to transition the better It's not impossible to do. I'm not saying don't do it I'm saying that you know, that's just something to be aware of is that if you are 30 35 40 years old trying to restart your career and you're trying to get a degree to do that You're gonna have to you have to really really really prove yourself.  I will say if however, you If however, I'm sorry my computer is Doing something weird if However, you have a degree in something that's semi related And let me give you an example Let's say you're a nurse and you have a nursing degree and then you go back and get a masters in data analytics Analytics computer science those two things go hand-in-hand same thing with finance same thing with business if you can combine two related degrees not skills, but degrees That can be a beautiful pairing and something that can really make you Stand out in the marketplace And when I say marketplace, I mean in in the competition for jobs Right because somebody who has a degree in computer science and then a masters in computer science We get it you like computer science But if you can marry those two together like finance or nursing or health anything health care related I'm health care.  You have the knowledge you have You have not only knowledge in the domain But in first hand experience like five or ten years of being a nurse and then moving over to the data side of things is Invaluable like that is absolutely something that people want so you think about that for your own industry if you're in construction finance, I Don't know other industries. I can't think of off the top of my head Obvious ones just think of your industry if you can marry that with a data analytics degree Would that be helpful?  You just wasted like 50 60 thousand dollars You know and as a nurse you're probably already making someone good salary I know some nurses that make a good salary and so You know if you just want a more I guess I don't want to say easier job More relaxing job a more office heavy job Then you know that could be a really good change even if you didn't get necessarily the pay bump But there's lots of great degrees that you can get One that I personally have been Looking at is getting a master's in computer science or a master's in information systems Or a master's in just data analytics, right? I think that for me if I want to advance my career even further I am going to need to get a master's degree. My experience is great I'm going to need to get a master's degree And so I think that a lot of people could also benefit from a master's degree in in a field like that To kind of sum all of this up. I think that There are specific people for each group There's almost none for the bootcamp But there's a lot for the self-learning a lot for the degree And I think that you just really need to look at yourself and think about Which one is going to work best For your lifestyle where you are do you have kids? You know do you've 10 years into your career and you're going to make a huge 180 like I did Well, I wasn't far into my career. I was you know, like a year into my career Or not even a year. I was like six months and I was like, I'm out of here. I'm getting a different job You know, you know where you're at. Know which one you want to do I highly recommend At least doing self-learning At the beginning, right doing self-learning for a couple months If you really like it trying to get into a master's program Even if you are in a master's program do self-learning Data analysts as a whole just need to be doing self-learning Anyways, right it comes with a territory if you're in tech You need to be keeping up with technologies upping your skills make yourself more marketable um And then you know for the bootcamp if you got some extra money to throw around and you want to Fast-track yourself learning You know have a mentor have a guide by all means do that that's that's your decision Again, I'm just jealous. I'm just jealous. I'm sorry I think I I you know, I I'm just going to touch on this one more time I feel like I really am just jealous and for all the people who've taken boot camps out there I genuinely do want to apologize. I'm not trying to make you feel bad. I care about you. I just Um, I know myself well. I know myself well enough to know when I'm jealous and I'm willing to admit that Uh, you know, and then there's the degree people who have not only money Um, but people have time Um, not a huge commitment. I will say for myself. I have three kids. I have a full-time job I do the youtube's You know, I have a lot I have a lot on my plate and I'm working from home. It's a pandemic It's just a lot going on, right? So, you know, for me, it's going to be tough to go back and get my masters I will do it almost 100 percent my my company offers It's called a tuition reimbursement So I pay up front and then after each semester they pay me back for whatever I for whatever I did up to a certain amount But I will never reach that amount. So I could get a free education I could I just have to do it. I have to spend the time Um, you know It's a it's a it's a big investment in time and money. So That is what I think that is my take on this whole thing I hope that that was helpful Just to hear my thoughts on it. I don't think it was very helpful to be honest. I think that this one was probably um My rambling about the boot camp really was a downer In this episode if I'm being honest So for all you people who took boot camps who left 10 minutes ago I apologize. It's a huge downer man. Just a bummer Uh, we are entering a time in the episode Where I take one comment off youtube. I read it to you. I answer it Um, it's semi related To what we've been not really it's not really related. Uh, but jas I'm gonna say sing He asked hi, alex. What order do you recommend learning to learn these skills excel sequel power bi slash tableau python For an accountant interested in data analyst career Like I said people from all walks of life want to become data analysts is the coolest job Nobody wants to be an accountant anymore The job is data data analysis Is there any other skill one should learn? Thanks Um, I think that these core skills which are absolutely the core skills, right? These are the things that you should start out and any data analyst should start out with And maybe toss r on there if you're just you really want to I I don't want to get flack for that I prefer python r whatever The order that I would learn these in is sequel number one No doubt in my mind I would then learn power bi and tableau Right and at the same time slash excel a little after because You know The marketability of knowing power Power bi and tableau is much higher than learning excel because they just expect you to know excel So I would learn power bi or tableau next Then I would learn excel and then after that I would learn python right python to me is probably the one skill that No, let me rephrase that sequel and python are the two skills that I think have earned me the most money in my career But I also know that python is very difficult it's um Can be very challenging for a lot of people and so You know, I think learning tableau first learning excel first learning sequel very first Is definitely the way to go um, all right, uh This is the end of the episode last last episode that I did Uh, we talked about how I went on this huge rant And then I asked you guys to type in jalapenos in the comments And for whatever reason I don't know why for whatever reason because you guys stuck around so long You guys really enjoyed that. I think you took pride in being able to comment that below So I want to give that you that opportunity again today If you watched all the way to the end today's vegetable. I'm keeping it, um vegetable based this week Is going to be avocado. So if you stuck around all the way to the very end again Type an avocado in the comments below I will look at it and know that you are dedicated You are you have what it takes even more than last episode jalapeno people Very cool It's the avocado time. So thank you for watching. Thank you for sticking around I hope that this was somewhat helpful, right? I hope the boot camp thing wasn't too much of a bummer I there's got to be at least one person who watched all the way through That's my goal for today's episode if I can get one person to watch all the way through i'll be happy Uh, one thing I completely forgot to mention. I have my dog sitting here right now. He reminded me Max said to remind you that if you want to support the channel go on over to patreon You know, I have even if you just want to give five bucks that would mean the world to me I I really do invest it back into these episodes. I'm going to be doing a big giveaway At 10,000 subscribers and so, you know your Your help with the channel your support of the channel means everything to me Thank you guys so much for watching. Have a good day Shout out to all the avocado people. Goodbye


Appalachian Wireless and Samsung proudly introduce Black November all month long. Get the Samsung Galaxy S9 for just a penny. The Galaxy S9 Plus just $99.99 and the Note 9 just $249.99. Black Friday all month long at Appalachian Wireless. Two-year agreement required. C-store for details. So we're picking up our first plow today here at Bitsy Lane High School. We have a program called Paint the Plow. This is our first year in District 12. And we're at Bitsy Lane High School. They are the first art department to do it. What we do is we take a plow to the schools and they have their art departments paying a snow scene or a mascot, whichever the case may be, related to snows. And we will put the plow back onto the trucks and that will be used in front of their schools to clean the major roads like 23 here at Bitsy Lane. But we reached out to all the art teachers in District 12 and eight schools are going to participate. This is our first one today.


I think we made me a minute or so early, but I don't know if you've heard anything to get started. My name is Harry Bolz. I'm the Director of the Central Kansas Library System and the Great Bed and Public Library. And I'm pleased to be here with that in PLA. I'm glad you're attending my session. There are handouts. I put some on the back chairs and a drawer here on the side. On this table, there are some samples of books that I've reviewed over the years. And you're welcome to look through them. I would get to do it and not take them with you. But you're certainly welcome to look through them. And if somebody wants to take them and pass them around and we're talking, we can do that. Or at the end, there may be time for you to go over and look at them. Well, I'm interested. How many of you actually, in your current position, read book reviews? I'm just about all of you. I think it's almost every handle of. So what I want you to do when I count to three, I want everybody to say the journal that they read the most book reviews out of. One, two, three. I heard library, maybe someone would just laugh. But that's interesting because that's the journal that I started with and I have done one other journal and I'm not doing that one currently. But writing book reviews can be a lot of fun. But I did this workshop 10 or 12 years ago in Kansas at the Library Association. I used to call it book reviewing for fun and profit because there are some people that, for a library journal, would read books. And at the end, where the book was actually published, a library journal would send you a fresh copy and then they would donate that to their library and you know what the retail manufacturer's retail suggested prices in the front of the book or the back of the book. And they would take tax deduction for the books that they donate to the library. So that kind of was a profit part. There's one journal forward magazine that did pay like 25 bucks for review. So there again was kind of a profit thing. I've probably done any work of 130 to 150 reviews.  I think I've maybe done a couple this year. And part of the reason is my area that I chose to do was really hot. Back in 93 when I started. And I kid people that the only thing that I've ever risked for the last 20 years is Russian history. And facets of Russian history. And people kind of screw up their notes with that one. That's not my favorite kind of word. But now is your chance. As you read those reviews, you probably read hundreds and hundreds of reviews.  I'd like to do that. I think I could do that. So that's what we're going to do today. And I visited with Francine Fyokoff at LK before she retired just a month or so ago. And she was pleased that I was doing this again because Library Journal does need book reviewers. So this is an opportunity for you to get started. Some of the satisfaction in doing this is seeing your name published. Have any of you ever written an article for a journal before? I see several hands. So for the rest of you to see your name in print is really quite satisfying. So that's probably one of the reasons to do it. And you know what? It's great to put on your resume that you're actually doing some writing and you're published. And another thing is once you get started with a journal and you learn the editors, then you have a connection. If you do want to write an article, you know the editor to call and say, I'm writing an article, can you expedite this one?  At my peak of reviewing Russian history probably in the late 90s or early 2000s, I was doing it one year twice. I did 13 books.  So some of them were good, some of them were not. So how do you get started today in book reviewing? If you have your hands out and they're around the room. Let's take a look at it so you see what all is in here. After the title page, there's the actual presentation that I'm doing. And then the next page is a page that comes in the book that tells when you review the issue and gives you information about what library journal wants to review. The next page right off their website are the guidelines for reviewing for library journal. And that's really important for you to read and understand before you get started because if you don't do it in their style, they will not like it. And that's a problem. The application didn't come out very well, but you can see the application is the next thing. And then there are a couple pages of questions that they want you to respond to so that they get a feel for what you do. And then there's an actual contract that you sign for library journal. And right at the end, I found a really good article to show you that a lot of people think that books are not dead. Books are not going away. And they assured me at library journal that last year they published or they were involved with more books than they ever have in any other year. So books are still being published and they need to be reviewed. So at least it worked when we tested it. I remember one of the first Internet workshops that I did at a school in Humboldt, Kansas. And that's when I had this spring recorded 150 feet down the aisle and through the hallway it didn't be obvious what it is. And I worked for an hour and a half trying to get the Internet to work in the bucket. And so the whole time I was trying to get it to work, I was saying, this is what you would have seen. So I guess we can do that. This is what you would have seen. This is the highlight of my program. You've got to see my slide. I'll tell you what, let's read these buckets. Read these buckets. We don't need that. We need the microphone. Does anybody need it? We need the microphone. You can see by your handout that the first thing you need to do is kind of assess your strength. What do you have to give to a library journal that they're going to want? And that's pretty important. If you have an advanced degree in a field to show that you're sort of an expert in that field, that's a good thing. So this is my Getting Started slide here. That's what we're doing now. If your advanced degree is in art history, that works. There are all different kinds of genres that have materials that need to be reviewed. You need to select a publication. If you like library journals or if you're doing book lists or doing any of the other journals, you want to decide which one you want to start with. I don't suggest that you apply all of them. Take one and give it your best shot. You need to read book reviews that they've been publishing so that you get a feel for the style and the way it's written. Because your reviewing has to fit in to the way they want it. So if you read the reviews and you are comfortable with that style, then you say, well, I can do that. And remember the key is to take the contents of a 200 to 800 page book and condense it down into 200 words including the bibliography. So you have to start thinking, can I capture the contents of a book and get it succinctly on the page the way that particular journal wants you to do it. You've got the guidelines. So if you read through the guidelines, some of the things that I look at when I'm writing a review that are guidelines. Number one is getting the bibliography in the style that they want it with the author, the title, and then all of the other things that are in the page numbers. If it's got pictures in it, if it's got plates in it, if it's got an index, you need to get that in the right order. And then your review as it's written for Library Journal is number one. You want to connect the author with previous publications and with similar publications. But you can't do that in a paragraph. You have to do it in a sentence. And then you have to get into the contents of the book. So you get into the contents and I'll get into this a little bit more in the next section. But it's the guidelines of how they want it written and I've given you the guidelines so you can read that that are really important to follow and you'll see that a little bit later. And then besides filling out the application, and it was different when I did it 25 years ago, but if you can write a sample review of a book that you don't think that anybody's reviewing, so you find some obscure book that you do a review on, and you send it in with the application because you can go on the website and get all of that information.  And you can see in some of the information I've given you that they need almost every genre a reviewer for. So all you have to do is be brave enough to get it started, to get the ball rolling. So how do we do it? And that's what I started with before. Well the first thing you need to do is you've got three weeks. You've got a 600 page book. And it's boring as heck. You still have to read it. And when you read it, you have to read it sort of critically because you're going to compare it to other works. You're going to decide if the author is getting his point across. That's why you pay really, really close attention to the forward or the introduction. Because it's in those sections that the author says, this is what I intend to do. And then your whole reading of the book is to prove or disprove whether the author has done that. So as you're reading it, and if you look at my samples over here, most of them I write in the margins, I make notes, I put question marks. And so when I'm ready to write my review, and oftentimes I will transfer the pertinent information to one of the blank pages so that when I'm writing my review, I go to that page and I know where the notes are that I want to look back on. You can quote from a galley, but you have to cite it exactly where it is in the galley so that they can check it in the final copy and make sure it's on the same pages. Every time you get a book, it comes basically from Library Journal, but it comes from the publisher to Library Journal to you. And in that book, usually is a page that has a lot of apparently graphic information on it because sometimes it's not complete in the galley. Sometimes they don't know the number of pages, they don't know what they have to put the index in the galley. So you need to look at that kind of information on what's provided. Sometimes it's on the back of the book on the cover, sometimes it's on the last page, but you need to discover where the correct bibliographic information is. But you don't want to read what someone else has already written about that book. Why would you not do that? That's a rhetorical question, by the way. It's because that would color your writing. It's really tempting when you're struggling to capture the essence of a book, I'm going to peek at what someone else wrote and see if that helps me out a little bit. And I won't say that I've never done that, but it's not right to take someone else's thoughts. We know that, and claim them as our own. So we don't read what someone else has written on most of the galleys. Or if you get a book in its final version, which is happening more and more, you'll have the cover flap that has everybody's craze of the book and why you should buy this book, and then you want to stay away from that. So you make notes of your impressions, the readability, the accuracy, and whether the author has delivered what they promised in the introduction or the forward. Certainly you need to follow the guidelines of the publication, which we've mentioned several times. And you need to be succinct, but you've got to provide enough information for you as librarians to decide whether you want that book. How many of you will only buy a book if you're satisfied with the review? Oh, nobody. I've got a couple here. Okay, how many of you read the review and that colors your decision somewhat on whether you're going to buy it or not? Okay, that's maybe more accurate. So that's because whoever writing those reviews have made it clear what the book is about and at the end, at least a library journal, you're supposed to do what's now called the verdict. Remember that? And the verdict is, you know, who is it suited for? Should someone really like this? So that's pretty important for you to provide that information to people like you who rely on them. Okay, please do not. Because on all of this information there's the publisher's name and address and you've got the editor's name on there, you've got their phone number and maybe twice in 20 years I've called the editor and it was to ask a specific question that I didn't understand probably in the bibliography. So don't call the publisher. If you really, really hate a book and it's really driving you crazy, never write a negative review. Library journals probably won't publish this. I don't know about some of the other ones. If you don't like it, send it back. If you can't get through it, send it back. I remember one time I wrote two reviews, one for actually publishing and one that I wish they would publish and it's one of those that I, it was one of these academic books, you know, somebody, some lowly professor having to publish a book so they get tenure and I said, and you've heard this before, you know, professors have to publish or perish or not publish teachers, professors. And I said this one should have perished. And they didn't use that one. They did my other one. So anyway, don't do negative reviews. And I've already said this before. Don't copy from what someone else has written. Okay, it needs to be your thoughts. It needs to be your impressions. You're the librarian writing for other librarians. You're not a friend. You're not the publisher's aide trying to get this book sold.  Another thing is don't worry about grammar and spelling. You know, you may come across something that is not spelled right. And if that is truly something you found as you submit your review, which is usually in the body of an email to the editor, you can make a little note down at the bottom. By the way, on page 61 of the galley, this word is misspelled. But that's not part of your review. If the book is not written, well, if it's not written so that it made you feel like you want to continue, you can reflect that, but you don't want to get into the specifics of what's left down. That's in a separate note to the editor. And of course, don't cross any of those barriers. Okay, about editors. I've had probably four editors in the last 20 years, and they all react differently to your writing. The first one in particular, when I would send in a review, and back then, and they sent you the copy, they would have a laminated copy of your review stuck inside. And I was first couple times I'd pull out that review and read it, and I said, this is what I wrote. Because the editor had taken my words and made it kind of funky and flowery and things like that wasn't me, but I never complained. I just said, oh well, it looks good. And so you just need to be aware that editors will do things. The last editor that I had had, we got into several pitch arguments about something that I've said in my review, and they didn't understand what I was trying to get across, and I suppose it's important. But I liked the way I said it. So when I wrote my explanation, it supported the way I said it, and then she would email back something else, and we had some emails flying back and forth, and it was not real comfortable sometimes. So just be aware that an editor may change what you've written now. They prefer that you write it and the editor doesn't do much changing. That's the way it's been for the last three or four years. They don't go in and rewrite it for you. They just want you to do it right. Editors really aren't human. They will visit with you. They do criticize. So that's just part of the course. Do we have any questions? When you get to the end of the presentation, if you keep talking, you're in trouble. So I have some sample books that we can go over and look at. You can see how I've written in the margins of them. You can see the kind of things that you get, the kind of things that you have to do. And I said I would show you one of the worst books that I had reviewed. This is one of the early galleys that I got. And you can see it's not in a real nice format. But from my historical perspective, the author did not talk about solos, outcasts, like I remembered them from history. And so that's what I said in the review. It wasn't a negative review. But what it said was, you know, I don't agree with this. And I didn't go around in the room with the editor a little bit about that. So that's one of the worst things that I've had to review. I've had like 800-page books that I think a professor was going to use for a textbook. And those are really nasty to get through. And let me show you some of the really good ones. This is one called Matasha's Dance. It's a cultural history of reality, which was really, really quite pleasant to read, even though it was a very large book. Brett Millianair, a political biography of Willie Munsonberg, was a good book to read. And one called So Don Give Journey. And this particular one is about Russian history. It's a very interesting in France from Jefferson to the Javay. And these were three of the ones that, you know, you really like to read. So do we have any questions about writing book reviews? Yes? Or is that enough to fill the floor? Repeat the question, please. The question is, if I would send a book back, which I think I only did once in 25 years, do you see it show up again? Did someone else read it because they liked it and they wrote the review? And, you know, I don't know the answer to that. That's a good one I should probably ask. I would think if the expert in the field didn't like it and sent it back, that they probably wouldn't send it to someone else, but I can't tell you for sure. And should they not try to do a review of it? You know, again, that's another good question. I don't know what criteria the editors at that library generally have for what they review. And I'm sure they don't do everything. Well, they do some how-to, but they don't do any mechanical explanations or really do a little bit of medical do.  And again, if you look through the material that you have, I think it kind of lists the genres, or I thought I maybe wrote it somewhere, but it's pretty wide. And I don't know, and I don't think LJ is at this conference to ask anybody. Yes? So what you're saying is if you do not have, if you can't find a good review of a book, or even a review of a book, then it's more often not any good. Well, I know there's probably a lot of vanity self-publishing that doesn't get anybody to review it. So that probably is not the case. And again, I'm not sure. I really couldn't tell you, but I know there are some things that don't get reviewed simply because they don't submit it to anyone. So, you know, and again, that's kind of what the publisher is for, to get it out to different journals for reviewing. So if you've got a good publisher, then you have a good chance of getting a book reviewed. Yes? I once reviewed a book in galley form that was so littered with typos and other layout errors that it was a chore to get through and it was a specialty in my specialty area, so I just swung through it. But if it's in the galley and it's in terrible construction, does that give them time to tell the publisher they need to go back and clean it up? Well, hopefully, you know, I don't know what the time frame is, but hopefully they've got somebody working on that as you're reviewing it. And the question was, one person in the audience got a galley that was full of mistakes and spelling errors and layout errors that it was a real chore to get through and wondered if there wasn't enough time for the publisher to go back and correct it before they published it. Hopefully, that's the case because that would kind of become a laughing stock, I would think, if it were published out like some question over here. I have read some negative reviews, so there must be varying degrees of how negative reviews could be. Possibly. So some of them have been, but you're just saying, library reviews. Right, that's great. And that question was an audience, person in the audience has read negative reviews, I don't know if you've met library journals, but maybe in other journals. In other journals. And so, evidently, there are some degrees of negative reviews that do get through and I'm sure that happens, but I was told I should not submit a negative review. Have you ever had an author take issue with your review or something you've said in the review? Have I ever had an author take issue of something I said in a review? You know what, they never get that far. I'm sure that they're over and over the setting at dinner time with friends. They probably first me quite a bit, I don't know. But what I have seen, and particularly when I was able to write my review more of my voice without the editor screwing it up, my reviews were in Amazon, in Borders, when you went and looked for a book and you went down to the reviews, my review was usually there. So I thought I must be doing the fun, should we do it? You would like it to be? I didn't have to be totally glorified. I mean that means that when I'm reading it that maybe it's not quite... Well, no, you can certainly point out something that you don't think makes it a great book. For example, you might say that the author never did prove his point kind of thing. But then when you get down to the verdict, instead of saying something like, this high school should never read this book or whatever, what you're doing is you're saying who can read it, who would be the audience for this book. So that's where you certainly would not be negative, it's in the verdict. Anymore? Yes? You mentioned at the beginning that some years you've done as many as 13 books. Do you have the option, if they ask you to do a book and you don't have time to do it and they're timeframe to turn it down? Yeah, well what happens is you're sitting in your office and suddenly FedEx brings you a book and it says that your book is due and they put the date on the slip of paper. So what you would have to do is stick it back in the mail with a little note that says I don't have time to do it now. But, and this does bring up a good point. If you turn down too many books, they're not going to send you books. And the other thing is if you don't get them in on time, they're not going to send you books because when they send you a book they want it usually for the next issue. So if you don't get it in on time and that can be a problem because sometimes you take a book and it's a big, thick book and you don't know you're going to get busy, but you have to finish it. And that's when you're tempted to skip chapters, you know, read the first two chapters and then go and read the ending and scrape together the review. I'm not going to say that I've never done that, but I did do it very often. But you want to get the review in on time, but they give you three weeks, that's the date they want it in and you're submitting it by email. So you can't wait till the afternoon of the 21st day and send it in and still read okay. I have emailed to them and said it's going to be a few days late because and that seems to have worked. So, yes, yes, yes. In the application there is information about the kinds of things you would like to do. If there are no more questions and we are probably a little bit early, I'm not sure how much early, you're welcome to look at some of the things that I've reviewed and how I've done it. And so you've got a few extra minutes for coffee. Thank you.


Hey, what's up guys? This is Travis from We The Kings. Mental health struggles, big or small, can be hard to put into words, but we have to talk about them. You never know the difference that one conversation can make. Be a part of the change. If you're feeling down, are in need of support, or are looking for tips on how to help someone who's struggling, go to findyourwords.org, brought to you by Kaiser Permanente.


Yeah, we on boss talk one-on-one. Yeah, we gonna stuff but now because acting is not the same anymore the medium is different not the same it's not It's Movies everywhere. You know your phone in the bathroom.  They're going to like netflix And But what about the guys like like the uh, you do have different people that's finding new ways and new lanes like the country Wayne And all those guys doing anything. Um, is that the same? Do you guys have the same respect? He gotta hold now.  I was like, I don't On facebook and instagram videos and all that doesn't pay money.  Ain't nowhere. Yeah You just get paid for what you get paid for now from 92 You see I'm saying yeah, yeah, yeah, yeah I don't know how that's gonna work if when they start going. Hey dig it do whatever he does I'm like, what does he do? I don't It's like he got to get his money right now. And then if something goes wrong retire or jump into something else that can Or invest that money everybody going to the bitcoin and all that right now He's the main guy doing that, but it's a lot of other ones. You know, it's kind of following that whole trend So that's a whole new thing instead of keep saying it, but I haven't seen nobody rich from it He made a couple million from it But I'm like People I know they do this are in Forbes Yeah So it's like and there's a track record like okay. No, this is a real check. It's a real check not like the We heard check. No, well when you google him it pops up.   It's like you said bitcoin. Yeah, right Bitcoin was 170,000 now it's 60. Well, how much it really worth right What is the what is the real worth of it? They've been trying to get me in the bitcoin for a minute. Listen this When bitcoin was the thousand dollars I could have got that's what you didn't get.  Tell me what it is. I need to guarantee it's a gamble. I know it's a gamble They don't want to tell you it's a gamble. Everything you do is a gamble, but it's it's it's it's investing in a ghost stock That Um oil is always going to be oil Um medicine is going to be medicine Ham is going to be ham. It's going to vary, but it's going to always be there AT&T Coke All these products are going to always be there But when your product goes from 40,000 to 78,000 Up and down then was then What is that? I that's for one coin. I can't lose man. I'm like give them 10,000 to get In I say, okay. No, you know what? I'm trying to figure out like it's serious I got the old man calling me saying we making We making millions doing it and he told me he told me he said if you give me 10 In three days it'll be 30,000. I say, are you serious? You know why because won't he just do it himself It was a guy sitting there. He was setting him up We was setting him up by killing him All I need is 10,000 You can make 15,000 in 20 seconds If I give you 20 do I make 60? No, no, because because he's the one that sounds too good to be true and you live Have you ever heard a dope music they got cocaine over here for 15 cents for a kilo?  Okay, are you want me to be rich too? Well, why don't you do me a favor? You take your money invested for me and then when it may get you just give it Since you want to give it away It's a it's it's a new pyramid hustle and that's what I hate.  I'll be hating them, but it's like it's legal now Because you guys can create a a bitcoin yourself.  Whatever you're gonna get whatever you get people to believe in That's what it becomes now. It ain't it ain't it ain't the brick and mortar now It's what you say because everything's invisible. Yeah, we on boss talk one on one. Yeah, we gonna talk