Customizing SMF > Portals, Bridges, and Integrations

Question about SMF Package Management

<< < (3/3)

maaxiim:
Thanks for the answers guys. I'm definitely going to keep an eye on this ;)

BTW, if you're interested, I can give you some detailed design information on
the AHI I wrote for wBB. It uses a technique called 'Interposition' so that, for
the most part, mods never need to make any direct changes to the source
code. Once an entry point has been created in a source file, that is usually
enough for most ordinary/simple hacks. If a hack has a special requirement
that means it needs to insert an entry point of its own, then it can create a
new entry point and then insert a new interpose entry in the DB.
The DB structure for the interpose table is very simple, a class name to load
and invoke, a condition (i.e. TMPL, ADMIN, BEGIN, END, POST, etc) and the
name of the file. So, if you wanted to insert a new button into the header,
all you need to do is invoke your class with {classname, TMPL, header}
and your class's Execute() method would be invoked each time the condition
and the filename matched.
In the several years that the AHI has existed, I've had over 50 hacks written
to use it, and never once did they need to directly modify the source, thats how
uniform the algorithm is.
The performance characteristics tend to be quite acceptable too, since, in almost
100% of cases, the hack code is only ever executed when needed, instead of
being included in every execution of index.php or global.php or _functions.php
or whatever your API file happens to be called :D

Plus, since I consider it open source, you're welcome to glean any useful bits
like the class caching, etc.

pulpitfire:
that sounds like it might be something cool.

[Unknown]:
Well, the SMF system is not much like the woltlab system.  First off, the templates don't use triggers because generally that is very confusing and limiting.

While a simple plugin system would not be difficult to add and/or cache, most mods probably would use a different system; something similar to the old YaBB SE 1.5.x index.php is still in use, and this means for most instances code isn't included unless it is needed.

However, PHP doesn't really get that hurt from including/parsing a longer file.  It takes a bigger hit to include lots of smaller files than a couple large ones.  (although, by no means should files be longer than they need to be.)

I'm currently not planning any support for a plugin system; first off, I'm not a huge fan of OOP, and second off, most of the mods made for YaBB SE wouldn't have benefited much with it.  An event based system, while great, would require a lot of triggers and end up making SMF generally slower in the long run.

However, by no means would I be opposed to looking into it - I just warn you that I'm not that gung-ho about such methodology.  Some people disagree, but let's not get me arguing about OOP again.

-[Unknown]

Tywick:
* Tywick  is not sure how this thread falls under Portal Development

--- Quote from: maaxiim on February 19, 2004, 07:17:47 PM ---Hi There,

I've been very impressed with the clean fast nature of this board and
am considering becoming a charter member. I tend to write a lot of
mods for my forums and am particularly interested in the package
manager feature you talk about in your marketing blurb.
Could someone explain, in technical detail, how it works please,
as that would be a key element in my becoming a charter member.
Incidentally, I currently use wBB2.x and have written a lot of mods
for it (including an automatic hack installer) ...

--- End quote ---

Navigation

[0] Message Index

[*] Previous page

Go to full version