Web-based IDE requirements

Current (proof of?) concept:

  • There is a remote object that does the following things:
    • Create an OS account for new users with constrained, but developer-compatible permissions on the host.
    • Starts a Telnet session to localhost that logs into the  user’s account
    • Channels the Telnet session back to the user
    • Has a set of components that handle the particulars of the following:
      • Creating a user account on Windows
      • Creating a user account on Linux
      • Parsing output from the compiler (maven)
      • Parsing output from the debugger
        • Debugging the client Flex code is an issue. What does the debugger run in? How does it connect to the browser? There is a command-line debugger for ActionScript. Do we run it in an Air App? A Servlet? A webstart component? It is a jar file, so it might work most easily ain a java context. A bit ugly though.
        • There is this thing: http://djproject.sourceforge.net/ns/ Which runs everything inside a webstart java app. This could work for everything, but it goes down an avenue that isn’t that popular now
        • Flashbug (http://blog.coursevector.com/flashbug/https://addons.mozilla.org/en-US/firefox/addon/14465/) is a more fashionable approach. Need to look into Firefox plugin development to see if it’ll work
  • Thoughts:
    • How to handle the differences between Windows and *nix? Does the Windows interface only run through Cygwin?
    • Is Telnet the right way to do this? It gives us a bunch of stuff for free, but I wonder if the Telnet port is shut down, is it still visible to localhost? SSH is a viable alternative, though.
    • The reason that this is done is that it is the only way that I can think of to give directory navigation to a user that will always work, without exposing other users to risks. This way, all code that is run in the user’s session is run with the user’s permissions, which means that it would be impossible to successfully run System(“rm -rf /*”);.
    • First implementation should be a straight TTY console. This should work with regular text, but I’m not sure what’s going to happen with non-standard keys. For example, what happens with VI/Emacs?

Later, after the IDE is working enough…

  • Once we have the ability to develop server-side code, we will need a way to deploy it. In looking at the Apache HTTP server documentation, it looks like there are ways to programatically create virtual servers dynamically. In our case, a virtual server would be provisioned with the following:
    • MySql
    • Tomcat (with xampp?)
    • I guess the developer gets to choose the name of the subdomain and the passwords for various things.
    • When the developer whats to try something out, the IDE manager creates a WAR file and deploys that to that particular server. If there is a problem, then the server is deleted and relaunched. The IDE should have access to the log files from the virtual server so that the developer can track what’s going on.

Some examples of web-based editors and such

Full set of components for IDE

  • Code Editor
    • Edit (Multiple windows in a single project
    • Compile
    • Link
    • Within-IDE execution
      • Server side
        • Do we need a sandbox?
      • Client side
        • Creation of the executable (swf) and the execution in your browser (new tab, within the console, or something else?)
  • Debugger
    • Starting with compile error line indication, then rolling in more capability. The following items may be helpful
    • Xray ( The AdminTool ) – Logging/debug/Runtime SWF controller
    • DebugIt – Displays traced data in a seperate SWF so you can debug outside of Flash, while running your application in its shell/production environment.
    • Print_r Debugger – Brings PHP‘s “print_r” to Flash, invaluable once you start to use it. Free, Complete Source Available
    • flashbug – Debug flash with Firebug
  • Version Control
  • Project Build Management (i.e. maven)
    • Maven requires that files live in files and not in a DB. That does mean more complex file management (folder naming, etc.)
  • Security
    • Access to server in impermissible ways (i.e. directory listings, etc. Addressed somewhat in the current ScriptEngine
    • Contamination of one execution environment with another. This shouldn’t be a problem if the code is running in its own jvm?
    • Should we write and compile java rather than an interpreted language like jython?
  • Execution
    • Client
      • Console window
      • Problems window others?
    • Server
      • Task scheduling (Servlet-like?)

Other Thoughts

  • Tying this into our current architecture would require some additional server behavior beyond the storage and retrieval of data that we are currently working with. Is this handled by specifying a different endpoint and having the java code deal with the SQL-ish interface that will be the default? Or do we do something more code specific.
  • For something else, there is Haxe, which is a platform independent language that compiles down to .js, .php, .swf etc. Yes, it’s odd. But they do address this . Not sure how it would deal with additional libraries. Flashdevelop, which is an open source (C#) project that has a lot of components to deal with the IDE parts (in a thick-client way).
  • The way to begin this might be to make a client-side servlet that handles interfacing with system commands in the way that MavenAssist does – by using the exec command and capturing the output for analysis.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: