SlideShare a Scribd company logo
CodeHub
Curran Kelleher
8/18/2012
Programming is Overly Complex
● Development environment setup
● Revision control management
● Dependency management
● Deployment
= time and effort learning tools,
not writing code.
● The barrier to entry is higher than necessary
● This can be solved through automation
Simplification by Automation
Automation of what?
● Development environment setup
○ It's all on the server
○ Just open a Web page
● Revision control management
○ It's all on the server
○ Just click "save"
● Dependency management
○ It's all on the server
○ Just use "require(moduleName)'
● Deployment
○ Just click "run" and share that link
Prior Art in "Web-Based IDEs"
We consider a "Web-Based IDE" something that
● runs in a browser
● lets users edit, save, and run source code
The following are notable examples:
● JSBin
● JSFiddle
● CSSDesk
● Cloud9 IDE
● GitHub
Prior Art - JSBin
code, run, save, deploy - in the browser try it!
Prior Art - JSFiddle
code, run, save, deploy - in the browser
Prior Art - CSSDesk
code, run, save, deploy (CSS) - in the browser
Prior Art - Cloud9 IDE
● Full featured IDE, runs Node.js code
● Integrates with GitHub and Heroku
● Integrated terminal for Git and Unix commands
Prior Art - GitHub
● An in-browser text file editor for Git repositories
● Can be coupled with "GitHub Pages", a service
that serves GitHub repositories as Web sites
Prior Art in Software Repositories
Developers can publish reusable packages
with support for dependency management
● The Maven Repository (for Java)
● RubyGems (for Ruby)
● The Node Package Manager (for Node.js)
● The CommonJS module specification
● Asynchronous Module Definition (AMD)
● The Require.js AMD module loader
● ...many more out there
● The point: packages and dependency
management empower the platforms
The CodeHub Vision
No existing tools have all of these features:
● Web-based source code editing
● Definition and use of reusable modules
● Web-based deployment, with
● Automated dependency management
Such a tool would support
● Computer science education
● a public Wikipedia-like software repository
● a research testbed for interactive graphics
The CodeHub Architecture
● Limited to JavaScript and HTML software
● Based on CommonJS modules
● All versions are published
○ So when an application is linked to or embedded,
its behavior does not change (or break) over time
● The server tracks
○ Script content, for all versions
○ The dependency graph, for all versions
● Scripts can be run
○ At runtime, dependencies are evaluated and
bundled together into a single page
○ Compilation strategy from a CommonJS Wiki Page
CodeHub Scripts
● Every piece of code stored is a "script"
● Each script has an id number
● Each script version has a revision number
● Saving a script creates a new revision
● All script revisions are published
○ For example
http://code-hub.org/edit/7.1
edits the script whose id is 7, revision number 1
● There are three types of scripts:
○ Modules
○ Templates
○ Applications
CodeHub Modules
● CodeHub supports CommonJS Modules
● Each module must have a unique name
● Modules can be required with the syntax
foo = require('foo')
● Modules can be defined with the syntax
@module foo
● Modules define their exported API by adding
properties to an exports object
CodeHub Templates
● Templates are HTML pages with placeholders
of the form ${parameterName}
● Parameter values are passed in from
applications that use the template
● ${scripts}gets replaced by script tags
including application source code
○ dependencies are bundled together and included also
● Each template has a unique name
● Templates can be defined with the syntax
@template templateName
CodeHub Applications
● Applications are scripts that can be run
● Applications can depend on modules
● Applications are defined using the syntax
@app template templateName
● Applications can pass arbitrary parameters
to the template using the syntax
@app parameterName value
CodeHub Implementation
CodeHub was implemented using
● Node.js as a server platform
● The Express.js Web Framework
○ With Jade and Markdown templates
● MongoDB via the Mongoose API
● Git via the Node.js child process API
● Hosted on the Rackspace cloud
○ In a single Ubuntu server VM
● Live now at code-hub.org
CodeHub Screenshots:
New Script and Script List
ddfds
CodeHub Screenshots:
Example Scripts
Try it!
CodeHub Implementation Modules
Case Study:
An Interactive Graphics Course
● Web-based IDEs were used in a course
○ "Computer Programming and Interactive Graphics"
○ a 50-hour summer course for high school students
○ of the MIT Junction program, July-August 2012
● The class blog contains
○ Links to the "edit" pages in CodeHub
○ Embedded programs from CodeHub using iFrames
○ Comment sections for students to post their work
● The class used
○ JSBin
○ CodeHub
○ Cloud9 IDE
○ GitHub and GitHub Pages
Case Study:
An Interactive Graphics Course
● Students were first exposed to JSBin
○ Basic JavaScript and HTML5 Canvas features were
introduced in "code as I code" fashion using JSBin
○ JSBin's "auto-run" feature provided instant feedback
● Students were then exposed to CodeHub
○ ..but did not use the module functionality
■ as it was beyond their knowledge
○ ..but preferred JSBin because
■ The editor and output are on the same page
■ The code is re-run automatically when changed
● Some students liked
○ the simplicity of CodeHub
○ that CodeHub adds nothing extra when running
■ whereas JSBin adds an "edit in JSBin" button
Case Study:
An Interactive Graphics Course
● Students were then exposed to GitHub
○ Students created GitHub accounts and a repository
○ Students used the in-browser GitHub editor
■ just for learning basic Markdown
○ Students set up Web sites using GitHub Pages
● Students were then exposed to Cloud9 IDE
○ Students learned the basics of Git, and merging
○ Students used Cloud9 IDE to
■ construct an interactive graphical program
■ publish it to the Web using GitHub Pages
● The overall response was fear and dislike
○ Students perceived GitHub and Cloud9 IDE as
overly complex and cumbersome to use
○ JSBin was their most preferred tool overall
Case Study:
An Interactive Graphics Course Blog
Links to
source
code in
CodeHub
The running
program
embedded
directly
from
CodeHub
using an
iFrame
Case Study:
An Interactive Graphics Course Blog
Comments
allowed students
to showcase
their work
and collaborate
Case Study:
An Interactive Graphics Course Blog
A starting point for graphics programming was provided.
Shortcomings
● Apps do not have names
○ So the list of scripts includes things like "12.4"
○ Perhaps apps should have names
● Modules are in a single global namespace
○ So modules for specific applications might use
"appName.moduleName" for the module name
● Modules are editable by anyone
○ Therefore breakable by anyone
○ No built-in concept of ownership or authorship
● Trumped by JSBin in terms of usability
○ CodeHub needs the "Auto-run JS" feature
Future Work
● A "showcase" feature
○ Apps can be showcased on their own page
○ Including a comments section
○ This would enable discussion-based collaboration
● The "Auto-run JS" feature from JSBin
● Visualization of dependencies and apps
○ The content of CodeHub is difficult to navigate
○ A node-link visualization of the dependency graph
would be useful for navigation
● A documentation editor
○ Each module could have documentation
○ This would make CodeHub more usable
● Implementation of Information Visualization
software within CodeHub
The End

