How good is XenForo plugin architecture?

I wonder if there could be some sort of "Community Codebase" where frequently used code / listeners are a part of the Codebase.
I have no idea if it would be useful or disaterous.
The idea would be to "integrate" addons more easily with each other.
Forinstance, a Tags addon could expose it's methods to other projects like galleries, and wikis and articles.
Thus the coders of galleries, and wikis and articles could utilize the Tagging framework for their addons.

I do see a trend towards coders releasing their own frameworks. Which I am sure has strengths and weaknesses.
They'd generally get together and work out an agreement. The last thing we want is XF integrating listeners for some addons and not others.
 
They'd generally get together and work out an agreement.
I don't think that is practical.
xenforo needs to setup things such that coders can do things quickly and efficiently.
Any coder could apply to have their listeners in the codebase.

Maybe it is just going to get bloated ?
Maybe a group of people could make rules as to what listeners would be included or not
 
Do you post any of them here? Best way for others to get better is to learn from someone who knows what they are doing.
I don't. It is really different coding from myself vs. coding from other people. I would have to make everything into phrases (so people could translate), and do not rely on anything internal I might have (for example, I can instantiate the memcache connection right away because I know it is going to be there - other people might not be using memcached).

Plus, to tell the truth, I am busy enough with my site and I don't have time for support. I have released some things, though, and I usually release them free-to-modify-and-redistribute so people don't feel tied to my agenda.

I am willing to share some of the techniques used, of course :) I do often when I see something that could be coded in a more efficient way.
 
Were you included in this statement?
People get offended so easily.

Without trying to be negative, if experience is an indicator, it will not, it will get worse, much worse.

My experience with vBulletin.org is that when it was a small community, the addons were overall better in quality, there wasn't as much selection but the people there usually knew how to code. They were the early adopters, after all, and that crowd is usually a techy crowd.

As vB started growing the crowd became less and less specialized, bunch of addons really poorly coded were introduced, almost anybody tried to do an addon by copying others or following tutorials. That is ok from the point of view you can get lots of things for customizing the forum, it is not ok from the sense that some people were introducing 2 GLOBAL queries, or doing full table scans, or pigging the memory, and they didn't care.

There was never an indicator of "addon" quality. There are some exceptions of people that code exceptionally good. But the rest, not so much.
I had to stop using addons from vB and either code my own or hire someone. I could not risk an addon bringing down my forum.
Yeah I see where you are coming from. But I meant it will get better over time for the current coders, they will get more familiar with how things work and look at their earlier stuff and think "oh, I could optimize this easily and remove these lines".

About the other stuff talked about, often used stuff. I want to release some stuff on github and encourage others to do the same and when something good is on there we all work to make it a nice addition to help add on creation.
 
I don't think that is practical.
xenforo needs to setup things such that coders can do things quickly and efficiently.
Any coder could apply to have their listeners in the codebase.

Maybe it is just going to get bloated ?
Maybe a group of people could make rules as to what listeners would be included or not
Then you are relying on some other random person to keep their addon up to date? I don't think this would be practical. And if they do keep it up to date there is always the possibility that they make a change which messes up what you are doing.

The age old question of cathedral and bazaar software development approach.
 
Once I get done building all the custom stuff I need to build for my site, I'm probably going to have 500+ listeners.

Already thinking I might need to build something that takes all the listener PHP files and compiles them down to a single one for each type of listener. I suspect including 500 PHP files (even if they are individually small) and extending 500 virtual classes for the listeners is going to be no bueno.

http://xenforo.com/community/threads/compile-each-event-listener-type-into-single-php-file.22301/
I'm thinking this too, but didn't find any solution because this would destroy the autoloader:(

In vB we have a great plugin which puts all plugins from the same hook into a file and only the file include was run in the eval part:).

THis was a big performance boost + much memory was saved.
 
People get offended so easily.

Not exactly sure how anything you said could offend me as nothing I have worked on, or done myself has been released :).

My point is your track record hasn't been the greatest to date, as you've only released one usable add-on, which isn't the best example of coding using XenForo standards.
 
I'm thinking this too, but didn't find any solution because this would destroy the autoloader:(

In vB we have a great plugin which puts all plugins from the same hook into a file and only the file include was run in the eval part:).

THis was a big performance boost + much memory was saved.
Yeah... we do the same for vB... and along the same lines, we also store compiled templates as PHP files.

I'm not going to worry about having a zillion listeners at this point... I'm just going to keep building the stuff I need and cross that bridge down the road when I'm closer to having everything rebuilt for XF... Maybe I'll just patch XF files, intercept it's looping listener execution and replace it with a single file that is just a single PHP file that consolidates all listeners of a single type into 1 file. The auto-loader shouldn't be an issue since you would still be passing the extend[] = 'DigitalPoint_MyClass' or whatever...
 
Not exactly sure how anything you said could offend me as nothing I have worked on, or done myself has been released :).

My point is your track record hasn't been the greatest to date, as you've only released one usable add-on, which isn't the best example of coding using XenForo standards.
Oh so you don't have anything yourself and probably don't know the difference between looking at good or bad code but because I have only had time to work on paid work I am some what a poor coder basically. Ummm ok. Quality > quantity, my mods will be released when done (with small exceptions).

This is why I like working for people instead of a community, people expect so much out of your limited time.
 
There was never an indicator of "addon" quality.
Any ideas how to accomplish that here at xenforo.com ?

The lack of quality of addons had a lot to do with the developers that were attracted there.
vBorg coder requirements: wants to release free addons and willing to give 24/7 support for free.
Not exactly rewarding / sustainable.

Low Cost, High Quality Addons with reasonable support is what the goal should be.

Xenforo is going down the vBorg path, which was never optimal, and certainly doesn't make sense in 2011.
 
The way I will be doing my addons (which will be high quality, don't care how arrogant I sound... it's just how it is) is 3 types.

First are tweaks and tiny changes which will be totally free. This will also include open source libraries to help making add-ons easier.

Second will be small addons like the View Later Queue add-on I am just about finished which will be released on my site and to download it you need to subscribe for a small amount, this small amount is currently $2.95 AUD per month. Just as a small fee to help me work on XenForo with at least some income. And for people who don't want to pay each month that is fine. Said people could pay for one month when they want to download a mod or update, there will be eventually a lot of mods available.

Third type will be paid mods like the advertisement manager, gallery/media and downloads systems. These would be priced between $15 and $50 per license (life time like XenForo, pay for addional support the same as well). I don't think I would go over the $50 mark.

I have thought a lot about this business model but really don't know if it will work well enough to keep me developeing mods for free (by free I mean I have no income while creating the mods, main reason a lot are still incomplete, I have to take up client work to keep food on the table).

Any suggestions/feedback is welcome :)
 
The solution is obvious:

Better documentation, more example plugin code with best practices demonstrated and documented.

As a consumer rather than creator of plugins, I don't know, by looking at the code, that a plugin is written well or poorly. With example code, I can do a rudimentary audit to see how far off the track the plugin's author has gone. "Best practices" doesn't have to be a 1,000 page opus. It can be rough notes which someone else can cleanup.
 
The solution is obvious:

Better documentation, more example plugin code with best practices demonstrated and documented.

As a consumer rather than creator of plugins, I don't know, by looking at the code, that a plugin is written well or poorly. With example code, I can do a rudimentary audit to see how far off the track the plugin's author has gone. "Best practices" doesn't have to be a 1,000 page opus. It can be rough notes which someone else can cleanup.

Agree on this point. We need documentation if you want XenForo to be a platform..
 
I really love the xf architecture.

There's only 1 major problem ATM for add-ons, but mike & kier are aware of it, and it seems that they're already working to fix this. I'm talking about http://xenforo.com/community/threads/event-listeners-to-manipulate-criteria-in-controllers.18072/
I agree, there could be some more dev helper classes to make several things easier/better, BUT good coders create them themself^^

