Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Developing for Drupal

From: Drupal 7 New Features

Video: Developing for Drupal

The familiar iceberg metaphor applies to Drupal 7's improvements. Most of what's there is hidden from view. This series mostly focuses on changes to how you administer Drupal. That happens mostly through Drupal's own browser-based interface. Now we're going to survey changes to how you program Drupal modules using Drupal's Application Programming Interface or API as it's better known. Now, I have to point out that I'm not a developer myself and this video will only go over the changes very superficially. But we will go over all of the important ones.

Developing for Drupal

The familiar iceberg metaphor applies to Drupal 7's improvements. Most of what's there is hidden from view. This series mostly focuses on changes to how you administer Drupal. That happens mostly through Drupal's own browser-based interface. Now we're going to survey changes to how you program Drupal modules using Drupal's Application Programming Interface or API as it's better known. Now, I have to point out that I'm not a developer myself and this video will only go over the changes very superficially. But we will go over all of the important ones.

The best way to get an overview of the API changes since Drupal 6 is by going back through the release notes of Drupal 7's development versions. To do that, go to drupal.org/project/ drupal and then scroll down underneath where you see the release numbers and say View all releases, because the ones you see up here are only the most recent ones. Once you're there, you read backwards in time and see what the most recent versions were that were released. To narrow it down to just one API version, you would click it up here, in this case, Version 7, and click Apply.

Then you see we have alpha7, alpha6, and so on going backwards in time. Click Read more at the bottom if you want to see back even further in time. As always, you can find complete technical documentation on Drupal's API at api.drupal.org. Once you're there, be sure to click on the Drupal 7 tab, or if you like, you could just go to api.drupal.org./api/ 7 as you see in the browser bar here. Let's talk very briefly about some of the most notable changes to Drupal's API.

The first big change is the Testing module. This is what was formerly known as Simple Test and you can still get that at drupal.org/project/simple test. It comes with many testing scripts to test the built-in modules with Drupal, and it will run scripts that you create against any modules that you create. We demonstrated this in the video on the Testing module in this series. To learn how to develop your own test for the Testing module, a good place to start is the Documentation for Simple Test, which is again on the Simple Test page.

The next big developer change in Drupal 7 is the database layer. Previous versions of Drupal could really only connect to a certain limited list of databases easily. To connect to any other databases, you had to do quite a bit of programming. In Drupal 7 however, that database connection has been abstracted and so now you can connect Drupal to any database, as long as there is a PDO driver. You would then get a Drupal database driver if it exists, and if it doesn't, you can write them fairly easily. You could learn about PDO drivers at the URL on your screen, php.net/manual/en/pdo.drivers.php and you can get more details about programming those Drupal database drivers at drupal.org/node/310069.

The third substantial change in Drupal 7 is RDF or the Resource Description Framework. We talked very briefly about this in an earlier video when I was showing you what the new modules were. RDF lets you describe your data better to other sites. For example, if we were to go to Google and type in a movie title, let's say, burn hollywood burn alan smithee film - one of my favorite films, by the way - Oh! It only got two stars. Well, the interesting thing here is that you can see what the rating is, because that was transmitted from IMDB to search engines through RDF probably.

Basically, it lets your site define what information is and not just that it is information. The next big change in Drupal 7 is there are now better installation profiles. Now, we haven't talked very much about installation profiles, but we will talk about them when we go on to the video about other versions of Drupal. Essentially, Drupal has split in a way. There is the core Drupal, which people consider now more of a platform on which you can build things, and then there are the products that people build from Drupal. One example of such a product is OpenPublish, which is a version of Drupal, which has additional modules and so forth, that lets you set up a new site very easily.

In any case, these installation profiles are now developed a lot like ,odules, and you can learn about this at the URL on your screen. The next big change, this will be a big one for those of you who like all sorts of visual effects in your sites, is jQuery and some other pieces are now part of drupal Core. The big one is jQuery UI, which gives you all that visual oomph, that is, things appearing and disappearing on the screen. One example of that is when you're editing a node and you say that you want to have a menu link to that node, you click in the checkbox and then all of the controls appear, that is, they don't clutter up the screen until you say yes, I actually want to see the controls.

There are some other jQuery bits besides jQuery UI and some JavaScript bits. If you want to learn exactly what they are, take a look in the /misc folder of your Drupal installation. That's it for the big changes, but I do want to point you to a few other resources. The resources you see on your screen here will tell you more about how to convert your old Drupal 6 modules to Drupal 7, exactly what is changed between different versions in Drupal 7 and, of course, as always, api.drupal.org is your source for all of the programming details that you need in order to make your own modules.

So, that's what's happened between Drupal 6 and Drupal 7. If iou want to see the future, you can get a sense of it by referring to a blog post that Drupal founder Dries Buytaert wrote about Drupal 8. He wrote it all the way back in November 2009 before Drupal 7 was ready for release. But at that point, he already had a pretty good sense of what the next steps would be. You can go and take a look at it at buytaert.net/8-steps-for-drupal-8. One thing that's apparent from his post is how Drupal 7's improvements are not only useful for developers now, but how they are important stepping stones for Drupal's continual improvement into Drupal 8 and beyond.

Show transcript

This video is part of

Image for Drupal 7 New Features
Drupal 7 New Features

29 video lessons · 7953 viewers

Tom Geller
Author

 

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Drupal 7 New Features.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.