More Related Content

What's hot (20)

PPTX
How do we test nodejs apps?
Michal Juhas
 
PPTX
Single page apps a bleeding edge new concept or a revived old one?
Omer Dawelbeit
 
PDF
Angular2 - A story from the trenches
Johannes Rudolph
 
PDF
Groovy android
Mario García
 
PDF
Nodeschool italy at codemotion
Michele Capra
 
PDF
Dealing with large code bases. cd ams meetup
Viktor Sadovnikov
 
PDF
Gradle enabled android project
Shaka Huang
 
PDF
Luna - How to build and maintain a github project
Panayiotis Arvanitis
 
PDF
Headless Drupal: A modern approach to (micro)services and APIs
sparkfabrik
 
PDF
Chromium on Wayland Desktop (BlinkOn 7)
Igalia
 
PDF
Improving the MODX Documentation - March 29, 2019
Mark Hamstra
 
PDF
Android build process (1)
Shubham Goyal
 
PDF
End-to-end HTML5 APIs - The Geek Gathering 2013
Alexandre Morgaut
 
PDF
Open data for good
Marco Liberati
 
PDF
QGIS UK: Developing with QGIS - What is possible (Lutra Consulting)
Ross McDonald
 
PDF
OpenCms Days 2014 Keynote - Step up to OpenCms 9.5
Alkacon Software GmbH & Co. KG
 
