Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Do I have to work with code when building websites in Drupal

Tags:

php

drupal

I know HTML and I know some PHP. But I would like to know if professionals do use code a lot when developing websites in Drupal. My experience from Drupal is that you don't have to write any PHP or HTML at al and that you can do everything from the admin menu. But since I'm new with Drupal and currently learning Drupal 7 I would like to know what opinion others have when it comes to Drupal and building websites.

When are you using code in you are using code at all?

like image 744
dejaninic Avatar asked Apr 16 '11 22:04

dejaninic


People also ask

Does Drupal require coding?

Every Drupal developer needs to know PHP language for a simple reason: Drupal software is written in it. The reason for that is, PHP is a programming language that is flexible and easy to learn, even if you come from a different knowledge background.

Can I build a website with Drupal?

It turns out, Drupal can be used to create almost any kind of website: Personal or business websites. Blogs and news websites.

Is Drupal worth learning?

Drupal is a good choice for websites such as this. It has the capability to manage this type of structured data really well built into Drupal core. You will have to do the work to build this application, but the pieces are there for you. Another thing Drupal handles really well is multiple users and roles/permissions.


5 Answers

As a professional, yes, I use PHP and HTML all the time while working with Drupal. I'd say that roughly 70% of the time is doing PHP, 5% is configuring the modules via Drupal's interface and 25% is testing. The numbers given are, of course, just to let you see how important PHP coding is when I'm doing a Drupal site for a client.

Theme development cannot be done without PHP + HTML + CSS + JavaScript coding. Drupal 7 requires more work than Drupal 6 due to an increased template engine granularity.

If there's no contrib module that suits you, you need to write your own or tweak an existing one (PHP and SQL, sometimes JavaScript). This is true especially of Drupal 7, as there are still many modules from D6 that have no stable version for D7.

like image 112
mingos Avatar answered Oct 23 '22 17:10

mingos


Once you get more experienced, you'll come to this conclusion:

Drupal carries you 90% of the way, and the remaining 10% is up to you.

Not every module will solve the particular problems of your project.

The upside is the API is pretty thorough and most (just about anything) is solvable in a simple module, template override, or hook.

like image 25
Kevin Avatar answered Oct 23 '22 19:10

Kevin


Unless you are building simple sites, you will probably do some coding. At the very least you will modify existing code to make changes to existing modules. More likely you may need to create new modules. Even though existing modules about, finding one that always does exactly what you want may be difficult.

like image 21
Scotty Avatar answered Oct 23 '22 18:10

Scotty


Short answer: Yes, you will have to write code.

Here's why. Drupal, on it's own is all well and good. It does what it needs to do, however when setting up a website professionally you can't use the default themes, most clients wont want this. Quite a lot of clients would prefer a unique theme, which involves you creating one. This would involve some PHP programming in order to get it working with Drupal.

Not only that, but writing and or customizing Drupal plugins will most likely be necessary.

In most, if not all professional environments the 'default' just isn't enough.

like image 28
Luke Berry Avatar answered Oct 23 '22 18:10

Luke Berry


I'm on the newer end of the Drupal spectrum. I've built about five sites. I built my first several sites using little or no PHP (I did use ample CSS and HTML markup). So I would say that it is possible to build in Drupal with little understanding of PHP.

But. Drupal is a complex system which seems to favor developers, as opposed to end users who may favor the click together approach (although this is something that may be changing).

I've found that the more I understand the codebase and the API, the easier it is to get what I want without having to wade through a giant body of contributed modules. The repository of contributed material in Drupal is fantastic and covers a lot of ground, but isn't always actively maintained and may not do just what you want.

I think a good place to start is understanding the hook system, the Form API, and the menu system, as well as how to generate queries. That's all more back-end stuff. On the front end: the template system, template.php and the preprocess and theming functions.

Checkout api.drupal.org.

like image 38
starsinmypockets Avatar answered Oct 23 '22 17:10

starsinmypockets