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 ansys fluent计算闪退
  • ¥15 有关wireshark抓包的问题
  • ¥15 Ubuntu20.04无法连接GitHub
  • ¥15 需要写计算过程,不要写代码,求解答,数据都在图上
  • ¥15 向数据表用newid方式插入GUID问题
  • ¥15 multisim电路设计
  • ¥20 用keil,写代码解决两个问题,用库函数
  • ¥50 ID中开关量采样信号通道、以及程序流程的设计
  • ¥15 U-Mamba/nnunetv2固定随机数种子
  • ¥30 C++行情软件的tick数据如何高效的合成K线