Proposal for New Offline Exercise Framework (I intend to develop)
ricklove opened this issue · 9 comments
KhanOpenExerciseFramework - Design
Summary
Below is a proposal for an offline web app version of the Khan exercise framework. I am personally interested in getting this project started and have the resources and time to do it. However, I would like the input of the community to make sure the design idea has a good start. Also, I would like to encourage others to think about the need for this and contribute if interested.
Objective
What problem is this solving?
- Smart Phones and tablets are the ideal platform for Khan Academy
- They are more common than computers
- They are better suited for quick use
- Children use them much more than computers
- In developing countries they are available where computers never will be
- However, khan exercises are not usable on Mobile Devices
- Exercises are slow
- Exercises require a constant internet connection
- The current mobile development roadmap is not ideal.
- Developing multiple apps for each app ecosystem is a waste of resources.
- Offline web apps work on all devices
- Offline web apps can be deployed to app stores if required.
- The exercise framework should be in a different github repo than the exercises
- khan-exercises is busy with new exercise development and mixing in framework changes is very difficult
- focused framework development should happen in its own repo and work independently from exercises and modules
Background
Why is it needed now?
- Khan academy should target devices that are most available to the target audience
- Children in developing countries
- Children in developed countries using tablet computers
- Children using parents' devices
- Adults using mobile devices
- Khan academy is better suited for a casual quick lesson on a mobile device rather than a formal scheduled lesson using a computer
Solution
- Develop a pure HTML5 Offline Web App
- Ensure good performance on any smart phone
- Refactor framework to work in any scenario
- Replace existing framework on main site
- Run as minimalistic app for mobile use
- Separate server access and UI concerns to enable easy adaptation to changing environments
- Refactor framework to simplify adding future features
- KhanProxyServer using the same codebase running on node.js for creating local servers
- Exercise Content
- Exercise Levels
Implementation
v.1 Offline Exercise Framework
- Use a single HTML page with main framework resources in app manifest
- JS for framework
- JS for exercise modules
- CSS for app and modules
- Images for app and modules
- Use localStorage for exercises and user data
- Topic & Exercise Lists
- Exercise Definitions (HTML or equivalent)
- Exercise content files (future)
- User Progress
- Run exercises offline
- Only connect to download exercises one time (possibly allow user to select which topics to download)
- Depending on size contraints may need to remove old (least used) exercises from localStorage
- Sync local user data to Khan server when connection is detected
- Videos are online only
- Difference from current implementation:
- Currently each exercise is its own webpages
- Every exercise must load everything every time (this is very slow)
- The exercise page loads the framework
- The framework loads the website template
- The framework loads the framework modules
- The framework loads the exercise
- Every exercise must load everything every time (this is very slow)
- Instead there will be a single app page
- The framework will be loaded only one time
- The app page will load the framework
- The framework will populate the website template
- The framework will load the modules (preload all modules' JS, but don't initialize until needed)
- The framework will change only the exercise itself (not reload everything)
- The framework will load the exercise page
- The framework will load and initialize the exercise
- The framework will be loaded only one time
- Currently each exercise is its own webpages
v.Future
- KhanProxyServer
- Enable creating a local network clone of Khan Academy with a single laptop and wifi (suitable for rural/developing schools without Internet)
- Host locally created user accounts
- Host khan videos
- Host exercises
- Sync with actual KhanServer to upload user data and download new content
- Use same js code base as offline web app (running in node.js)
- Exercise leveling and content
- Enable progression for each exercise type
- Enable content-centric exercise types for non-math subjects
You may want to check out https://github.com/jamalex/ka-lite and coordinate with @jamalex. I think he's headed in the same direction.
Thanks, I'll see how that will work together.
It seems ka-lite is mainly focused on what I called the KhanProxyServer. However, my main focus is an offline web app. The two projects could work well together once the overlap is determined. Or if @jamalex is interested in merging interests we might be able to combine the projects.
I would recommend:
KhanOpenExerciseFramework (name?) - The offline web app that can use any server as the backend
ka-lite - What I called the proxy server
As a note: This project should not attempt to replace the exercises themselves, but mainly refactor and replace part of the framework that runs the exercises. Another words, the project should be completely backwards compatible with existing exercises.
In this post, http://ejohn.org/blog/khan-exercise-rewrite/
John Resig mentions:
There are a few things that we’re looking to do in the near future: Bring offline support to the exercises (for those with spotty internet connections or those using the upcoming iPad/Android application), client-side translation of content into other languages, and exercise answer checking using Node.js and JSDOM.
What is the status of this?
We've been focusing on other things so haven't gotten to any of those yet.
@spicyj Thanks for your response. What is your recommendation for me? Should I wait until the Khan team starts on this work and then I will have a chance to contribute?
I don't want to start a project that will become irrelevant. I want to know how I can contribute towards the official code base.
I understand that the Khan team does not have the resources to focus on this right now.
My proposal would separate the exercise framework (what is now khan-exercises.js) from the exercises and modules. This would allow focused improvements to the framework. As it is now, framework improvements would be mixed with hundreds of pull requests for exercises (content). This makes it very difficult to collaborate with others.
Therefore, where should exercise framework improvements take place?
- khan-mobile (the scope of this project seems to be the entire website rather than exercises and secondly the framework improvements should not just be for mobile use)
- a user created repo (I fear this would never be used officially)
- a new official khan-exercises-framework repo (this would be ideal - if someone @ Khan could create a repo for this purpose - even a blank repo - and let the community have a place to colloborate)
So here is what I am asking:
_Could Khan create a khan-exercises-framework repo that is blank?_
This would allow the community to:
- begin designing the concept using the wiki pages
- refactor the current framework to separate it from the exercises
- create a friendly environment for framework improvements
- create focused tests on the framework itself
- create a test environment that uses the new framework code
Me again(:)) After seeing the symbiosis between KA and KA Lite I was out trolling around and stumbled on this discussion. I do wonder how many others are out using the KA exercise framework to just create raw exercises as well as the larger framework? Local language instruction (using some sound tools like www.daveconservatoire.org), local history, familiy history, etc are all things that can be at least partially targeted with the exercise framework and then portions of the work (that which "translates") could be shared back.
Finally, by design, the ability for learners to view the source is part of the package but teachers/mentors eventually need a way to selectively turn off this feature or use alternative testing methods. Thoughts?
We do not plan on pursuing any of those in the near future, and I don't believe we keep that sort of information about the use of the exercise framework.
@mjptak Feel free to open this up as an issue on the ka-lite repo, so we can hold some discussion there about our planned local content creation features. We do plan to provide other exercise formats than khan-exercises, but supporting custom khan-exercise modules would be good too.