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 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器