Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling

Re: Re: Best way to 'add modules' to web app?

by BUU (Prior)
on Jul 06, 2003 at 04:44 UTC ( #271731=note: print w/replies, xml ) Need Help??

in reply to Re: Best way to 'add modules' to web app?
in thread Best way to 'add modules' to web app?

Thats a very interesting idea/concept, and one I had not though of before. I'll definately have to give it some thought. I'm not sure of how the users would register handles for an event though..
  • Comment on Re: Re: Best way to 'add modules' to web app?

Replies are listed 'Best First'.
Re: Best way to 'add modules' to web app?
by Anonymous Monk on Jul 06, 2003 at 05:17 UTC
    Frankly i'm not either. I've been working on concepts for a Community site with many of the features of Everything, Slashcode, Forums, Blogs, and link databases all combined into one.

    With perl it shouldn't be too hard to have each module have a standard init function that is called when its installed/loaded. That init function could then call a sub giving it the event to handle and a reference to the sub to call. I'd also think that instead of passing events arguments, either pass it a hashref with the arguments in it, or just have one common hash that is used to communicate between events, and the board/forum system.

    Some problems would be, how to handle multiple occurences of them all? or let them overpower the original in some way? Maybe that could be one of the options for the function to set handlers. So some handlers are used in addition to the current one, and some replace the original. It would me anyone making modules needs to play nice, but thats true anyway. You could also run the modules in a Safe compartment to control what access they do have for some added security.

    I look forward to seeing what you do come up with!

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://271731]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (4)
As of 2018-08-14 21:05 GMT
Find Nodes?
    Voting Booth?
    Asked to put a square peg in a round hole, I would:

    Results (155 votes). Check out past polls.