Ticket #58 (closed defect: wontfix)

Opened 20 years ago

Last modified 16 years ago

Add namespace capability for included modules or "Action Packs"

Reported by: d.nando@… Owned by: somebody
Priority: normal Milestone:
Version: Severity: normal
Keywords: Cc:

Description

Following up on the comment i left in your blog post about ActionPacks? ... i'd like to see the capability to add a namespace to included modules. Here's how i'd propose it would work, from the perspective of a user of the framework.

The modelglue framework itself would (or might) have an additional boolean property "useNamespaces" which would default to false. If this addition could break something in someone's app, then setting useNamespaces = false would prevent that breakage. (Not sure if this would be needed, but it then gives the framework user full control of how the events are processed.)

<include> as a child of <modelglue> would have an optional property called "namespace".

example:

<include template="/mgwiki/config/Wiki.xml" namespace="wiki" />

Then within the "mother" app, you'd refer to the events within the wiki app using dot notation, like so:

event=wiki.addUser

Then event handler mechanism within ModelGlue?, when useNamespaces is true, would look for that event within the included wiki app and run it. (I think that probably means that when the application is loaded, MG would automatically prefix the events in the wiki app with "wiki." internally, and perhaps do the same with the controller instances it is caching, so the controllers wouldn't possibly step on each other.)

Again, this is submitted from the perspective of a user of the framework. It would ease the organization of events in large apps by placing them in a clearly defined hierarchy, and decouple the modules from each other nicely. So i think it's worthy of consideration.

Nando

Change History

Changed 20 years ago by joe.rinehart

  • status changed from new to closed
  • resolution set to wontfix

Sorry, this adds a level of complication that's just not necessary. Use of prefixes can accomplish much of the same thing.

Changed 16 years ago by cfgrok

  • milestone Feature Requests deleted

Milestone Feature Requests deleted

Note: See TracTickets for help on using tickets.