Understanding Drupal

Video loading...

  • 0:00
    [Lullabot]
  • 0:04
    [Nate Haug] When people ask me about Drupal it happens all the time
  • 0:06
    that I'm trying to explain to people what it is that I do.
  • 0:11
    It's a little hard once you answer the question "Oh, I build websites,"
  • 0:14
    and then usually that's enough for some people, and they don't want to hear anymore,
  • 0:19
    and a lot of people, they wonder, well, what's special about what you do,
  • 0:25
    and what's this Drupal thing?
  • 0:29
    [Jeff Eaton] Drupal is a lot of things to a lot of people.
  • 0:31
    At the simplest level it's a piece of software that allows someone to
  • 0:35
    easily manage the content of their website, like all the blog posts
  • 0:39
    or the news stories or something like that.
  • 0:42
    [Addison Berry] And it allows you to edit the content
  • 0:44
    through a web browser rather than having to pay somebody
  • 0:47
    who knows a lot of HTML and how to do fancy code things
  • 0:51
    to actually change things for you.
  • 1:00
    [Angie Byron] In a traditional sense usually with web pages you have to
  • 1:04
    edit some code by hand, and you have to manage these files everywhere
  • 1:09
    and links and stuff like that.
  • 1:11
    Drupal makes that a lot easier.
  • 1:13
    Once you get it installed you can just click buttons to add
  • 1:15
    pages and forms and all this kind of stuff.
  • 1:19
    [Matt Westgate] You can go to a page, click an edit button,
  • 1:23
    and all the content that was on that page is now in a series of forms
  • 1:26
    and a series of text fields, so you can go there,
  • 1:29
    you can edit it, save it, and then you're editing the content
  • 1:32
    in real time on your site.
  • 1:34
    [James Walker] Whether it's a social networking site
  • 1:37
    that has lots of user interaction or my single user blog
  • 1:42
    making sure that the code that runs it all as well as the
  • 1:46
    administration interface works in all those different scenarios.
  • 1:50
    [♪ Music ♪]
  • 2:36
    [Understanding Drupal]
  • 2:44
    [Jeff Robbins] A lot of people refer to Drupal as a content management system, a CMS.
  • 2:47
    How I describe a content management system,
  • 2:50
    first it's good to give a little bit of historical perspective on the way things have been.
  • 2:56
    [1977]
  • 2:58
    [1978 BBS] [1979]
  • 3:00
    [1980 Usenet] [1981,1982]
  • 3:02
    [1984] [1985 Free Software Foundation]
  • 3:04
    [1989 CompuServe]
  • 3:06
    [AOL] [1969,1971, 1975, 1987, 1986, 1988]
  • 3:08
    [1991 World Wide Web]
  • 3:10
    The explosive growth in the number of people who have discovered
  • 3:13
    the power of the internet for learning, marketing,
  • 3:16
    and just plain having fun has been incredible.
  • 3:20
    The internet is changing the way we learn, work and play forever.
  • 3:25
    [1991] [1993 Mosaic, HTML] [1994 Yahoo, Netscape]
  • 3:27
    [1995 MySQL, Amazon.com, Internet Explorer, eBay, Altavista] [1996 Hotmail, Javascript, CSS]
  • 3:29
    [1998 XML, Google] [1999, 2000]
  • 3:31
    When the Web first came into existence the way people created web pages
  • 3:33
    was each page on a website was its own page.
  • 3:37
    [Angie Byron] Web pages used to be just a collection of little small files
  • 3:40
    called HTML files, and they just have code in them.
  • 3:43
    You would use a program like Microsoft FrontPage or Dreamweaver,
  • 3:47
    or you would roll your own and you would code out
  • 3:50
    every single page on your site, which is good and fine
  • 3:54
    except if you're Amazon.com you're going to have
  • 3:57
    a million pages, two million pages.
  • 4:02
    The number of just files that were lying around was just astronomical,
  • 4:06
    and keeping them in sync and making design changes was almost impossible to pull off
  • 4:10
    without huge amounts of work.
  • 4:12
    That's how the concept of dynamic websites really took off.
  • 4:17
    They wanted a way to say, "Hey, this copyright is going to be on every page."
  • 4:21
    "Let's put that in one place and then link to that
  • 4:25
    within all of our other pages so that when we need to change the copyright
  • 4:28
    we do it in one place and it spirals out through the rest of the site."
  • 4:35
    It's designed to be able to run on the lowest common denominator hardware.
  • 4:40
    It runs on the LAMP platform, which is Linux, Apache, MySQL, PHP.
  • 4:46
    Where Drupal fits in with that is you basically have
  • 4:49
    Linux on the bottom layer, and that's running your operating system.
  • 4:51
    That kind of is keeping your disk drives running,
  • 4:54
    really low level stuff like that.
  • 4:56
    Then you have Apache sitting on top of that, and what that is is the web server.
  • 4:59
    It handles when you go to www.example.com
  • 5:02
    it will go and find a file on the computer it's installed on
  • 5:06
    and then feed it back to you through your web browser.
  • 5:08
    MySQL is a database, so that's storing all the content of your website
  • 5:11
    as well as all your users, all of your sales reports.
  • 5:15
    Things like that all go into a database, and then PHP
  • 5:18
    is kind of the bridge between MySQL and Apache to sort of
  • 5:23
    take this dynamic content out of the database and present it in such a way
  • 5:26
    that someone can view it in Internet Explorer, Firefox, and that kind of thing.
  • 5:30
    Drupal basically serves as an underlayer to generate HTML,
  • 5:36
    but how it does it is instead of having hundreds or thousands even millions
  • 5:42
    of HTML pages that are all individually written
  • 5:46
    Drupal is very centralized in how it generates pages.
  • 5:54
    [Angie Byron] A database-driven system works off the concept of
  • 5:57
    all of your content being centralized in one place,
  • 6:00
    and it's fed dynamically through template files and such to just output
  • 6:05
    whatever the content of the page is at any given time.
  • 6:08
    [♪ Music ♪]
  • 6:16
    Instead of having, say, 200 pages you'll probably have about one or two,
  • 6:21
    and then there's little dynamic bits called variables
  • 6:24
    that just feed in, say, the content of a given page
  • 6:27
    or the title of a given page.
  • 6:32
    [Content Management Framework]
  • 6:37
    The part I think that most Drupal developers get really excited about
  • 6:40
    is the underlying framework of Drupal.
  • 6:43
    The other thing that it is is it's a concept management framework,
  • 6:46
    and what that means is that it allows you to hire a developer,
  • 6:50
    or if you're a developer yourself, to extend Drupal to do additional functionality
  • 6:54
    beyond what it normally can do.
  • 6:56
    I've really, really grown to appreciate Drupal's capabilities
  • 6:59
    as a platform to build additional solutions on top of
  • 7:03
    because of its APIs and all of its hooks for additional third-party plugin modules
  • 7:07
    to be built on top of it.
  • 7:09
    I've found that if there is a feature that Drupal doesn't have
  • 7:12
    the distance between starting with Drupal and adding that feature
  • 7:16
    is much shorter than me trying to go and build something from scratch on my own.
  • 7:23
    Certainly for developers the flexibility
  • 7:26
    is kind of the key that I find.
  • 7:29
    It's what helped me fall in love with it, the fact that
  • 7:32
    it's got a very kind of clean, simple core
  • 7:35
    with lots of hooks exposed that can be used to
  • 7:38
    add in any kind of functionality that you want.
  • 7:42
    Without having to actually dig in and actually even understanding code
  • 7:45
    you can do a lot and really create exactly what you want
  • 7:49
    by snapping the proper pieces together.
  • 7:52
    The idea of taking all of these small Lego brick pieces
  • 7:55
    and assembling them together into large sites with a lot of rich functionality
  • 8:00
    is really, really important for the direction that Drupal has been growing in.
  • 8:08
    The idea that you work with kind of a base platform
  • 8:11
    and then you're clicking pieces together and that's typically--
  • 8:16
    at least the first portion of a Drupal install or Drupal site build
  • 8:20
    is that you're clicking a bunch of these pieces together
  • 8:23
    and tying them together.
  • 8:25
    Not only can you pick and pull pieces out for free
  • 8:29
    and try them out by installing them on your site
  • 8:32
    and actually seeing how well they work you can also open them up
  • 8:35
    and look at them on the inside and see exactly how well they're written,
  • 8:40
    how good the code quality is and find out if it's a quality enough piece of software
  • 8:44
    that you want to use as the basis for your website.
  • 8:49
    What attracted me to Drupal was the code, the elegance of the code.
  • 8:55
    It was commented. It was clean.
  • 8:58
    It had a really elegant architecture to it.
  • 9:02
    And when I started looking at Drupal's code it was amazing.
  • 9:06
    I mean, it was like this I could understand and there was all this--
  • 9:10
    just a lot of stuff that really made me feel like the software was much smarter than me.
  • 9:14
    There really was a lot of stuff underneath, and I just needed to sort of
  • 9:18
    learn how to harness it, and then I would be able to do anything
  • 9:21
    that we needed to do for this site.
  • 9:23
    We already have a flexible content system.
  • 9:26
    We already have a taxonomy system.
  • 9:28
    This is stuff that you don't have to develop yourself,
  • 9:30
    and instead you can build on top of stuff that just comes taken for granted
  • 9:34
    from Drupal, and you can start doing stuff that really matters
  • 9:37
    to your actual project.
  • 9:40
    [Drupal's Core Modules]
  • 9:44
    [Open Source]
  • 9:49
    Drupal being open source was very important
  • 9:52
    simply because I was looking for a way to get a head start on something
  • 9:56
    by taking something existing and then working up from
  • 10:00
    a point where I started really high up
  • 10:04
    and then just could work higher from there.
  • 10:08
    Over the last several years Drupal has really evolved a lot,
  • 10:11
    and it's grown from just a prepackaged website
  • 10:15
    that you can turn features on and off into a real platform
  • 10:18
    for building really, really advanced large-scale websites.
  • 10:22
    A lot of larger companies are starting to take interest
  • 10:26
    because a lot of them are coming either from a vendor who they pay
  • 10:30
    hundreds of thousands of dollars a year in order to maintain
  • 10:33
    their content management system or something custom where they have to maintain
  • 10:36
    a fleet of developers in order to just keep it running and maintained.
  • 10:41
    Open source is a very appealing option to them
  • 10:44
    because it allows them to leverage this community of
  • 10:48
    literally thousands of people that are not on their payroll
  • 10:52
    that can do things like adding new features,
  • 10:55
    testing for bugs, and just making little improvements here and there.
  • 11:03
    Closed software is liking buying a car with the hood welded shut,
  • 11:07
    so if you want to change the oil or see what's going on underneath
  • 11:11
    you really don't have a way to do that.
  • 11:13
    You're dependent on taking it to another person.
  • 11:15
    You're dependent on them giving you the features of the car
  • 11:18
    that you are left with,
  • 11:21
    and open source software is like sometimes you're lucky if you get a hood,
  • 11:26
    but you are able to get in there and dig around and see how things work,
  • 11:30
    change your own oil, and that's really liberating
  • 11:34
    for a lot of companies.
  • 11:36
    And by being free and open source, as developers
  • 11:39
    it makes it very, very easy to get a much richer, much deeper
  • 11:43
    understanding of the code, how it works and how best
  • 11:46
    to use it and extend it.
  • 11:49
    The fact that it is free as in beer
  • 11:53
    and also free as in freedom in that you can
  • 11:56
    change things on your own and that you're not locked in
  • 11:59
    to what somebody else has given you, and you're sort of basically at their whim.
  • 12:05
    By being licensed GPL Drupal kind of not only secures the code
  • 12:11
    at its core to kind of live on as free and open source software
  • 12:16
    but it also promotes and in some cases dictates
  • 12:21
    that code that has been added on to it and extensions,
  • 12:24
    so downloadable modules, are also GPL licensed
  • 12:27
    and therefore freely available.
  • 12:31
    [Community]
  • 12:35
    Another feature of it--and why people might choose it--
  • 12:40
    is just the development community around it and the contributor community.
  • 12:44
    It basically has a huge developer base of thousands of people
  • 12:47
    constantly improving the software and the add-ons available.
  • 12:52
    The growth has been kind of staggering and to the point where
  • 12:56
    it's really kind of shocking to actually sit and think about
  • 13:01
    the community as well as the software itself.
  • 13:03
    It's just sort of this self-feeding thing where
  • 13:07
    Drupal gets better and more people get interested because it's better,
  • 13:11
    and then we have more people working on it, so it gets better,
  • 13:13
    and then more people get interested in it again,
  • 13:16
    and so it's just a fascinating process to watch and be part of.
  • 13:21
    [Content]
  • 13:27
    There's a lot of jargon in Drupal
  • 13:30
    and it really increases the--it's referred to as the "I suck" threshold
  • 13:36
    of there's taxonomy and node and all of this sort of jargon
  • 13:40
    that you have to learn, and it takes a while to absorb that
  • 13:44
    and soak it in and get over to that place where you start to feel confident
  • 13:47
    that you can talk the talk.
  • 13:49
    Yeah, nodes was probably one of the hardest concepts for me to get
  • 13:53
    when I first got to Drupal.
  • 13:55
    I remember being puzzled by the word and sort of--
  • 13:59
    I don't know, I just want to make pages, okay?
  • 14:01
    I just want web pages. I don't know what this node stuff is.
  • 14:05
    The idea of nodes of content can be a little confusing to people
  • 14:10
    usually because they say things like "Well, why not just call it a post?"
  • 14:14
    "Why not just call it a story or an article or something like that?"
  • 14:19
    The difficulty is that a node could be any or all of those things.
  • 14:25
    [What is a Node?]
  • 14:29
    A node is the basic building block of Drupal.
  • 14:35
    Drupal is a content management system, and a node is
  • 14:39
    the content that is being managed.
  • 14:41
    Yeah, if you've worked with Drupal for any given time you've probably noticed
  • 14:44
    that when you look at a piece of content like a blog entry
  • 14:47
    or a poll you'll see this weird node/1 thing.
  • 14:52
    Drupal picked the word node for some reason
  • 14:55
    to refer to any piece of content in the system.
  • 14:58
    [♪ Music ♪]
  • 15:06
    [Addison Berry] And so for me, learning what a node was, no matter how many descriptions
  • 15:09
    I read or how many people tried to explain it to me,
  • 15:12
    I had to just use Drupal to actually understand it
  • 15:16
    but really it is essentially--I mean, it's just a piece of content on the site.
  • 15:21
    What a piece of content means is does it have a title
  • 15:24
    and an author and a description or a body?
  • 15:27
    Does it have a create date? Things like that.
  • 15:30
    Most importantly they have a unique ID,
  • 15:33
    so they can be addressed via URL
  • 15:37
    or referenced uniquely throughout the system.
  • 15:40
    They basically stepped back at one point and said,
  • 15:42
    "Okay, well, we have polls, and we have stories, and we have pages,
  • 15:46
    and we have articles, and we have events, all kinds of stuff."
  • 15:51
    And they said, "What are the main things that are common between
  • 15:54
    these different elements?"
  • 15:57
    And so they drew out those individual pieces like the titles and such
  • 16:01
    and then put those into sort of a concept of an overarching
  • 16:04
    content piece called a node, and then everything else
  • 16:07
    just added stuff to a basic node.
  • 16:11
    [Node Revision]
  • 16:16
    Another huge advantage of the node system and being centralized and such is that
  • 16:20
    Drupal can track revisions to nodes, which means that if you edit
  • 16:24
    a piece of content and change a couple lines and hit save
  • 16:27
    it can store a revision of that so that you could go back
  • 16:30
    and revert back to the way it was before.
  • 16:33
    [♪ Music ♪]
  • 16:42
    [Addison Berry] If you want to you don't have to keep a copy
  • 16:45
    of every single change that you make, but you can,
  • 16:48
    and what will happen is that every time you make a change
  • 16:51
    if you tell--there's a checkbox for make a revision,
  • 16:54
    and what will happen is Drupal will basically take a snapshot of that data
  • 16:58
    and put that into the database every time you make a change.
  • 17:03
    This is particularly important for things like managing abuse.
  • 17:07
    It's also important for things like--say you're running your entire user manual
  • 17:11
    for your employee handbook or something off of Drupal.
  • 17:14
    You want to be able to see how that document has evolved over time,
  • 17:18
    and so Drupal can keep track of all that for you, and you can revert revisions,
  • 17:22
    you can delete revisions, you can add new revisions,
  • 17:24
    and it's just a way of protecting your content and kind of keeping
  • 17:27
    a constant backup of everything.
  • 17:31
    [Content Types]
  • 17:35
    Generally speaking, on the end user side
  • 17:38
    the visitor should never really see the word node.
  • 17:42
    Throughout the user interface the guidelines
  • 17:45
    for writing Drupal modules
  • 17:48
    is that you don't talk about nodes.
  • 17:51
    The first rule of nodes is you don't talk about nodes.
  • 17:54
    Oftentimes where you hear the word node is in the developer speak.
  • 18:00
    You hear it less sort of on the end user side of things.
  • 18:03
    In the Drupal administrative interface
  • 18:07
    it's called a content type.
  • 18:12
    But the truth is that all the developers refer to these things as nodes.
  • 18:16
    One of the things that Drupal can do with this content management component
  • 18:20
    is it can allow you to create different types of content.
  • 18:24
    The way Drupal works is it uses this concept of content types,
  • 18:27
    and it's really incredible and I think one of Drupal's strengths.
  • 18:31
    Drupal allows you to divide up the content on your site
  • 18:34
    into different kinds of content so that each different type of content--
  • 18:38
    like events or blog posts or uploaded photos--
  • 18:42
    can be treated differently.
  • 18:46
    Different node types can have different attributes.
  • 18:49
    They can have different default settings of whether they're promoted
  • 18:52
    to the home page or not, whether they show
  • 18:56
    the user submission information, the date it was posted and stuff like that.
  • 19:04
    I can make those look different.
  • 19:06
    I can list them in different ways,
  • 19:09
    and so I can loop them together.
  • 19:11
    I can split them apart and sort of rearrange
  • 19:14
    how I want my data, my content to be displayed on the site.
  • 19:21
    And you can also set different permissions on content types as well.
  • 19:24
    Any content type in the system you can control who can create it,
  • 19:27
    who can edit it, who can delete it, who can manage all of those things
  • 19:31
    and even who can manage all content across a site altogether.
  • 19:37
    [Content Construction Kit]
  • 19:41
    When I started building WordPress blogs
  • 19:46
    the thing that I was always missing was the ability to add more fields.
  • 19:51
    I wanted more than just this, the title and the excerpts, synopsis
  • 19:55
    or whatever they call it in different things and different web applications and the body.
  • 20:01
    It starts out with just the title and the body.
  • 20:04
    It's a basic node, and then you take those two basic pieces,
  • 20:09
    and then you start adding additional things on to them
  • 20:11
    like adding in taxonomy information and publishing information
  • 20:15
    and using CCK, adding in additional fields
  • 20:20
    but make it so that you can tack on all kinds of additional information
  • 20:23
    around the basic node.
  • 20:26
    CCK is the content construction kit
  • 20:30
    and really is about creating custom content types,
  • 20:34
    so moving beyond blog posts and simple stories that have title and body
  • 20:40
    and adding extra additional fields of information.
  • 20:46
    With CCK that Holy Grail of being able to add
  • 20:51
    as many fields as you want to the content type is starting to be realized in Drupal,
  • 20:56
    and this is really, really powerful stuff.
  • 20:59
    And fields can be anything from text fields to image fields
  • 21:02
    to number fields to date fields.
  • 21:05
    There's even some really fancy modules out there that let you
  • 21:08
    attach embedded videos or complete addresses
  • 21:14
    and all kinds of stuff.
  • 21:16
    The flexibility that you get from that is really amazing.
  • 21:19
    It's like you don't get this block of content
  • 21:22
    and you're just stuck with this monolithic block,
  • 21:25
    and that you have to use it the way that it is, and it's always going to be this way,
  • 21:29
    and they're all the same, and you can't distinguish between anything.
  • 21:32
    It's like no, different types of content have different meaning to me on my site,
  • 21:36
    and I want to be able to do different things with them.
  • 21:40
    You don't want to have just one form on your entire site for all of the content.
  • 21:45
    Instead building out different content types allows you to basically
  • 21:50
    build specialized forms for whatever kind of content you're actually talking about.
  • 21:54
    [Addison Berry] Basically creating--especially when you have other people
  • 21:57
    that are going to be creating content on your site
  • 22:00
    giving them a form to fill out that has the exact fields
  • 22:05
    that are descriptive of what the information is you want to elicit from them
  • 22:09
    is hugely helpful in getting the right information.
  • 22:12
    CCK really allows you to--completely through the interface--
  • 22:15
    just add those additional fields and configure them,
  • 22:19
    add default values and things like that to really make
  • 22:22
    the data entry or the content creation on the site
  • 22:26
    very simple and streamlined.
  • 22:28
    Now, from a developer's perspective this is great
  • 22:31
    because this sort of stuff we do day in and day out, and it gets old
  • 22:34
    and tedious to do those sort of same things over and over again
  • 22:37
    when you're just playing with the same type of code,
  • 22:40
    so if we can hand that control off to an administrator, a site editor,
  • 22:46
    so that they can go in and set up these systems
  • 22:49
    that gives us time to do the fun things.
  • 22:52
    Building out separate content types is basically
  • 22:55
    the first building block of your website, the first step
  • 22:59
    to actually getting a new site under way.
  • 23:01
    Boot up Drupal, install CCK,
  • 23:04
    start building your content types that all contain
  • 23:08
    the various fields that you need to describe those pieces of content.
  • 23:13
    [Users]
  • 23:18
    For a long time the history of the Web was very much one of
  • 23:22
    small teams of people going and building a website
  • 23:25
    and putting it up for other people to come and view.
  • 23:29
    Although it was a lot more flexible and a lot easier
  • 23:34
    than older publishing models before the Web was available
  • 23:37
    it still meant that it was one team of people making things
  • 23:41
    and another consuming things.
  • 23:45
    Drupal is part of a trend in the evolution of the internet towards
  • 23:52
    the people who come to a website and who visit it,
  • 23:55
    actually helping build and develop the content for it.
  • 24:01
    A lot of companies have started looking at Drupal seriously
  • 24:05
    as a content management system because they're really interested
  • 24:09
    in sort of playing catch up to all of the sites
  • 24:13
    that are around now where users interact with the site.
  • 24:16
    It's no longer an informational site where
  • 24:19
    you just go there, and there's information,
  • 24:21
    and you click around, and that's it.
  • 24:24
    Now a lot of big corporations are really interested in interactive sites.
  • 24:28
    The idea is that it's not just my team publishing
  • 24:32
    and that group of people reading but
  • 24:36
    my team building an environment where other people can come in
  • 24:40
    and share what they're interested in or what their thoughts on something is.
  • 24:44
    [♪ Music ♪]
  • 24:53
    [Users]
  • 24:57
    A visitor to the website is called a user in Drupal speak,
  • 25:01
    and there are two types of users at a base level.
  • 25:03
    There's anonymous users, which haven't logged in yet,
  • 25:06
    and there's authenticated users who have.
  • 25:08
    The first and simplest is an anonymous user.
  • 25:11
    That means just somebody who is coming and is asking to see
  • 25:14
    a given page on the website but has never logged in,
  • 25:17
    and Drupal has no real way of identifying who that person is.
  • 25:21
    Basically you have an anonymous user who is just
  • 25:24
    anybody just wandering around the Web,
  • 25:27
    a random "Oh, look, here's a site."
  • 25:30
    And what they're going to see could be drastically different
  • 25:35
    from someone that's created an account on your site
  • 25:38
    and therefore you know and want to give them something different to see.
  • 25:44
    In a lot of social networking sites you have to log in in order to
  • 25:47
    actually get that functionality.
  • 25:49
    A similar concept in Drupal is what's called the authenticated user.
  • 25:53
    That just means someone who comes to the site
  • 25:56
    and has created a user account and given some sort of
  • 25:59
    identifying information so that Drupal can know "Oh, this is Bob,"
  • 26:02
    or "This is Mary, and they're interested in this particular kind of topic."
  • 26:07
    "I should show them that on the front page."
  • 26:09
    And it goes through and basically has to check and build and say
  • 26:11
    for this particular person at this particular time
  • 26:15
    I need to build XYZ page for them and then display that
  • 26:19
    for them when it gets to the end, and it can involve
  • 26:23
    all kinds of things like do they even have access to the page?
  • 26:26
    Because if they don't I'm not going to show it to them.
  • 26:28
    I'm going to go over here, and I'm going to redirect them to
  • 26:31
    a busy signal because you're not allowed to access this page,
  • 26:36
    or it might be, well, they are allowed to see the page,
  • 26:41
    but I'm going to display it to them in a slightly different way.
  • 26:47
    It could be something as simple in terms of theme layers like a collar,
  • 26:50
    but it could also be actually in the amount of data that's displayed.
  • 26:53
    You don't necessarily get all of it.
  • 26:57
    [Roles and Permissions]
  • 27:02
    Blogs and blogging software, which tends to be one person
  • 27:06
    running their own site where there's that level of trust of everyone
  • 27:09
    who has the permission to post things on the Web
  • 27:12
    using this site is usually either one person
  • 27:17
    or a small group of people who all know each other.
  • 27:20
    With Drupal kind of anyone can come and register for the site,
  • 27:24
    and then you need to decide what you're actually going to be able to
  • 27:27
    trust them to do.
  • 27:29
    And still one of Drupal's strengths is how well it works
  • 27:33
    as a community tool, and it's not limited to just
  • 27:36
    one person on the site, a static sort of site.
  • 27:40
    It's different roles, different permissions.
  • 27:44
    Drupal at its heart uses a role-based permission system,
  • 27:49
    and a very flexible one at that, so as a site administrator
  • 27:53
    you can define any number of roles
  • 27:56
    that a user may have within your system,
  • 28:01
    and any role that that user has will then dictate
  • 28:05
    what permissions and what things that user is allowed to do within the site,
  • 28:09
    which allows for varying levels of interaction.
  • 28:13
    In addition to that you can define additional roles such as
  • 28:16
    a manager role or an administrator role or a
  • 28:19
    lawyer role or something, and they can have additional privileges above and beyond
  • 28:22
    what authenticated users have.
  • 28:24
    Usually when we create a Drupal site the first thing we'll do is create
  • 28:27
    a new role for administrator, and we'll usually call it admin,
  • 28:32
    and basically you go through and check off all of the boxes
  • 28:35
    so that anyone in the admin role
  • 28:39
    has all those permissions.
  • 28:41
    You don't need to have one user account
  • 28:45
    that everyone in the company has the password for that's the
  • 28:48
    root user account that has all the permissions
  • 28:51
    and then somebody goes and leaves the company,
  • 28:53
    and they decide to deface the site and stuff like that.
  • 28:56
    It's no fun.
  • 28:58
    Instead you can set up this admin role
  • 29:02
    and people have their own user name and their own password,
  • 29:05
    and they have all the permissions for everything basically.
  • 29:10
    As more and more people are contributing and interacting,
  • 29:13
    more and more users are logging into your site,
  • 29:16
    you can clearly define and cleanly define
  • 29:20
    what each of those users is allowed to do within your sites,
  • 29:23
    whether it's creating different types of content
  • 29:26
    or you have users that are allowed to publish things or promote things.
  • 29:32
    That all can be cleanly separated out
  • 29:34
    using the role-based permission system.
  • 29:40
    [Single Sign-On]
  • 29:44
    I'd say one of the great strengths of Drupal
  • 29:49
    and one of the reasons why a lot of people get involved in it
  • 29:52
    is because it has the flexibility
  • 29:55
    to do so many things, and behind all of that now
  • 29:59
    is just a single user login system.
  • 30:03
    And this is one of the really powerful things about it.
  • 30:06
    I mean, if you're writing your own content management system you have to
  • 30:09
    handle all of this yourself, but with Drupal Drupal automatically just
  • 30:12
    knows a bunch of information about the user.
  • 30:15
    Drupal does all of the heavy lifting work of maintaining
  • 30:19
    contextual information about
  • 30:22
    who a user is, what they've been doing.
  • 30:24
    You can do things like keep track of what pieces of content they've written
  • 30:28
    versus what pieces of content other people have written,
  • 30:30
    when their last visit was, things like that.
  • 30:34
    All of the process of keeping track of who the user is
  • 30:37
    that's logged in and what permissions they have and
  • 30:40
    sort of what else is going on in the site is all handled by
  • 30:43
    Drupal's framework.
  • 30:45
    The user login system is part of core, and then everything else
  • 30:48
    gets put on top of that.
  • 30:50
    It's a very central piece and something that not a lot of systems have,
  • 30:55
    this great luxury of every single module,
  • 30:58
    everything that's built on top of Drupal has the convenience
  • 31:01
    of knowing who the current logged in user is,
  • 31:05
    what their credentials are, information about them.
  • 31:09
    [Blocks]
  • 31:14
    Blocks are another one of those pieces of Drupal jargon
  • 31:17
    that you've probably heard but not known what they are.
  • 31:22
    The good news is that if you've built the Drupal site
  • 31:26
    you've interacted with a block before, knowingly or not knowingly.
  • 31:29
    The user login form is a block.
  • 31:32
    It shows up on the side bar.
  • 31:36
    Drupal calls these blocks,
  • 31:39
    kind of a nondescript name, but it's what they're called.
  • 31:41
    They're little blocks that can appear across the site.
  • 31:45
    And what blocks are and how they're different from nodes
  • 31:48
    is nodes are the main content, and blocks are
  • 31:51
    the accessory information, the additional information
  • 31:54
    usually shown in the side bars,
  • 31:57
    the navigation system, a little search form maybe, a block.
  • 32:02
    Basically there are kind of two ways that content is represented in Drupal.
  • 32:06
    Nodes is the big one, and that's for sort of content pieces that you
  • 32:09
    generally are going to write once and then leave alone.
  • 32:13
    You might go back and make minor edits, but in general once you've written
  • 32:16
    your about us page it's written, and it's done.
  • 32:18
    Blocks are another way.
  • 32:20
    They are generally more for dynamic, up-to-the-minute content,
  • 32:23
    so for example, Drupal ships with some blocks like who is online
  • 32:27
    and recent comments and things like that
  • 32:30
    that are going to change a lot over time.
  • 32:36
    Other examples of blocks would be
  • 32:39
    recent comments, recent forum topics,
  • 32:42
    all that accessory information that you would see
  • 32:45
    that goes along the main content area of your site.
  • 32:50
    You might want to have--as we do on Lullabot.com--
  • 32:53
    show the latest posts on the site.
  • 32:57
    What's the latest article on the site?
  • 32:59
    What's our latest podcast?
  • 33:01
    And have a link to that that goes across all the pages.
  • 33:03
    It might be ad banners.
  • 33:05
    It might be stuff that tends to appear
  • 33:10
    on multiple pages on the site.
  • 33:13
    And the other thing that blocks are for is kind of supplementary information
  • 33:15
    to the current content.
  • 33:17
    For example, there's an author information block that you can enable
  • 33:20
    which if you look at any post by a given person
  • 33:23
    it will bring up more details about their user profile and stuff like that.
  • 33:28
    You can also put actual content in a block.
  • 33:31
    Sometimes people will use blocks for things like a sale of the week kind of thing,
  • 33:35
    but in general I like to make the distinction where like a node
  • 33:39
    is permanent content that you want to be searchable
  • 33:42
    and things like that and a block is more either
  • 33:45
    transient content that changes constantly or it's just like
  • 33:48
    supplementary information to sort of enhance the rest of the content on the page.
  • 33:54
    [Modules]
  • 33:59
    At the heart of Drupal in all of its functionality is the concept of modules,
  • 34:04
    and what a module is is essentially it's just a little piece of code.
  • 34:07
    Modules are Drupal's plugins.
  • 34:11
    They add functionality.
  • 34:18
    A lot of the Drupal system is built around this idea of modules,
  • 34:22
    plugin software that can either change the default behavior
  • 34:26
    of a given feature in Drupal or add new features entirely.
  • 34:30
    If you want to add a new feature or a new function to your site
  • 34:34
    you would use a module to do that.
  • 34:36
    And examples of modules are things like the blog module
  • 34:39
    which lets you post blog entries.
  • 34:42
    [New Content Type] [New Permissions] [New Block]
  • 34:48
    All of these things that we're talking about modules basically have
  • 34:51
    the ability to fundamentally add
  • 34:54
    and/or modify what Drupal does,
  • 35:00
    and it makes it really powerful.
  • 35:02
    A given module can add new features or change behaviors
  • 35:05
    without any of the other modules on the Drupal site
  • 35:08
    knowing what's happening or even being aware of that,
  • 35:12
    this idea of all of these different pieces that weren't written
  • 35:15
    explicitly to work with each other but can be combined,
  • 35:18
    and using Drupal's APIs they can all interact effectively
  • 35:21
    without clobbering each other.
  • 35:23
    That's one of the really effective and powerful aspects of the software.
  • 35:29
    [Lean and Flexible]
  • 35:33
    Core--which is what we refer to the Drupal that you download
  • 35:36
    by default--comes with a handful of modules.
  • 35:39
    Most of them are pretty simple, and then there's a couple of
  • 35:42
    utility modules that you kind of have to have like system and filter
  • 35:46
    that take care of very low-level tasks.
  • 35:49
    Drupal prides itself on having a very small core library
  • 35:55
    that it uses, and it always wants to make sure that core library
  • 35:58
    is as efficient as possible.
  • 36:04
    [Nate Haug] Drupal comes with very little
  • 36:07
    functionality right out of the box.
  • 36:09
    Instead what it is meant to be is a system
  • 36:12
    where you start out with something small that does
  • 36:15
    basically what every website needs to do,
  • 36:18
    and then by enabling modules
  • 36:21
    you add additional functionality on to the website.
  • 36:25
    The community has gone to great lengths
  • 36:28
    to make Drupal a tight, lean, secure machine.
  • 36:32
    And the philosophy is to keep things as efficient
  • 36:36
    and effective as possible and as light as possible.
  • 36:40
    That's where the flexibility of Drupal lies
  • 36:43
    is that it's really small and compact when you start out,
  • 36:47
    but then by just enabling whatever modules you feel are necessary
  • 36:52
    the site can get a whole lot of functionality really fast.
  • 36:55
    [♪ Music ♪]
  • 37:04
    [Hook System]
  • 37:08
    Drupal operates off the concept of this crazy thing called the hook system.
  • 37:12
    The hook system is something that makes Drupal
  • 37:16
    really extensible, and it's something that is really, really simple
  • 37:20
    just at its core but adds so much flexibility to Drupal
  • 37:24
    that it really gets developers in and working
  • 37:27
    with Drupal in a really shortened amount of time.
  • 37:29
    You can think of Drupal as an event-driven system.
  • 37:33
    All along the process of spitting out a Drupal page
  • 37:38
    there's different moments along the way where it says
  • 37:41
    "Does anybody need to do anything here?"
  • 37:44
    [Would any module like to change this data?]
  • 37:46
    [♪ Music ♪]
  • 37:51
    The module that's responsible for rendering the page will stop occasionally
  • 37:55
    and ask all the other modules in Drupal
  • 37:58
    "All right, I'm at this point with processing the data."
  • 38:01
    "Is anybody else interested in changing the data?"
  • 38:04
    And other modules will all get a shot at changing
  • 38:07
    whatever data is currently being processed, and that might be
  • 38:10
    loading some additional things from the database and adding it
  • 38:13
    to the node object.
  • 38:15
    All along the way there's these things called hooks
  • 38:19
    which basically means that a module developer can hook into it
  • 38:22
    and say, "Okay, I want to do something at this point,"
  • 38:25
    and Drupal will pass along the context.
  • 38:27
    It will say, "Okay, here's the user that's logged in."
  • 38:30
    "Here's the content that they're wanting to view," and now I
  • 38:33
    as the module developer can change that up, manipulate it,
  • 38:36
    do whatever I want.
  • 38:38
    One example is when you view the user permissions screen
  • 38:41
    and you get a big list of check boxes of all the different permissions in the site.
  • 38:45
    What it's doing there is it's querying all of the installed modules in the system
  • 38:49
    and asking if any of them would like to define permissions.
  • 38:57
    Any time I've gone to add in a new bit of functionality
  • 39:00
    all of the kind of hooks to add
  • 39:03
    my extra code were already there and available for me
  • 39:07
    and easy to integrate with.
  • 39:09
    And so that's where Drupal gets a lot of its flexibility.
  • 39:12
    It's not just the node module that has this ability.
  • 39:15
    Every module in Drupal can at any point
  • 39:18
    decide to ask other modules what they want to do with
  • 39:22
    what data is currently being processed and have a chance to change it.
  • 39:27
    [Core versus Contributed]
  • 39:32
    The difference between core and contrib
  • 39:36
    is manifested in that they're actually two different code repositories,
  • 39:40
    which sort of serves as a metaphor for how those code repositories are treated.
  • 39:45
    The core of Drupal is what you download when you download the zip file of
  • 39:51
    Drupal from Drupal.org, and it's sort of the base
  • 39:55
    libraries and things that Drupal needs to get started
  • 39:58
    as well as a collection of around 30 modules
  • 40:01
    that are common features that most sites will use.
  • 40:05
    In addition to those there's also the contributed modules,
  • 40:08
    which are the rich community supplied modules,
  • 40:13
    and those can do all kinds of crazy things like event management,
  • 40:17
    photo galleries, neat little JavaScript clicky, draggy,
  • 40:22
    shiny, pretty things.
  • 40:24
    All that kind of stuff.
  • 40:30
    Drupal is moving towards a world where there's lots of small pieces, modules
  • 40:36
    and add-ons that do one or two things really, really well,
  • 40:41
    but a website is built by combining lots of those things together.
  • 40:45
    The fact that things like CCK and views and image handling things
  • 40:50
    are all in contrib means that almost every Drupal site
  • 40:56
    and Drupal implementation requires both pieces
  • 41:01
    so that the contrib modules aren't just optional add-ons that tend to be
  • 41:05
    very core pieces that Drupal requires.
  • 41:10
    The number of additional add-ons for Drupal,
  • 41:13
    plugin modules that are available,
  • 41:16
    has exploded over the past couple of years.
  • 41:19
    We've gone from having a good solid 700 modules
  • 41:22
    to thousands that are now available
  • 41:26
    for a huge variety of different functions.
  • 41:29
    The Drupal contrib repository, the contributions
  • 41:32
    are add-on modules, and it's much more the Wild West of Drupal code.
  • 41:38
    It's much easier to get access to maintain modules there
  • 41:43
    and the maintainership is--the level of maintainership
  • 41:47
    depends on the individual who is doing the maintaining.
  • 41:53
    [Menus]
  • 41:58
    On a basic level the menus system is a way to create
  • 42:02
    a navigational system for your site.
  • 42:04
    The menus system allows you to manage
  • 42:07
    all of the navigation links that are available
  • 42:10
    for users who are surfing around the site
  • 42:13
    and clicking around and trying to decide what's even available
  • 42:16
    when looking around.
  • 42:19
    When you install a Drupal site and you log in
  • 42:22
    as an administrator and there's all those links that you
  • 42:25
    can click on, the create content, the administer site,
  • 42:29
    that's implemented as a menu, as a Drupal menu.
  • 42:33
    There's one menu, the basic navigation menu,
  • 42:37
    that Drupal automatically builds for you and will maintain.
  • 42:41
    As you install third-party modules, they can add new menu items to that
  • 42:45
    without any other interaction.
  • 42:50
    It's the way to navigate your site, and it knows about things
  • 42:54
    like parent and child relationships so you can have
  • 42:57
    links that are children of other links and that sort of stuff,
  • 43:00
    so if you want to have some sort of hierarchical navigation system
  • 43:04
    you definitely use a menu for that.
  • 43:10
    But again, by default Drupal has this concept of primary links
  • 43:14
    and primary navigation, and then it also has secondary links,
  • 43:18
    so when you go to one section
  • 43:21
    of the site you might have further links that help you get there,
  • 43:24
    so if you have an about page or something like that
  • 43:26
    you need to put that somewhere so that someone can actually find it,
  • 43:30
    and so you would add that to a menu in Drupal,
  • 43:33
    and then it would appear on all of the pages.
  • 43:37
    [Menu Paths]
  • 43:42
    It's really important to keep in mind that there's a very small amount
  • 43:45
    of information that the Drupal software or any web platform has to go on.
  • 43:51
    All that's really there is the URL that a user has asked for,
  • 43:55
    and if they've logged into the website there's going to be
  • 43:59
    a cookie storing session information,
  • 44:02
    just a unique identifier for that person.
  • 44:04
    As far as what's coming in from their browser
  • 44:07
    that's all you have to go on.
  • 44:09
    A big thing when I got started in Drupal is I couldn't figure out
  • 44:13
    "Okay, I just have this path, and I want to
  • 44:17
    make something appear at this path."
  • 44:20
    In traditional development what that means is
  • 44:23
    you make a series of folders, and then you put a file in
  • 44:25
    where you want to take over that path.
  • 44:29
    When you see a path like user/1 you might think that under
  • 44:32
    the hood of things there's a user directory
  • 44:35
    and then there's files for user 1, user 2, user 3 and so on.
  • 44:39
    But in actuality all of the requests that you make to Drupal.org
  • 44:43
    run through a file called index.php.
  • 44:46
    Because in Drupal there's actually only one PHP file
  • 44:49
    that's called for every single request.
  • 44:51
    There is no about.php and news.php.
  • 44:55
    There's exactly one file, and it's index.php,
  • 44:58
    and that file is called on every single request,
  • 45:02
    and the very first thing that's fired up is the menu system.
  • 45:08
    The fact that it is a dynamic site and that your pages
  • 45:11
    are built dynamically on the fly
  • 45:17
    is a much more complex process then people would realize
  • 45:20
    just on the surface when you're used to just plain HTML.
  • 45:24
    The menu system is a lot more than just menus.
  • 45:27
    It's not just what you see along the top of the page
  • 45:31
    or along in the side bar.
  • 45:34
    Rather in Drupal the menu system is actually
  • 45:39
    what defines what gets executed on the entire page.
  • 45:42
    It's like a page router.
  • 45:45
    Underneath the hood the menu system keeps track of every
  • 45:48
    single valid URL path on your website.
  • 45:51
    It's sort of the switchboard operator of Drupal,
  • 45:54
    taking an incoming URL and determining
  • 45:57
    what module and what PHP function should be responsible
  • 46:00
    for actually building the content at that URL.
  • 46:08
    [Clean URLs]
  • 46:12
    One of Drupal's innovations early on
  • 46:15
    has been the clean URL system,
  • 46:18
    and what we did is we said, "Look, these URLs
  • 46:21
    that most dynamic content management systems generate
  • 46:24
    tend to have a lot of gobbledygook in them and tend to make them hard to read
  • 46:28
    for humans, hard to remember."
  • 46:30
    If your URL has a bunch of question marks, ampersands
  • 46:33
    and tildes and all that other stuff
  • 46:36
    it's hard to remember it let alone say that to another person.
  • 46:41
    "Just go to index.php?/ squiggly line."
  • 46:46
    What we did is we came up with a way
  • 46:49
    to hide all of that stuff to sort of make it not visible
  • 46:52
    but still work, if you will, and so we did that
  • 46:56
    through using clean URLs where
  • 46:59
    instead of pages being index.php?q=node/11
  • 47:06
    it's just node/11.
  • 47:09
    The pages are being built dynamically.
  • 47:12
    The beginning part, your example.com part of your URL
  • 47:17
    saying that's the website that I'm on,
  • 47:20
    but everything after that is a query
  • 47:23
    because that's how Drupal is actually building that page is
  • 47:26
    you're actually querying the database.
  • 47:28
    It's building the page and returning it, so the q= is all this query stuff that's going on.
  • 47:33
    It's all the dynamic stuff that's happening. It's what's happening afterwards.
  • 47:36
    And then we decided to take that one step further.
  • 47:39
    We said, "Why restrict it to just node/11?"
  • 47:42
    "Let's have it be /fishing or whatever you want it to have."
  • 47:47
    We added another layer on top of that with a path module,
  • 47:51
    and what we did is we just mapped those already clean URLs
  • 47:55
    to more search engine friendly URLs or whatever URL
  • 47:58
    you want to have on your site.
  • 48:02
    [Themes]
  • 48:07
    I tend to think of Drupal actually in little layers,
  • 48:11
    so there's the theme layer that sits on top,
  • 48:14
    and basically you're generating content, and it's sitting in a database,
  • 48:20
    and it's all related to each other in Drupal's little world.
  • 48:24
    But at the end of the day it needs to be presented
  • 48:27
    on a browser screen to your end user.
  • 48:30
    Theming is Drupal's presentational layer.
  • 48:34
    It's the display layer, and it's separated conceptually
  • 48:39
    from Drupal's framework, the functionality layer.
  • 48:43
    [Nate Haug] The idea of the Drupal theme layer is to separate
  • 48:47
    logic from display.
  • 48:49
    When the logic is all done it's handed to the theme layer and says,
  • 48:53
    "Okay, the logic is done, just print this out."
  • 48:56
    And then the theme layer, that's when it decides exactly
  • 48:59
    how that data is actually going to be output.
  • 49:01
    There isn't processing done before it.
  • 49:03
    It just kind of gets the data and knows
  • 49:06
    what it needs to actually output, and then the theme function
  • 49:09
    can actually decide to take that object and print it out in any way you like.
  • 49:15
    It's really cool that you can have these things separated like that
  • 49:18
    because it means that you can really quickly assemble
  • 49:21
    the functionality of your site and then choose the look of your site separately,
  • 49:26
    and these things are not interrelated.
  • 49:33
    Also you can have two different teams working on the site at the same time.
  • 49:38
    You can have people working on the functionality
  • 49:41
    while meanwhile the design people are working on the theming aspect of things,
  • 49:45
    or you can download existing themes
  • 49:49
    and basically change the look of your site.
  • 49:52
    [♪ Music ♪]
  • 50:11
    Drupal has the ability to output things however you'd like.
  • 50:15
    It's got the basic node data,
  • 50:18
    but the node data is not at all tied to how things are displayed.
  • 50:22
    Things can be displayed however you want and not necessarily in HTML.
  • 50:26
    You could output them, say, in JSON for JavaScript,
  • 50:31
    or you could output them in XML for RSS feeds
  • 50:34
    or for any format you wanted.
  • 50:37
    The theme layer is something that you can affect,
  • 50:41
    and you don't have to drill deep down into the guts of Drupal
  • 50:45
    in order to change how something looks,
  • 50:48
    which is really nice.
  • 50:51
    [Site Configuration]
  • 50:57
    [Error Reporting]
  • 51:02
    Drupal has a lot of different ways of informing you of what's going on
  • 51:05
    in your site, if there's things that you ought to pay attention to
  • 51:08
    or if there's errors that happened and that kind of thing.
  • 51:10
    The most obvious way is if you click and something bad happens
  • 51:14
    you'll get a little red error on the screen that you're looking at that says,
  • 51:17
    for example, the user name field is required or something like that,
  • 51:22
    so that's an easy feedback way to know that, oops,
  • 51:25
    I messed up, and I did something wrong.
  • 51:27
    Drupal has two main error reporting modes,
  • 51:31
    and essentially the difference between the two
  • 51:34
    is the difference between your development or your kind of working state
  • 51:38
    and then your production final state,
  • 51:41
    so whether you want to log all errors
  • 51:45
    as well as print them to the screen,
  • 51:47
    so any time PHP runs in to a parse error
  • 51:51
    or there's a warning or things like that
  • 51:54
    it will log that error using Drupal's logging system,
  • 51:59
    and then you can also have it printed to the screen.
  • 52:01
    As you're developing and working on your site you can actually get those errors
  • 52:06
    right there so you don't have to go check the logs.
  • 52:08
    They're there, and you can address them in your code.
  • 52:11
    Most people--in terms of the end user--you would really rather
  • 52:14
    them just get a blank screen than have a whole bunch of nasty code
  • 52:17
    and weird warnings and things that are sort of frightening and scary sounding
  • 52:21
    and they're like "Oh, my gosh! Do I have a virus on my computer?"
  • 52:24
    They're just not sure, and so silence generally is sort of the best rule there.
  • 52:31
    Instead of actually having it printed out to the screen you would rather just have it log.
  • 52:35
    There's also the concept of a watch dog error logging message.
  • 52:40
    If you go under the administration panel and reports you can see
  • 52:43
    a whole log of all the system events that have happened,
  • 52:46
    which logs everything from really bad database error, PHP error kind of stuff,
  • 52:51
    but it also logs things like who is searching for what terms
  • 52:55
    and when was content created or deleted, and who did it and so on,
  • 52:59
    which is good to keep track of, especially if you want to do
  • 53:03
    some sort of security auditing kind of things and also just to keep track
  • 53:06
    of pages that aren't found.
  • 53:11
    [Status Report]
  • 53:15
    There's the concept of a status report, and at any given time
  • 53:18
    in your site it will kind of keep track of
  • 53:21
    the state of the site and if there's anything that you need to be concerned about.
  • 53:24
    That keeps track of things like what version of PHP are you running,
  • 53:27
    what version of MySQL you're running, when was the last time that Cron ran,
  • 53:31
    when was the last time that your system was checked for security updates,
  • 53:35
    and it will also inform you there if there's a problem that you need to address.
  • 53:42
    And so it's a good thing to just go and check that every once in a while.
  • 53:46
    It's sort of like a healthy little status report, like is there anything odd
  • 53:49
    going on with my site?
  • 53:51
    It's obviously not going to cover every nook and cranny,
  • 53:54
    but it's just covering some of the big basic things
  • 53:58
    about where your site is running, how it's running
  • 54:01
    and what you may need to attend to
  • 54:04
    that might silently be happening in the background
  • 54:07
    that you're just not aware of.
  • 54:11
    [Cron]
  • 54:15
    After you get Drupal installed, one of the first things that you have to do
  • 54:19
    is set up what's called a Cron job,
  • 54:21
    and most people have no idea what that is, and it is kind of a funny word.
  • 54:25
    What Cron basically is is it's something that runs on a schedule,
  • 54:29
    and you can set up how often, like every 5 minutes or every hour,
  • 54:32
    every 6 days or something like that.
  • 54:35
    On a given website it's often important for different tasks
  • 54:38
    to be performed at regular intervals.
  • 54:41
    That could be updating a list of what the highest rated
  • 54:46
    content on the website is, or it could be
  • 54:49
    clearing out old log information that's no longer necessary.
  • 54:54
    That's performed by a utility called Cron
  • 54:57
    that works with Drupal.
  • 54:59
    It's a Unix utility that's present on lots of different web servers
  • 55:04
    that can at regular intervals, like say every 30 minutes or so,
  • 55:07
    just run a particular command.
  • 55:10
    Drupal has a system that utilizes that Cron software
  • 55:14
    to execute cleanup tasks and perform different tasks
  • 55:19
    at regular intervals.
  • 55:21
    We had this one client that didn't run Cron
  • 55:25
    on their system, and we asked him how many records they had
  • 55:29
    in one of the tables in Drupal, and they said they had over a million,
  • 55:32
    and it was the cache table, which is supposed to hold all of this temporary
  • 55:36
    information that can be built up and lost and built up and lost
  • 55:40
    for performance, and as soon as we cleared that table for them
  • 55:45
    the site was snappy and responsive, and we were able to get Cron up and running,
  • 55:49
    and their site was fine.
  • 55:51
    Cron is important because it does things like clean out your old log files
  • 55:55
    and re-index your content for the search engine
  • 55:58
    and kind of general maintenance tasks that only make sense to do once in a while.
  • 56:03
    It will send out emails on a certain schedule
  • 56:07
    so that you don't do things all at once and take down your site.
  • 56:10
    It will batch things up and do them a lot over time.
  • 56:14
    If you have search enabled
  • 56:17
    Drupal has to go through and actually see "Oh, you've got new content,"
  • 56:20
    and "Oh, you've got new words in that content, and I need to know about that."
  • 56:25
    It doesn't do that on the fly every single time
  • 56:28
    because that would be rather intensive, so Drupal does that
  • 56:33
    on a Cron run.
  • 56:37
    [Performance]
  • 56:41
    Because Drupal is a database-driven application a lot of times
  • 56:44
    people will get nervous about the fact, well,
  • 56:47
    is it going to scale?
  • 56:49
    Just a static HTML page is really easy to serve,
  • 56:52
    but when you start bringing databases and PHP and stuff like that
  • 56:55
    it becomes quite a bit of extra overhead.
  • 56:58
    But there are things that you need to keep in mind as you're
  • 57:01
    making the transition from tinkering around and building websites
  • 57:04
    and learning how Drupal works to actually making one
  • 57:07
    that can stand up under the load of being linked to
  • 57:10
    by Slashdot or being mentioned in an article
  • 57:13
    in a magazine or something like that.
  • 57:15
    A lot of the performance and scalability with Drupal
  • 57:18
    actually comes from the other layers that comes from
  • 57:22
    the operating system, the database, the web server,
  • 57:25
    and Drupal is sort of the last thing that you optimize
  • 57:28
    because you can optimize Drupal all you want,
  • 57:30
    but if you're reaching a bottleneck with the other layers
  • 57:34
    that are coming before that you're not going to see
  • 57:38
    the performance increases that you would otherwise notice.
  • 57:42
    We've helped set up a lot of large-scale clients
  • 57:45
    with these 20-server installations
  • 57:53
    where they've got multiple database servers and load-balanced Apache servers
  • 57:58
    and separate file servers and all that kind of stuff,
  • 58:02
    so each of the different aspects of the website
  • 58:09
    which might all run on one server if you're running it on the $5 dollar a month hosting
  • 58:14
    can break off, and you can actually dedicate an entire server
  • 58:18
    or group of servers to that functionality,
  • 58:22
    so it scales pretty well.
  • 58:26
    Drupal provides a lot of ways to improve the performance of your site
  • 58:29
    and help it to scale.
  • 58:31
    At a basic level some things that you can do are
  • 58:34
    you can turn on CSS aggregation.
  • 58:37
    What that will do is take all of the various style files
  • 58:40
    that are coming from different modules and themes and different places
  • 58:43
    and smush them all down into one file, so that's only sent
  • 58:46
    across the wire once, and that will make your site a lot more responsive for your visitors.
  • 58:50
    Traditionally the solution has been to
  • 58:53
    rework the internals of Drupal so that it's easy
  • 58:56
    to plug in new capabilities for, say, advanced caching
  • 59:00
    or new ways of optimizing speed for certain kinds of information look ups or whatever
  • 59:06
    but not to require those so that people with modest hardware
  • 59:09
    or small needs can just install Drupal out of the box
  • 59:13
    and start using it whereas people who really need to
  • 59:17
    squeeze performance out of it can begin
  • 59:20
    optimizing and replacing certain components
  • 59:23
    with highly optimized replacements.
  • 59:29
    [Caching]
  • 59:33
    Caching is a really important concept in Drupal and actually in a lot of websites.
  • 59:38
    The idea behind caching is that there are some
  • 59:42
    kinds of content that can be really expensive to build
  • 59:46
    from the perspective of a server that has to spend time
  • 59:50
    pulling information out of the database and formatting
  • 59:53
    into HTML and taking into account all of the information
  • 59:56
    like who a user's friends are and what content they've recommended
  • 59:59
    to that person and stuff like that.
  • 1:00:02
    It's not that bad on a simple website, but on complex websites
  • 1:00:05
    that have lots of rich context and time-based information
  • 1:00:10
    there are certain pieces of information that just take a long time to build,
  • 1:00:13
    and if you have a lot of traffic coming to your website
  • 1:00:16
    each person asking the web server to build that
  • 1:00:20
    complex bit of information can be a serious problem.
  • 1:00:23
    Caching is basically just the practice of
  • 1:00:26
    only building that once if it doesn't need to be redone.
  • 1:00:31
    The HTML parts of Drupal, the HTML pages
  • 1:00:34
    can't be cached because they're dynamic.
  • 1:00:36
    You're always updating that.
  • 1:00:38
    People are adding comments.
  • 1:00:40
    You are creating new blog entries.
  • 1:00:42
    All that stuff lives in the database, not static files
  • 1:00:45
    like those other parts, so what we've enabled
  • 1:00:48
    inside of Drupal is a page caching mechanism
  • 1:00:51
    where if an anonymous user visits a page
  • 1:00:55
    at the end of that request we take all of that
  • 1:00:59
    and stick it in the database.
  • 1:01:01
    The next time an anonymous user visits
  • 1:01:03
    that same page we can say, "You know what?"
  • 1:01:05
    "Nothing's changed yet, so let's just load
  • 1:01:09
    that page that we have on standby,"
  • 1:01:12
    and that's generally what is referred to as caching.
  • 1:01:15
    It's slightly less desirable because
  • 1:01:18
    it only works for anonymous users, not people who are logged in,
  • 1:01:21
    and the other problem is that it will make the content stale
  • 1:01:25
    for a certain period of time, so for example, if there's new comments
  • 1:01:28
    in the last 5 minutes they might not see them except
  • 1:01:31
    every time the cache flushes, which might be every 10 minutes or so.
  • 1:01:35
    It's also possible to do smaller bite-sized chunks of a page
  • 1:01:39
    and cache them after they're built
  • 1:01:42
    so that even logged in users who may see a different mix of content
  • 1:01:46
    may still be seeing a cached piece of content or a smaller chunk of the page
  • 1:01:50
    if it doesn't change very frequently.
  • 1:01:53
    And what we've done is we've evolved from just a page caching system
  • 1:01:57
    to a module caching system as well, so now different modules--
  • 1:02:01
    if there's parts of their code that tend to be CPU intensive
  • 1:02:05
    or a little more involved from an algorithm standpoint--
  • 1:02:09
    developers can cache that now.
  • 1:02:12
    They can create their own cache tables, store that information,
  • 1:02:16
    and just call on that rather than going through all of the steps over and over again.
  • 1:02:22
    There's also a relatively new feature called aggressive caching
  • 1:02:27
    that strips out a lot of the API calls that Drupal will make
  • 1:02:31
    to third-party modules to allow them to do their work
  • 1:02:34
    and focus on doing nothing but pulling that cached page
  • 1:02:38
    out of the database and presenting it to a user.
  • 1:02:40
    That means that Drupal does a lot less work to display
  • 1:02:43
    a page to a user, and that means that your website
  • 1:02:46
    can serve pages to more users as they come and visit the site.
  • 1:02:50
    There's also modules such as memcache and advanced cache
  • 1:02:53
    to do crazy kinds of caching, but generally you only need that
  • 1:02:56
    if you're talking about several different back ends
  • 1:03:00
    that you're using.
  • 1:03:02
    For the typical person who is just using a blog site
  • 1:03:05
    or even just a really popular site
  • 1:03:07
    with not a lot of logged in users you should be fine with the default options.
  • 1:03:11
    [♪ Music ♪]
  • 1:03:21
    [Featuring]
  • 1:03:24
    [Addison Berry]
  • 1:03:31
    [Angie Byron]
  • 1:03:37
    [Jeff Eaton]
  • 1:03:43
    [Nate Haug]
  • 1:03:50
    [Jeff Robbins]
  • 1:03:56
    [James Walker]
  • 1:04:02
    [Matt Westgate]
  • 1:04:07
    [Understanding Drupal]
  • 1:04:13
    [Part of the Lullabot Learning Series]
  • 1:04:16
    [www.Lullabot.com]
  • 0:00
    [Lullabot]
  • 0:04
    [Nate Haug] 人们总是问我关于Drupal
  • 0:06
    我试图向人们解释它是什么,我做什么。
  • 0:11
    这是有点难,一旦你回答这个问题:“哦,我建立网站,”
  • 0:14
    对某些人来说通常是足够的,,他们不希望听到更多
  • 0:19
    很多人,他们不知道,你的工作有什么特殊.
  • 0:25
    这个Drupal是什么?
  • 0:29
    [Jeff Eaton] 对很多人Drupal是有很多不同功用
  • 0:31
    在最简单的层次,它是一个软件,它允许你
  • 0:35
    轻松地管理他们的网站内容,例如管理所有的博客文章
  • 0:39
    新闻故事或类似的东西.
  • 0:42
    [Addison Berry] 它可以让你编辑内容
  • 0:44
    通过网页浏览器,而不是聘请别
  • 0:47
    知道很多的HTML和如何做编程程序员
  • 0:51
    为你更新内容
  • 1:00
    [Angie Byron] 在通常与传统意义上的网页,你必须
  • 1:04
    手工修改一些程序,你必须管理这些文件
  • 1:09
    和链接像网页和文件的东西。
  • 1:11
    Drupal 使过程轻松了许多。
  • 1:13
    一旦你安装,你可以只要按一下按钮来添加
  • 1:15
    网页和表格,所有这些东西。
  • 1:19
    Matt Westgate] 你可以去一个页面,单击“编辑”按钮.
  • 1:23
    该网页上的所有内容,现在是一系列表格.
  • 1:26
    一系列的文本字表格,所以你可以去那里,
  • 1:29
    您可以编辑它,保存它,然后你编辑的内容
  • 1:32
    在实时编辑您的网站上的内容。
  • 1:34
    [James Walker] 无论它是一个社交网站
  • 1:37
    有大量的用户交互或我的单用户博客
  • 1:42
    使得确保程序运行以及
  • 1:46
    管理界面运行在所有这些不同的场景。
  • 1:50
    [音乐]
  • 2:36
    了解Drupal
  • 2:44
    很多人都参照Drupal作为一个内容管理系统,CMS。
  • 2:47
    我怎么形容一个内容管理系统
  • 2:50
    首先给一点背景从历史的角度。
  • 2:56
    [1977]
  • 2:58
    [1978 BBS] [1979]
  • 3:00
    [1980 Usenet] [1981,1982]
  • 3:02
    自由软件基金会
  • 3:04
    [1989 CompuServe]
  • 3:06
    [AOL] [1969,1971, 1975, 1987, 1986, 1988]
  • 3:08
    [1991 World Wide Web]
  • 3:10
    人数量的爆炸性增长
  • 3:13
    使用互联网为学习和营销.
  • 3:16
    普通的有乐趣的令人难以置信的。
  • 3:20
    互联网正在改变我们永远学习,工作和娱乐的方式。
  • 3:25
    [1991] [1993 Mosaic, HTML] [1994 Yahoo, Netscape]
  • 3:27
    [1995 MySQL, Amazon.com, Internet Explorer, eBay, Altavista] [1996 Hotmail, Javascript, CSS]
  • 3:29
    [1998 XML, Google] [1999, 2000]
  • 3:31
    人们创建网页,第一次来到网站存在
  • 3:33
    是在网站上的每一页是自己的页面。
  • 3:37
    网页只是一个档案的收集.
  • 3:40
    被称为HTML文件,他们只是在他们的代码。
  • 3:43
    你可以使用一个程序如Microsoft FrontPage或Dreamweaver,
  • 3:47
    不然你就编程,你会编写出
  • 3:50
    非常单一页面在您的网站上,这是可行
  • 3:54
    除非你是Amazon.com,你将有
  • 3:57
    万页,2万页。
  • 4:02
    只是附近的链接文件的数量是天文,
  • 4:06
    并保持同步,没有大量的工作
  • 4:10
    设计改变更几乎是不可能的
  • 4:12
    这是动态网站的概念,如何真正起飞。
  • 4:17
    他们想说"版权要在每一个网页上"
  • 4:21
    让我们在一个地方,然后把它链接到该
  • 4:25
    在我们的所有其他页面,这样当我们需要改变的版权
  • 4:28
    我们在一个地方,它的螺旋通过该网站的其余部分
  • 4:35
    它的设计是可以运行的最小公分母硬件。
  • 4:40
    它可以运行在LAMP平台,这是Linux,Apache,MySQL和PHP。
  • 4:46
    Drupal的适合与你基本上有
  • 4:49
    Linux上的底层,并且正在运行的操作系统。
  • 4:51
    这是一种保持您的磁盘驱动器的运行,
  • 4:54
    非常低的水平,类似的东西。
  • 4:56
    那么你的Apache坐在最重要的是,那是什么是Web服务器的。
  • 4:59
    它可以处理,当你去到www.example.com
  • 5:02
    它会找到一个文件的​​电脑上安装的
  • 5:06
    再回给你,通过你的网络浏览器。
  • 5:08
    MySQL是一个数据库,存储,使您的网站的所有内容
  • 5:11
    以及所有你的用户,你的销售报告。
  • 5:15
    之类的东西,都去到数据库中,然后PHP
  • 5:18
    MySQL和Apache之间的桥梁,是一种
  • 5:23
    此动态内容从数据库中取出,并以这样的方式呈现
  • 5:26
    有人能看到它在Internet Explorer,Firefox和之类的浏览器
  • 5:30
    Drupal的基本上是作为一个底层生成HTML,
  • 5:36
    但如何做,而不是数百或数千甚至上百万
  • 5:42
    HTML页面都单独写
  • 5:46
    Drupal是非常集中的,它是如何生成的网页。
  • 5:54
    一个数据库驱动的系统的概念
  • 5:57
    所有的内容集中在一个地方,
  • 6:00
    受够模板文件,通过动态等,以只输出
  • 6:05
    任何内容的页面是在任何给定的时间。
  • 6:08
    [音乐]
  • 6:16
    而不是,比方说,200页,你可能有一个或两个,
  • 6:21
    再有一点称为变量的动态位
  • 6:24
    只给,说,一个给定页面的内容
  • 6:27
    一个给定页面的标题。
  • 6:32
    [内容管理框架]
  • 6:37
    我认为,最Drupal的开发变得很兴奋的部分
  • 6:40
    是的Drupal的基本框架。
  • 6:43
    其他的事情,这是它的一个概念管理框架,
  • 6:46
    这是什么意思是,它可以让你雇用一个开发人员,
  • 6:50
    或者,如果你是一名开发人员自己,扩展Drupal的附加功能
  • 6:54
    超出了它一般可以做。
  • 6:56
    我真的,真的很欣赏Drupal的能力
  • 6:59
    作为一个平台之上建立更多的解决方案
  • 7:03
    因为它的API和其挂钩的额外的第三方插件模块
  • 7:07
    最重要的是要建立在。
  • 7:09
    我发现,如果有一个特点,Drupal没有有
  • 7:12
    之间的距离开始,Drupal和加入该功能
  • 7:16
    我试图去对我自己从头开始建立一些短得多。
  • 7:23
    当然,对于开发人员能够灵活
  • 7:26
    是关键,我觉得。
  • 7:29
    这是什么帮助我爱上了它,但事实上,
  • 7:32
    它有一个干净,简单的核心
  • 7:35
    有许多可用钩子
  • 7:38
    加在什么样的功能,你想要的。
  • 7:42
    不实际挖掘,实际上什至理解代码的情况下
  • 7:45
    你可以做很多事情,真正创造正是你想要的
  • 7:49
    通过捕捉适当的拼凑。
  • 7:52
    所有这些小乐高积木块的想法
  • 7:55
    和他们一起组装成大型网站有很多丰富的功能
  • 8:00
    是真的,真的很重要的Drupal的方向已经越来越英寸
  • 8:08
    这个想法,你工作的一种基础平台
  • 8:11
    然后你点击拼在一起,这就是典型的
  • 8:16
    至少一个Drupal安装或Drupal网站建设的第一部分
  • 8:20
    是,你点击了一堆这些作品一起
  • 8:23
    并把他们绑在一起。
  • 8:25
    您不仅可以挑,所有的组件免费
  • 8:29
    并尝试通过安装在您的网站
  • 8:32
    真正看到他们如何工作,你也可以打开它们
  • 8:35
    在里面,看看他们,看看他们究竟是如何写的,
  • 8:40
    代码的质量是如何好,并找出如果它是一个质量足够的软件
  • 8:44
    要使用为基础,为您的网站。
  • 8:49
    是什么吸引了我到Drupal的代码,优雅的代码。
  • 8:55
    注解。它是干净的。
  • 8:58
    它有一个非常典雅的体系结构
  • 9:02
    当我开始寻找在Drupal的代码,它是惊人的。
  • 9:06
    我的意思是,它是这样的,我可以理解这一切
  • 9:10
    只是很多东西,真的让我感觉之类的软件是比我聪明得多。
  • 9:14
    实在是一个很大的东西下面,我只需要
  • 9:18
    学会了如何驾驭它,然后我就可以做任何事情
  • 9:21
    我们需要做的这个网站。
  • 9:23
    我们已经有一个灵活的内容体系。
  • 9:26
    我们已经有一个分类系统。
  • 9:28
    这是你不必自己开发,
  • 9:30
    而是可以建立在上面的东西,只是来理所当然的
  • 9:34
    从Drupal,你可以开始做真正重要的东西,
  • 9:37
    到你的实际项目。
  • 9:40
    [Drupal的核心模块]
  • 9:44
    [开源]
  • 9:49
    Drupal的是开源的,是非常重要的
  • 9:52
    只是因为我一直在寻找一种方式来获得一个良好的开端的东西
  • 9:56
    以现有的东西,然后从
  • 10:00
    一个地步,我开始真的高了
  • 10:04
    ,然后就可以从那里。
  • 10:08
    在过去的几年中,Drupal的,确实形成了很多,
  • 10:11
    它的成长只是一个预先包装的网站
  • 10:15
    你可以把功能和成为一个真正的平台
  • 10:18
    真的,真的很先进的大型网站建设。
  • 10:22
    很多规模较大的公司也开始有兴趣
  • 10:26
    因为很多人无论是从他们支付供应商
  • 10:30
    数十万美元,以维持一年
  • 10:33
    其内容管理系统或东西的习惯,他们必须保持
  • 10:36
    开发商一队以保持它的运行和维护。
  • 10:41
    开源是一种非常有吸引力的选择
  • 10:44
    因为它使他们能够利用这个社区
  • 10:48
    成千上万的人,是不是他们的工资
  • 10:52
    可以做的事情,如添加新的功能,
  • 10:55
    测试错误,并在这里和那里只是小的改进。
  • 11:03
    封闭的软件,喜欢买一辆车罩焊死,
  • 11:07
    如果你想更换机油或看到发生了什么事情下
  • 11:11
    你真的没有办法做到这一点。
  • 11:13
    你依赖于给其他人。
  • 11:15
    你是依赖于他们给你的车的特点
  • 11:18
    你留下了,
  • 11:21
    和开源软件就像是有时你是幸运的,如果你得到一个罩,
  • 11:26
    但你可以在那里得到挖掘,看看是如何工作的,
  • 11:30
    更改自己的油,这就是真正解放
  • 11:34
    很多公司。
  • 11:36
    免费和开源,作为开发人员
  • 11:39
    这使得它非常,非常容易得到一个更丰富,更深入的
  • 11:43
    理解的代码,它是如何工作以及如何最好
  • 11:46
    使用它,扩展它。
  • 11:49
    事实上,它是免费的啤酒
  • 11:53
    和自由,在自由中,你可以
  • 11:56
    改变自己的东西,你没有锁定在
  • 11:59
    其他人给你,基本上是在他们突发奇想。
  • 12:05
    通过授权的GPL Drupal的一种,不仅保证了代码
  • 12:11
    其核心种生活在自由和开放源码软件
  • 12:16
    但它也促进,并在某些情况下,决定了
  • 12:21
    该代码已被添加到它和扩展,
  • 12:24
    下载的模块,也是GPL许可
  • 12:27
    因此免费提供的。
  • 12:31
    [社区]
  • 12:35
    它的另一个特点 - 为什么人会选择
  • 12:40
    开发社区和贡献者社区。
  • 12:44
    成千上万的人基本上有一个庞大的开发基地
  • 12:47
    不断提高的软件和附加套件。
  • 12:52
    他的增长是惊人的,到这种地步
  • 12:56
    思考令人震惊的
  • 13:01
    社区以及软件本身。
  • 13:03
    这只是样的自进的东西,
  • 13:07
    Drupal的变得更好,更多的人有兴趣,因为它是更好的,
  • 13:11
    然后我们有更多的人努力工作,所以它变得更好,
  • 13:13
    然后更多的人对它感兴趣了,
  • 13:16
    所以观看的一部分,它只是一个有趣的过程。
  • 13:21
    [内容]
  • 13:27
    Drupal有很多的专业术语
  • 13:30
    它确实增加了 - 它被称为为“我很糟糕”门槛
  • 13:36
    那里的taxonomy 和node和所有这类术语
  • 13:40
    你一定要学会,还需要一段时间来吸收
  • 13:44
    到那个地方你开始感到有信心
  • 13:47
    你可以谈论的话题。
  • 13:49
    是的,节点可能是一个最难的概念,我让
  • 13:53
    当我第一次使用Drupal。
  • 13:55
    我记得疑惑
  • 13:59
    我不知道,我只是想使网页,好吗?
  • 14:01
    我只想网页。我不知道这个node的东西是什么。
  • 14:05
    节点的内容可以是一个有点令人困惑的的想法
  • 14:10
    通常是因为他们这样说:“好吧,为什么不只是公告?”
  • 14:14
    为什么不只是一个故事或一篇文章,或类似的东西吗?
  • 14:19
    困难的是,一个node可以是任何一个或所有这些东西。
  • 14:25
    [什么是 Node?]
  • 14:29
    Chinese (Simplified)EnglishSpanish node是Drupal的基本构建块。
  • 14:35
    Drupal是一个内容管理系统,以及一个node是
  • 14:39
    所管理的内容。
  • 14:41
    是的,如果你曾经使用过的Drupal,对于任何给定的时间内,你可能已经注意到
  • 14:44
    当你看到在一块的内容,如博客条目
  • 14:47
    或投票,你会看到这个奇怪的node/1的事情。
  • 14:52
    Drupal的node由于某种原因选择了字
  • 14:55
    参照系统中的任何内容片段。
  • 14:58
    [音乐]
  • 15:06
    所以对我来说,学习一个node是什么,不管有多少说明
  • 15:09
    我读了或有多少人试图向我解释,
  • 15:12
    我只使用Drupal能够真正了解它
  • 15:16
    但实际上它本质上是 - 我的意思是说,它只是一块的网站上的内容。
  • 15:21
    内容是指一块是它有一个标题
  • 15:24
    一个作者,一个描述或身体?
  • 15:27
    它有一个创建日期?事情是这样的。
  • 15:30
    最重要的是,他们有一个唯一的ID,
  • 15:33
    使他们能够通过URL寻址
  • 15:37
    或在整个系统中唯一地引用。
  • 15:40
    他们基本上是在一个点上,后退了几步,说,
  • 15:42
    好了,好了,我们有调查结果显示,我们的故事,和我们有网页,
  • 15:46
    我们的文章,和我们有活动,各种各样的东西。"
  • 15:51
    他们说,“什么是主要的东西是通用的
  • 15:54
    这些不同的元素吗?“
  • 15:57
    因此,他们制定这些单件类似的标题和等
  • 16:01
    然后把那些样的一个总体的概念,
  • 16:04
    内容片段称为一个node,然后一切
  • 16:07
    只是添加的东西,以一个基本的node。
  • 16:11
    [Node 修订版]
  • 16:16
    node系统和集中另一个巨大优势是,
  • 16:20
    Drupal可以跟踪修订的node,这意味着,如果您编辑
  • 16:24
    一块内容修改两行点击保存
  • 16:27
    它可以存储的修订,让你可以回去
  • 16:30
    恢复到它以前的方式。
  • 16:33
    [音乐]
  • 16:42
    如果你愿意,你不必保留一份副本
  • 16:45
    但你可以改变,
  • 16:48
    会发生什么事是,每次你做出改变
  • 16:51
    如果你告诉 - 有一个复选框的修订,
  • 16:54
    会发生什么事是,Drupal将基本采取的快照,数据
  • 16:58
    并将它放入数据库中每次你做出改变。
  • 17:03
    这是特别重要的事情,比如管理滥用。
  • 17:07
    这也是非常重要的事情,比如 - 比如你运行你的整个用户手册
  • 17:11
    为您的员工手册或东西的Drupal。
  • 17:14
    你想成为能够看到该文件已经演变随着时间的推移.
  • 17:18
    等Drupal可以保持跟踪所有你的,你可以恢复修改,
  • 17:22
    你可以删除修订版,你可以添加新的修订,
  • 17:24
    它只是一个方式保护您的内容和种保持
  • 17:27
    不断备份的一切。
  • 17:31
    [内容类型]
  • 17:35
    一般而言,在最终用户
  • 17:38
    访问者应该从来没有真正看到这个词node
  • 17:42
    整个用户界面的指引
  • 17:45
    写Drupal模块
  • 17:48
    是你不谈论node
  • 17:51
    node的第一条规则,就是你不谈论node。
  • 17:54
    通常情况下,你听到这个词node在开发者发言。
  • 18:00
    你少听到它在最终用户方面的事情。
  • 18:03
    在Drupal管理界面
  • 18:07
    这就是所谓的内容类型。
  • 18:12
    但事实是,所有的开发者把这些东西作为node
  • 18:16
    Drupal可以做的事情,与这内容管理组件
  • 18:20
    它可以让你创建不同类型的内容。
  • 18:24
    Drupal的工作原理是,它会使用这个概念的内容类型,
  • 18:27
    这真的令人难以置信,我认为Drupal的优势之一。
  • 18:31
    Drupal允许你分割你的网站上的内容
  • 18:34
    置身于不同种类的内容,因此,每种不同类型的内容
  • 18:38
    类似事件或博客文章或上传的照片
  • 18:42
    可以区别对待。
  • 18:46
    不同的节点类型可以有不同的属性。
  • 18:49
    他们可以有不同的默认设置
  • 18:52
    是否显示主页或不显示
  • 18:56
    用户提交的信息,它被贴日期之类的东西。
  • 19:04
    我可以让那些看上去不同。
  • 19:06
    我可以列出他们以不同的方式,
  • 19:09
    我可以循环他们。
  • 19:11
    我可以分割他们的重新整理排序
  • 19:14
    我多么希望我的数据,我要显示的内容在网站上。
  • 19:21
    而且你还可以设置不同的权限,内容类型以及。
  • 19:24
    你可以控制谁可以创建在系统中的任何内容类型,
  • 19:27
    谁可以编辑它,可以删除它,谁可以管理所有的那些事
  • 19:31
    甚至可以管理整个站点的所有内容完全。
  • 19:37
    {内容构建工具包]
  • 19:41
    当我开始建设的WordPress博客
  • 19:46
    我总是缺少的东西是能够添加更多的领域。
  • 19:51
    我想不止这一点,标题和摘录,故事大纲
  • 19:55
    无论他们在不同的事情,不同的Web应用程序和身体。
  • 20:01
    它一开始只是标题和正文。
  • 20:04
    这是一个基本的node,然后你把那两个基础件,
  • 20:09
    然后你开始添加额外的东西,他们
  • 20:11
    如添加在分类信息和发布信息
  • 20:15
    使用CCK,增加额外的字段
  • 20:20
    但这样就可以跨行各种其他信息
  • 20:23
    围绕基本的节点。
  • 20:26
    CCK的内容构建工具包
  • 20:30
    真的是有关创建自定义内容类型,
  • 20:34
    因此,超越博客文章和简单的故事,有标题和正文
  • 20:40
    并增加额外的附加字段的信息。
  • 20:46
    使用CCK,圣杯可以添加
  • 20:51
    许多领域,你想要的内容类型开始在Drupal实现,
  • 20:56
    这是真的,真的很强大的东西。
  • 20:59
    而字段可以是任何从文本字段图像领域的
  • 21:02
    号码字段日期字段。
  • 21:05
    甚至还有一些真正看中的模块,在那里让你
  • 21:08
    附加的嵌入式视频或完整的地址
  • 21:14
    各种项目
  • 21:16
    灵活性更是惊人。
  • 21:19
    这就像你没有得到这个块的内容
  • 21:22
    你只是坚持了这个集成块,
  • 21:25
    和你有使用它的方式,它是,它总是会是这个样子,
  • 21:29
    它们都是一样的,你不能区分什么。
  • 21:32
    这就像没有的内容,不同类型有不同的含义,我在我的网站上,
  • 21:36
    我希望能够与他们做不同的事情。
  • 21:40
    你不希望有你的整个网站上全部的内容只是一种形式。
  • 21:45
    而是建立了不同类型的内容,让您基本上
  • 21:50
    什么样的内容,你实际上是在谈论建立专门的表格。
  • 21:54
    基本上创造 - 尤其是当你有其他人
  • 21:57
    将要在您的网站上创建内容
  • 22:00
    他们要填写的表单,有确切的栏位
  • 22:05
    是描述性的信息是什么,
  • 22:09
    在获得正确的信息是巨大的帮助。
  • 22:12
    CCK真的让你 - 完全通过界面 -
  • 22:15
    只需添加这些额外的字段,并配置它们,
  • 22:19
    添加默认值之类的东西,要真正使
  • 22:22
    在网站上输入数据或内容创作
  • 22:26
    很简单,简化。
  • 22:28
    现在,从开发人员的角度来看,这是伟大的
  • 22:31
    因为这样的东西,我们做一天和一天
  • 22:34
    和乏味做同样的事情一遍又一遍的那些排序
  • 22:37
    当你只是在玩同类型的代码
  • 22:40
    因此,如果我们可以给管理员,网站编辑,
  • 22:46
    因此,他们可以去和这些系统
  • 22:49
    让我们有时间做有趣的事情。
  • 22:52
    构建了不同的内容类型是基本
  • 22:55
    他第一块基石,你的网站,第一步
  • 22:59
    实际上正在进行一个新的网站。
  • 23:01
    启动了Drupal的安装CCK,
  • 23:04
    开始建立您的内容类型都包含
  • 23:08
    的各个领域,你需要描述这些作品的内容。
  • 23:13
    [用户]
  • 23:18
    很长一段时间的网站历史是
  • 23:22
    小团队的人,建立一个网站
  • 23:25
    并把它来查看其他人。
  • 23:29
    虽然这是一个很多更灵活,更轻松了许多
  • 23:34
    之前,网络是比旧的出版模式
  • 23:37
    它仍然意味着这是一个团队的人做的事情
  • 23:41
    另一个耗时的事情。
  • 23:45
    Drupal是向互联网发展的一个趋势,
  • 23:52
    谁的人来一个网站,访问它的人,
  • 23:55
    实际上是在帮助建立和发展的内容。
  • 24:01
    很多公司已经开始认真考虑Drupal
  • 24:05
    作为一个内容管理系统,因为他们是真正的兴趣
  • 24:09
    赶上所有的网站
  • 24:13
    用户与网站进行交互。
  • 24:16
    它不再是一个信息网站
  • 24:19
    你只是去那里,那里的信息,
  • 24:21
    并单击
  • 24:24
    现在很多大公司真正感兴趣的互动网站
  • 24:28
    我们的想法是,这不只是我的团队出版
  • 24:32
    其他人阅读,但
  • 24:36
    我的团队建设的环境下,其他人可以进来
  • 24:40
    并分享他们感兴趣或他们的思想的东西是什么。
  • 24:44
    [音乐]
  • 24:53
    [用户]
  • 24:57
    一个访客在网站被称为Drupal的用户,
  • 25:01
    基础有两种类型的用户。
  • 25:03
    有匿名用户,都尚未登录,
  • 25:06
    有通过身份验证的用户
  • 25:08
    第一,最简单的是一个匿名用户
  • 25:11
    这意味着,刚才有人来了,要看
  • 25:14
    一个给定页面上的网站,但从未登录过,
  • 25:17
    Drupal有没有真正的办法确定那个人是谁。
  • 25:21
    基本上你只是一个匿名用户
  • 25:24
    任何人只是四处游荡网络,
  • 25:27
    一个随机的“哦,你看,这里有一个网站。”
  • 25:30
    他们会看到什么显着不同的
  • 25:35
    在您的网站上创建一个帐户
  • 25:38
    因此,你知道,想给他们看不同的东西。
  • 25:44
    在很多社交网站,你必须登录以
  • 25:47
    其实该功能。
  • 25:49
    在Drupal类似的概念是所谓的经过身份验证的用户。
  • 25:53
    这只是意味着有人来到网站
  • 25:56
    并创建一个用户帐户,并给予某种形式的
  • 25:59
    识别信息,以便Drupal可以知道“哦,这是Bob。”
  • 26:02
    “这是Mary,和他们有兴趣在这种特殊的主题。”
  • 26:07
    “我告诉他们在头版。”
  • 26:09
    它通过和基本检查,建立并说
  • 26:11
    这个人在这个特定的时间
  • 26:15
    我需要建立XYZ页,然后显示该
  • 26:19
    他们当它到达的结束,它可能涉及
  • 26:23
    各种类的东西,他们甚至有访问的页面?
  • 26:26
    因为如果他们不这样做,我不会把它展示给他们。
  • 26:28
    我要在这里,我将它们重定向到
  • 26:31
    一个繁忙的信号,因为你不允许访问此页面,
  • 26:36
    或者它可能是,他们被允许看到的页面,
  • 26:41
    但我要显示给他们一个稍微不同的方式。
  • 26:47
    这可能是一些简单的像一个领的主题层,
  • 26:50
    但它也可能是实际中所显示的数据量。
  • 26:53
    你不一定能得到这一切。
  • 26:57
    [角色和权限]
  • 27:02
    博客和博客软件,这往往是一个人
  • 27:06
    运行自己的网站,在这里,每个人的信任,
  • 27:09
    有权限发表在网络上的东西
  • 27:12
    使用本网站通常是要么一人
  • 27:17
    或一小群人都知道对方的。
  • 27:20
    与Drupal样的人可以来注册的网站,
  • 27:24
    然后,你需要决定你实际上能够
  • 27:27
    相信他们做的。
  • 27:29
    和Drupal的优势之一是它如何工作
  • 27:33
    作为一个社会工具,它不能只限于
  • 27:36
    在网站上的一个人,一个静态的网站。
  • 27:40
    这是不同的角色,不同的权限。
  • 27:44
    Drupal的在它的心脏采用了基于角色的权限系统,
  • 27:49
    和一个非常灵活的,所以作为一个网站管理员
  • 27:53
    您可以定义任意数量的角色
  • 27:56
    用户可能会在您的系统中,
  • 28:01
    该用户具有任何作用,将决定
  • 28:05
    什么样的权限和允许用户在做网站什么东西
  • 28:09
    它允许对不同级别的交互。
  • 28:13
    另外,您还可以定义其它作用,
  • 28:16
    如管理者角色或系统管理员角色或
  • 28:19
    律师的角色或东西,他们可以有额外的权限超出
  • 28:22
    什么身份验证的用户。
  • 28:24
    通常,当我们创建一个Drupal站点,我们会做的第一件事是创建
  • 28:27
    一个新的角色为管理员,我们将通常所说的IT管理员,
  • 28:32
    基本上你去,并选框
  • 28:35
    因此,任何人都在管理角色
  • 28:39
    所有这些权限
  • 28:41
    您不需要有一个用户帐户
  • 28:45
    在公司的每个人都拥有密码的
  • 28:48
    root用户帐户的所有权限
  • 28:51
    然后有人去,离开了公司,
  • 28:53
    和他们决定污损的网站和类似的东西。
  • 28:56
    这是没有乐趣。
  • 28:58
    相反,你可以设置此管理员角色
  • 29:02
    人都有自己的用户名和自己的密码,
  • 29:05
    他们拥有的一切基本上全部的权限。
  • 29:10
    随着越来越多的人贡献和互动
  • 29:13
    越来越多的用户正在登录到您的网站,
  • 29:16
    你可以清楚地定义和干净的定义
  • 29:20
    允许每个用户在您的网站上,
  • 29:23
    无论是创建不同类型的内容
  • 29:26
    或者你的用户被允许发布的事物或促进物联网。
  • 29:32
    这一切都可以清晰地分离出来,
  • 29:34
    使用基于角色的权限系统。
  • 29:40
    [单点登录]
  • 29:44
    我说的是大优势的Drupal
  • 29:49
    和为什么很多人涉足的原因之一
  • 29:52
    是因为它具有的灵活性
  • 29:55
    做这么多的事情,和后面所有的,现在
  • 29:59
    只是一个单一的用户登录系统。
  • 30:03
    这是一个真正强大的关于它的事情。
  • 30:06
    我的意思是,如果你写你自己的内容管理系统,你必须
  • 30:09
    处理自己的,但用Drupal.Drupal的自动只是
  • 30:12
    知道了一堆关于用户的信息。
  • 30:15
    Drupal的所有繁重的维护工作
  • 30:19
    上下文信息
  • 30:22
    用户是谁,他们一直在做什么。
  • 30:24
    你可以做这样的事情哪部分的内容,他们已经写了
  • 30:28
    与条的内容其他人写的
  • 30:30
    当他们最后访问是,类似的事情。
  • 30:34
    所有的跟踪的过程中,用户是谁
  • 30:37
    的记录,他们有什么样的权限,
  • 30:40
    有点什么在网站上的所有处理
  • 30:43
    Drupal的框架。
  • 30:45
    用户登录系统的核心部分,然后一切
  • 30:48
    被放在最重要的是。
  • 30:50
    这是一个非常核心的一块,不是很多系统的东西,
  • 30:55
    这个伟大的奢侈品的每一个模块
  • 30:58
    一切,是建立在顶部的Drupal具有方便
  • 31:01
    知道谁是当前登录的用户,
  • 31:05
    他们的凭据是什么,他们的信息。
  • 31:09
    [区块]
  • 31:14
    区块是另一种的那件Drupal的术语
  • 31:17
    你可能听说过,但不知道它们是什么。
  • 31:22
    好消息是,如果你已经建立了Drupal站点
  • 31:26
    你互动的块之前,明知或不明知。
  • 31:29
    用户登录表单是一个块。
  • 31:32
    它显示了边栏上的。
  • 31:36
    Drupal的调用这些块
  • 31:39
    他们是怎么样的一个不伦不类的名字,但它的
  • 31:41
    他们小的块,可以出现在整个网站。
  • 31:45
    块和他们是不同的从节点
  • 31:48
    是节点的主要内容,并阻止
  • 31:51
    附件信息,附加信息
  • 31:54
    通常显示在侧杆,
  • 31:57
    导航系统,也许一个小的搜索形式,一个块。
  • 32:02
    基本上有两种方式,内容表示在Drupal中的一种。
  • 32:06
    节点是最大的一个,那就是内容块进行排序
  • 32:09
    一般要编写一次,然后独自离开。
  • 32:13
    您可能回去细微的修改,但一旦你写一般
  • 32:16
    关于我们页写的,它的完成。
  • 32:18
    块是另一种方式。
  • 32:20
    他们一般都是动态的,到了分钟的内容
  • 32:23
    例如,Drupal的附带一些喜欢谁的块在线
  • 32:27
    最近的评论之类的东西
  • 32:30
    随着时间的推移,会发生很大的变化。
  • 32:36
    其他的块的例子将
  • 32:39
    最近的评论,最近的论坛主题,
  • 32:42
    所有附件的信息,你会看到
  • 32:45
    随之而来的您的网站的主要内容区域。
  • 32:50
    您可能希望有 - 因为我们做Lullabot.com
  • 32:53
    显示最新的帖子在网站上。
  • 32:57
    什么是最新的网站上的文章吗?
  • 32:59
    我们最新的播客是什么?
  • 33:01
    而有“的所有页面的链接。
  • 33:03
    这可能是广告横幅。
  • 33:05
    这可能是东西,往往会出现
  • 33:10
    在多个页面的网站上。
  • 33:13
    其他的事情块是种补充资料
  • 33:15
    当前的内容。
  • 33:17
    例如,有一个作者的信息块,您可以启用
  • 33:20
    如果你看任何一间邮政局的一个特定的人
  • 33:23
    它带来了更多有关他们用户配置文件和类似的东西。
  • 33:28
    你也可以把块中的实际内容
  • 33:31
    有时候人们会使用块的东西像一个销售的一周之类的话,
  • 33:35
    但总的来说,我喜欢的区别,像一个节点
  • 33:39
    你想搜索的是永久性的内容
  • 33:42
    这样的事情块是无论是
  • 33:45
    短暂的内容不断变化,或者它就像
  • 33:48
    补充信息进行排序的提高在页面上的内容的其余部分。
  • 33:54
    [模块]
  • 33:59
    在它所有的功能是在心脏的Drupal模块的概念,
  • 34:04
    一个模块是什么,本质上它只是一个小的代码段。
  • 34:07
    模块是Drupal的插件。
  • 34:11
    他们补充功能。
  • 34:18
    很多Drupal系统是建立在这个想法的模块
  • 34:22
    插件软件,可以更改默认行为
  • 34:26
    一个给定的Drupal的功能或增加新的功能完全。
  • 34:30
    如果你想添加新的功能或新的功能到您的网站
  • 34:34
    要做到这一点,你可以使用一个模块。
  • 34:36
    模块的例子是博客模块类的东西
  • 34:39
    它可以让你发布的博客条目。
  • 34:42
    [内容类型] [权限][模块]
  • 34:48
    所有这些事情,我们正在谈论的模块基本上有
  • 34:51
    的能力,从根本上添加
  • 34:54
    和/或修改的Drupal做什么,
  • 35:00
    这使得它真正强大的。
  • 35:02
    一个给定的模块可以添加新的功能或改变行为
  • 35:05
    没有任何的Drupal站点上的其他模块
  • 35:08
    知道发生了什么事,即使是意识到这一点,
  • 35:12
    这个想法没有写入的所有这些不同的片
  • 35:15
    明确对方,但可以结合起来
  • 35:18
    使用Drupal的API的,他们都可以有效互动
  • 35:21
    不破坏其他。
  • 35:23
    这是真正有效和强大的软件方面之一。
  • 35:29
    [精益生产和柔性]
  • 35:33
    核心 - 这就是我们所说的,你下载的Drupal
  • 35:36
    默认情况下 - 带有一个小的模块。
  • 35:39
    他们中的大多数是相当简单的,然后有一对夫妇
  • 35:42
    实用模块,你必须有一种系统和过滤器等
  • 35:46
    照顾非常低级别的任务。
  • 35:49
    Drupal的自诩具有非常小的核心库
  • 35:55
    它的用途,它总是希望确保核心库
  • 35:58
    尽可能高效。
  • 36:04
    Drupal的是用很少的
  • 36:07
    功能的开箱即用。
  • 36:09
    相反它是什么意思是是一个系统
  • 36:12
    你开始用的小东西,不
  • 36:15
    基本上是每一个网站需要做的
  • 36:18
    然后通过使模块
  • 36:21
    你的网站上添加额外的功能
  • 36:25
    社区已竭尽全力
  • 36:28
    让Drupal一紧,瘦的,安全的机器。
  • 36:32
    的理念是让事情有效率
  • 36:36
    尽可能的和尽可能轻。
  • 36:40
    这就是Drupal的灵活性在于
  • 36:43
    是当你开始的时候它确实是小,结构紧凑,
  • 36:47
    但随后只是使任何模块,你觉得是必要的
  • 36:52
    网站可以得到一大堆的功能,速度非常快。
  • 36:55
    [音乐]
  • 37:04
    [Hook 系统]
  • 37:08
    Drupal的运行,这个疯狂的事,叫钩系统的概念。
  • 37:12
    钩制度是让Drupal
  • 37:16
    真正可扩展的,它的东西是真的,真的很简单
  • 37:20
    只是在它的核心,但增加了这么多的灵活性到Drupal
  • 37:24
    真正得到开发人员和工作
  • 37:27
    Drupal的一个真正的大量的时间缩短。
  • 37:29
    你能想到的Drupal作为一个事件驱动的系统。
  • 37:33
    整个过程中吐出一个Drupal页面
  • 37:38
    有不同的时刻沿途说
  • 37:41
    是否有人需要做的事情
  • 37:44
    是否有任何的模块想改变这个数据?
  • 37:46
    [音乐]
  • 37:51
    负责渲染页面的模块,偶尔会停止
  • 37:55
    并要求所有其他模块在Drupal
  • 37:58
    好吧,我在这一点上处理数据
  • 38:01
    任何人有兴趣在不断变化的数据?
  • 38:04
    和其他模块都将得到一个镜头在不断变化的
  • 38:07
    目前的任何数据被处理,并且,可能会对
  • 38:10
    从数据库加载一些额外的东西,并将其添加
  • 38:13
    节点对象。
  • 38:15
    一路上有这些东西叫做钩
  • 38:19
    这基本上意味着,一个模块开发者可以连接到它
  • 38:22
    并说:“好,我开始想要做的”
  • 38:25
    和Drupal将通过沿的背景下。
  • 38:27
    它会说:“好吧,这里的用户登录”
  • 38:30
    “这是他们想查看的内容,”现在我
  • 38:33
    作为模块开发人员可以改变这种状况,操纵它,
  • 38:36
    做我想做的事情。
  • 38:38
    一个例子是,当你查看用户的权限屏幕
  • 38:41
    你在该网站的所有不同的权限复选框的大名单。
  • 38:45
    它有它的系统中查询所有已安装的模块
  • 38:49
    并要求如果他们想定义权限。
  • 38:57
    任何时候,我添加一个新的功能
  • 39:00
    所有种钩添加
  • 39:03
    我的额外的代码已经存在, 我可以用它
  • 39:07
    和易于集成。
  • 39:09
    因此,这就是Drupal的得到了很多它的灵活性。
  • 39:12
    它不只是节点的模块,有这个能力。
  • 39:15
    在任何时候,每个Drupal模块可以在
  • 39:18
    决定要问他们想要做什么其他模块
  • 39:22
    目前正在处理什么样的数据,并有机会去改变它。
  • 39:27
    [核心与额外的模块]
  • 39:32
    它们之间的差异
  • 39:36
    表现在,它们实际上是两个不同的代码库,
  • 39:40
    哪种比喻为如何处理这些代码库。
  • 39:45
    Drupal的核心是什么,你下载时,下载的zip文件
  • 39:51
    Drupal的Drupal.org,它的基地
  • 39:55
    程式库和项目,Drupal需要以开始浏览网页
  • 39:58
    以及约30个模块的集合
  • 40:01
    的共同特点是,大多数网站将使用。
  • 40:05
    除了这些模块,贡献模块
  • 40:08
    社区提供的丰富的模块,
  • 40:13
    那些可以做各种疯狂的事情,比如活动管理,
  • 40:17
    照片画廊,整洁的小的JavaScript clicky,拖拉的,
  • 40:22
    漂亮的东西
  • 40:24
    不同的东西
  • 40:30
    Drupal是走向一个世界里,有很多的小块模块
  • 40:36
    附加​​做一两件事情真的非常好,
  • 40:41
    但一个网站是建立在将很多的事情上。
  • 40:45
    事实上,CCK,Views 和图像处理类的东西的模块
  • 40:50
    都在contrib方式,几乎每一个Drupal站点
  • 40:56
    和Drupal的实现需要
  • 41:01
    这样的contrib模块不只是可选的附加软件,往往是
  • 41:05
    非常核心件,Drupal的需要。
  • 41:10
    Drupal额外的附加,
  • 41:13
    可用的插件模块,
  • 41:16
    在过去的几年里发展快
  • 41:19
    我们已经从具有良好的固700模块
  • 41:22
    现已成千上万
  • 41:26
    一个巨大的各种不同的功能。
  • 41:29
    Drupal的的contrib的资料库,的贡献
  • 41:32
    添加模块,它更狂野的西部Drupal代码。
  • 41:38
    这是很容易获得,以保持模块
  • 41:43
    维护水平
  • 41:47
    依赖于个人,是谁做的维护。
  • 41:53
    [菜单]
  • 41:58
    在基本层面的菜单系统是一种方法来创建
  • 42:02
    您的网站一个导航系统
  • 42:04
    菜单系统可让您管理
  • 42:07
    所有可用的导航链接
  • 42:10
    上网的用户
  • 42:13
    然后点击左右,并试图决定什么是
  • 42:16
    当环顾四周。
  • 42:19
    当您安装一个Drupal的网站,你登录
  • 42:22
    作为管理员和所有这些链接,你
  • 42:25
    可以点击,创建内容,管理网站,
  • 42:29
    实现一个菜单,一个Drupal菜单。
  • 42:33
    有一个基本的导航菜单,
  • 42:37
    Drupal的自动建立,并保持。
  • 42:41
    当您安装第三方模块的,就可以添加新的菜单项,
  • 42:45
    没有任何其他作用。
  • 42:50
    它的方式浏览您的网站,它知道的事情
  • 42:54
    如父母与子女之间的关系,这样你就可以有
  • 42:57
    链接,儿童等各个环节和那种东西,
  • 43:00
    因此,如果你想拥有某种层次的导航系统
  • 43:04
    你肯定使用菜单
  • 43:10
    但同样,默认情况下,Drupal有这个概念的主要连结
  • 43:14
    主导航,然后它也有二级链接,
  • 43:18
    所以当你去到一个网站区域
  • 43:21
    你可能有进一步的连结,帮助你到达那里,
  • 43:24
    因此,如果你有一个关于页面或类似的东西
  • 43:26
    你需要把地方,以便有人可以真正找到它,
  • 43:30
    所以你想补充一点,在Drupal菜单,
  • 43:33
    然后它会出现在所有的页面上。
  • 43:37
    [菜单路径]
  • 43:42
    这是真正重要的是要记住,有一个非常小的量
  • 43:45
    信息的Drupal软件或任何Web平台去。
  • 43:51
    这是真正存在的URL,用户要求,
  • 43:55
    如果他们已经登录到网站,将是
  • 43:59
    一个Cookie存储会话信息,
  • 44:02
    只有一个唯一的标识符的那个人。
  • 44:04
    至于什么是未来的从他们的浏览器
  • 44:07
    这是你必须去。
  • 44:09
    当我开始在Drupal是一个很大的事情,我无法弄清楚
  • 44:13
    好吧,我只是有这个路径,我想
  • 44:17
    做的东西出现在这条路径
  • 44:20
    在传统的开发是什么意思
  • 44:23
    你做了一系列的文件夹,然后你把一个文件中
  • 44:25
    您要接管这条文件路径
  • 44:29
    当你看到 user/1 这样的路径,你可能会认为,根据
  • 44:32
    hook的东西用户目录
  • 44:35
    然后有文件,用户1,用户2,用户3等。
  • 44:39
    但实际上,所有的请求您对Drupal.org
  • 44:43
    通过一个名为index.php的文件运行。
  • 44:46
    因为在Drupal其实只有一个PHP文件
  • 44:49
    这就是所谓的为每一个请求。
  • 44:51
    没有about.php和news.php。
  • 44:55
    有一个文件,只有一个index.php,
  • 44:58
    该文件被每一个请求
  • 45:02
    的第一件事,菜单系统。
  • 45:08
    事实上,它是一个动态的网站和你的网页
  • 45:11
    是动态构建
  • 45:17
    是一个更加复杂的过程,那么人会意识到
  • 45:20
    只是在表面上只是普通的HTML当你已经习惯了。
  • 45:24
    菜单系统是一个很大的不仅仅是菜单。
  • 45:27
    这不只是你看到的页面的顶部
  • 45:31
    或在侧栏中。
  • 45:34
    而在Drupal的菜单系统实际上是
  • 45:39
    定义了整个页面被执行。
  • 45:42
    这就像一个页面的路由器。
  • 45:45
    引擎盖下方的菜单系统跟踪每一个
  • 45:48
    一个有效的URL路径,在您的网站上。
  • 45:51
    这是Drupal的总机接线员,
  • 45:54
    传入的​​URL,并确定
  • 45:57
    模块和PHP函数应负责
  • 46:00
    实际建设内容,URL。
  • 46:08
    [清洁网址]
  • 46:12
    Drupal的创新之一早在
  • 46:15
    已清洁的URL系统,
  • 46:18
    和我们所做的就是我们所说的,“你看,这些URL
  • 46:21
    多数活力的内容管理系统生成
  • 46:24
    他们往往有大量的官样文章,往往使他们难以阅读
  • 46:28
    对于人类来说,很难记住。
  • 46:30
    如果你的URL有一堆问号,&符号
  • 46:33
    和波浪线和所有其他的东西
  • 46:36
    这是很难记单独住它让我们说给其他人。
  • 46:41
    “刚去的index.php?/波浪线”。
  • 46:46
    我们所做的就是想到了一个办法,
  • 46:49
    隐藏所有的东西进行排序,使其不可见
  • 46:52
    但仍然可以工作,如果你愿意,所以我们这样做,
  • 46:56
    通过使用干净的URL地址
  • 46:59
    代替网页的index.php?q=node/11
  • 47:06
    它只是node/11。
  • 47:09
    页面动态建立
  • 47:12
    开头部分,您的example.com的一部分,你的URL
  • 47:17
    说,该网站是我去的网站,
  • 47:20
    但一切后,这是一个查询
  • 47:23
    因为这是Drupal是如何建设页面
  • 47:26
    其实你查询数据库。
  • 47:28
    它的建筑的页面,并返回它,所以,Q =这一切查询的东西,是怎么回事。
  • 47:33
    这是所有动态的东西,发生的事情。这是发生了什么事之后。
  • 47:36
    然后,我们决定采取一步。
  • 47:39
    我们说:“为什么要限制它只是node/11?”
  • 47:42
    “让我们/fishing或任何你希望它有。”
  • 47:47
    最重要的是我们又增加了一层的路径模块,
  • 47:51
    我们所做的是,我们只是那些已经干净的URL对应
  • 47:55
    更多的搜索引擎友好的网址或其他URL
  • 47:58
    您想在您的网站上。
  • 48:02
    [主题]
  • 48:07
    我倾向于认为,其实在小层的Drupal,
  • 48:11
    因此,主题层之上,
  • 48:14
    基本上你正在生成的内容,和它坐在一个数据库,
  • 48:20
    这一切都相互关联的Drupal的小世界。
  • 48:24
    但是结束时它需要呈现
  • 48:27
    您的最终用户在浏览器上的屏幕。
  • 48:30
    主题化是Drupal的表象层
  • 48:34
    它的显示层,它的分离概念
  • 48:39
    Drupal的框架,功能层。
  • 48:43
    他的想法是分开的Drupal主题层
  • 48:47
    从显示的逻辑。
  • 48:49
    当逻辑都交给它的主题层,并说,
  • 48:53
    “好了,做的逻辑是这一点只印了这一点。”
  • 48:56
    然后,主题层,这是当它决定究竟
  • 48:59
    数据如何实际上是要被输出。
  • 49:01
    有没有处理完成之前。
  • 49:03
    它只是一种获取数据,并且知道
  • 49:06
    它所需要的实际输出,然后主题函数
  • 49:09
    实际上可以决定该对象,并把它显示出来,在任何你喜欢的方式。
  • 49:15
    这是真的很酷,你可以有分开的这些东西一样,
  • 49:18
    因为这意味着,你真的可以快速组装
  • 49:21
    的功能,你的网站,然后分别选择您的网站的外观,
  • 49:26
    这些东西都不是相互关联的。
  • 49:33
    您也可以在网站上同时有两个不同的团队。
  • 49:38
    您可以一队人做功能
  • 49:41
    而同时设计人努力的主题化方面的东西
  • 49:45
    或者你可以下载现有的主题
  • 49:49
    根本上改变网站外观的。
  • 49:52
    [音乐]
  • 50:11
    Drupal有能力的事情,但是你想输出。
  • 50:15
    它有基本的节点数据,
  • 50:18
    但是该节点的数据,如果没有在所有绑事情是如何显示的。
  • 50:22
    但是可以显示你想要的,并不一定是HTML的东西。
  • 50:26
    你可以把它们输出,也就是说,在JSON为JavaScript,
  • 50:31
    或者你可以在XML输出的RSS提要
  • 50:34
    或为任何格式你想要的。
  • 50:37
    主题层是你可以影响,
  • 50:41
    你不必钻深成的Drupal
  • 50:45
    为了改变的东西看起来如何,
  • 50:48
    这是非常好的。
  • 50:51
    [网站配置]
  • 50:57
    [错误报告]
  • 51:02
    Drupal有一个很多不同的方式通知您这是怎么回事
  • 51:05
    在您的网站,如果有,你应该注意的事
  • 51:08
    或者如果有错误发生这样的事情。
  • 51:10
    最明显的方法是,如果你点击什么不好的事情发生
  • 51:14
    你说,你会得到一个红色的小错误在屏幕上,
  • 51:17
    例如,“用户名”字段是必需的或类似的东西,
  • 51:22
    所以这是一个简单的反馈方式要知道,哎呀,
  • 51:25
    我搞砸了,我做错了什么事。
  • 51:27
    Drupal有两个主要的错误报告模式,
  • 51:31
    及本质的区别两者之间的
  • 51:34
    是开发或种工作状态之间的差异
  • 51:38
    然后你制作的最终状态,
  • 51:41
    因此,是否要记录所有的错误
  • 51:45
    以及把它们打印到屏幕上,
  • 51:47
    所以任何时候PHP运行在一个解析错误
  • 51:51
    或有警告或类似的东西
  • 51:54
    使用Drupal的记录系统,它会记录这个错误,
  • 51:59
    然后你也可以显示到屏幕上。
  • 52:01
    当你正在开发的您的网站上,你可以得到这些错误
  • 52:06
    在那里,所以你不必去检查日志。
  • 52:08
    他们在那里,你可以在你的代码中解决这些问题。
  • 52:11
    大多数人 - 在最终用户 - 你真的
  • 52:14
    他们只是得到一个空白的屏幕,而不是有一大堆讨厌的代码
  • 52:17
    和怪异的是一种可怕的,可怕的冠冕堂皇的警告和活动
  • 52:21
    和他们说“哦,我的天哪!我有一个病毒在我的电脑?”
  • 52:24
    他们只是不知道,和这样的沉默是一种最好的规则。
  • 52:31
    而不是实际有它显示到屏幕上,你宁愿只是有记录。
  • 52:35
    还有一个看门狗错误日志消息的概念。
  • 52:40
    如果你去管理面板和报告,你可以看到
  • 52:43
    整个记录所有系统事件已经发生,
  • 52:46
    这非常糟糕的数据库错误,记录所有的PHP错误类的东西,
  • 52:51
    但它也记录类的东西正在寻找什么条件
  • 52:55
    是什么时候创建的内容,或删除,和谁做的等等,
  • 52:59
    这是很好的跟踪,特别是如果你想做的事
  • 53:03
    某种形式的安全审计类的东西,也只是为了跟踪
  • 53:06
    没有页都。
  • 53:11
    [状态报告]
  • 53:15
    有一个状态报告的概念,以及在任何给定的时间
  • 53:18
    在您的网站,它会种跟踪
  • 53:21
    国家的网站,如果有什么事,你需要关注。
  • 53:24
    跟踪的东西,如您运行的是什么版本的PHP,
  • 53:27
    你正在运行什么版本的MySQL,当是最后一次cron运行,
  • 53:31
    当最后一次检查您的系统的安全性更新,
  • 53:35
    它会告诉你有,如果有一个问题,你需要解决。
  • 53:42
    所以这是一件好事,只是去检查,每一次在一段时间内。
  • 53:46
    这有点像一个健康的小状况报告,我的网站上
  • 53:49
    好像是有什么奇怪的
  • 53:51
    这显然​​不打算覆盖每一个角落,
  • 53:54
    但它只是覆盖的大的一些基本的东西,
  • 53:58
    在您的网站正在运行,它是如何运行
  • 54:01
    你可能需要参加
  • 54:04
    可能会默默的在后台发生的
  • 54:07
    你只是不知道。
  • 54:11
    [Cron]
  • 54:15
    在你的Drupal安装,你必须做的第一件事情之一
  • 54:19
    设置了一个执行cron
  • 54:21
    和大多数人不知道那是什么,它是怎么样一个有趣的词。
  • 54:25
    Cron基本上是它的东西上运行的时间表,
  • 54:29
    你可以设置频率,如每5分钟或每隔一小时,
  • 54:32
    每6天或类似的东西。
  • 54:35
    在给定的网站,它往往是重要的,不同的任务
  • 54:38
    定期进行。
  • 54:41
    什么收视率最高的可更新列表
  • 54:46
    网站上的内容,或者它可能是
  • 54:49
    清除不再需要的旧的日志信息。
  • 54:54
    这是执行了一个叫cron
  • 54:57
    与Drupal。
  • 54:59
    这是一个Unix实用程序上存在很多不同的Web服务器
  • 55:04
    可以在固定的时间间隔,比如说,每30分钟左右,
  • 55:07
    只运行一个特殊的命令。
  • 55:10
    Drupal有一个系统利用cron软件
  • 55:14
    执行清理任务,执行不同的任务
  • 55:19
    以规则的时间间隔。
  • 55:21
    我们有一个客户端没有执行cron
  • 55:25
    在他们的系统中,我们问他,他们有多少条记录
  • 55:29
    在Drupal的表,他们说,他们有超过一百万,
  • 55:32
    这是缓存表,这是为了保持这个临时
  • 55:36
    信息,可以建立和丢失,建立和失去
  • 55:40
    的性能,并尽快为我们清除该表的
  • 55:45
    该网站是活泼,反应灵敏,我们能够得到的Cron和运行,
  • 55:49
    他们的网站上是好的。
  • 55:51
    Cron是很重要的,因为它没有类的东西清理掉旧的日志文件
  • 55:55
    并重新索引你的内容对于搜索引擎
  • 55:58
    样才有意义,在一段时间内做一次常规维护任务。
  • 56:03
    它会发送电子邮件,在一定的时间表
  • 56:07
    所以,你不要做的事情都在一次和您的网站上取下来
  • 56:10
    将一批东西了,随着时间的推移做了很多。
  • 56:14
    如果您启用了搜索
  • 56:17
    Drupal有去和实际看到“哦,你已经得到了新的内容。”
  • 56:20
    “噢,你已经得到了新词的内容,而且,我需要知道这一点。”
  • 56:25
    它没有每一次这样做
  • 56:28
    因为那将是相当密集的,所以Drupal的,
  • 56:33
    一个cron运行
  • 56:37
    [产品性能]
  • 56:41
    由于Drupal是一个数据库驱动的应用程序有很多次
  • 56:44
    人会感到紧张的事实,好了,
  • 56:47
    扩大规模吗?
  • 56:49
    只是一个静态的HTML页面服务是很容易的,
  • 56:52
    但是当你开始把数据库和PHP之类的东西
  • 56:55
    它成为相当多的额外的系统开销。
  • 56:58
    但有些事情,你需要记住你
  • 57:01
    过渡修补,网站建设
  • 57:04
    学习如何Drupal的工作原理其实是一个
  • 57:07
    被链接到的负载下,可以站起来
  • 57:10
    Slashdot的或在一篇文章中被提及
  • 57:13
    在一本杂志或类似的东西。
  • 57:15
    很多的性能和可扩展性与Drupal
  • 57:18
    来自来自其他层
  • 57:22
    操作系统,数据库,web服务器,
  • 57:25
    Drupal是排序的最后一件事是你优化
  • 57:28
    因为你可以优化Drupal的所有你想要的,
  • 57:30
    但是,如果你达到了一个瓶颈与其他层
  • 57:34
    在此之前,你不会看到
  • 57:38
    性能的提高,否则,你会注意到。
  • 57:42
    我们已经帮助建立了许多大型客户端
  • 57:45
    与这20台服务器的安装
  • 57:53
    他们已经得到了多个数据库服务器和Apache服务器负载平衡
  • 57:58
    单独的文件服务器和所有这样的东西,
  • 58:02
    所以每个网站的不同方面的
  • 58:09
    这可能会运行在一台服务器上运行它,如果你的$5美元一个月托管
  • 58:14
    可以中断,实际上,你可以奉献整个服务器
  • 58:18
    或一组服务器相应的功能,
  • 58:22
    因此,扩大尺度相当不错。
  • 58:26
    Drupal提供了大量的方法来改善您的网站的性能
  • 58:29
    并帮助它扩大。
  • 58:31
    在一个基本的层面上,你可以做一些事情
  • 58:34
    你可以打开CSS聚合任务。
  • 58:37
    各种所有CSS文件
  • 58:40
    都来自不同的模块和主题,不同的地方
  • 58:43
    所有CSS文件聚合到一个CSS文件中,因此只发送
  • 58:46
    将让你的网站了更多的反应,以便你的访问者。
  • 58:50
    传统的解决方案已经
  • 58:53
    返工的Drupal的内部,很容易
  • 58:56
    插入的新功能,比方说,先进的高速缓存
  • 59:00
    或某些种类的信息查找或任何优化速度的新途径
  • 59:06
    但不要求现代硬件
  • 59:09
    或小的需求就可以安装Drupal的开箱即用
  • 59:13
    并开始使用它,而谁真正需要的人
  • 59:17
    挤表现出它的开始
  • 59:20
    优化和更换某些部件
  • 59:23
    高度优化的替代品。
  • 59:29
    [缓存]
  • 59:33
    缓存在Drupal,实际上在很多网站是一个非常重要的概念。
  • 59:38
    缓存背后的想法是,有一些
  • 59:42
    种的内容,可以是非常昂贵的建立
  • 59:46
    从服务器有花时间的角度来看,
  • 59:50
    拉动信息的数据库和格式化
  • 59:53
    成HTML,并考虑到所有的信息
  • 59:56
    喜欢一个用户的好友是谁,什么样的内容,他们已经建议
  • 59:59
    之类的东西。
  • 1:00:02
    就一个简单的网站这是良好,但在复杂的网站
  • 1:00:05
    有很多丰富的背景和基于时间的信息
  • 1:00:10
    有一定的信息,只是需要很长的时间来建立,
  • 1:00:13
    如果你有大量的流量到您的网站
  • 1:00:16
    每个人要求的Web服务器来构建
  • 1:00:20
    复杂的位的信息可以是一个严重的问题。
  • 1:00:23
    缓存是基本的做法
  • 1:00:26
    只有建设,一旦如果它不需要重做。
  • 1:00:31
    Drupal的,在HTML页面的HTML部分
  • 1:00:34
    不能被缓存,因为它们是动态的。
  • 1:00:36
    你会一直更新。
  • 1:00:38
    人们在添加注释。
  • 1:00:40
    您正在创建新的博客文章。
  • 1:00:42
    住在数据库中所有的东西,而不是静态文件
  • 1:00:45
    像其他的部分,所以我们启用了
  • 1:00:48
    里面的Drupal是一个页面缓存机制
  • 1:00:51
    其中,如果一个匿名用户访问一个页面
  • 1:00:55
    结束时,要求我们采取一切,
  • 1:00:59
    并把它贴在数据库中。
  • 1:01:01
    下一次匿名用户访问
  • 1:01:03
    同样的页面,我们可以说,“你知道什么?”
  • 1:01:05
    “没有什么改变,所以我们只加载
  • 1:01:09
    该页面中我们随时待命,“
  • 1:01:12
    这通常被称为缓存。
  • 1:01:15
    这是稍微不太理想,因为
  • 1:01:18
    它仅适用于匿名用户,而不是人被记录在,
  • 1:01:21
    和其他的问题是,它将使内容陈旧
  • 1:01:25
    一段时间,例如,如果有新的回应
  • 1:01:28
    在过去的5分钟内,他们可能看不到他们除了
  • 1:01:31
    每次缓存刷新,这可能会对每隔10分钟左右。
  • 1:01:35
    它也可以做的更小的块的页
  • 1:01:39
    并缓存他们后,他们正在建
  • 1:01:42
    所以,即使登录的用户可能会看到不同的内容组合
  • 1:01:46
    仍然可以看到一个缓存的内容片段或一个较小的块的页
  • 1:01:50
    如果它不改变非常频繁。
  • 1:01:53
    我们所做的是,我们已经演变而来的只是一个页面的缓存系统
  • 1:01:57
    一个模块的缓存系统,所以现在不同的模块
  • 1:02:01
    如果有他们的代码,往往是CPU密集
  • 1:02:05
    还是有点更多地参与从算法的角度来看
  • 1:02:09
    开发人员现在可以缓存。
  • 1:02:12
    他们可以创建自己的缓存表,将这些信息存储,
  • 1:02:16
    而不是通过一遍又一遍的所有的步骤。
  • 1:02:22
    还有一个相对较新的功能,称为积极的缓冲
  • 1:02:27
    带出了很多的 Drupal API调用
  • 1:02:31
    第三方模块的,让他们做他们的工作
  • 1:02:34
    并专注于做什么,但它是缓存的页面
  • 1:02:38
    从数据库中取出,并呈现给用户。
  • 1:02:40
    这意味着,Drupal的确实少了很多工作,以显示
  • 1:02:43
    一个页面给用户,这意味着您的网站
  • 1:02:46
    可以为更多用户提供网页服务来访问我们的网站
  • 1:02:50
    还有模块,如memcache和先进的高速缓存
  • 1:02:53
    不要疯狂的缓存,但通常你只需要
  • 1:02:56
    如果你在谈论几个不同的后端
  • 1:03:00
    你使用。
  • 1:03:02
    对于一般的人只使用一个博客网站
  • 1:03:05
    甚至只是一个很受欢迎的网站
  • 1:03:07
    登录的用户不是很多,你应该优良默认选项。
  • 1:03:11
    [音乐]
  • 1:03:21
    [特色]
  • 1:03:24
    [Addison Berry]
  • 1:03:31
    [Angie Byron]
  • 1:03:37
    [Jeff Eaton]
  • 1:03:43
    [Nate Haug]
  • 1:03:50
    [Jeff Robbins]
  • 1:03:56
    [James Walker]
  • 1:04:02
    [Matt Westgate]
  • 1:04:07
    [了解的Drupal]
  • 1:04:13
    {部分Lullabot学习系列]
  • 1:04:16
    [www.Lullabot.com]
  • 0:00
    [Lullabot]
  • 0:04
    [Nate Haug] Kada me ljudi pitaju o Drupalu, uglavnom
  • 0:06
    im pokušam objasniti čime se to točno bavim.
  • 0:11
    Ako odgovorim "Izrađujem web stranice"
  • 0:14
    nekima je to dovoljno i ne žele znati više,
  • 0:19
    ali mnogi se pitaju, pa dobro, što je toliko posebno u izradi web stranica
  • 0:25
    i što je to Drupal?
  • 0:29
    [Jeff Eaton] Drupal ljudi koriste na razne načine.
  • 0:31
    Na bazičnoj razini to je program koji omogućava
  • 0:35
    jednostavno upravljanje sadržajem web stranice, na primjer blog člancima
  • 0:39
    ili novostima ili sličnim podacima.
  • 0:42
    [Addison Berry] Također vam omogućava uređivanje sadržaja
  • 0:44
    putem web preglednika kako ne bi morali platiti nekome
  • 0:47
    tko poznaje jako dobro HTML i odlično programira
  • 0:51
    da radi vaš posao.
  • 1:00
    [Angie Byron] U radu s web stranicama na tradicionalan način obično se mora
  • 1:04
    dio koda urediti ručno pri čemu se treba snalaziti s mnoštvom datoteka,
  • 1:09
    poveznica i sličnih stvari.
  • 1:11
    Drupal spomenuto čini mnogo lakšim.
  • 1:13
    Jednom kada ga instalirate možete samo klikati gumbiće kako bi dodali
  • 1:15
    stranice i forme i tomu slične stvari.
  • 1:19
    [Matt Westgate] Možete otići na stranicu, kliknuti gumb za uređivanje,
  • 1:23
    i pretvoriti njen cjelokupni sadržaj u niz formi
  • 1:26
    i tekstualnih polja, tako da ga
  • 1:29
    možete urediti, snimiti, i na taj način mijenjati sadržaj
  • 1:32
    vlastite web stranice u realnom vremenu.
  • 1:34
    [James Walker] Bilo da se radi o web stranici za društveno umrežavanje,
  • 1:37
    na kojoj ima puno korisničke interakcije, ili o mojoj vlastitoj blog stranici,
  • 1:42
    bitno je da kod koji pogoni sve navedeno kao i
  • 1:46
    administracijsko sučelje zadovoljava sve te različite scenarije.
  • 1:50
    [♪ Glazba ♪]
  • 2:36
    [Razumijeti Drupal]
  • 2:44
    [Jeff Robbins] Mnogo ljudi shvaća Drupal kao sustav za upravljanje sadržajem, (eng.) CMS.
  • 2:47
    Kada opisujemo sustav za upravljanje sadržajem,
  • 2:50
    nije loše za početak pružiti povijesnu perspektivu kako su stvari nekad bile.
  • 2:56
    [1977.]
  • 2:58
    [1978. BBS] [1979.]
  • 3:00
    [1980. Usenet] [1981., 1982.]
  • 3:02
    [1984.] [1985. Free Software Foundation]
  • 3:04
    [1989. CompuServe]
  • 3:06
    [AOL] [1969., 1971., 1975., 1987., 1986., 1988.]
  • 3:08
    [1991. World Wide Web]
  • 3:10
    Eksplozivni rast broja ljudi koji su otkrili
  • 3:13
    mogućnosti koje Internet nudi u području učenja, marketinga,
  • 3:16
    i zabave je nevjerojatan.
  • 3:20
    Internet zauvijek mijenja način na koji učimo, radimo i igramo se.
  • 3:25
    [1991.] [1993. Mosaic, HTML] [1994. Yahoo, Netscape]
  • 3:27
    [1995. MySQL, Amazon.com, Internet Explorer, eBay, Altavista] [1996. Hotmail, Javascript, CSS]
  • 3:29
    [1998. XML, Google] [1999., 2000.]
  • 3:31
    U samom početku postojanja Interneta, ljudi su kreirali web stranice tako da
  • 3:33
    je svaka stranica bila samostalna i zasebna jedinica.
  • 3:37
    [Angie Byron] Web stranice su nekada bile samo kolekcija malih datoteka
  • 3:40
    nazvanih HTML datoteke koje su sadržavale kod.
  • 3:43
    Pomoću programa poput Microsoft FrontPagea ili Dreamweavera,
  • 3:47
    ili naprosto ručno, kodirali biste
  • 3:50
    posebno svaki dio vlastite web stranice, što je dobro
  • 3:54
    osim ako ste Amazon.com i imate
  • 3:57
    milion ili dva miliona stranica.
  • 4:02
    Broj datoteka koje su samo tako ležale uokolo je bio astronomski,
  • 4:06
    a promjena dizajna i njihovo sinkroniziranje je bilo gotovo nemoguće izvesti
  • 4:10
    bez ogromne količine posla.
  • 4:12
    Tako je koncept dinamičkih web stranica zapravo ušao u široku upotrebu.
  • 4:17
    Željeli su reći: "Hej, ovo autorsko pravo bit će na svakoj stranici."
  • 4:21
    "Postavimo ga na jedno mjesto i povežimo ga
  • 4:25
    sa svim ostalim stranicama tako da kada budemo mijenjali autorsko pravo
  • 4:28
    možemo to napraviti na jednom mjestu tako da promjena bude vidljiva svugdje."
  • 4:35
    Može se pokrenuti na svim računalima.
  • 4:40
    Vrti se na LAMP platformi, koju čine Linux, Apache, MySQL i PHP.
  • 4:46
    Drupal se tu uklapa, jer, u osnovi imate
  • 4:49
    Linux ispod svega koji pogoni vaš operativni sustav.
  • 4:51
    To omogućava da se vaši hard diskovi i dalje vrte,
  • 4:54
    i ostale slične bazične stvari.
  • 4:56
    Odmah nakon toga imate Apache koji je zapravo web server.
  • 4:59
    On prihvaća vaš zahtjev za www.example.com
  • 5:02
    i traži datoteku na računalu na kojem je instaliran
  • 5:06
    i vraća vam ju natrag putem vašeg web preglednika.
  • 5:08
    MySQL je baza podataka, ona pohranjuje cjelokupan sadržaj vaše web stranice
  • 5:11
    kao i sve vaše korisnike, sva vaša izvješća o prodaji.
  • 5:15
    Sve takve stvari nalaze se u bazi podataka, a PHP
  • 5:18
    služi kao most između MySQLa i Apachea koji na neki način
  • 5:23
    uzima taj dinamički sadržaj iz baze podataka i prikazuje ga u obliku
  • 5:26
    u kojem ga netko može vidjeti u Internet Exploreru, Firefoxu ili nekom drugom web pregledniku.
  • 5:30
    Drupal u osnovi služi kao podloga za generiranje HTMLa,
  • 5:36
    ali umjesto da ima stotine tisuća, čak i milion
  • 5:42
    HTML stranica koje su sve pojedinačno napisane
  • 5:46
    Drupal ih generira na centralizirani način.
  • 5:54
    [Angie Byron] Sustav pogonjen bazom podataka radi na osnovu ideje
  • 5:57
    kako je sav sadržaj centraliziran na jednom mjestu,
  • 6:00
    odakle ga se dinamički prikazuje pomoću predložaka
  • 6:05
    bez obzira što sadržava u određenom trenutku.
  • 6:08
    [♪ Glazba ♪]
  • 6:16
    Namjesto da imate, recimo, 200 stranica, imat ćete vjerojatno jednu ili dvije,
  • 6:21
    i male dinamičke komadiće zvane varijable
  • 6:24
    u kojima može biti pohranjen sadržaj
  • 6:27
    ili naslov određene stranice.
  • 6:32
    [Razvojna Cjelina (eng. framework) za Upravljanje Sadržajem]
  • 6:37
    Ono što mislim da je najzanimljivije Drupal programerima
  • 6:40
    je Drupalu svojstvena razvojna cjelina.
  • 6:43
    Ona je ujedno i razvojna cjelina za upravljanje idejama,
  • 6:46
    što znači da omogućava bilo kojem programeru,
  • 6:50
    ili vama, proširiti Drupal dodatnom funkcionalnošću
  • 6:54
    koju inače ne posjeduje.
  • 6:56
    Ja sam doista i uistinu naučio cijeniti mogućnosti Drupala
  • 6:59
    kao platforme za izgradnju dodatnih rješenja
  • 7:03
    a sve zbog njegovog APIa i dostupnih priključaka (eng. hooks) za dodatne neovisne module
  • 7:07
    pomoću kojih možete proširivati Drupal.
  • 7:09
    Otkrio sam da, ako trebam mogućnost koju Drupal nema,
  • 7:12
    udaljenost između započinjanja s Drupalom i dodavanja navedene mogućnosti
  • 7:16
    i toga da pokušam samostalno iz temelja izgraditi nešto, je mnogo kraća.
  • 7:23
    Fleksibilnost je za programere zasigurno
  • 7:26
    svojevrsni ključ uspjeha.
  • 7:29
    To je meni pomoglo da se zaljubim, činjenica da
  • 7:32
    imam veoma čistu, jednostavnu jezgru (eng. core)
  • 7:35
    s mnogo dostupnih priključaka koji se mogu koristiti za
  • 7:38
    dodavanje bilo koje željene funkcionalnosti.
  • 7:42
    Zapravo ne morate razumjeti kod
  • 7:45
    kako biste napravili puno toga i uistinu kreirali točno ono što želite
  • 7:49
    spajajući zajedno odgovarajuće dijelove.
  • 7:52
    Mogućnost uzimanja svih tih malih Lego kockica
  • 7:55
    i slaganja istih kreirajući velike web stranice s mnogo bogate funkcionalnosti
  • 8:00
    je doista i uistinu važno za smjer u kojem se Drupal kreće.
  • 8:08
    Ideja je da imate svojevrsni temelj
  • 8:11
    na koji spajate dijelove, što je više manje sve što radite,
  • 8:16
    barem u prvom dijelu Drupal instalacije ili izgradnje Drupal web stranice
  • 8:20
    dodavajući dijelove
  • 8:23
    i povezujući ih skupa.
  • 8:25
    Ne samo da možete izabrati i uzeti dijelove besplatno
  • 8:29
    te ih instalirati i isprobati na vašoj web stranici
  • 8:32
    i vidjeti koliko dobro rade, već isto tako možete
  • 8:35
    pogledati koliko dobro su napisani,
  • 8:40
    kolika je kvaliteta koda i saznati je li program dovoljno dobar
  • 8:44
    za korištenje u izgradnji temelja vaše web stranice.
  • 8:49
    Drupalu me je privukla elegancija njegovog koda.
  • 8:55
    Imao je komentare. Bio je čist.
  • 8:58
    Imao je uistinu elegantnu arhitekturu.
  • 9:02
    Bilo je zapanjujuće kada sam počeo proučavati Drupal kod.
  • 9:06
    Mislim, bilo je kao, ovo mogu razumjeti, ali opet je sve bilo
  • 9:10
    prepuno stvari od kojih sam se osjećao kao da je program puno pametniji od mene.
  • 9:14
    Zaista je bilo mnogo toga skriveno i samo sam trebala nekako
  • 9:18
    naučiti kako pronaći ono što mi treba kako bih bila u mogućnosti učiniti sve
  • 9:21
    što je potrebno za izgradnju web stranice.
  • 9:23
    Već imamo fleksibilan sustav za sadržaj.
  • 9:26
    Već imamo sustav za taksonomiju.
  • 9:28
    Sve navedeno ne morate izmišljati ispočetka,
  • 9:30
    već namjesto toga možete razvijati na osnovu onoga što vam pruža
  • 9:34
    Drupal, te početi implementirati dijelove koje su vam zaista potrebni
  • 9:37
    za vaš trenutni projekt.
  • 9:40
    [Moduli Drupal jezgre]
  • 9:44
    [Otvoreni kod]
  • 9:49
    Jako mi je bilo važno to što Drupal ima otvoren kod
  • 9:52
    jer sam jednostavno želio odmah početi raditi
  • 9:56
    uzimajući već postojeća rješenja na osnovu
  • 10:00
    kojih sam mogao nastaviti
  • 10:04
    graditi sve ostalo što mi je bilo potrebno.
  • 10:08
    Tijekom posljednjih godina Drupal se zaista jako razvio,
  • 10:11
    te je narastao od samo zapakirane web stranice,
  • 10:15
    kojoj možeš isključiti i isključiti mogućnosti, u istinsku platformu
  • 10:18
    za izgradnju doista i uistinu naprednih web stranica velikih razmjera.
  • 10:22
    Mnoge velike tvrtke počinju pokazivati interes
  • 10:26
    zato što je mnogo njih u situaciji gdje plaćaju drugim tvrtkama
  • 10:30
    stotine tisuće dolara na godinu kako bi održavali
  • 10:33
    tuđe sustave za upravljanje sadržajem ili imaju svoj vlastiti za koji izdržavaju
  • 10:36
    vojsku programera kako bi sustav funkcionirao.
  • 10:41
    Otvoreni kod im je vrlo privlačna opcija
  • 10:44
    jer omogućava upotrebu snage zajednice koju čini
  • 10:48
    doslovce tisuće ljudi koji nisu na platnom spisku tvrtke,
  • 10:52
    a mogu obaviti stvari poput dodavanja novih mogućnosti,
  • 10:55
    testiranja kvarova ili mogu naprosto tu i tamo uraditi neko sitno poboljšanje.
  • 11:03
    Zatvoreni program je poput kupnje auta sa zatvorenom i zavarenom haubom,
  • 11:07
    tako da ako želite promijeniti ulje ili vidjeti što se događa ispod
  • 11:11
    zaista nemate način kako to učiniti.
  • 11:13
    Ovisni ste o automehaničaru.
  • 11:15
    Ovisni ste o ljudima koji vam prodaju auto
  • 11:18
    takav kakav je,
  • 11:21
    dok kod programa otvorenog koda ste sretni ako uopće dobijete haubu,
  • 11:26
    ali ste u mogućnosti pogledati iznutra, pročeprkati i vidjeti kako stvari rade,
  • 11:30
    promijeniti vlastito ulje, i to je zaista oslobađajuće
  • 11:34
    za puno tvrtki.
  • 11:36
    Bivajući besplatan i otvorenog koda, programerima
  • 11:39
    je puno lakše steći mnogo dublje i bogatije
  • 11:43
    razumijevanje koda, kako radi i kako ga najbolje
  • 11:46
    koristiti i proširiti.
  • 11:49
    Činjenica da je besplatan poput besplatnog piva
  • 11:53
    te istovremeno slobodan kao sloboda omogućava vam da
  • 11:56
    samostalno promijenite bilo što ne bivajući ograničeni
  • 11:59
    rezultatima tuđeg rada ili hira.
  • 12:05
    GPL licenca ne osigurava samo Drupalu da kod
  • 12:11
    njegove jezgre bude program slobodnog i otvorenog koda
  • 12:16
    već također promiče i u nekim slučajevima diktira
  • 12:21
    da nadodani kod kao i dostupna proširenja,
  • 12:24
    odnosno moduli koji se mogu preuzeti, budu isto tako GPL licencirani
  • 12:27
    te stoga besplatno dostupni.
  • 12:31
    [Zajednica]
  • 12:35
    Još jedna njegova posebnost - zbog koje bi ga ljudi možda odabrali -
  • 12:40
    je zajednica programera i doprinositelja oko njega.
  • 12:44
    On u osnovi ima ogromnu bazu programera sastavljenu od tisuće ljudi
  • 12:47
    koji neprekidno usavršavaju program i postojeće dodatke.
  • 12:52
    Rast je zapanjujuć do mjere gdje
  • 12:56
    doista ostanete šokirani kada zapravo sjednete i razmislite o
  • 13:01
    zajednici kao i o samom programu.
  • 13:03
    To je svojevrsni začarani krug, jer
  • 13:07
    Drupal postaje bolji zbog čega raste interes za njega,
  • 13:11
    gdje onda dolazi još više ljudi koji rade na njemu kako bi bio još bolji,
  • 13:13
    što uzrokuje zainteresiranost još više ljudi,
  • 13:16
    tako da je zaista očaravajuće promatrati i sudjelovati u tom procesu.
  • 13:21
    [Sadržaj]
  • 13:27
    Drupal je pun žargona
  • 13:30
    koji zapravo povisuje tzv. "Nemam pojma" prag
  • 13:36
    jer postoji taksonomija i (eng.) node i slične vrste žargona
  • 13:40
    koje trebate savladati i usvojiti, za što je potrebno određeno vrijeme
  • 13:44
    nakon kojeg se počinjete osjećati sigurno
  • 13:47
    koristeći žargon.
  • 13:49
    Node je bio jedan od najteže razumljivih pojmova
  • 13:53
    kada sam se počela baviti Drupalom.
  • 13:55
    Sjećam se kako sam bila zbunjena samom riječi,
  • 13:59
    a samo sam željela izrađivati web stranice.
  • 14:01
    Ne znam što node znači, samo želim web stranice.
  • 14:05
    Ideja nodova zbunjuje ljude
  • 14:10
    i često kažu "Zašto ih ne bi jednostavno zvali člancima?"
  • 14:14
    "Zašto ne bismo jednostavno koristili riječ članak ili dopis ili nešto slično tome?"
  • 14:19
    Problem je u tome što node može biti bilo što od navedenog.
  • 14:25
    [Što je to Node?]
  • 14:29
    Node je osnovni građevni element Drupala.
  • 14:35
    Drupal je sustav za upravljanje sadržajem, a node je
  • 14:39
    sadržaj kojim se upravlja.
  • 14:41
    Ako imate imalo iskustva s Drupalom onda ste vjerojatno primijetili
  • 14:44
    kako se prilikom pregleda sadržaja poput blog članka
  • 14:47
    ili ankete pojavljuje node/1 u adresnom polju.
  • 14:52
    Drupal je zbog nekog razloga odlučio koristiti riječ node
  • 14:55
    za pozivanje sadržaja u sustavu.
  • 14:58
    [♪ Glazba ♪]
  • 15:06
    [Addison Berry] Osobno nisam mogla naučit što je to node, bez obzira koliko opisa
  • 15:09
    sam pročitala ili koliko puno ljudi mi ga je pokušalo objasniti,
  • 15:12
    sve dok jednostavno nisam počela koristiti Drupal.
  • 15:16
    Ali, u osnovi, node je samo dio sadržaja na web stranici.
  • 15:21
    Osnovni dio sadržaja jest posjedovanje naslova,
  • 15:24
    autora, opisa ili tijela.
  • 15:27
    Ima li datum kreiranja i slično.
  • 15:30
    Najvažnije je posjedovanje jedinstvenog identifikatora (eng. ID)
  • 15:33
    koji služi za adresiranje putem URLa
  • 15:37
    ili pozivanje unutar sustava.
  • 15:40
    U jednom trenutku su zastali i rekli:
  • 15:42
    "U redu, imamo ankete, priče, stranice,
  • 15:46
    imamo članke i događaje i slično."
  • 15:51
    Zapitali su se: "Koja su glavna obilježja zajednička između
  • 15:54
    svih navedenih različitih elemenata?"
  • 15:57
    I onda su izvukli sve te pojedinačne komadiće poput naslova
  • 16:01
    te ih uklopili u sveobuhvatni koncept
  • 16:04
    nazvan node kao dio sadržaja, nakon čega je sve
  • 16:07
    postalo dio noda.
  • 16:11
    [Node Revizija]
  • 16:16
    Još jedna ogromna prednost centraliziranog node sustava jest
  • 16:20
    mogućnost praćenja promjena, što znači da ako
  • 16:24
    promijenite par linija teksta i snimite ih,
  • 16:27
    izmjena će biti spremljena na način koji vam omogućava
  • 16:30
    povratak na prijašnju verziju sadržaja.
  • 16:33
    [♪ Glazba ♪]
  • 16:42
    [Addison Berry] Ako ne želite ne morate zadržati kopiju
  • 16:45
    svake pojedinačne promjene koju ste napravili, ali ako želite
  • 16:48
    ono što će se desiti svaki put kada napraviti promjenu,
  • 16:51
    dakako, ako ste uključili spremanje izmjena,
  • 16:54
    jest da će Drupal u osnovi napraviti snimak trenutnog stanja
  • 16:58
    i spremiti ga u bazu podataka svaki puta kada nešto promijenite.
  • 17:03
    To je naročito važno kod situacija poput upravljanja zloupotrebama.
  • 17:07
    Također je važno u slučaju kada su npr. cjelokupne upute za upotrebu
  • 17:11
    za vaše zaposlenike u Drupalu.
  • 17:14
    Želite imati mogućnost uvida u razvoj navedenog dokumenta kroz vrijeme,
  • 17:18
    a to Drupal može raditi za vas, dok je na vama da povraćate izmjene,
  • 17:22
    brišete ih ili dodajete nove,
  • 17:24
    a to je sve način na koji štitite vaš sadržaj i čuvate
  • 17:27
    stalnu kopiju svega.
  • 17:31
    [Tipovi Sadržaja]
  • 17:35
    Općenito govoreći, krajnji korisnik
  • 17:38
    nikada ne bi trebao vidjeti riječ node.
  • 17:42
    Smjernice za korisničko sučelje,
  • 17:45
    ukoliko pišete Drupal module,
  • 17:48
    upućuju na ne korištenje riječi node.
  • 17:51
    Prvo pravilo o nodovima je da ne pričate o nodovima.
  • 17:54
    Programeri često koriste riječ node.
  • 18:00
    Krajnji korisnici ju rijetko koriste.
  • 18:03
    U Drupal administracijskom sučelju
  • 18:07
    koristi se naziv tip sadržaja.
  • 18:12
    Unatoč tome, programeri i dalje koriste naziv node.
  • 18:16
    Jedna od stvari koju Drupalu navedena komponenta za upravljanje sadržajem
  • 18:20
    omogućava jest kreiranje različitih tipova sadržaja.
  • 18:24
    Drupal uvelike koristi navedeni koncept,
  • 18:27
    što je nevjerojatno, ali ujedno i jedna od Drupal vrlina.
  • 18:31
    Drupal omogućava podjelu sadržaja vaše web stranice
  • 18:34
    u različite vrste sadržaja tako da svaki tip -
  • 18:38
    poput događaja, blog članaka ili fotografija -
  • 18:42
    može biti obrađen na drugi način.
  • 18:46
    Svaki tip sadržaja može imati različite postavke.
  • 18:49
    Mogu se razlikovati po tome hoće li biti propagirani
  • 18:52
    na početnu stranicu ili po tome hoće li prikazati
  • 18:56
    informacije o tome kada je sadržaj postavljen i tko ga je postavio.
  • 19:04
    Mogu ih prikazati različito.
  • 19:06
    Mogu ih izlistati na različite načine,
  • 19:09
    tako da ih povežem skupa.
  • 19:11
    Mogu ih razdvojiti i preurediti
  • 19:14
    na način na koji želim sadržaj prikazati na web stranici.
  • 19:21
    Također im možete postaviti različite dozvole.
  • 19:24
    Za bilo koji tip sadržaja u sustavu možete odrediti tko ga može kreirati,
  • 19:27
    urediti, obrisati, tko može upravljati njima
  • 19:31
    i čak tko može upravljati cjelokupnim sadržajem web stranice.
  • 19:37
    [Alat za izradu polja]
  • 19:41
    Kada sam počeo izrađivati WordPress blogove
  • 19:46
    uvijek mi je nedostajala mogućnost dodavanja novih polja.
  • 19:51
    Nisam želio ostati samo na naslovu, sinopsisu
  • 19:55
    i tijelu odnosno sadržaju članka.
  • 20:01
    Na početku imate samo naslov i tijelo.
  • 20:04
    To su osnovni dijelovi noda
  • 20:09
    kojima pridružujete dodatne informacije
  • 20:11
    poput taksonomije, informacije o objavi,
  • 20:15
    i sve to koristeći (eng.) CCK, pomoću kojeg nadodajete polja
  • 20:20
    tako da su sve te dodatne informacije povezane
  • 20:23
    s osnovnim nodom.
  • 20:26
    CCK kao alat za izradu polja
  • 20:30
    zapravo služi za stvaranje specifičnih tipova sadržaja,
  • 20:34
    gdje blog člancima i običnim člancima koji imaju naslov i tijelo
  • 20:40
    pridružujete dodatna polja za informacije.
  • 20:46
    CCK je Sveti Gral pomoću kojeg možete dodati
  • 20:51
    bilo koji broj polja bilo kojem tipu sadržaja,
  • 20:56
    i to je doista i uistinu moćna tehnika.
  • 20:59
    Polja mogu sadržavati zaista svašta, od teksta, slika,
  • 21:02
    pa do brojeva i datuma.
  • 21:05
    Postoje čak i napredni moduli koji vam omogućavaju
  • 21:08
    umetanje videa ili potpunih adresa
  • 21:14
    i sličnog.
  • 21:16
    Fleksibilnost koja vam se pruža je zaista nevjerojatna.
  • 21:19
    Nije da dobijete određeni blok sadržaja
  • 21:22
    kojeg ne možete mijenjati,
  • 21:25
    već ga morate koristiti takvog kakav je zauvijek,
  • 21:29
    gdje je sve toliko slično da ne možete razlikovati jedno od drugoga.
  • 21:32
    No nije tako, različiti tipovi sadržaja imaju različito značenje
  • 21:36
    i možete s njima raditi različite stvari.
  • 21:40
    Ne morate imati jednu jedinu formu za unos cjelokupnog sadržaja na vašoj web stranici.
  • 21:45
    Umjesto toga svaki tip sadržaja može u osnovi imati
  • 21:50
    posebnu formu za unos bilo kakvog sadržaja koji vam je potreban.
  • 21:54
    [Addison Berry] Ukoliko će više ljudi
  • 21:57
    unositi sadržaj na vašoj web stranici
  • 22:00
    utoliko im je bolje pružiti formu za unos s točno određenim poljima
  • 22:05
    koja jasno daju do znanja što u njih treba unijeti
  • 22:09
    kako bi pohranila pravu informaciju.
  • 22:12
    CCK vam zapravo u potpunosti omogućava da kroz sučelje
  • 22:15
    naprosto dodate i podesite polja,
  • 22:19
    postavite zadane vrijednosti i učinite sve
  • 22:22
    što je potrebno kako bi kreiranje sadržaja
  • 22:26
    bilo jednostavno i tečno.
  • 22:28
    Gledajući iz perspektive programera, to je odlično
  • 22:31
    jer su to svakodnevne radnje koje postanu dosadne
  • 22:34
    i monotone kada ih radite neprestano
  • 22:37
    odnosno kada imate posla s jednolikim kodom,
  • 22:40
    tako da kada predamo kontrolu administratoru ili web uredniku,
  • 22:46
    koji mogu samostalno postaviti cijeli sustav,
  • 22:49
    imamo vremena za obavljanje zabavnih stvari.
  • 22:52
    Izrada zasebnih tipova sadržaja je u osnovi
  • 22:55
    prvi korak koji trebate napraviti
  • 22:59
    kako bi započeli s vašom web stranicom.
  • 23:01
    Pokrenite Drupal, instalirajte CCK,
  • 23:04
    i počnite izrađivati tipove sadržaja koji posjeduju
  • 23:08
    sva potrebna polja koja trebate za određenu vrstu sadržaja.
  • 23:13
    [Korisnici]
  • 23:18
    Veoma dugo kroz povijesti Interneta
  • 23:22
    mali timovi ljudi su izrađivali web stranice
  • 23:25
    kako bi ih drugi mogli vidjeti.
  • 23:29
    Iako su bile mnogo fleksibilnije i lakše
  • 23:34
    nego starije izdavačke metode prije dostupnosti Interneta
  • 23:37
    to je još uvijek značilo kako jedni izrađuju
  • 23:41
    dok drugi konzumiraju stvari.
  • 23:45
    Drupal je dio trenda u evoluciji Interneta koja
  • 23:52
    posjetiteljima web stranica
  • 23:55
    zapravo pomaže u stvaranju sadržaja za iste.
  • 24:01
    Dosta se tvrtki ozbiljno zanima za Drupal
  • 24:05
    kao sustav za upravljanje sadržajem zato što uistinu žele
  • 24:09
    dostići sve te web stranice
  • 24:13
    koje korisnicima pružaju mogućnost interakcije.
  • 24:16
    To nije više informativna web stranica gdje
  • 24:19
    dobijete isključivo informaciju
  • 24:21
    i u par klikova sve vidite.
  • 24:24
    Danas mnogo tvrtki uistinu žele interaktivne web stranice.
  • 24:28
    Ideja nije više u tome da jedni ljudi stvaraju
  • 24:32
    a drugi čitaju sadržaj, već
  • 24:36
    u tome da se stvori ambijent gdje ljudi mogu doći
  • 24:40
    i podijeliti vlastite interese ili razmišljanja.
  • 24:44
    [♪ Glazba ♪]
  • 24:53
    [Korisnici]
  • 24:57
    Posjetitelj web stranice se u Drupalu naziva korisnik,
  • 25:01
    i u osnovi postoje dva tipa korisnika.
  • 25:03
    Imamo anonimne korisnike, koji se još nisu prijavili,
  • 25:06
    te prijavljene korisnike koji su to napravili.
  • 25:08
    Prvi i osnovni jest anonimni korisnik.
  • 25:11
    To je osoba koja pokušava vidjeti
  • 25:14
    određeni članak na web stranici, ali se nije prijavila
  • 25:17
    zbog čega Drupal ne može identificirati tko je ta osoba.
  • 25:21
    U osnovi imate anonimnog korisnika koji
  • 25:24
    naprosto luta Internetom,
  • 25:27
    i u jednom trenutku naleti na vašu web stranicu.
  • 25:30
    Ono što on vidi može biti potpuno drugačije
  • 25:35
    od onoga što vidi netko tko je kreirao račun na vašoj web stranici
  • 25:38
    i kojemu ste odlučili prikazali nešto sasvim drukčije.
  • 25:44
    Kod puno društvenih mreža morate se prijaviti kako biste
  • 25:47
    dobili određenu funkcionalnost.
  • 25:49
    Sličan koncept ima i Drupal, te nosi naziv prijavljeni korisnik.
  • 25:53
    To jednostavno znači da kada netko dođe na web stranicu
  • 25:56
    i kreira korisnički račun dobiva svojevrsnu
  • 25:59
    identifikacijsku oznaku kako bi Drupal znao da su to Ivan
  • 26:02
    ili Marija koje zanima određena tematika
  • 26:07
    i koju im treba prikazati na početnoj stranici.
  • 26:09
    U pravilu Drupal točno zna
  • 26:11
    kako za tu određenu osobu u točno određenom trenutku
  • 26:15
    treba prikazati točno određenu stranicu
  • 26:19
    što na kraju može uključivati i
  • 26:23
    razne ostale stvari poput provjere ima li ta osoba uopće pristup stranici?
  • 26:26
    Jer ako nema, neću im je ni prikazati.
  • 26:28
    Samo ću ih preusmjeriti i pustiti
  • 26:31
    signal zauzeća budući da nemaju dopuštenje pristupa,
  • 26:36
    a u slučaju da ga imaju
  • 26:41
    mogu im ju prikazati, ali na neznatno izmijenjen način.
  • 26:47
    Što može biti zaista nešto jednostavno,
  • 26:50
    ali također može biti i količina prikazanih podataka.
  • 26:53
    Ne mora vam se nužno prikazati sve.
  • 26:57
    [Uloge i dopuštenja]
  • 27:02
    Blog web stranice u pravilu uređuju
  • 27:06
    njihovi vlasnici te se točno zna
  • 27:09
    tko ima dopuštenje objavljivati članke,
  • 27:12
    bilo da se radi o jednoj osobi
  • 27:17
    ili o više njih koji se međusobno dobro poznaju.
  • 27:20
    U slučaju Drupala, bilo tko se može registrirati
  • 27:24
    a na vama je odluka što ćete im dopustiti
  • 27:27
    činiti.
  • 27:29
    Snaga Drupala također leži u tome koliko je dobar
  • 27:33
    kao društveni alat jer nije ograničen na samo
  • 27:36
    jednog korisnika web stranice.
  • 27:40
    Postoje različite uloge i dopuštenja.
  • 27:44
    Drupal u suštini koristi sustav dopuštenja utemeljen na ulogama
  • 27:49
    koji je veoma fleksibilan jer vam kao administratoru
  • 27:53
    omogućava definiranje bilo kojeg broja uloga
  • 27:56
    koje korisnik može posjedovati.
  • 28:01
    Uloge u konačnici određuju
  • 28:05
    što korisnik može činiti unutar web stranice
  • 28:09
    i koju razinu interaktivnosti ima na raspolaganju.
  • 28:13
    Osim zadanih uloga možete kreirati dodatne uloge poput
  • 28:16
    upraviteljske, administratorske ili
  • 28:19
    pravničke s dodatnim privilegijama koje
  • 28:22
    prijavljeni korisnici nemaju.
  • 28:24
    Prilikom izgradnje Drupal web stranice obično je prvi korak kreiranje
  • 28:27
    nove administratorske uloge, često nazvane admin,
  • 28:32
    za koju označimo sve dostupne postavke
  • 28:35
    kako bi bilo tko u admin ulozi
  • 28:39
    imao sva navedena dopuštenja.
  • 28:41
    Ne morate imati jedan korisnički račun
  • 28:45
    čiju lozinku svi u tvrtci znaju i koji je
  • 28:48
    glavni račun sa svim dopuštenjima
  • 28:51
    jer kada netko napusti tvrtku
  • 28:53
    može izbrisati web stranicu.
  • 28:56
    A to nije zabavno.
  • 28:58
    Umjesto toga možete postaviti admin ulogu
  • 29:02
    tako da svatko ima vlastito korisničko ime i lozinku
  • 29:05
    i u osnovi dopuštenje za sve.
  • 29:10
    Što više i više ljudi doprinosi i međudjeluje,
  • 29:13
    tako se sve više i više korisnika prijavljuje na vašu web stranicu,
  • 29:16
    a vi jasno i glasno možete definirati
  • 29:20
    što svatko od njih može raditi,
  • 29:23
    bilo da se radi o kreiranju različitih tipova sadržaja
  • 29:26
    ili o dopuštenju za izdavanje i promociju članaka.
  • 29:32
    Sve navedeno se besprijekorno može odvojiti
  • 29:34
    koristeći sustav dopuštenja utemeljen na ulogama.
  • 29:40
    [Jedinstvena Prijava]
  • 29:44
    Jedna od najvećih prednosti Drupala
  • 29:49
    i jedan od razloga zašto ga ljudi koriste
  • 29:52
    jest njegova mogućnost
  • 29:55
    obavljanja mnogo stvari istovremeno, dok je u pozadini svega toga
  • 29:59
    sustav za jedinstvenu prijavu korisnika.
  • 30:03
    A to je jedno njegovo zaista moćno svojstvo.
  • 30:06
    Kada pišete vlastiti sustav za upravljanje sadržajem morate
  • 30:09
    sve to sami podesiti, dok Drupal naprosto automatski
  • 30:12
    zna gomilu informacija o korisniku.
  • 30:15
    Drupal odrađuje sav težak posao čuvanja
  • 30:19
    sastavnih informacija o
  • 30:22
    tome tko je korisnik i što radi.
  • 30:24
    Možete pratiti koji je dio sadržaja on napisao,
  • 30:28
    a koji su napisali drugi ljudi,
  • 30:30
    kada se zadnji put prijavio i slično.
  • 30:34
    Cjelokupni postupak praćenja tko je korisnik
  • 30:37
    koji se upravo prijavio i koja dopuštenja ima kao i
  • 30:40
    što se sve događa na web stranici odrađuje
  • 30:43
    Drupal.
  • 30:45
    Sustav za prijavu korisnika je dio temelja na osnovu
  • 30:48
    kojeg je sve ostalo izgrađeno.
  • 30:50
    To je ključan dio kojeg mnogi sustavi nemaju,
  • 30:55
    taj luksuz da svaki pojedinačni modul,
  • 30:58
    sve što je izgrađeno u Drupalu, ima mogućnost
  • 31:01
    doznati tko je trenutno prijavljeni korisnik
  • 31:05
    i sve informacije o njemu.
  • 31:09
    [Blokovi]
  • 31:14
    Blokovi su još jedan dio Drupal žargona
  • 31:17
    za koje ste vjerojatno čuli, ali niste znali što znače.
  • 31:22
    Ako ste ikada izgrađivali Drupal web stranicu
  • 31:26
    susreli ste se s blokom, bili vi svjesni toga ili ne.
  • 31:29
    Forma za prijavu korisnika je blok.
  • 31:32
    Nalazi se u stupcu sa strane.
  • 31:36
    U Drupalu ih nazivamo blokovi,
  • 31:39
    što je malo nezgodno ime, ali tako se zovu.
  • 31:41
    To su maleni komadići koji se pojavljuju duž cijele web stranice.
  • 31:45
    Blokovi su jedinstveni i razlikuju se od nodova po tome što
  • 31:48
    je node glavni sadržaj, dok su blokovi
  • 31:51
    sporedne odnosno dodatne informacije
  • 31:54
    većinom dostupne u stupcima sa strane,
  • 31:57
    poput navigacijskog sustava, forme za pretraživanje i sličnog.
  • 32:02
    U pravilu postoje dva načina na koji se prikazuje sadržaj u Drupalu.
  • 32:06
    Prvi je node koji služi za tip sadržaja koji ćete
  • 32:09
    najčešće napisati jednom i tada ostaviti na miru.
  • 32:13
    Možda ćete uraditi tu i tamo koju izmjenu, ali obično kada jednom kreirate
  • 32:16
    stranicu "O nama", više ju ne mijenjate.
  • 32:18
    Blokovi su drugi način.
  • 32:20
    Oni su uglavnom namijenjeni za dinamičniji i promjenjivi sadržaj,
  • 32:23
    kao npr. blokovi koji se nalaze u Drupalu, poput "Tko je prijavljen"
  • 32:27
    i "Nedavni komentari" i tomu slično
  • 32:30
    što će se mijenjati tokom vremena.
  • 32:36
    Ostali primjeri blokova bi bili
  • 32:39
    nedavni komentari, svježe forum teme,
  • 32:42
    i slične dodatne informacije koje inače vidite
  • 32:45
    uz glavni sadržaj vaše web stranice.
  • 32:50
    Možda želite imati - poput nas na lullabot.com -
  • 32:53
    prikaz najnovijih članaka.
  • 32:57
    Koji je najnoviji članak na web stranici?
  • 32:59
    Koji je zadnji podcast?
  • 33:01
    Imamo i poveznice koje vode na sve te stranice.
  • 33:03
    Mogu biti reklame.
  • 33:05
    Mogu biti stvari koje imaju tendenciju pojavljivati se
  • 33:10
    na više mjesta na web stranici.
  • 33:13
    Blokovi se također mogu koristiti za dodatne informacije
  • 33:15
    trenutnom sadržaju.
  • 33:17
    Npr. možete uključiti blok "Informacije o autoru"
  • 33:20
    koji će vam prilikom gledanja članka određene osobe
  • 33:23
    prikazati dodatne informacije o korisničkom profilu autora.
  • 33:28
    Također možete postaviti pravi sadržaj u blok.
  • 33:31
    Ponekad ljudi koriste blokove za stvari poput rasprodaje,
  • 33:35
    ali ja općenito volim razlikovati node koji je
  • 33:39
    postojan sadržaj kojeg možete pretraživati
  • 33:42
    i stvari poput blokova koji sadrže ili
  • 33:45
    prolazan i promjenjiv sadržaj ili
  • 33:48
    dodatnu informaciju koja nadopunjuje ostatak sadržaja stranice.
  • 33:54
    [Moduli]
  • 33:59
    U samoj srži Drupal funkcionalnosti leži ideja modula
  • 34:04
    koji je u biti samo maleni komadić koda.
  • 34:07
    Moduli su dodaci za Drupal.
  • 34:11
    Oni dodaju funkcionalnost.
  • 34:18
    Veliki dio Drupal sustava je izgrađen oko ideje modula,
  • 34:22
    tj. dodatnih programa koji ili mogu promijeniti unaprijed
  • 34:26
    zadano svojstvo Drupala ili mogu dodati neko sasvim novo.
  • 34:30
    Ako vašoj web stranici želite dodati novu funkcionalnost
  • 34:34
    trebate koristiti modul.
  • 34:36
    Jedan primjer je blog modul
  • 34:39
    koji omogućava kreiranje blog članaka.
  • 34:42
    [Novi Tip Sadržaja] [Nova Dopuštenja] [Novi Blok]
  • 34:48
    Sve navedeno znači kako moduli u osnovi
  • 34:51
    imaju mogućnost u temelju dodati
  • 34:54
    i/ili promijeniti Drupal,
  • 35:00
    što ih čini zaista moćnima.
  • 35:02
    Određeni modul može dodati novo ili promijeniti postojeće svojstvo
  • 35:05
    bez da bilo koji drugi Drupal modul
  • 35:08
    zna ili je uopće svjestan što se događa,
  • 35:12
    ideja je da se svi ti različiti dijelovi koji nisu zamišljeni
  • 35:15
    da rade skupa, ipak mogu povezati
  • 35:18
    koristeći Drupal API bez da
  • 35:21
    smetaju jedan drugom.
  • 35:23
    To je jedno zaista djelotvorno i moćno svojstvo programa.
  • 35:29
    [Sitan, ali Dinamitan]
  • 35:33
    Jezgra Drupala koju skinete s Interneta
  • 35:36
    dolazi s pregršt standardnih modula.
  • 35:39
    Većina ih je prilično jednostavna, dok ima i par
  • 35:42
    korisnih modula koje morate imati, poput sustava i filtera
  • 35:46
    koji obavljaju osnovne zadatke.
  • 35:49
    Drupal je ponosan na vrlo malu jezgru programa
  • 35:55
    koju koristi i uvijek se trudi osigurati da bude
  • 35:58
    što efikasnija.
  • 36:04
    [Nate Haug] Drupal sadrži jako malo
  • 36:07
    funkcionalnosti sam po sebi.
  • 36:09
    On je zamišljen kao sustav
  • 36:12
    koji sadrži samo osnovne dijelove
  • 36:15
    koje u pravilu svaka web stranica treba,
  • 36:18
    a onda aktivirajući module
  • 36:21
    nadodajete dodatnu funkcionalnost web stranici.
  • 36:25
    Zajednica se zaista potrudila
  • 36:28
    napraviti od Drupala sitan, neprobojan i siguran program.
  • 36:32
    Filozofija je biti učinkovit,
  • 36:36
    djelotvoran i lagan koliko god je to moguće.
  • 36:40
    Drupal je fleksibilan zbog toga što
  • 36:43
    je uistinu sitan i kompaktan sam po sebi,
  • 36:47
    međutim aktiviranjem određenih modula
  • 36:52
    možete jako brzo ostvariti puno funkcionalnosti.
  • 36:55
    [♪ Glazba ♪]
  • 37:04
    [Sustav Priključaka (eng. Hooks)]
  • 37:08
    Drupal djeluje na osnovu tog ludog koncepta priključaka.
  • 37:12
    Sustav priključaka čini Drupal
  • 37:16
    zaista proširivim i on je uistinu jednostavan
  • 37:20
    dio jezgre koji dodaje toliko mnogo fleksibilnosti Drupalu
  • 37:24
    koja programerima omogućava da počnu raditi
  • 37:27
    s Drupalom u vrlo kratkom vremenskom roku.
  • 37:29
    Možete si predočiti Drupal kao sustav pogonjen događajima.
  • 37:33
    Prilikom procesa prikazivanja Drupal stranice
  • 37:38
    postoje razni trenuci u kojima se postavlja pitanje:
  • 37:41
    "Treba li netko ovdje nešto uraditi?"
  • 37:44
    [Želi li ikoji modul promijeniti ove podatke?]
  • 37:46
    [♪ Glazba ♪]
  • 37:51
    Modul odgovoran za prikazivanje stranice povremeno će zastati
  • 37:55
    i upitati sve ostale module u Drupalu:
  • 37:58
    "Trenutno obrađujem podatke."
  • 38:01
    "Želi li ih netko izmijeniti?"
  • 38:04
    Svi ostali moduli će u tom trenutku dobiti priliku izmijeniti
  • 38:07
    bilo koji podatak koji se trenutno obrađuje ili naprosto
  • 38:10
    nadodati neki novi iz baze podataka
  • 38:13
    node objektu.
  • 38:15
    Na kraju dolazimo do priključaka
  • 38:19
    koji u osnovi služe programeru modula da se priključi
  • 38:22
    i kaže: "U redu, želim nešto uraditi u ovom trenutku."
  • 38:25
    i Drupal će mu to omogućiti.
  • 38:27
    Reći će mu: "U redu, ovaj korisnik je trenutno prijavljen."
  • 38:30
    "Ovo je sadržaj koji želi pogledati.", tada ja
  • 38:33
    kao programer modula mogu utjecati na navedeno,
  • 38:36
    odnosno napraviti što god poželim.
  • 38:38
    Jedan primjer je sučelje s korisničkim dopuštenjima
  • 38:41
    gdje vam se prikaže ogromna lista s kučicama za razna dopuštenja.
  • 38:45
    U tom trenutku Drupal pita sve instalirane module
  • 38:49
    želi li netko od njih definirati dopuštenja.
  • 38:57
    Kada god poželim dodati neku novu funkcionalnost
  • 39:00
    imam na raspolaganju niz već postojećih
  • 39:03
    priključaka s kojima mogu jednostavno
  • 39:07
    integrirati vlastiti kod.
  • 39:09
    I to je gdje Drupal dobiva na fleksibilnosti.
  • 39:12
    Nema samo node modul tu mogućnost.
  • 39:15
    Bilo koji modul u Drupal može bilo kada
  • 39:18
    odlučiti upitati ostale module što žele učiniti
  • 39:22
    s podacima koji se trenutno obrađuju i dati im mogućnost izmjene.
  • 39:27
    [Jezgra naspram Dodataka]
  • 39:32
    Razlika između jezgre i dodataka (eng. contrib)
  • 39:36
    prisutna je u činjenici kako se zapravo radi o dva različita repozitorija koda
  • 39:40
    što donekle služi kao metafora na koji način se postupa s njima.
  • 39:45
    Jezgra Drupala je ono što dobijete kada skinete zip datoteku
  • 39:51
    Drupala s drupal.org koja sadrži svojevrsnu bazu
  • 39:55
    programa koje Drupal treba za rad
  • 39:58
    kao i kolekciju tridesetak modula
  • 40:01
    za obavljanje učestalih funkcija na web stranicama.
  • 40:05
    Zatim imamo dodatne module
  • 40:08
    osigurane od strane zajednice
  • 40:13
    koji mogu raditi svakojake lude stvari poput upravljanja događajima,
  • 40:17
    mogu biti foto galerije, ili slatka mala JavaScript klikajuće povlačeća
  • 40:22
    ljepuškasta sučelja.
  • 40:24
    I tome slično.
  • 40:30
    Drupal se kreće u smjeru u kojem postoji mnogo malenih komadića, modula
  • 40:36
    i dodataka koji rade jednu ili dvije stvari jako, jako dobro,
  • 40:41
    a web stranica je izgrađena kombinirajući mnogo takvih komadića zajedno.
  • 40:45
    Činjenica kako su CCK, Liste (eng. Views) i moduli za upravljanje slikama
  • 40:50
    dostupni kao dodaci znači kako ih svaka
  • 40:56
    Drupal web stranica i implementacija iziskuje,
  • 41:01
    što znači kako oni nisu samo neobvezatni dodaci
  • 41:05
    već nastoje biti dio Drupal jezgre.
  • 41:10
    Broj dostupnih Drupal
  • 41:13
    dodatnih modula
  • 41:16
    je eksplodirao tijekom proteklih par godina.
  • 41:19
    Od solidnih sedamsto došli smo
  • 41:22
    do tisuća dostupnih modula
  • 41:26
    koji služe u razne svrhe.
  • 41:29
    Repozitorij Drupal dodataka, odnosno
  • 41:32
    dodatnih modula, je poput Divljeg Zapada Drupal koda.
  • 41:38
    Mnogo je lakše dobiti pristup održavanju dodatnih modula
  • 41:43
    gdje razina održavanja ovisi
  • 41:47
    isključivo o svakoj pojedinačnoj osobi.
  • 41:53
    [Meniji]
  • 41:58
    Meni sustav u osnovi služi za kreiranje
  • 42:02
    navigacijskog sustava za vašu web stranicu.
  • 42:04
    Meni sustav omogućava upravljanje
  • 42:07
    svim navigacijskim linkovima koji su dostupni
  • 42:10
    korisnicima koji surfaju po web stranici
  • 42:13
    i klikaju kako bi vidjeli što je sve uopće raspoloživo
  • 42:16
    za pregled.
  • 42:19
    Nakon instalacije i prijave
  • 42:22
    kao administrator imate na raspolaganju mnoštvo linkova
  • 42:25
    za kreiranje sadržaja i administriranje,
  • 42:29
    a sve to je zapravo dio Drupal menija.
  • 42:33
    Postoji osnovni navigacijski meni
  • 42:37
    kojeg Drupal automatski izgrađuje i održava za vas.
  • 42:41
    Dodatni moduli koje instalirate mogu dodati
  • 42:45
    automatski nove elemente u meni.
  • 42:50
    On služi za navigaciju vašom web stranicom, a može
  • 42:54
    sadržavati i nadređenu odnosno podređenu povezanost
  • 42:57
    između linkova što znači da ako želite
  • 43:00
    možete imati svojevrsni hijerarhijski navigacijski sustav
  • 43:04
    u obliku menija.
  • 43:10
    Po defaultu Drupal ima koncept primarnih linkova
  • 43:14
    i primarne navigacije, te isto tako ima sekundarne linkove,
  • 43:18
    tako da kada odete na jedan dio
  • 43:21
    web stranice imate dodatne linkove koji vas vode dalje,
  • 43:24
    npr. ako imate "O nama" članak
  • 43:26
    morate ga postaviti negdje gdje će biti vidljiv,
  • 43:30
    a to ćete postići tako da ga dodate u meni
  • 43:33
    kako bi se pojavio na svim stranicama.
  • 43:37
    [Meni putanje]
  • 43:42
    Bitno je imati na umu kako je potrebna uistinu mala
  • 43:45
    količina informacija kako bi Drupal odradio svoj posao.
  • 43:51
    Jedino što zapravo postoji jest URL koji korisnik traži,
  • 43:55
    a ako se prijavi na web stranicu postojat će
  • 43:59
    i kolačić (eng. cookie) koji pohranjuje informaciju o sesiji,
  • 44:02
    odnosno jedinstveni identifikator za tog korisnika.
  • 44:04
    Što se informacija o korisniku tiče
  • 44:07
    to je sve što vam je potrebno.
  • 44:09
    Kada sam tek započinjao s Drupalom nisam mogao shvatiti
  • 44:13
    kako da postavim nešto na
  • 44:17
    putanju koju želim.
  • 44:20
    U tradicionalnom razvoju imali ste
  • 44:23
    niz direktorija, te ste postavili
  • 44:25
    datoteke u određeni direktorij i dobili putanju.
  • 44:29
    Kada vidite putanju poput "user/1" sigurno pomislite kako
  • 44:32
    postoji "user" direktorij
  • 44:35
    s datotekama koje nose naziv 1, 2, 3 itd.
  • 44:39
    Ali u stvarnosti svi zahtjevi poslani prema drupal.org
  • 44:43
    prođu kroz index.php datoteku.
  • 44:46
    U Drupalu zapravo postoji samo jedna PHP datoteka
  • 44:49
    koja se poziva za svaki pojedinačni zahtjev.
  • 44:51
    Ne postoji about.php ili news.php.
  • 44:55
    Postoji točno jedna datoteka, a to je index.php
  • 44:58
    i ona se poziva pri svakom pojedinačnom zahtjevu,
  • 45:02
    a prvo što poziva je meni sustav.
  • 45:08
    Činjenica kako se radi o dinamičkoj web stranici
  • 45:11
    gdje se sve prikazuje u hodu
  • 45:17
    zahtjeva dosta kompleksniji proces nego što ljudi
  • 45:20
    navikli na čisti HTML očekuju.
  • 45:24
    Meni sustav je mnogo više od samih menija.
  • 45:27
    To nije samo ono što vidite na vrhu stranice
  • 45:31
    ili u stupcu sa strane.
  • 45:34
    Drupal meni sustav zapravo
  • 45:39
    određuje što će se prikazati na cjelokupnoj stranici.
  • 45:42
    On je usmjerivač (eng. router) stranica.
  • 45:45
    Ispod haube meni sustav je svjestan svih
  • 45:48
    važećih URL putanja na vašoj web stranici.
  • 45:51
    On je svojevrsna telefonska centrala Drupala
  • 45:54
    koja zaprima dolazni URL i utvrđuje
  • 45:57
    koji je modul ili PHP funkcija odgovorna
  • 46:00
    za izgradnju sadržaja za navedeni URL.
  • 46:08
    [Čisti URLovi]
  • 46:12
    Jedna od Drupal inovacija u samom početku
  • 46:15
    je bio sustav čistih URLova.
  • 46:18
    Primijetili smo kako mnoštvo URLova
  • 46:21
    u većini dinamičkih sustava za upravljanje sadržajem
  • 46:24
    imaju u sebi mnoštvo nesuvislih znakova koje ljudi teško mogu
  • 46:28
    pročitati i zapamtiti.
  • 46:30
    Ukoliko URL sadrži mnoštvo upitnika, tildi
  • 46:33
    i sličnih znakova utoliko ga je
  • 46:36
    teže zapamtiti i prenijeti drugoj osobi.
  • 46:41
    "Samo idite na index.php?/ tip rečenice."
  • 46:46
    Pokušali smo pronaći način kako
  • 46:49
    sakriti i učiniti nevidljivim sve navedeno
  • 46:52
    a da je još uvijek dostupno, a to smo uradili
  • 46:56
    koristeći čiste URLove gdje
  • 46:59
    namjesto index.php?q=node/11
  • 47:06
    imate samo node/11 adresu.
  • 47:09
    Prikaz stranice se izgrađuje dinamički.
  • 47:12
    Početni dio adrese, example.com dio URLa
  • 47:17
    govori na kojoj se trenutno web stranici nalazim,
  • 47:20
    ali sve iza njega je zahtjev
  • 47:23
    pomoću kojeg Drupal zapravo izgrađuje prikaz stranice
  • 47:26
    preusmjeravajući zahtjev bazi podataka.
  • 47:28
    On izgradi prikaz stranice koji vidite, a q= sadrži cjelokupni zahtjev.
  • 47:33
    Sve se odvija dinamički iza kulisa.
  • 47:36
    U jednom smo trenutku odlučili napraviti korak dalje.
  • 47:39
    Zašto bi bili ograničeni na samo node/11?
  • 47:42
    Zašto ne bi moglo izgledati kako god poželimo?
  • 47:47
    Dodali smo novi sloj iznad pomoću modula za putanje
  • 47:51
    koji je već postojeće čiste URLove mapirao
  • 47:55
    u URLove koji su prijateljski nastrojeni prema tražilicama ili
  • 47:58
    izgledaju točno kako vi želite.
  • 48:02
    [Teme]
  • 48:07
    Drupal zapravo ima niz slojeva,
  • 48:11
    gdje sloj teme sjedi na vrhu,
  • 48:14
    dok sadržaj koji generirate sjedi u bazi podataka,
  • 48:20
    tako da je sve međusobno povezano u Drupal svijetu.
  • 48:24
    Ali na kraju dana sve to treba biti prikazano
  • 48:27
    korisniku u web pregledniku.
  • 48:30
    Temiranje je prezentacijski sloj Drupala.
  • 48:34
    To je prikazni sloj koji je konceptualno odvojen
  • 48:39
    od funkcionalnog Drupal sloja.
  • 48:43
    [Nate Haug] Uloga Drupal sloja teme je odvajanje
  • 48:47
    logike od prikaza.
  • 48:49
    Nakon što logika obavi svoje, sloj teme preuzima te
  • 48:53
    ispisuje sve van.
  • 48:56
    Sloj teme točno određuje
  • 48:59
    na koji način će podaci biti prikazani.
  • 49:01
    Ne postoji obrada prije toga.
  • 49:03
    On jednostavno dobije podatke i zna
  • 49:06
    što se zapravo treba ispisati, dok u tematskoj (eng. theme) funkciji
  • 49:09
    možete uistinu odlučiti na koji način ispisati podatke.
  • 49:15
    Zaista je odlično što su te stvari odvojene
  • 49:18
    jer vam omogućavaju doista brzo sastavljanje
  • 49:21
    funkcionalnosti vaše web stranice nakon čega odabirete izgled posebno,
  • 49:26
    a te dvije stvari nisu ovisne jedna o drugoj.
  • 49:33
    Također možete imati dva različita tima koji istovremeno rade na web stranici.
  • 49:38
    Možete imati ljude koji rade na funkcionalnosti
  • 49:41
    dok u međuvremenu dizajneri izrađuju tematski dio,
  • 49:45
    ili možete skinuti postojeće teme
  • 49:49
    koje u pravilu promijene izgled vaše web stranice.
  • 49:52
    [♪ Glazba ♪]
  • 50:11
    Drupal može ispisati sadržaj kako god želite.
  • 50:15
    Postoje osnovni node podaci,
  • 50:18
    ali oni nisu povezani s načinom njihova prikaza.
  • 50:22
    Stvari mogu biti prikazane kako god želite, a ne nužno u HTML formatu.
  • 50:26
    Možete ih npr. dobiti u JSON formatu za JavaScript,
  • 50:31
    ili u XML formatu za RSS feed
  • 50:34
    ili u bilo kojem drugom formatu.
  • 50:37
    Na sloj teme možete utjecati
  • 50:41
    bez da kopate duboko do samih Drupal temelja
  • 50:45
    kako bi promijenili izgled,
  • 50:48
    što je zaista lijepo.
  • 50:51
    [Konfiguracija Web Stranice]
  • 50:57
    [Izvještaj o Pogreškama]
  • 51:02
    Drupal vas može obavijestiti na razne načine o tome što se događa
  • 51:05
    na vašoj web stranici, bilo da trebate obratiti pažnju na nešto
  • 51:08
    ili postoje pogreške u radu i tome slično.
  • 51:10
    Najočiglednije je kada kliknete te se nešto loše dogodi
  • 51:14
    i dobijete malenu crvenu pogrešku na ekranu koja npr. kaže
  • 51:17
    kako je potrebno upisati korisničko ime ili tome slično,
  • 51:22
    što je jednostavan način davanja povratne informacije
  • 51:25
    kako ste nešto učinili pogrešno.
  • 51:27
    Drupal na dva osnovna načina izvještava o pogreškama,
  • 51:31
    a suštinska razlika između njih
  • 51:34
    je razlika između vašeg razvojnog odnosno radnog
  • 51:38
    i finalnog stanja,
  • 51:41
    gdje odabirete hoćete li zapisati pogreške
  • 51:45
    ili ćete ih ispisati na ekran,
  • 51:47
    tako da kada PHP naleti na pogrešku
  • 51:51
    ili upozorenje ili slično
  • 51:54
    on će zapisati tu pogrešku koristeći Drupal zapisni (eng. logging) sustav,
  • 51:59
    ujedno prikazujući pogrešku na ekranu.
  • 52:01
    Prilikom razvijanja i rada na web stranici pogreške vam se mogu odmah
  • 52:06
    ispisati tako da ne morate provjeravati zapise.
  • 52:08
    Uočljive su i možete ih popraviti u vašem kodu.
  • 52:11
    Ostatku ljudi, odnosno krajnjim korisnicima, je bolje
  • 52:14
    prikazati prazan ekran nego gomilu neprijatnog koda
  • 52:17
    i čudnih upozorenja te sličnih zastrašujućih poruka
  • 52:21
    zbog kojih će pomisliti kako imaju virus na računalu.
  • 52:24
    Kako neće znati o čemu se točno radi, najbolje je ne prikazati ništa.
  • 52:31
    Namjesto ispisa na ekranu, radije ih spremite u zapisnik.
  • 52:35
    Također postoji koncept psa čuvara (eng. watch dog) koji zapisuje pogreške.
  • 52:40
    Ako odete u administracijsko sučelje pod izvješćima ćete vidjeti
  • 52:43
    cjelokupni zapisnik svega što se dogodilo u sustavu,
  • 52:46
    od zaista štetnih pogrešaka u bazi podataka, PHP pogrešaka,
  • 52:51
    pa do zapisa o tome tko je što tražio,
  • 52:55
    kada i tko je kreirao sadržaj i slično,
  • 52:59
    što je dobro imati, pogotovo ako želite napraviti
  • 53:03
    neki oblik sigurnosne provjere ili samo biti svjestan
  • 53:06
    stranica koje nisu pronađene.
  • 53:11
    [Izvještaj o Statusu]
  • 53:15
    Ideja izvještaja o statusu je neprekidno
  • 53:18
    praćenje stanja vaše web stranice
  • 53:21
    i skretanje pažnje na neobičnosti.
  • 53:24
    U njemu se nalaze informacije poput verzije PHPa i
  • 53:27
    MySQLa, kada je zadnji put pokrenut Cron,
  • 53:31
    kada je vaš sustav zadnji put provjerio ima li dostupnih sigurnosnih ažuriranja,
  • 53:35
    te obavijesti o propustima koje biste trebali ispraviti.
  • 53:42
    Tako da ga je dobro provjeriti tu i tamo.
  • 53:46
    On je svojevrstan izvještaj o zdravlju
  • 53:49
    vaše web stranice.
  • 53:51
    Očigledno ne pokriva svaki detalj,
  • 53:54
    već samo neke osnovne informacije
  • 53:58
    o radu vaše web stranice i o tome
  • 54:01
    na što biste trebali pripaziti
  • 54:04
    jer se dešava nečujno u pozadini
  • 54:07
    bez da ste toga svjesni.
  • 54:11
    [Cron]
  • 54:15
    Nakon što instalirate Drupal, jedna od prvih stvari koje trebate napraviti
  • 54:19
    jest postaviti tzv. Cron zadatak,
  • 54:21
    a osim što se radi o smiješnoj riječi, većina ljudi nema pojma što ona znači.
  • 54:25
    U pravilu Cron je nešto što se pokreće prema rasporedu,
  • 54:29
    a možete ga postaviti u razmaku od recimo svakih pet minuta ili svaki sat,
  • 54:32
    pa do svakih šest dana i tome slično.
  • 54:35
    Na određenoj web stranici često je važno
  • 54:38
    redovito izvršavati razne zadatke.
  • 54:41
    To može biti ažuriranje popisa najviše rangiranog
  • 54:46
    sadržaja na web stranici ili jednostavno
  • 54:49
    čišćenje starih i nepotrebnih informacija iz zapisnika.
  • 54:54
    To obavlja program nazvan Cron
  • 54:57
    koji radi uz Drupal.
  • 54:59
    Radi se o sveprisutnom Unix programu
  • 55:04
    koji može u pravilnim razmacima, npr. svakih trideset minuta,
  • 55:07
    pokrenuti određenu naredbu.
  • 55:10
    Drupal posjeduje sustav koji koristi Cron program
  • 55:14
    za pokretanje čišćenja i raznih drugih zadataka
  • 55:19
    u redovitim vremenskim razmacima.
  • 55:21
    Imali smo jednog klijenta koji nije podesio Cron
  • 55:25
    i kada smo ga upitali koliko zapisa ima
  • 55:29
    u jednoj tablici u Drupalu, odgovor je bio preko milion,
  • 55:32
    a radilo se o cache tablici čija je namjena čuvanje svih privremenih
  • 55:36
    informacija koje se neprestano mijenjaju
  • 55:40
    zbog performanci, čim smo očistili tablicu
  • 55:45
    web stranica je opet bila brza, a mi smo podesili Cron
  • 55:49
    kako se problem ne bi ponovio.
  • 55:51
    Cron je važan zato što npr. čisti stare zapise
  • 55:55
    i osvježava sadržaj tražilice,
  • 55:58
    te obavlja općenite poslove održavanja koje treba ponekad izvršiti.
  • 56:03
    Poslat će poruke prema određenom rasporedu kako ne bi
  • 56:07
    došlo do zagušenja kada bi se sve obavilo odjednom.
  • 56:10
    Grupirat će zadatke i izvršiti ih tijekom vremena.
  • 56:14
    Ako imate uključeno pretraživanje
  • 56:17
    Drupal zapravo treba doznati kada se pojavi novi sadržaj
  • 56:20
    kako bi provjerio postoje li nove riječi u njemu za koje bi trebao znati.
  • 56:25
    On ne obavlja navedeno svaki put u hodu
  • 56:28
    jer bi to bilo prezahtjevno, već se to dešava
  • 56:33
    prilikom pokretanja Crona.
  • 56:37
    [Performance]
  • 56:41
    Kako je Drupal uvjetovan bazom podataka mnogo puta
  • 56:44
    ljudi postanu nervozni kada se pitaju
  • 56:47
    hoće li moći rasti?
  • 56:49
    Jednostavnu statičnu HTML stranicu je zaista lagano poslužiti,
  • 56:52
    ali kada nadodate baze podataka, PHP i tome slično
  • 56:55
    dolazi do dodatnog opterećenja.
  • 56:58
    Postoje stvari koje treba imati na umu kada
  • 57:01
    prelazite s petljanja oko izgradnje web stranica
  • 57:04
    i učenja kako Drupal radi, na stvarnu izradu neke
  • 57:07
    koja će moći podnijeti promet zbog objave
  • 57:10
    na slashdot.org ili zbog pojave u
  • 57:13
    časopisu i tome slično.
  • 57:15
    Drupal performance i skalabilnost u dosta slučajeva
  • 57:18
    zapravo dolazi od drugih slojeva koji su dijelovi
  • 57:22
    operativnog sustava, baze podataka, web servera,
  • 57:25
    a Drupal je na neki način zadnja stvar koju ćete optimizirati
  • 57:28
    jer možete vi optimizirati Drupal koliko god hoćete,
  • 57:30
    ako je usko grlo negdje drugdje
  • 57:34
    nećete vidjeti nikakvih
  • 57:38
    pomaka u brzini izvedbe, koje bi inače zamijetili.
  • 57:42
    Imali smo dosta velikih klijenata kojima smo pomogli
  • 57:45
    s instalacijom dvadesetak servera
  • 57:53
    gdje je postojalo više servera za baze podataka i Apache servera za balansiranje opterećenja
  • 57:58
    i odvojenih servera za podatke i tome slično,
  • 58:02
    tako da se razni aspekti web stranice,
  • 58:09
    koji bi mogli biti na jednom jedinom serveru na nekom jeftinom hostingu,
  • 58:14
    mogu podijeliti, gdje zapravo možete posvetiti cijeli server
  • 58:18
    ili grupu servera određenoj funkcionalnosti,
  • 58:22
    u svakom slučaju raste doista dobro.
  • 58:26
    Drupal nudi mnogo načina za poboljšanje performanci
  • 58:29
    rasta vaše web stranice.
  • 58:31
    Za početak ono što možete učinti jest
  • 58:34
    uključiti agregaciju CSS datoteka.
  • 58:37
    Ona će uzeti sve dostupne datoteke
  • 58:40
    koje dolaze iz različitih modula i tema
  • 58:43
    te ih sjediniti u jednu datoteku kako bi ista
  • 58:46
    bila poslana preko žice samo jednom, odnosno ubrzala prikazivanje vaše web stranice posjetiteljima.
  • 58:50
    Tradicionalno riješenje je bilo
  • 58:53
    preraditi unutrašnjost Drupala kako bi lakše
  • 58:56
    uključili nove mogućnosti, kao npr. napredno cachiranje
  • 59:00
    ili nove načine optimiziranja brzine dohvaćanja informacija,
  • 59:06
    ali bez zahtijevanja istih, kako bi ljudi sa slabijim hardverom
  • 59:09
    ili manjim potrebama mogli instalirati Drupal i odmah
  • 59:13
    ga početi koristi, a ostali koji zaista trebaju
  • 59:17
    visoke performance bi ga mogli
  • 59:20
    optimizirati i zamijeniti određene dijelove
  • 59:23
    s visoko optimiziranom zamjenom.
  • 59:29
    [Spremanje u priručnu memoriju (eng. caching)]
  • 59:33
    Cachiranje je dosta bitan koncept kako kod Drupala tako i kod ostalih web stranica.
  • 59:38
    Ideja cachiranja je u tome da postoje određeni
  • 59:42
    tipovi sadržaja koje je zaista skupo sastaviti
  • 59:46
    ako gledamo iz perspektive servera koji mora utrošiti vrijeme
  • 59:50
    povlačeći informacije iz baze podataka i oblikujući
  • 59:53
    ih u HTML prilikom čega treba uzeti u obzir sve informacije
  • 59:56
    poput sadržaja kojeg su preporučili prijatelji od korisnika
  • 59:59
    i tome slične stvari.
  • 1:00:02
    To nije toliko bitno kod jednostavnih web stranica, ali kod kompliciranijih
  • 1:00:05
    koji imaju mnogo obilnog sadržaja i vremenski određenih informacija
  • 1:00:10
    postoje određeni dijelovi informacija koji se dugo vremena sastavljaju,
  • 1:00:13
    te ako imate prometnu web stranicu gdje
  • 1:00:16
    svaki posjetitelj zahtjeva od servera sastavljanje te
  • 1:00:20
    kompleksne informacije, to može biti ozbiljan problem.
  • 1:00:23
    Cachiranje je u osnovi samo postupak
  • 1:00:26
    jednokratnog sastavljanja nečega što se ne mijenja često.
  • 1:00:31
    Drupal HTML stranice se ne mogu
  • 1:00:34
    cachirati jer su dinamičke.
  • 1:00:36
    Uvijek se mijenjaju.
  • 1:00:38
    Ljudi dodaju komentare.
  • 1:00:40
    Vi kreirate nove blog članke.
  • 1:00:42
    Sve se to nalazi u bazi podataka, a ne u statičkim datotekama
  • 1:00:45
    poput ostalih dijelova, tako da smo uključili
  • 1:00:48
    unutar Drupala mehanizam cachiranja stranica
  • 1:00:51
    gdje kada anonimni korisnik posjeti stranicu
  • 1:00:55
    uzmemo cjelokupni zahtjev
  • 1:00:59
    i spremimo ga u bazu podataka.
  • 1:01:01
    Pri sljedećoj posjeti anonimnog korisnika
  • 1:01:03
    toj istoj stranici možemo
  • 1:01:05
    ako se nije promijenila jednostavno učitati
  • 1:01:09
    tu stranicu koju imamo u pričuvi,
  • 1:01:12
    a to se obično naziva spremanje u priručnu memoriju (eng. caching).
  • 1:01:15
    To i nije toliko poželjno
  • 1:01:18
    jer radi samo za anonimne korisnike, ne i za prijavljene,
  • 1:01:21
    a drugi problem je što sadržaj postane ustajao
  • 1:01:25
    nakon određenog vremena, tako da npr. ako ima novih komentara
  • 1:01:28
    u zadnjih pet minuta, neće se vidjeti osim ako
  • 1:01:31
    svaki put očistimo cache, što se inače dešava u pravilu svakih deset minuta.
  • 1:01:35
    Također je moguće podijeliti stranicu u manje komadiće
  • 1:01:39
    i cachirati ih nakon što su izgrađeni
  • 1:01:42
    tako da svaki prijavljeni korisnik kojemu se možda prikazuje različit sadržaj
  • 1:01:46
    ipak može vidjeti cachirani dio sadržaja odnosno stranice
  • 1:01:50
    koji se ne mijenja vrlo često.
  • 1:01:53
    Omogućili smo ne samo cachiranje stranica
  • 1:01:57
    već i modula, tako da razni moduli,
  • 1:02:01
    ako je određeni dio njihovog koda procesorski
  • 1:02:05
    ili s algoritamskog stanovišta zahtjevniji,
  • 1:02:09
    programeri mogu koristiti cache.
  • 1:02:12
    Mogu kreirati vlastite cache tablice za spremanje nužnih informacija,
  • 1:02:16
    te jednostavno pozvati spremljeno, bez da ponavljaju postupak.
  • 1:02:22
    Također postoji relativno nova mogućnost nazvana agresivno cachiranje
  • 1:02:27
    koja uklanja dosta Drupal API poziva prema
  • 1:02:31
    dodatnim modulima koji omogućavaju da odrade svoj posao,
  • 1:02:34
    tako da se Drupal može fokusirati samo na povlačenje cachirane stranice
  • 1:02:38
    iz baze podataka i prikazivanja iste korisniku.
  • 1:02:40
    To znači da Drupal obavlja puno manje posla kako bi prikazao
  • 1:02:43
    stranicu korisniku, dok istodobno vaša web stranica
  • 1:02:46
    poslužuje stranice mnogo većem broju posjetitelja.
  • 1:02:50
    Također postoje moduli poput memcache ili advanced cache
  • 1:02:53
    koji rade lude stvari, ali u pravilu ih trebate samo
  • 1:02:56
    ako koristite više različitih pozadina
  • 1:03:00
    za rad.
  • 1:03:02
    Tipičnoj osobi koja ima samo blog
  • 1:03:05
    ili čak popularniju web stranicu
  • 1:03:07
    bez puno prijavljenih korisnika, mogu biti dovoljne unaprijed zadane postavke.
  • 1:03:11
    [♪ Glazba ♪]
  • 1:03:21
    [Pričali]
  • 1:03:24
    [Addison Berry]
  • 1:03:31
    [Angie Byron]
  • 1:03:37
    [Jeff Eaton]
  • 1:03:43
    [Nate Haug]
  • 1:03:50
    [Jeff Robbins]
  • 1:03:56
    [James Walker]
  • 1:04:02
    [Matt Westgate]
  • 1:04:07
    [Razumijeti Drupal]
  • 1:04:13
    [Dio Lullabot Edukacijskog Serijala]
  • 1:04:16
    [www.lullabot.com]

Understanding Drupal

Loading...

Learn the essential terminology of Drupal in this overview of content nodes, blocks, theming, menu system and modules. In Understanding Drupal, the first in The Lullabot Learning Series, the Lullabot team provides an overview of Drupal as a content management system, as a PHP web application framework, and as a developer community. Its documentary-style exploration covers all the terminology and fundamental concepts for both site administrators and developers. If you've ever been confused by Drupal or are still trying to wrap your head around the community and platform, then this video is a roadmap to accelerate your journey up the Drupal learning curve. Topics include:

  • How content is entered and managed
  • How users and user permissions are handled
  • What blocks are and what they can do
  • The concepts and capabilities of Drupal's powerful module system
  • How Drupal handles navigation and its menu system
  • How themes alter the site layout, design, and presentation
  • Site configuration and administrative messages and settings

This video uses Drupal 6 for examples, however it is more focused on general Drupal concepts rather than version-specific how-tos.

Additional resources:
There are no resources for this video, if you believe there should be please contact us.

Average review

5
Average: 5 (1 vote)

Reviews

5

first video I watched. Great for an overview of Drupal with some depth too.