Drupal 初学者最常见的陷阱是什么? [英] What are the most common pitfalls for a beginner Drupal user?

查看:18
本文介绍了Drupal 初学者最常见的陷阱是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚开始学习 Drupal,我真的很喜欢它.

I'm just starting to learn Drupal, and I am really liking it.

初学者最常见的陷阱是什么?如何避免?

What are the most common pitfalls for a beginner? How can they be avoided?

推荐答案

首先,您应该清楚自己要学习的内容:

First of all you should be clear with yourself on what you are trying to learn:

  • 主题化?
  • 网站建设?
  • 开发新的模块/功能?

当然,每个领域的界限并不明确,但是您学习 drupal 所遵循的模式会大不相同.这是我的看法:

Of course the boundaries of each of those areas are not sharp, but the patterns that you will follow to learn about drupal will be quite different. Here's my opinion:

一般陷阱(适用于所有领域)

初学者最常犯的一个错误就是匆忙.在诸如在 24 小时或更短的时间内学会掌握 C++"之类的书籍的世界中,人们接近 drupal 相信他们可以摆脱玩弄别人的代码几天.如果他们一开始不理解 Drupal 中的工作原理,他们就会切换到rant mode,并开始在博客和论坛上发布关于 drupal 有多么愚蠢的复杂性.

The single most recurrent mistake beginners do is to be in a hurry. In a world of books with titles like "learn to master C++ in 24 hours or less" people approaches drupal believing that they can get away with a couple of days of playing around with somebody's else code. If they do not understand at first sight how things work in Drupal they switch to rant mode and begin to post on blogs and forums on how much drupal is stupidly complicated.

所以:准备好投入时间和精力来接受 Drupal 的高度复杂性(这与复杂性不同).准备好实际研究事情是如何运作的,而不是浏览论坛和邮件列表上的帮助请求.如果你还是不相信.它来了一些不错的阅读.

So: be prepared to invest time and energy to embrace the high level of complexity (which is something different than complication) of Drupal. Be prepared to actually study how things work rather than skim over help requests on forums and mailing lists. If you are still not convinced. Here it comes some good reading.

如果您正在学习主题化

  • 陷阱:通过尝试破解以前存在的主题来学习.
  • 更好的方法:首先,至少深入了解 Drupal 主题指南.它枯燥乏味,但它为您提供了主题引擎流程的良好概览.然后下载并安装 zen 主题 并使用随附的入门工具包启动您的主题.我建议 - 如果您使用 Drupal 6 - 使用主题的第 2 版,尽管处于测试阶段,因为它的内部文件组织更加合乎逻辑,至少在 IMO 中是这样.
  • Pitfall: learning by trying to hack a previously existing theme.
  • A better way: first off, give at least a good in-depth look at the Drupal theming guide. It's dry and it's boring but it gives you a good overview of the flow of the theming engine. Then download and install the zen theme and start you theme by using the starter kit that is included. I recommend - if you use Drupal 6 - to use the version 2 of the theme, although in beta, as it has a much more logical organisation of its internal files, at least IMO.

如果您正在学习构建网站

  • 陷阱:被可用模块的数量淹没而错过了大模块.
  • 更好的方法:阅读一些已经介绍过的案例研究在 drupal.org 上的那些年.您将对通过贡献模块实现功能的常见模式有一个很好的了解.探索和理解drupal井的核心组件.它们是其他一切的基础,因此您绝对需要了解节点和修订机制的工作原理、分类法的功能、权限/角色系统的工作原理、节点和块之间的区别等... 不要错过 CCK视图,尽管它们(直到现在)是贡献模块,但它们是外面"99% 的 drupal 站点的组成部分.
  • Pitfall: getting overwhelmed by the amount of available modules and missing out on the big ones.
  • A better way: read some of the case studies that have been presented over the years on drupal.org. You will get a pretty nice idea of what are common patterns in implementing functionality by means of contributed modules. Explore and understand the core components of drupal well. They are the basis for everything else, so you will definitively need to know how the mechanism of nodes and revision works, what is the functioning of the taxonomy, how the permission/roles system work, what are the differences between nodes and blocks etc... Do not miss out on CCK and Views, which - although they are (until now) contributed modules, are a component of 99% of the drupal sites "out there".

