• Feb. 4, 2015, 10:18 p.m.

    Ah, 2015 has came, and with it certain two pradigm shifts to Misago 0.6.

    Those keeping up with project's github can guess one of shifts that occured, but for those who didn't know it yet:

    Misago UI is being moved into Ember.JS

    This means Misago became de-facto two apps. Django REST server exposing API's, and Ember.js application that handles frontend. The reason for this change origins from growing complexity of existing JS code, which while working nicely, was getting dangerously close to becoming JS framework on its own.

    I didn't want that, so I've decided to offload this burden on 3rd party vendor. Ember.js went long way since its "debut" in Discourse and Django Rest Framework 3 is around for some time now.


    The other shift shouldn't come as suprise either, considered there's thread discussing it on those forums:

    Misago is becoming flatty

    Yep, Misago 0.6 will introduce option to switch board index between showing categories and threads. Thread relation with category will too no longer be absolute, meaning that threads posted within subcategories will be displayed within parent categories, providing greater visibility and optional selectivity.

    And ofcourse, other view will still be available trough link in navbar.


    Finally, don't worry that Misago will become next Discourse. Dependencies needed to run Misago are still purely python and can be installed via single pip install command with no extra configuration necessary.

  • Members 11 posts
    Feb. 4, 2015, 11:52 p.m.

    Very nice to have these monthly updates ! I'm eagerly waiting for 0.6 in order to try to integrate it in a Django website. That will be so nice.

  • Members 4 posts
    Feb. 17, 2015, 6:42 a.m.

    Regarding moving UI to Ember.js.

    Are you sure it is not going to cause problems with SEO? Will Google be able to index pages generated by javascript? May be it is not an issue for normal javascript applications, but in case of a forum, it is content what makes the difference.

  • Feb. 17, 2015, 6:53 a.m.

    Those with JS off will get content via noscript tags, so it shouldn't be a problem.

    Also how is forum really different for Google from other apps? Its very simple data hierachy and there isn't much magic in going around it.

  • Members 4 posts
    Feb. 17, 2015, 8:04 a.m.

    Something like this: "Your browser does not support JavaScript!" ?
    Is Google indexing bot also going to see only this?

    It is not so easy to make site indexable, if it is generated by client-side javascript. It requires generating html snapshots. And this doubles your work.

    Normally apps are made to perform some set of functions and not to present content.
    So, SEO is not a primary concern.

  • Feb. 17, 2015, 8:08 a.m.

    Every page will have simplier version served by Django within noscript tags, so you don't even need JavaScript to consume forum content. Its only required for participation.

  • Members 5 posts
    March 6, 2015, 10:01 p.m.

    Why make it read-only for users without javascript? Having a graceful fallback is hardly a new idea and has never involved much extra work (POST the data to the server, which is done anyway, then redirect the user back to the same page). Misago looked really promising, until that point, and now I'm incredibly disappointed. :(

  • March 16, 2015, 4:34 a.m.

    @moon, I don't think you understand the nature of Ember.JS apps. :)

    When you are building Ember.js app, you are ultimately working with JS data structures (Either POJO's or Ember.Model instances), and JSON as intermediary to Django/Python data structures (models.Model or dicts).

    In "vanilla" application if user wishes to follow other user, he clicks the button, button submits form to a view that only checks CSRF, then pulls out the DB user model, and sees if relation to request.user already exists. If it does not, view creates it.

    In Ember.js application, pressing button results in API call, sending JSON representing current user to api/users/1231/followers/. Then API endpoint that is aware of followers/ meaning would again turn this JSON into data structure, this time Django model. If action succeeded, API would then reply with 200 code and JSON with "current" state of user we followed. Ember.js receives response and updates data state, which in turn updates UI state. Now because there's already single point for changing site users, I don't need to write all additional Django forms and views for that.

    This contrasts with jQuery that left you with a lot of freedom in deciding on how you will achieve asynchrony in your APP. With it, you could "just" take over form submission event, already update UI, then send POST from form asynchronously to same view that would also handle non-js submit. Only difference would be deciding between setting flash message and returning redirect, or sending back JSON with same message instead if request.is_ajax() was true.

    This means that for graceful fallback with Ember.js, in addition to developing API, you would need to develop static UI and Django views that would use forms for changing app state.

  • Members 5 posts
    March 18, 2015, 12:27 a.m.

    Indeed, I do not. Thank you for the explanation. :)

    My next question would be why not make the Django views use the API endpoints too, but again, I have little idea what I'm suggesting actually involves.

    I'm disappointed that the only Python forum I've found that looked decent has turned out to be unsuitable for me, but I may peruse the code for inspiration and such if I ever implement my own solution.

    Thanks again for the explanation.

  • March 18, 2015, 12:40 a.m.

    Well, to use those endpoints your views would have to muck with HttpRequest object.

    Hey, tell me your use-case and lets see if its really unsuitable for you. :)

  • Members 5 posts
    March 19, 2015, 5:51 p.m.

    I meant more have the API views and the regular views basically act as wrappers around a common interface, but yeah, a bunch of work I guess.

    My use-case is "not everyone has/can have JS enabled". Core functionality cannot rely on JS. This isn't just a personal opinion that I'm trying to force on a site (although I do believe JS shouldn't be required if it doesn't have to be); many users of the site simply do not have JS enabled all the time (some are paranoid, some have terrible computers that many sites run horrifically slow on for basic stuff, some have battery-powered devices and have JS disabled to save power).

  • March 20, 2015, 3:07 p.m.

    Point that Ember.js is slow on old devices is only one that I'all agree isn't subjective one.

    Now, if somebody cripples his own experience, it is his choice, not mine, and there will always be people with agenda against something. I've seen how decade of "oh, we must cater for those who can't" philosophy took webdev. Those times are gone now however. And look now, out of those 3-5% of clients that don't support js, tiny percent are acient devices and extreme majority are bots and scrapers.

    And If you are paranoiac, install plugin that blocks referers and async requests to spies, don't disable JS that more and more web comes to depend on.

  • Members 5 posts
    March 20, 2015, 7:19 p.m.

    If you agree with the "slow on old devices" one, then the battery-powered device one should make sense too.

    As I said, I was talking about my specific use case. I have a lot of users with these problems (and the paranoid few just make that mountain even higher).

    While I don't agree that JS should be unnecessarily required for core functionality (obviously things like games, interactive graphs, etc. need it), I have it enabled and don't generally complain about it (although I have had to use some sites that run at 100% CPU just for a mouse-over menu, in which case I will bitch). I agree that blocking JS entirely because you're paranoid is stupid, and generally tell those people to stop being idiots, but that's the thing about paranoia - it's not rational.

    Now, this post probably sounded somewhat aggressive, so just to clarify: I'm not demanding you change the site to suit my needs, I'm just giving my requirements since you asked specifically. After my first post and your reply, I went off to continue looking for an alternative to the Swiss-cheese security PHP forums that are so prolific.

    Also, to give some context to anything I say, my day job is webdev.

  • March 20, 2015, 7:42 p.m.

    To be honest, I hoped for links to site and some details about what it uses are seeking in it. Is it something superniche? Is it located somewhere remotely where market adoption of new devices is superslow or aimed directly at certain democraphic?

    Eh, I dyslike this general php bashing. phpBB3, while they did some annoying design decisions that they are now spending great deal of time fixing, had rock solid implementation and security record.

  • Members 5 posts
    March 20, 2015, 10:34 p.m.

    It's for a community that doesn't have a website yet. Because of what the community is based around, most people fit into the terrible/old-devices category.

    It wasn't meant as general PHP bashing (although I really don't like PHP). I just meant every (free) PHP-based forum that I've ever used (as an admin/host or a regular user) has had countless serious security vulnerabilities.