PPTX
Introduction to React
Quentin Leonetti
 
PDF
Continuous integration is not a solved problem
Kristian Van Der Vliet
 
PDF
Gradle explained
Andrey Mukamolov
 
PDF
Griffon for the Enterprise
James Williams
 
How do we test nodejs apps?
Michal Juhas
 
Single page apps a bleeding edge new concept or a revived old one?
Omer Dawelbeit
 
Angular2 - A story from the trenches
Johannes Rudolph
 
Groovy android
Mario García
 
Nodeschool italy at codemotion
Michele Capra
 
Dealing with large code bases. cd ams meetup
Viktor Sadovnikov
 
Gradle enabled android project
Shaka Huang
 
Luna - How to build and maintain a github project
Panayiotis Arvanitis
 
Headless Drupal: A modern approach to (micro)services and APIs
sparkfabrik
 
Chromium on Wayland Desktop (BlinkOn 7)
Igalia
 
Improving the MODX Documentation - March 29, 2019
Mark Hamstra
 
Android build process (1)
Shubham Goyal
 
End-to-end HTML5 APIs - The Geek Gathering 2013
Alexandre Morgaut
 
Open data for good
Marco Liberati
 
QGIS UK: Developing with QGIS - What is possible (Lutra Consulting)
Ross McDonald
 
OpenCms Days 2014 Keynote - Step up to OpenCms 9.5
Alkacon Software GmbH & Co. KG
 
Introduction to React
Quentin Leonetti
 
Continuous integration is not a solved problem
Kristian Van Der Vliet
 
Gradle explained
Andrey Mukamolov
 
Griffon for the Enterprise
James Williams
 

Similar to Code-Hub (20)

PDF
OVERVIEW: Chromium Source Tree
Chang W. Doh
 
PDF
JIO and WebViewers: interoperability for Javascript and Web Applications
XWiki
 
PDF
Dust.js
Yevgeniy Brikman
 
PDF
DocDoku: Using web technologies in a desktop application. OW2con'15, November...
OW2
 
PPTX
Node js vs golang -which one is better ?
ForceBolt
 
PDF
Programming Android
league
 
PDF
AstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdf
FarHanWasif1
 
PDF
Architektura html, css i javascript - Jan Kraus
Women in Technology Poland
 
PDF
Voxxed days Vilnius 2015 - Android Reverse Engineering Lab
Ron Munitz
 
PDF
Drools & jBPM Workshop London 2013
Mauricio (Salaboy) Salatino
 
DOCX
Web Development Tools That Every Developer Should Explore.docx
jenricha43
 
PDF
Electron JS | Build cross-platform desktop applications with web technologies
Bethmi Gunasekara
 
PPTX
GDG Workshop on React (By Aakanksha Rai)
gdgoncampuslncts
 
PDF
Keep calm and write reusable code in Android
Juan Camilo Sacanamboy
 
PDF
Who needs containers in a serverless world
Matthias Luebken
 
PDF
Scaling xtext
Lieven Lemiengre
 
PDF
A New CLI for Spring Developer Productivity
VMware Tanzu
 
DOCX
Best React js Training course in Bangalore
Avinash Kumar
 