Because of missing dev tutorials & documentation=> As i started coding my first "big" add-on it was a horror because it took several days/weeks to find the necessary steps(e.g. rebuild the node/content type cache after creating own node/content type) but it's IMO always better to read & try understand the code instead of reading simple examples....
Yes, everybody is sometimes in the "rush"(hope that's the right word for it) and don't want to read dozen files until he's able to code it, but i prefer mike & kier work @xenforo and not writing documentation

As a consumer rather than creator of plugins, I don't know, by looking at the code, that a plugin is written well or poorly. With example code, I can do a rudimentary audit to see how far off the track the plugin's author has gone. "Best practices" doesn't have to be a 1,000 page opus. It can be rough notes which someone else can cleanup.

How would you be able to do this?
If you don#t know by looking at the code if it's good or not, you'll also not know it if you compare it with some example codes...

my 0.02$
 
Any ideas how to accomplish that here at xenforo.com ?

The lack of quality of addons had a lot to do with the developers that were attracted there.
vBorg coder requirements: wants to release free addons and willing to give 24/7 support for free.
Not exactly rewarding / sustainable.

Low Cost, High Quality Addons with reasonable support is what the goal should be.

Xenforo is going down the vBorg path, which was never optimal, and certainly doesn't make sense in 2011.

Resources should be committed to this.
It would be a really different scenario if there were one person whose main job were to audit the addons, he would inspect the addon and put a rating over it.

A basic check would be that the addon should not 1) steal user information 2) do callbacks 3) put the forum security in risk
A secondary check would be the 4) performance impact of the addon
And last 5) The quality of the code (OO design, hardcoded values, use of phrases, etc)

Yes, I know that has a cost. I have no idea about the financials of XenForo, I do not think they are good given the actual scenario. But to have a thriving addon section, just one person actually reviewing them would go long in helping.

Look at how ios works, they review every single think, there are people doing the featured section. There is user ratings, sure, but there is a single approver. Android is in that sense worse. The end result is that the app quality in the ios world is somehow higher. Content discovery is also higher. No wonder sales are also higher.
 
  • Like
Reactions: HWS
A basic check would be that the addon should not 1) steal user information 2) do callbacks 3) put the forum security in risk
A secondary check would be the 4) performance impact of the addon
And last 5) The quality of the code (OO design, hardcoded values, use of phrases, etc)
Essentially you are asking XF to officially take on liability for other people's bad addons.

I'm a fairly competent developer and going through other people's code to actually verify some of those things is no easy task (mainly performance and security risks). I'm not sure it would be worth the time needed for them to do it right even if they were collecting 100% of the revenue generated by the addons.
 
Essentially you are asking XF to officially take on liability for other people's bad addons.

I'm a fairly competent developer and going through other people's code to actually verify some of those things is no easy task (mainly performance and security risks). I'm not sure it would be worth the time needed for them to do it right even if they were collecting 100% of the revenue generated by the addons.

I do not expect XenForo to take the liability for other people's bad addons, but I sincerely feel if the addons will be distributed through XF, they could be reviewed, with a score next to it that lets the downloading user make decisions easily, without having to download and inspect the code, because a "professional reviewer" has already done that job. Another firm could be hired just to do that.

From a legal standpoint, it should be really clear that XenForo will not take responsibility for the addon and that the review is not a recommendation either.

You are a competent developer, most people aren't. If XenForo wants to extend their software to the "almost anybody can use it" category (which is the one that has the most sales), then they need to make easy to install the addons, else the software is restricted to IT people, developers and enthusiasts.

As you say, going through the code to actually verify it, is not an easy task. As such, it should not be left to the users, it should be done professionally. Otherwise installing an addon will always be betting your entire forum installation on it :)
 
Well I don't think being somewhere in the middle is going to be of much use... "We reviewed this and we think it's good and safe to use... but if it's not, don't blame us."

Regardless of the fine-print or notices put up, the end users are going to be pissed at the reviewers because they recommended it, but it turned out to have something exploitable that ruined their forum/site.

I think something more along the lines of a rating system where users OF the addon could rate it would be nice. But giving people a false sense of security by telling people "all looks good to me" probably isn't the best thing to do...

In the end, it's probably just going to come down to a developer's track record. If they have consistently produced highly rated addons that don't have a ton of bugs and user's don't report security or performance issues, those developers are going to be more trusted with their new stuff.
 
Back
Top Bottom