What are the skills a Drupal Developer needs? [closed] - drupal

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I'm trying to write out a list of key Drupal competencies, mainly so I can confirm what I know, don't know and don't know I don't know. (Thanks D. Rumsfeld for that quote!)
I think some of these are really broad, for instance there's quite a difference between making a functional theme and creating a theme with good SEO, load times and so on, but I'm hoping you could assume that a half decent web developer would look after that anyway.
Just interested to see what people here feel is also important. I've edited the suggestions so far into this list.
Languages
PHP
MYSQL
Query
Drupal Skills
Research and install modules to meet project requirements
Configure the basic modules and core settings to get a site running
Drush command line tool
Create a custom Theme from scratch which validates with good HTML/CSS.
Able to customise forms, core, themes without altering core files but by using template.php or custom modules.
Can make forms from scratch using the API - with validation and posting back to the DB/email
Can create custom modules from scratch utilising core hooks and module hooks.
Be involved with the community, understand the naming conventions, CVS system and ideally have submitted some code or revisions.
Modules
It's not easy to make a must know module list, as not only is the modules you use very dependent on the site, but also how you use them. However the following are widely used:
Views
Know how to make basic views and blocks.
Know how to make more complex views with relationships and terms.
Know how to use hook_views_query_alter, to make complex queries.
Know how to use hook_views_default_views, to create specific views.
CCK
Know how to setup content - what field types to use.
Know how to create your own field_formatters - the foundation for theming CCK fields.
Hooks
The most important hooks to learn, to create a basic module are probably:
hook_form_alter() - change forms without changing code.
hook_menu()
hook_theme()
hook_nodeapi() - almost anything regarding nodes
hook_schema() - create tables
hook_install() / hook_uninstall() - create tables and clean up.
hook_perm() - when you need special access control.
hook_init() - things to want always to happen.
hook_user() - if you need to tap into user actions or modify the user object.

I good understanding of client-server architecture, how servers and browsers works. And knowledge of php and mysql, templates engines. And of course, you should also read Drupal documentations.

Able to create a custom Theme from scratch which validates with good HTML/CSS and also pays attention to usability and accessibility. (Whilst still looking kick-ass).
You usually don't want to create themes from scratch but from a starter theme like Zen instead.
For Drupal you will need:
PHP, it's a PHP framework, so to really understand and use it, you need to understand PHP.
SQL, the list of SQL serves that Drupal can use is growing, but you will need to understand * SQL, relational database and how to setup some basic architecture.
Javascript (and jQuery). Drupal uses the jQuery js library, so it will be a lot easier if you not only, know how yo use javascript, but also understand how to use jQuery and some of it concepts.
The hook system and how you can alter Drupal core and modules implementing hooks.
The naming convention for hooks, theme functions etc.
Modules
It's not easy to make a must know module list, as not only is the modules you use very dependent on the site, but also how you use them. The two top modules in Drupal is.
Views
Know how to make basic views and blocks.
Know how to make more complex views with relationships and terms.
Know how to use hook_views_query_alter, to make complex queries.
Know how to use hook_views_default_views, to create specific views.
CCK
Know how to setup content - what field types to use.
Know how to create your own field_formatters - the foundation for theming CCK fields.
Another module that I find very powerfull once mastered is Panels. It allows you to do a lot of complex and difficult things with very little and simple code. There is a lot of hooks you need to learn, and not much documentation. But once you understand Panels, you find that you time has been well spent.
Hooks
The most important hooks to learn, to create a basic module is probably:
hook_form_alter() - change forms without changing code.
hook_menu()
hook_theme()
hook_nodeapi() - almost anything regarding nodes
hook_schema() - create tables
hook_install() / hook_uninstall() - create tables and clean up.
hook_perm() - when you need special access control.
hook_init() - things to want always to happen.
hook_user() - if you need to tap into user actions or modify the user object.
You don't need to use all of these hooks all of the time, but they are some of the most used ones.

Great list so far! Some others for consideration:
Ability to use Drush to update or setup a site
Strong understanding of good best practices configuration for performance, security and SEO of a Drupal site (think launch checklists)
Having submitted a module to Drupal.org (however simple) or submitted a patch (the process of getting a CVS account and getting your first code in is instructive to the community and to standards)