PDF
Programming for non tech entrepreneurs
Rodrigo Gil
 
PDF
GeoServer Developers Workshop
Jody Garnett
 
OVERVIEW: Chromium Source Tree
Chang W. Doh
 
JIO and WebViewers: interoperability for Javascript and Web Applications
XWiki
 
DocDoku: Using web technologies in a desktop application. OW2con'15, November...
OW2
 
Node js vs golang -which one is better ?
ForceBolt
 
Programming Android
league
 
AstroLabs_Academy_Learning_to_Code-Coding_Bootcamp_Day1.pdf
FarHanWasif1
 
Architektura html, css i javascript - Jan Kraus
Women in Technology Poland
 
Voxxed days Vilnius 2015 - Android Reverse Engineering Lab
Ron Munitz
 
Drools & jBPM Workshop London 2013
Mauricio (Salaboy) Salatino
 
Web Development Tools That Every Developer Should Explore.docx
jenricha43
 
Electron JS | Build cross-platform desktop applications with web technologies
Bethmi Gunasekara
 
GDG Workshop on React (By Aakanksha Rai)
gdgoncampuslncts
 
Keep calm and write reusable code in Android
Juan Camilo Sacanamboy
 
Who needs containers in a serverless world
Matthias Luebken
 
Scaling xtext
Lieven Lemiengre
 
A New CLI for Spring Developer Productivity
VMware Tanzu
 
Best React js Training course in Bangalore
Avinash Kumar
 
Programming for non tech entrepreneurs
Rodrigo Gil
 
GeoServer Developers Workshop
Jody Garnett
 
Ad

More from Curran Kelleher (9)

PDF
Resume
Curran Kelleher
 
PDF
Introduction to D3
Curran Kelleher
 
PDF
The Chiasm Visualization Platform
Curran Kelleher
 
PDF
Chiasm
Curran Kelleher
 
PDF
Introduction to D3.js
Curran Kelleher
 
ODP
2011 07 14_fractalperspective
Curran Kelleher
 
PDF
Visualizing the Bureau of Labor Statistics Employment Dataset
Curran Kelleher
 
PDF
Multiscale Visualization Using Data Cubes
Curran Kelleher
 
PDF
CSGSO Welcome Reception Fall 2012
Curran Kelleher
 
Introduction to D3
Curran Kelleher
 
The Chiasm Visualization Platform
Curran Kelleher
 
Introduction to D3.js
Curran Kelleher
 
2011 07 14_fractalperspective
Curran Kelleher
 
Visualizing the Bureau of Labor Statistics Employment Dataset
Curran Kelleher
 
Multiscale Visualization Using Data Cubes
Curran Kelleher
 
CSGSO Welcome Reception Fall 2012
Curran Kelleher
 
Ad

Recently uploaded (20)

PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PPTX
Building and Operating a Private Cloud with CloudStack and LINBIT CloudStack ...
ShapeBlue
 
PPTX
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
PPTX
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
PDF
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
PDF
Français Patch Tuesday - Juillet
Ivanti
 
PDF
Wojciech Ciemski for Top Cyber News MAGAZINE. June 2025
Dr. Ludmila Morozova-Buss
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PPTX
Top Managed Service Providers in Los Angeles
Captain IT
 
PDF
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
PPTX
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
PDF
Ampere Offers Energy-Efficient Future For AI And Cloud
ShapeBlue
 
PDF
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
PDF
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
PDF
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Building and Operating a Private Cloud with CloudStack and LINBIT CloudStack ...
ShapeBlue
 
MSP360 Backup Scheduling and Retention Best Practices.pptx
MSP360
 
WooCommerce Workshop: Bring Your Laptop
Laura Hartwig
 
TrustArc Webinar - Data Privacy Trends 2025: Mid-Year Insights & Program Stra...
TrustArc
 
Français Patch Tuesday - Juillet
Ivanti
 
