A Fast Front-End Framework For Flarum
My amazing alliteration abilities aside, it’s finally time to reveal what’s been happening at Flarum for the past month. We’ve been hard at work on some very cool stuff — here’s the rundown.
We originally chose to build Flarum’s front-end using Ember.js because it provides a very solid architectural foundation. However, we have been a little concerned about its poor performance, especially given feedback from the esoTalk and FluxBB communities.
A little over a month ago while working on the first Flarum extensions, we ran into some fundamental issues with Ember related to extensibility. Proceeding with Ember was simply not feasible if we were to achieve the ease of extensibility that we wanted.
Mithril is a breath of fresh air. It weighs just 8KB, has a tiny API, and is highly performant. Flarum’s new front-end is really light (96 KB minified + gzipped) and really fast. Feel the difference!
The new front-end code is much cleaner and simpler, and the extensibility story is fantastic.
We’re really excited to show off this performance win, and we noticed that our homepage is a bit outdated… So we flipped on our marketing hats and whipped up a new one. Check it out!
Flarum’s back-end has received a bit of a makeover too. We’ve restructured the skeleton application, a step towards the easy installation we’ve promised for down the track. Coming soon™
More work will be done in the coming weeks towards decoupling Flarum’s code from Laravel. Instead of using the whole framework, we will explicitly pull in components and tie everything together with a custom bootstrapping process. This will allow us to optimize performance and provide better integration with existing applications.
On a side note, there has been talk about splitting up Flarum’s front-end and back-end code into separate repositories. After much consideration, we have decided against this; it would require setting up additional repositories containing shared libraries, and ultimately there would be too many moving parts for it to be manageable. Rest assured, though, that the code within the Flarum repository is well-separated: It’s easily possible to use the back-end without using the front-end, and vice versa.
A lot of work has been done on Flarum’s extensibility story since converting to Mithril. Thanks to this groundwork, we’ve been able to easily put together Flarum’s first two extensions: Categories and Sticky. These are both active on the Demo Forum, but they’re still in their very early stages so don’t be too rough. As always, please let us know what you think!
We’ll be working on a few more essential extensions in the coming weeks, moving us forward on our quest to begin consolidating and documenting the extension APIs.
Did you know that Flarum has an IRC channel? Neither did we. At least, I haven’t been on there in a good while.
We’re retiring the underused IRC channel and opening up a Gitter channel. Gitter is a modern solution to the chat problem, and we’re much more active on it. See you in there! (If you prefer using an IRC app, you can still use a bridge.)