You don't need SEO skills for templates, drupal usually helps with SEO alot. Ofcourse a developer who will slice a design must know that all headings must be done with h1,h2,h3,h4 tags. that's really basic one. everything all is up to drupal..
as for my opinion to be a drupal "developer", you need some very basic skills in PHP. Because drupal is really written without object-oriented programing, and without DESIGN PATTERNS, so these are two things is really makes you a programmer.. without them it just [sorry for this word] bullshit not a programming.
I think anybody can install drupal or wordpress or some cms-made-simple, systems if you have at least once connected to ftp in your life... to develop plugins for them is a requires basic skills of php. Ofcourse if you'll find skillfull developer then he will know oop basic, and will write plugins with OOP and that code will be really NiCE! =)

Being able to edit existing functionality (core or module) without touching the core or module and knowing whether to put it in template or a custom module.

As we anything web related these days, you really must have a good understanding of the HTTP protocol. You also need a good understanding of JavaScript, the DOM, CSS and HTML5. Knowing a bit of jQuery is not enough for a developer, you need to understand what your are doing with the DOM, HTML5 APIs and CSS in order to build features and behaviours into the browser. You also need to understand the Drupal JavaScript APIs, both on the server side (hook_library(), #attached, etc.) and the client side (Drupal.behaviors, etc.)
You also need to known the various APIs of Drupal. The Form API is not the only one. You need to understand the Menu system (page, access, title and delivery callbacks, how to pass parameters to them, etc.), the Queue API for asynchronous operations, Batch API for long running operations, Entities and Field APIs for user editable structured data, Theme API and Render Arrays for anything presentation, Cache API, Schema and Database APIs, File API, Cache API and the Localization API.

Related

Integrating Drupal and WHMCS

I am just wondering if there is any hook to integrate WHMCS database with my existing Drupal site.
WHMCS has its own CMS and so as Drupal. I have used the same html twice for WHM and also for Drupal hence the problem is that I have to change twice if there is any design update.
The answer is no, there is no such thing.
A hook, in Drupal is not something magically to integrate anything. A hook is merely a architectual concept to allow code being ran on several occasions. A hook is not what you are looking for.
You will need to implement each and every piece of integration with Create, Read, Update, Delete synchronisation. A user in Drupal gets updated, that should fire code wich updates the data in your other CMS's database. A piece of content is created in your WHCMS, then it needs to become available in Drupal too. And so on and so on.
So, you will first need to define very clearly what you want to integrate and share between both. If it is only the session (single sign on) there are several solutions ready to use. But if you need all content, their comments, search-results and so on to be shared, you have a long way to go.
The reailty with integrating two CMS's entirely, is that you often need more then the sum of the codebase of both CMSs as gluecode: it needs such great amounts of complex integration and synchronisation-code, that in the same time you had probably written both Drupal and WHCMS from ground up. My advice: don't even try.
Hooks are mainly for CMS operations (creating/updating/deleting content). Sounds like you just need to share the theming from the CSS and header/footer HTML across both systems.
You can switch Drupal to use the Smarty template engine: http://drupal.org/project/smarty
You may then be able to create a Drupal theme that imports the header.tpl.php and footer.tpl.php from the WHMCS theme.
You may need to remove some of the Smarty markup and variables from the WHMCS side to simplify the header and footer to the point they can be used with Drupal (if you can make the header and the footer pure HTML, you may not even need to use Smarty on the Drupal side), or write a lot of preprocessing code on the Drupal side you may be able to populate the template variables with values from the WHMCS database.

Drupal module development examples

I'm new to Drupal, but I want to create an add-on. The add-on requires some sort of multi-page form with advanced jQuery (I already looked at the jQuery module).
The add-on requires details of the current logged in user and will also communicate with an external database.
I've been looking at tutorials concerning Module creation etc. But they mostly cover creation of simple forms, where as what I want to create is more of a plugin.
Multi page forms are a total drag. Pro Drupal Development, has a very good section on this topic, and I highly recommend that book if you are doing any Drupal development.
Online I found the following article pretty useful too (though I ultimately went with my own system).
http://www.nicklewis.org/using-chaos-tools-form-wizard-build-multistep-forms-drupal-6
There's a decent example here:
http://thedrupalblog.com/creating-multipage-form-using-forms-api
To make the most out of this, you're going to want to get pretty friendly with the Form API:
http://drupal.org/node/204270
Sadly Drupal.org seems to be missing a Drupal 6.x explanation (though plenty exist for 5.x and 4.7 oddly enough).
Multi step forms are complex by nature, but there are some methods to make it easier. I recommend that you have a look at the multistep form tools offered by the Ctools module. This blog post by Nick Lewis explains how you can use it.
I think you should think twice before going with javascript/jQuery to create your forms. Javascript is a great way to improve the user interface, but it can be easily manipulated because it's client side technology. You shouldn't rely on javascript alone for things like input validation, temporary storage of form values and controlling the flow between different steps of the form.
I feel odd saying this, but I don't think you want to use the Drupal Forms API.
The Forms API provides a lot of security features (unique token, rebuilds form after submit to compare to ensure correct form is processed, etc.) and allows other modules to modify your forms, but I think a lot of those features will get in the way of your jEditable form. Multi-page forms are not that challenging using the Forms API, but jEditable elements will be.
Your module could simply add a menu item with a page callback function that puts together your jEditable form for you. That is about as close to the world of a 'normal PHP' script as Drupal will let you get.

Migating from CakePHP to Drupal, functionality question

(I've posted this on the drupal forum too btw)
I'm converting the company websites to use Drupal, or at least trying to check that its going to be the best way forward. I have a background in PHP development, and I'm currently using the CakePHP framwork. I've built this site (not my design) and I can see how to replicate most of the functionality using Drupal, most likely using the CCK module.
http://preview.tinyurl.com/yk6u8mt
As you can see from the homepage:
A user chooses a country.
The country is passed using an ajax call to a script that decides which phone is best based on 'in country' network coverage.
A div is shown recommending the visitor the best phone for that country.
I'm wondering how to go about this in Drupal, I'm definitely not after a step by step guide, I just want to know if this kind of thing is possible with Drupal, and what approach to use.
If someone can help that would be superb. Thanks.
Okay, so you've got a path you're defining in hook_menu, which is where your form is being presented - or else you've got it set up as a webform in a node, that could work too.
Either way, in your form you're going to be using AHAH - check out http://api.drupal.org/api/drupal/developer--topics--forms_api_reference.html/6#ahah and http://drupal.org/node/348475 .
Basically, you're going to define another path in hook_menu that's of type MENU_CALLBACK, and which will receive the country as input, and then will return the div that you'll display on the screen.
One core example of AHAH that may be useful to you is where you're entering a password and it lets you know if the password is secure enough - check that out.
Edit: There's also some good examples at http://drupal.org/project/examples.
I would look into using CCK and views. you can set up filters for the views. If filters don't work, you have the ability to include php code. I have also successfully added jquery code in the header of a view through which I was then able to have my view filtered by what is typed in a text box.
Coming from CakePHP using Drupal is a pain in the a** - even more for developers.
It's application structure might be designed to ease extensibility but this only means you have a system to enable your own plugins and themes.
While modules are basically the M+C-part the themes are the V-part of an MVC-application. The problem is that this seperation is not very strict in Drupal - in fact you have to break it sometimes in order to make things work (e.g. you have to include a theme_mymodule_myfunction() into your module as default output which you then can override with your theme using mytheme_mymodule_myfunction() ) And don't even bother looking for classes ( see http://drupal.org/node/547518 ).
Also there is no real link from a module to a theme. On many occations this is a good thing as you can switch modules and themes seperatly without creating a problem. For application builders coming from CakePHP (or any other framework) you often feel a lack of "wholesomeness" - you create parts for a base software and have to live with it's drawbacks.
IMHO I wouldn't recommend this step. Drupal is fine if you have to manage a website and might add a few modules to add neccessary value (image gallery etc.) but I definetly don't recommend it as a base for a customized web-app.

Using Drupal Views VS templating

I have recently started working with Drupal on the side and have had to tackle the limitations I come up against in the Views API. More than not I find it faster and more powerful to code it myself.
It is hard to create custom views that have a specific look and feel without create custom files anyway.
Creating the pages from scratch in a *.tpl.php gives me more choice and flexibility. I have done a couple of them now and it is almost as fast.
For a developer (since this is a programming forum) what is better in your opinion:
Views or Custom templates?
I'm not even sure what you mean by custom templates (please say you're not hardcoding SQL into .tpl.php files), but no matter what you mean, the answer is to use Views wherever possible.
Reasons:
Development speed - I promise you creating a View will be faster than a custom module 99.9% of the time
Stability - it has hundreds of thousands of testers
Security - it has the eyes of many on its code
Support - there are hundreds of contrib modules that interact with Views somehow
Maintenance - Views is a Drupal standard. Using custom modules gives your site's maintenance an unnecessary learning curve.
Upgrading - Views will provide an upgrade path from D6 to D7. Your custom stuff won't.
As for your "it is hard to create custom views that have a specific look and feel" point, I think you'll change your mind after a little time with template_preprocess_whatever() functions and overriding Views templates. You have absolute control if you want it.

What makes Drupal better/different from Joomla [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 4 years ago.
Improve this question
I talked to a few friends who say that Drupal is amazing, and it is a way better than Joomla. What are the major differences/advantages?
The general consensus is that programmers prefer Drupal whereas mere mortals prefer Joomla. Joomla is praised for having a simpler user interface. (I personally don't agree with that; I think Joomla's UI is pretty painful to use. But then again, I'm looking at it with a programmer's eye.) Drupal, on the other hand, is praised for its high level of extensibility, along with its large library of high-quality (more or less) plug-ins that add features ("modules" in Drupal lingo) and many of which are extensible themselves.
Start using Joomla today, and you'll probably end up with a decent but not quite perfect web site tonight. Start using Drupal today, and you'll be able to build exactly the web site you're wishing for - once you've put the time in.
If you're considering parlaying your skills into a paid job one day, you should definitely side with Drupal.
The community around drupal - theres a module to do just about everything. Sometimes, theres more than one way to do something too.
If you want to change almost anything, from presentation (themes) to function (hooks), its possible. However, its not MVC and it does take a lot of getting used to.
With Views + CCK + Panels Module, you rarely need to touch code to create a wide variety of pages.
Finally, Drupal's User and Roles system is much more flexible.
The API. Every form and pretty much every bit of functionality can be modified via a module that hooks into the API, without having touch core code. This makes upgrades much easier, as your customisations aren't overwritten.
The code it outputs by default is much nicer, as well.
Under the hood, Joomla runs on mostly an OO architecture, whereas Drupal is almost entirely procedural with OO paradigms. Joomla has no form builder (that I am aware of), so you are forced to hand-code entire blocks of html for the form, whereas, with Drupal, you create forms as structured arrays. In Joomla, creating administrative features and front end featured requires that you place files in both administrative directories and in front end directories or create an install file to correctly partition things for you. In Drupal, everything pertaining to a particular module is contained in 1 directory, and you control access and url structure.
In general, Joomla's admin GUI is considered prettier and more user-friendly than Drupal's, but Joomla is, in my opinion, a less intuitive system at the programming level and makes certain tasks more difficult than necessary. 2 areas where Drupal truly outshines Joomla in my opinion is in the ability to create various content types - with various fields - on the fly to easily segment data, and the ability to create pretty seo-friendly urls with path or, even better, with pathauto.
Bottom Line: Joomla tends to look pretty from an administration perspective, but Drupal tends to outperform Joomla and be a more easily customizable system to achieve many of the things you really want out of a CMS.
Starting off, Joomla is fun and easy, from both an administrative and user view, but once the site needs to be customised (naturally), it becomes a pain.
In my opinion, Drupal is opposite. It has a steep learning curve (the pain part), but becomes easier not harder over time. This is from both the admin and user part.
For what it's worth Joomla before 1.5 was pretty ugly, and the API included a lot of very specific calls related to older Mambo code. The most recent version, and all future versions are built ontop of a very powerful OO framework, so if you haven't looked at it recently, do now.
Drupal shines with these two modules.
CCK: Adds custom fields to nodes
Views: Controls how lists of content are presented; it is essentially a smart query builder
What I like about Drupal is the plugin model: you have your core of drupal, and you can customize it however you want it by creating your own seperate template directory and modules (the plugins).
For a complete technical overview you can also tick Drupal and Joomla in http://www.cmsmatrix.org/matrix/cms-matrix

Resources