Firstly, this looks amazing! And I am feeling overwhelmed as you can read:
What I CAN do:
1. Write business oriented JS and JSON web apps for desktop (wrapped in nw.js to build a "native" desktop app) with XHR/REST calls to get JSON packets and use that data for the client side business logic and UI.
2. Organise the scripts: BDD (Gherkin / Cucumber); have modules of business logic that separates that logic from the UI so tests can be run without any UI (ie separate models from views, etc); pages containing just the views; etc
3. Build an app that has a single index.html file that inits the JS to require the business modules and pull in the JS and CSS for the views, etc.
What I have done so far:
1. Downloaded Jasonette to a mobile device and played with creating some test code on http://web.jasonette.com and getting it to run on my mobile device. Wow! That is like magic, I must say!
2. Read as much of the Jasonette documentation as I can take in.
3. Tested a Jasonette-web example set up on my localhost
4. Downloaded Android Studio and ran the test app in an emulator as detailed on http://docs.jasonette.com/#quickstart
5. I understand that I create the app with JASON and have an initial URL to get the JSON file which can be served from my own web server (or within the app?) if I wish. That URL can be run from the jasonette app on my phone for prototyping or in an app I build for production using the Android Studio / Xcode as per your example. BTW: the idea of prototyping like that is brilliant!
SO... what I am stuck on is understanding migrating from the "traditional" way:
If I start a new desktop web project I have a folder structure with the various files for BDD, CSS, JS, frameworks, 3rd party bits and pieces, node_modules, a build system, etc. There is an index.html, app.js and package.json that is the entry point for the whole app. If it was being deployed via a web browser the index.html is the start (of course). When wrapped in nw.js either index.html or index.js is the entry point as per the package.json file.
Now, I understand the concept of a JASON document and can build simple little things. But what is the strategy for scaffolding an app that modularises the whole thing? Do you have just one JASON document that uses an Agent for each module? Or a collection of JASON documents in their own files that you call in via file:://url ? Or both? or neither?
I guess my question is: how do you NOT have one giant JASON file? How do you organise the structure for a "real world" app?
For example: an app that has an authentication module, a client module and a messaging module. The details of each of those are not important here. Imagine I am using a plain JS Class for Authentication(), Clients() and Messages() with each of those having a .js file for the model (the business logic) and a separate .js file for each view, with each view being a Jasonette document. Am I conceiving this in the right way here?
Thanks, I am really excited to build a real app with this. I just cant figure out out to lay it all out.