From: Demian K. <dem...@vi...> - 2011-07-26 12:43:21
|
A module would really better be called a controller if you use the model-view-controller model; each module is a directory containing PHP scripts that each represent a single web-accessible action. Thus, as you say, the core fabric of VuFind consists of modules, since every URL you access in VuFind corresponds to one module or another. It's also possible to create alternatives by building new modules and editing URLs in view templates. When things are designed correctly with the MVC model, the controllers really shouldn't do much beyond pushing data around -- reading input from the user, calling library functions to achieve the requested effect, and making assignments necessary to allow the view to render. So to answer your question about how Summon/Email.php relates to Record/Email.php, they both call the same VuFind_Mailer class from the library and use the same view templates, but they pass different parameters since one is designed to handle Solr records and the other is designed to handle Summon records. Similarly, VuFind has a generic module in its library for building citations. If we build a citation action for the WorldCat module, it's a matter of extracting the necessary inputs for the citation builder from the WorldCat record rather than from the Solr record... but it won't create any new code that would be likely to be reusable elsewhere. Unfortunately, not every module in VuFind has quite such a clean design -- this is one of several things I'm working on improving as I build my prototype of VuFind 2.0. Also, regarding the WorldCat module, it is related to the search API, not WorldCat Local. I hope this helps -- let me know if you have further questions. - Demian > -----Original Message----- > From: anna headley [mailto:an...@gm...] > Sent: Monday, July 25, 2011 4:02 PM > To: vuf...@li... > Subject: [VuFind-Tech] Modules > > Regarding http://vufind.org/wiki/building_a_module: > > What exactly is a module? The current list is missing some modules > that are in /web/services, such as WorldCat and Summon. > > Are modules completely separate from one another? In some cases it > seems like maybe they are alternatives to one another, containing > similar functionalities, but in other cases it seems they are meant to > be woven together to form the fabric of VuFind. > > As an example, if the WorldCat module had a citation tool > (<http://vufind.org/jira/browse/VUFIND-225>) could that be pulled into > the Record module as an alternative to or in addition to the Record > module's citations? Or, how does Summon/email.php relate to > Record/email.php? > > An specifically w/r/t the WorldCat module, Is this more related to > WorldCat Local or to the WorldCat search API? > > Thanks!! > Anna (TriCo) > > ----------------------------------------------------------------------- > ------- > Storage Efficiency Calculator > This modeling tool is based on patent-pending intellectual property > that > has been used successfully in hundreds of IBM storage optimization > engage- > ments, worldwide. Store less, Store more with what you own, Move data > to > the right place. Try It Now! > http://www.accelacomm.com/jaw/sfnl/114/51427378/ > _______________________________________________ > Vufind-tech mailing list > Vuf...@li... > https://lists.sourceforge.net/lists/listinfo/vufind-tech |