On 02/05/11 12:54, Ms. Nancy Wichmann wrote:
In general, I don't split the module up until it gets to some point in size, which is just a judgment call. Then the first thing I look at is splitting the admin functions out to mymodule.admin.inc. If it keeps getting bigger, I look at what the functions are and which ones they use. If a function is not used commonly, I will split it off. I suspect my call on that is from the early days of my career when commercial virtual memory was in its early days too and we worried about "locality of reference." I know PHP is different to some extent, but I like to keep calling and called code near each other to reduce page faults. That's also why I try to keep "one time" (actually only infreqent) calls, such as hook_menu(), separated from the more active code in my modules.

/*NancyDru*/

Injustice anywhere is a threat to justice everywhere. -- Dr. Martin L. King, Jr.



------------------------------------------------------------------------
*From:* Iain William Wiseman

Will be looking a views again tonight (day job to do!). I am looking into helping out port LinkedIn to Drupal 7 but felt I might be best just getting a simple view/database module going first. I do have on question with regard to building the code though, is there a standard approach to where to put the bits. I understand .install and .info but where how to split up the pages seems unclear to me.

Thanks all who provided help. For reference, my issue was caused by not uninstalling and re-installing the module. Once this was done all worked fine. Next, multi-step form.

Reply via email to