如果您正在学习编写自己的模块

  • 陷阱:试图通过组合在网络上到处检索的 PHP 和 jQuery 代码片段来组合功能.
  • 更好的做法:如果你想擅长 drupal,你不能按照及时学习范式去,你必须去对于老式的以防万一.您确实需要对系统的所有组件(其中包括:表单 API、菜单系统、钩子逻辑、Drupal 中的 js、节点处理、主题引擎、本地化、缓存等)有一个总体的了解.Drupal 在某种程度上是一个框架,如果您不太了解您在其中植入代码的生态系统,您很可能会花费大量时间来生成糟糕的代码,这些代码迟早会无法完成它应该做的事情.最重要的是,您将花费大量时间来编写一些可能需要花费一小部分时间才能实现的drupal 方式".
  • Pitfall: trying to put together a functionality by mean of assembling PHP and jQuery snippets of code retrieved here and there on the web.
  • A better way of doing: if you want to be good at drupal you can't afford to go by the just in time learning paradigma, you have to go for the old-school just in case one. You really need to have a general overall understanding of all the components of the system (amongst others: form API, menu system, hook logic, js in Drupal, node processing, theming engine, localisation, caching...). Drupal is somehow a framework, and if you do not know well the ecosystem in which you are planting your code, chances are you will spent lot of time in producing an horrible code that will soon or later fail in doing what it is supposed to. Above all you will take a lot of time to code something that possibly would have taken a fraction of the time to be realised "the drupal way".

我对学习在 drupal 中良好编码的可能工具的看法

  • http://drupal.org - 包含有用的信息,但它是太乱了,信噪比太低,我不鼓励将该网站用作您的主要信息来源.
  • 书籍 - IMO 如果您是 Drupal 的新手,可能值得投资几本书.书籍提供了逻辑结构和学习顺序,您无法通过从一个站点跳转到另一个站点,在此处进行截屏并在此处进行操作.我的前三名:模块开发是一本非常好的书编写,随着主题的巧妙进展,它实际上会指导您编写一些复杂性越来越高的模块.快速了解 drupal 的工作原理是一本很好的读物.Pro Drupal Develpment 是面向 Drupal 的书.它非常枯燥——尽管它一直都有代码示例——我更喜欢它作为学习书籍/参考文本.一定要获得第二版,因为第一版涉及 Drupal 5,它很快就会过时.Pro Drupal Development 唯一明显的缺点是 javascript(以非常仓促的方式引入).JS 和 Drupal 是一个广泛的话题,为此我喜欢 Drupal 6 Javascript 和 jQuery更好作为我提到的第一本书,这本书也是基于项目的(即您学习与实施项目的需求相关的东西).
  • 其他网站 - 它们是宝贵的信息和示例来源.当您对如何实现事物有大致的了解,但在特定领域的经验太少而无法自主时,这是一个完美的搜索场所(每个人,无论多么有经验,都有一些他们不专业"的领域)).其他人已经提到了一些好的网站.我一直以来最喜欢的是 lullabotdrupal dojo随手学习也很不错.
  • 社区 - 这是 drupal 的巨大资产.社区非常大,也非常有帮助,您很可能一直会找到希望提供帮助的人.IRC 频道是一个不错的起点.
  • 会议 - Drupal 社区每 6 个月召开几天会议(一次在北美,一次在欧洲),以交流专业知识和信息.尽管前往 DrupalCon 可能(太)昂贵,因为社区组织了几次会议来发布所有 所有会议的视频.它们也是极好的资源.
  • http://drupal.org - Is packed with useful information, but it is so messy and the ratio signal/noise is so low that I would discourage to use the site as your main source of information.
  • Books - IMO if you are new to Drupal it might be worth to invest on a couple of books. Books provide that logical structure and learning sequence that you can't have by jumping from one site to the other, following a screencast here and a how-to there. My top three: Module development is a book very well written, with a smart progression of topics, it actually guides you to writing a few modules with increasing complexity. It is a good reading to quickly get an idea of how drupal works. Pro Drupal Develpment is the book for Drupal. It is quite dry and - although it has examples of code all along - I like it more as a study-book / reference text. Be sure to get the second edition as the first one deals with Drupal 5, which is going to be obsolete soon. The only noticeable shortcoming of Pro Drupal Development is javascript (introduced in a very hasty way). JS and Drupal is a wide topic, and for that purpose I like Drupal 6 Javascript and jQuery better as the first book I mentioned, this book is also project-based (i.e. You learn things in relation to the needs to implement a project).
  • Other websites - They are an invaluable source of information and examples. It is the perfect place to search when you have a general understanding on how to realise things, but too little experience in a specific domain to be autonomous (and everybody, no matter how experienced, have some domains in which they are not "pro"). Some good websites have been already mentioned by others. My all-time favourite is lullabot but drupal dojo and learn by the drop are also very good.
  • Community - This is a huge asset of drupal. The community is very big and very helpful and you are likely to all the time find somebody wishing to help. The IRC channel is a good place to start.
  • Meetings - Every 6 months the Drupal community meets for a few days (once in North America and once in Europe) to exchange expertise and information. Although travelling to DrupalCon can be (too) expensive for doing it, since a couple of meetings the community got organised to post all the videos of all the sessions held. They are an excellent resource too.

希望这有助于您前进,并祝您学习顺利!:)

Hope this helps to get you going, and best luck with your learning! :)

这篇关于Drupal 初学者最常见的陷阱是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