Question about SMF Package Management

Started by maaxiim, February 19, 2004, 07:17:47 PM

Previous topic - Next topic

maaxiim

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) ...

[Unknown]

Well, basically, it is like the "automatic hack installer" you speak of for wbb, more or less.  But there's a lot to it, and it's not even done yet.

However, it is getting closer every day, and as someone remarked after looking at the changelog, most of the changes going in this week have been for the package manager because I've made it a priority.

I'm sure you'l get replies saying "look at YaBB SE's package stuff" but please... don't heed them.  The package manager is completely different and barely even similar to the YaBB SE, erm, equivalent.

If you're comfortable with xml or using a program to generate your packages, you will like it.

-[Unknown]

eFishie

Quote from: [Unknown] on February 19, 2004, 07:21:29 PM
Well, basically, it is like the "automatic hack installer" you speak of for wbb, more or less.  But there's a lot to it, and it's not even done yet.

However, it is getting closer every day, and as someone remarked after looking at the changelog, most of the changes going in this week have been for the package manager because I've made it a priority.

I'm sure you'l get replies saying "look at YaBB SE's package stuff" but please... don't heed them.  The package manager is completely different and barely even similar to the YaBB SE, erm, equivalent.

If you're comfortable with xml or using a program to generate your packages, you will like it.

-[Unknown]

Program as in what? Like your YaBBpak Maker?
--Jon

Abstraction Point Electronic Music Community - We don't bite! Really! I promise!

Check out my newest song: Alive

[Unknown]


eFishie

--Jon

Abstraction Point Electronic Music Community - We don't bite! Really! I promise!

Check out my newest song: Alive

Anguz

[Unknown], will the package manager modify the script each time or is it going to create a cache of the modified script and use that until the packages installed change?
Cristián Lávaque http://cristianlavaque.com

[Unknown]

I'm not sure I understand what you mean, Anguz.  Which script are you talking about?

-[Unknown]

Anguz

I'm talking about SMF, but I'm probably not saying it right... :P

the package manager will apply the changes from the packages to the SMF code, right?

my question is if it'll be done each time it's ran or only once and saved
Cristián Lávaque http://cristianlavaque.com

[Unknown]

Erm, of course the package manager will not redo the changes on every call to index.php; that would not be smart at all.

-[Unknown]

Anguz

#9
thought so... cool... just checking (^_^;)
Cristián Lávaque http://cristianlavaque.com

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) ...

Advertisement: