Ahh, November!
November is sucky month for two reasons: it's infections season in Poland, and it's month before December, which is hot month for advertising. Working in one of top digital advertising agencies in country, I've spent most of November putting crazy hours into projects, even on weekends, all the way into early december when I was caught by awful infection in my gut.
This means that in matter of code little actually happened in Misago, but project still has seen some changes that are worthy sharing.
The romance with the SPA's has came to an end
Over the 2015 I've learned a great deal about Django, JavaScript and frontend tooling, thanks to Ember.js, Mithril.js, professional projects and awesome people I am working with.
You know, before I've decided for switch to Ember.js, I've actually experimented shortly with Angular.js, trying to replace thread's posts list with Angular.js component, however Angular's approach to view layer as well monkeypatching required to expose posts data as json to it was... awful.
This was 10 months ago, and time spent on move to Ember.js has brought some changes to codebase, making this approach much more viable today.
Enter R&R
So here's new approach to Misago's Frontend:
'frontend' directory contains Misago's frontend: uncompressed images, fonts, uncompiled less and JavaScript, plus gulp.js tasks for running tests as well as building final assets and copying them over to 'misago/static'.
Misago's no longer SPA, so there's no router or routes that you need to implement in JavaScript separately from Django. This makes it easier to add new views to Misago as well as to integrate it with exsiting flows.
Currently, Misago Javascript is collection of few singletons providing necessary services like Ajax or Zxcvbn with immutable state from server being held by the instance of Misago
singleton, and mutable state being held by Redux.js.
Misago's UI is complemented by React.js components for parts that are highly interactive, like user menu with dropdowns for alerts, options, real-timey labels, search, modals, forms and editable lists like threads/posts/forums/subscriptions.
Misago's JS and JSX is transpiled by Babel and then minified and bundled via Browserify into vendor.js with dependencies and misago.js with Misago's JS.