Hey Rafael,
It's been really interesting following this thread and hearing your ideas. I'd like to go over a few of the changes we've made and why we made them.
Firstly we started with a course.json file. Our internal Adapt framework started like this - it was nested and had hierarchical layout. However the nested structure starts to become overwhelming - copying a pasting large chunks of JSON making sure it fits in with the right closing bracket. Following the indent lines down through the 16th indent becomes un-manageable. We had modules, topics, pages, articles, blocks and components plus all the other attributes of plugins. It became a JSON mess to maintain.
Then we have a performance leak at the start of Adapt - this was mainly seen on mobile devices and IE8 where iterating through the JSON took a long time. We were putting them into models and then into collections - all of this was chunky.
Now we let Backbone do the work of importing the single JSON files and putting them into collections. No iterating over them at start time = A fast and reliable framework that gets started within our speed test times.
You've mentioned about it being a mistake we've deemed performance as more important than readability of the JSON. I see this the other way - performance is key. We strive to give the user (not the developer) the best experience - as what we're creating is a learning tool. On mobile devices we want near native performance, on desktop we want it seem-less between pages and on touch devices we want users to feel like they are in apps interacting with touch events. Right now we are smashing our download tests (https://github.com/adaptlearning/documentation/blob/master/01_cross_workstream/developer_requirements.md). When testing our in-house version we don't come anywhere near this.
I've edited both types of JSON structure and my personal opinion of the two is - single JSON files that contain one type are faster to create. The reason behind this is due to us knowing the course structure first - this is an important step (I can see how if there is no structure it can become harder). We have Word documents that have our course structure - by following this we're able to put all the pages into the course - then the articles, then blocks and then components. I have to admit it's a different workflow but it's much quicker when you've set yourself up with JSON snippets (Sublime Text does an amazing job of this - If I know I need two text components, one graphic and one media component I can type - text "tab", text "tab", graphic "tab", media "tab"). This I cannot do in a hierarchical structure where I have to put in another article and block to place my components.
In terms of importing and exporting - I did a lot of research around the use cases of hierarchical data structures - who's using them and why? Almost every new web app or application is using smaller chunks of JSON data. The reasons can be put inline with why we write smaller chunks of code - If I want to change something it's easier to change one attribute then multiple things. For example, I want to change an article and put it in another page and remove the first block inside it to another article on the previous page. In a nested data structure this is quite a task of making sure you get the two places correct - selecting the right end bracket (and if you've got a few question types in there you know this data is going to be long). In our current version I have to change two attributes - no copying and pasting. Change a _parentId on the article and then change the _parentId on the block.
I went on a course run by the MongoDB guys and the way they describe data is to not lock yourself into structure. Structure can change - what happens if one day we decide to take out articles. It's a lot easier to do with this structure than nested. Storing nested data in MongoDB is harder to work with, so it's best to keep these separate.
Whilst I'm saying all of this I'm conscious that we've released the framework as a developers release - it is intended to be harder to work with than the editor. I envisage 98% of people using the tool - it does all the hierarchical data visualisations for us. Where Sven has said that some developers will still hand code JSON is when developing new plugins or adding additional JSON attributes (at Kineo we do this a lot to add attributes into the menu items). On the note of developing plugins - it's important for developers to really understand where can I put my plugin data. Having the separate files, plugin creators know they can either put data in the "config.json", "course.json", "contentObjects.json", "articles.json", "blocks.json" or "components.json". It then means there's a nice distinction between "where can I put my attributes?" and "I can put my attributes here".
Some other benefits are the ability to import and export the JSON data easier, you can leave JSON data in that might not be needed for one course but needed for another - simply remove the _parentId (However this should probably not be seen as a positive with the editor involved).
One of the biggest new updates in Adapt is the multi-dimensional menu system we've built. It enables contentObjects (pages and menus) to have a never ending system of menus. We were limited in the current in-house version to three levels and although we hardly went over three we did have cases where we wanted three menu items on the first screen and two of those went to pages whilst one went to a two level menu system. To code this and put it into the JSON structure we needed to have redundant JSON data for no reason. Now we can put our _parentId to the correct contentObject and it builds a menu system for us.
I hope this makes sense as I've realised it's gone on for quite a while. If you have any more questions or suggestions post back and we'll try to answer them as best as possible.
Thanks,
Daryl