• Dec. 17, 2015, 1:18 p.m.

    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.

  • Jan. 5, 2016, 1:04 a.m.

    Welp, log in/out is now being done via React.js components. Moving on to registration form.

    Move from Mithril.js to React.js also means that I've had to reset progress tracker on github.

  • Members 21 posts
    Jan. 12, 2016, 12:12 p.m.

    So now you migrate from Mithril.js to React.js?
    And earlier you move from Ember.js to Mithril.js.

    You just learn different framework? Or you use React.js earlier with Mithrill.js?

  • Jan. 12, 2016, 12:28 p.m.

    I have rewritten all Mithril.js components to React.js over holidays. I have also dropped routing, because Misago's no longer single-page application. This made last reason to use Mithril.js go. Misago's JS now is set react.js components backed by set of custom microlibraries "framework" and few libraries like jquery, bootstrap, react.js, moment.js and redux.

    In places where reloading whole page to swap single components isn't making any sense (but we need to have URL to each component) react-router will eventually be introduced.

    Looking back, I'm super pleased with how "do it yourself from libs" approach compares to "do everything" approach of Ember's or "do SPA as simply as possible" Mithril's one.

  • Members 20 posts
    Jan. 18, 2016, 8:19 p.m.

    hmm, my question python 3 vs php7.
    New php is very fast and simple, this question is only my opinion.
    Python vs PHP 7, fast is new way.

  • Jan. 19, 2016, 11:02 a.m.

    If your only comparator when it comes to languages are benchmarks, you are going to have a bad time.

    There's language itself, experience in it, knowledge and availability of tools and libs in ecosystem, etc ect. I'm invested into Python and Django, first as hobbyist, but for some time now as professional too.

  • Members 20 posts
    Jan. 24, 2016, 4:58 p.m.

    Yes, benchmark is only benchamark.
    I'm curiosity, you started maked forum engine based on php, now based on python, why?

  • Jan. 27, 2016, 1:07 a.m.

    Eh, I've answered it plenty of times already.

    These days I'm finding Python (and Django) as basis an opportunity, not an downside. Misago 0.6 will not only run forum out of the box. It'll also expose all Django's power for you to expand further from forum and building whole site around your community, and that's going to be awesome once it happens :3