dongtang6718 2012-04-30 13:56
浏览 50
已采纳

Drupal 7模块开发建议

recently we started a proyect where we need to implement a webpage that should be able to manage google maps markers and locations, with aditional info on them. However the requirement was to do it as a Drupal module in order for the client to embed it on his existing web page powered by Drupal.

I have a strong background developing web pages using java technologies like JSF, and I have had some previous experience using PHP MVC frameworks like cake php, but that's the reason why I think I'm so confused with the module development process used in Drupal (hook methods and conventions...).

First of all I have been looking at the Drupal 7 module development book by Packt, and I just finished the chapter 4 where you're supposed to implement and theme a single blog module. However by using the techniques showed until that point... I find it extremely difficult to implement a google maps powered (Block???) by just theming it as lists or using the render API.

What I found really interesting was the possibility to use theme templates and create the block content based on them; by just passing variables and priting php statemnets..., but it's not explained very well on the book either. So that's why I wanted to ask you where I could find more resources about theme templates, so that I could just put my html markup and js functions on that template, and pass to it the processed variables.

The other question I had is..., what are the topics that I should focus most in order to start my module fast, what I basically need is the ability to put markers on a map (Using the Javascript V3 API I guess...), and then sending AJAX callbacks to the server in order to update the selected marker info and adding it to my Session?? variables.. (This is really easy using JSF, and a framework like Primefaces.. however in the php world I'm lost) I think I should look at Drupal Entities and Fields next... but also Widgets?? Right???

Any suggestion that you could make would be great, I am just starting Drupal and right now I feel a little overwhelmed and lost, even looking at the API's Drupal website documentation is difficult for a beginner.

Thanks a lot.

  • 写回答

2条回答 默认 最新

  • duandong7980 2012-04-30 14:06
    关注

    Drupal is a mess for beginners. You will have to forget all the good practices you have learned in java and learn the drupal way. The best way to do this (imo) is to start extremely small. Do very simple themeing tutorials before you dive in to module development.

    Before you begin createing a module it is important to look to see what is out there. There are tons and tons of modules in various states of finished out there. For drupal 7 I use http://drupal.org/project/gmap and Location module to provide the functionality you described.

    To start your module fast you will have to start slow, sorry; wit very basic themeing and module development. I have purchased The Definitive Guide To Drupal 7 by Apress. It provides all the information a developer will need to maintain, create, and design a drupal 7 project from the ground up. It was written by programmers and is much easier to understand then the confusing documentation.

    Additionally posting on http://drupal.stackexchange.com is invaluable. kiamlaluno, berdir and clive are extremely knowledgable of all things drupal and provide answers that will save hours and hours of searching or fumbling through drupal.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 C#调用python代码(python带有库)
  • ¥15 矩阵加法的规则是两个矩阵中对应位置的数的绝对值进行加和
  • ¥15 活动选择题。最多可以参加几个项目?
  • ¥15 飞机曲面部件如机翼,壁板等具体的孔位模型
  • ¥15 vs2019中数据导出问题
  • ¥20 云服务Linux系统TCP-MSS值修改?
  • ¥20 关于#单片机#的问题:项目:使用模拟iic与ov2640通讯环境:F407问题:读取的ID号总是0xff,自己调了调发现在读从机数据时,SDA线上并未有信号变化(语言-c语言)
  • ¥20 怎么在stm32门禁成品上增加查询记录功能
  • ¥15 Source insight编写代码后使用CCS5.2版本import之后,代码跳到注释行里面
  • ¥50 NT4.0系统 STOP:0X0000007B