Wojciech Ciemski for Top Cyber News MAGAZINE. June 2025
Dr. Ludmila Morozova-Buss
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
Top Managed Service Providers in Los Angeles
Captain IT
 
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
Webinar: Introduction to LF Energy EVerest
DanBrown980551
 
Ampere Offers Energy-Efficient Future For AI And Cloud
ShapeBlue
 
Fl Studio 24.2.2 Build 4597 Crack for Windows Free Download 2025
faizk77g
 
Chris Elwell Woburn, MA - Passionate About IT Innovation
Chris Elwell Woburn, MA
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
Complete JavaScript Notes: From Basics to Advanced Concepts.pdf
haydendavispro
 
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 

Code-Hub

  • 2. Programming is Overly Complex ● Development environment setup ● Revision control management ● Dependency management ● Deployment = time and effort learning tools, not writing code. ● The barrier to entry is higher than necessary ● This can be solved through automation
  • 3. Simplification by Automation Automation of what? ● Development environment setup ○ It's all on the server ○ Just open a Web page ● Revision control management ○ It's all on the server ○ Just click "save" ● Dependency management ○ It's all on the server ○ Just use "require(moduleName)' ● Deployment ○ Just click "run" and share that link
  • 4. Prior Art in "Web-Based IDEs" We consider a "Web-Based IDE" something that ● runs in a browser ● lets users edit, save, and run source code The following are notable examples: ● JSBin ● JSFiddle ● CSSDesk ● Cloud9 IDE ● GitHub
  • 5. Prior Art - JSBin code, run, save, deploy - in the browser try it!
  • 6. Prior Art - JSFiddle code, run, save, deploy - in the browser
  • 7. Prior Art - CSSDesk code, run, save, deploy (CSS) - in the browser
  • 8. Prior Art - Cloud9 IDE ● Full featured IDE, runs Node.js code ● Integrates with GitHub and Heroku ● Integrated terminal for Git and Unix commands
  • 9. Prior Art - GitHub ● An in-browser text file editor for Git repositories ● Can be coupled with "GitHub Pages", a service that serves GitHub repositories as Web sites
  • 10. Prior Art in Software Repositories Developers can publish reusable packages with support for dependency management ● The Maven Repository (for Java) ● RubyGems (for Ruby) ● The Node Package Manager (for Node.js) ● The CommonJS module specification ● Asynchronous Module Definition (AMD) ● The Require.js AMD module loader ● ...many more out there ● The point: packages and dependency management empower the platforms
  • 11. The CodeHub Vision No existing tools have all of these features: ● Web-based source code editing ● Definition and use of reusable modules ● Web-based deployment, with ● Automated dependency management Such a tool would support ● Computer science education ● a public Wikipedia-like software repository ● a research testbed for interactive graphics
  • 12. The CodeHub Architecture ● Limited to JavaScript and HTML software ● Based on CommonJS modules ● All versions are published ○ So when an application is linked to or embedded, its behavior does not change (or break) over time ● The server tracks ○ Script content, for all versions ○ The dependency graph, for all versions ● Scripts can be run ○ At runtime, dependencies are evaluated and bundled together into a single page ○ Compilation strategy from a CommonJS Wiki Page
  • 13. CodeHub Scripts ● Every piece of code stored is a "script" ● Each script has an id number ● Each script version has a revision number ● Saving a script creates a new revision ● All script revisions are published ○ For example http://code-hub.org/edit/7.1 edits the script whose id is 7, revision number 1 ● There are three types of scripts: ○ Modules ○ Templates ○ Applications
  • 14. CodeHub Modules ● CodeHub supports CommonJS Modules ● Each module must have a unique name ● Modules can be required with the syntax foo = require('foo') ● Modules can be defined with the syntax @module foo ● Modules define their exported API by adding properties to an exports object
  • 15. CodeHub Templates ● Templates are HTML pages with placeholders of the form ${parameterName} ● Parameter values are passed in from applications that use the template ● ${scripts}gets replaced by script tags including application source code ○ dependencies are bundled together and included also ● Each template has a unique name ● Templates can be defined with the syntax @template templateName
  • 16. CodeHub Applications ● Applications are scripts that can be run ● Applications can depend on modules ● Applications are defined using the syntax @app template templateName ● Applications can pass arbitrary parameters to the template using the syntax @app parameterName value
  • 17. CodeHub Implementation CodeHub was implemented using ● Node.js as a server platform ● The Express.js Web Framework ○ With Jade and Markdown templates ● MongoDB via the Mongoose API ● Git via the Node.js child process API ● Hosted on the Rackspace cloud ○ In a single Ubuntu server VM ● Live now at code-hub.org
  • 18. CodeHub Screenshots: New Script and Script List ddfds
  • 21. Case Study: An Interactive Graphics Course ● Web-based IDEs were used in a course ○ "Computer Programming and Interactive Graphics" ○ a 50-hour summer course for high school students ○ of the MIT Junction program, July-August 2012 ● The class blog contains ○ Links to the "edit" pages in CodeHub ○ Embedded programs from CodeHub using iFrames ○ Comment sections for students to post their work ● The class used ○ JSBin ○ CodeHub ○ Cloud9 IDE ○ GitHub and GitHub Pages
  • 22. Case Study: An Interactive Graphics Course ● Students were first exposed to JSBin ○ Basic JavaScript and HTML5 Canvas features were introduced in "code as I code" fashion using JSBin ○ JSBin's "auto-run" feature provided instant feedback ● Students were then exposed to CodeHub ○ ..but did not use the module functionality ■ as it was beyond their knowledge ○ ..but preferred JSBin because ■ The editor and output are on the same page ■ The code is re-run automatically when changed ● Some students liked ○ the simplicity of CodeHub ○ that CodeHub adds nothing extra when running ■ whereas JSBin adds an "edit in JSBin" button
  • 23. Case Study: An Interactive Graphics Course ● Students were then exposed to GitHub ○ Students created GitHub accounts and a repository ○ Students used the in-browser GitHub editor ■ just for learning basic Markdown ○ Students set up Web sites using GitHub Pages ● Students were then exposed to Cloud9 IDE ○ Students learned the basics of Git, and merging ○ Students used Cloud9 IDE to ■ construct an interactive graphical program ■ publish it to the Web using GitHub Pages ● The overall response was fear and dislike ○ Students perceived GitHub and Cloud9 IDE as overly complex and cumbersome to use ○ JSBin was their most preferred tool overall
  • 24. Case Study: An Interactive Graphics Course Blog Links to source code in CodeHub The running program embedded directly from CodeHub using an iFrame
  • 25. Case Study: An Interactive Graphics Course Blog Comments allowed students to showcase their work and collaborate
  • 26. Case Study: An Interactive Graphics Course Blog A starting point for graphics programming was provided.
  • 27. Shortcomings ● Apps do not have names ○ So the list of scripts includes things like "12.4" ○ Perhaps apps should have names ● Modules are in a single global namespace ○ So modules for specific applications might use "appName.moduleName" for the module name ● Modules are editable by anyone ○ Therefore breakable by anyone ○ No built-in concept of ownership or authorship ● Trumped by JSBin in terms of usability ○ CodeHub needs the "Auto-run JS" feature
  • 28. Future Work ● A "showcase" feature ○ Apps can be showcased on their own page ○ Including a comments section ○ This would enable discussion-based collaboration ● The "Auto-run JS" feature from JSBin ● Visualization of dependencies and apps ○ The content of CodeHub is difficult to navigate ○ A node-link visualization of the dependency graph would be useful for navigation ● A documentation editor ○ Each module could have documentation ○ This would make CodeHub more usable ● Implementation of Information Visualization software within CodeHub