There has been much discussion, originally starting here: #951, and most recently in IRC around the future of Ghost's admin UI and the frameworks and tools that it should use.
This discussion is driven by a number of problems that are present in the existing implementation. Any discussion around solutions needs to carefully to consider all the problems that we face in the admin:
- The admin is halfway between a one-page app, and a multi-page app, resulting in confusion between what goes where, and code split between the client and the server.
- The confusion and disarray has lead to really poor mobile support
- A complete lack of data binding, leading to code like this (see Backbone: data binding libraries / tools? #550)
- No memory management for views (views are never destroyed) (see Backbone Implementation 2.0 #951)
- Views are doing transitions (animations) manually (see Backbone Implementation 2.0 #951)
- Really ugly routing (see Backbone Implementation 2.0 #951)
- Most of our stuff is rendered client side, but is this bad? interesting article
- Our code is really really fragile. It's easy to break saving, or uploading, or something else critical.
Discussion point 1: What other problems does the admin suffer from? Can you help us better quantify any of these problems?
It would be great to develop a set of principles / statements that need to be true for any new solution like:
- Data-binding is handled automatically.
- Sub-page routing is easy
Do you have examples of bits of the admin UI that you think are particularly dire? Are their problems you anticipate we might have if we moved from Backbone? Etc..
Discussion point 2: What is the best structure for a complex client side app like this?
This sort of depends on the tool used to build it, but also has implications for choosing a tool.
Is the Ghost admin a single page app, or a collection of single page apps? If you take the dashboard into consideration, I believe that alone is a single page app. The editor is probably the same.
Do you have ideas on how to structure the admin UI, and how to ensure it works as a whole?
Discussion point 3: Is backbone the best framework for the job?
There are many other potential tools we could use, and there are a few main solutions that we consider to be on the table:
- Improving the current backbonejs implementation by adding more underlying structure and using additional tools like marionette and rendr
- Switching to emberjs
- Switching to angular
- Something else entirely?
Do you have some relevant experience with one of these solutions that you can tell us about? Are you able to put together a code example or demo that shows what it might look like, or specifically how a problem is solved?
Do you have time to implement a more complete demo / example of one of the key features, like the editor, or the post-settings menu?
Please note:
Discussions on topics like these can be hard to keep objective, so I'm going to lay out some ground rules. Comments on this issue should contribute something of real value to one of the above discussion points:
- experience or insight that is relevant to one of the discussion points
- an interesting article providing insight on how other people have solved
- a demo or code example showing how a tool could solve a relevant problem
Please do not post subjective comments suggesting which is your preferred framework, and although we all know the hamster IS a valid reason to choose ember, please keep those sorts of comments to IRC (please)! I have the power to delete comments, and for this thread, I may make use of it without warning 😈
Next steps:
This is a call to action for our community, a place to come to put your thoughts, ideas, examples and other contributions. We will then use one of the public development meetings to discuss this further and come up with a decision. I propose that we aim for the meeting on Tuesday 25th February.
update: moved back from 18th to 25th