Giter Site home page Giter Site logo

scalaide's Introduction

ScalaIde

Is a web-based IDE for the Scala Language. For the frontend html5 is used with especially websockets; in the backend the play framework is used, which is implemented in Scala.

It is originated as a teamproject at the department of computer science at University of Applied Sciences, Constance, Germany.

Thanks to Dirk, he had previously implemented the compiler-binding. We ported it to Play 2.0.

ScalaIde Screenshot

ScalaIde with a bigger Project opened:

ScalaIde Screenshot bigger Project

Features:

  • Multiple users
  • Each users has a project
  • Automatic compiling for error detection and notice
  • File tree
  • Editor
  • Terminal-Shell (ssh connection)

Browser Support (Tested on):

  • Firefox 13.0.1 (Windows)
  • Safari 5.1.7 (Mac OS X)

Used technologies:

This project is optimized for running on UNIX and UNIXlike systems -- especially for the Terminal feature. If you run it on Windows, the Terminal will be deactivated.

Installation

Steps to do, before you can run ScalaIde.

Mac OS X

Instructions for installing Homebrew.

Instructions for installing Scala.

brew install scala sbt maven giter8
brew install play

Debian or Ubuntu

Instructions for installing Scala.

wget http://apt.typesafe.com/repo-deb-build-0002.deb
dpkg --install repo-deb-build-0002.deb 
apt-get update
apt-get install typesafe-stack
apt-get install openjdk-6-jdk  # we need also javac!

Play Framkework Download

cd ~
wget http://download.playframework.org/releases/play-2.0.1.zip
unzip play-2.0.1.zip
# add play to your PATH, via default $HOME/bin is already in your PATH
mkdir bin
ln -s $HOME/play-2.0.1/play bin/play

Windows

Click something here and click something there…

Configuration

Basic Configuration (without terminal support)

If you want to run ScalaIde on Windows there is no terminal support yet and on UNIX if you disable the terminal, you can save much configuration effort.

In conf/application.conf set the flag terminal.support=true if you want to enable terminal support, else let the default value terminal.support=false.

Via default a projectspaces folder is created, where every user has his own folder (relative path in conf/evolutions/2.sql file) with source code files and maybe additional jar-files fetched automatically via sbt update at user login. Therefore the login may take some seconds!

If you want run the server on Windows you must provide in conf/application.conf the path to the bat-file, which stats sbt. Change this flag: sbt.windows.path="C:/path/to/sbt.bat".

To compile code the scala compiler is needed in form of jar-files. The play framework delivers this. In conf/application.conf you must set a flag to the main folder of your downloaded play installation: framework.directory="/path/to/play-2.0". In this example the play-executable would be in /path/to/play-2.0/play.

Advanced Configuration

If you want terminal support, there may be more configuration effort. Especially terminal support is only on UNIX (like Debian, Mac OS X) available yet.

If you enable the terminal (set in conf/application.conf the flag terminal.support=true, default ist false) we assume, you have a real operating-system user for every user in the database. The OS-user must be available via ssh. Users email is also ssh loginname and users password is also the ssh password. (Users marked as public have never terminal access/support.) Further we assume the home of the user is his project path, and only one project per user is allowed yet! Set an absolute path (path to the user's home) and set the flag, that's an absolute path is set.

You can set the users in conf/evolutions/2.sql.

Because of the OS-useres you have more configuration, with groups and rights. Example: One OS-user (the master user) starts the ScalaIde and the client user can login through the Ide and have their own scope and can not kill the ScalaIde-Server. But the master user must have access (read, write) to the client user files!

Run It

Reminder: Change in conf/application.conf

  • the variable framework.directory to the play-main-folder,
  • windows users must set sbt.windows.path,
  • if you want terminal support set terminal.support -> more configuration effort!

Lets begin, type in your shell:

git clone git://github.com/themerius/ScalaIde.git
cd ScalaIde
play run

Open your websocket-ready browser at http://localhost:9000.

You will be asked if you want to create the bootstrap database, with three default users:

If you want to create the database direcly, instead of play run, call play like this:

play -DapplyEvolutions.default=true start

To manage the databse:

play h2-browser run

Limits

  • One project per user

scalaide's People

Contributors

themerius avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

scalaide's Issues

tabs and mac os x

If you click on a tab to switch to it, nothing happens. Mac OS X, with Safari/Chrome/Firefox. The close buttons works!

sbt jar files

Include dependency-jar-files generated from sbt into ScalaIde's compiler, so it can check also the external librarys etc.

tab completion

In the ace-editor you should be able to tab-complete the project-file-contents.

Headless Eclipse / SBT / Dirk's PH

Mal das eclim anschauen. Wie kommuniziert das? Was kann man da alles rausholen / abfangen? Insbesondere wie bekommt man da die statische Code-Analyse raus?

Andere Ansätze:

  • SBT Plugin? Wie hat das z.B. Play Framework gemacht? Stichwort: sbt.PlayReloader
  • Dirk

user login

Allow multiple users with their own project-spaces.

Terminal-Anbindung

Wie können wir eine Terminal-Anbindung realisieren?

Gibt es schon Webfrontends für Terminal-Sessions (bash / ssh) in JavaScript?

Sollen wir das indirekt über Play regeln? Wie kann man Befehle vom Frontend an das Server-Terminal senden? Wie kann man den Terminal-Text wieder an das Frontend leiten? Gibt es für so was Scala-Librarys?

browser support

Mac platform

runs on safari fine (with terminal)
on firefox runs also fine (without terminal)

chrome and opera don't render all!

Windows platform

firefox works fine. And the others?

Maintained?

Hi Guys,

I just wanted to check if this repo was maintained at all?

js unittests

Introduce unittests for client-side javascripts. But first research the various js-testing libraries!

concurrent websocket

Make websocket concurrent, so that more than one user (anonymous and logged in) can view the page.

Maybe akka.actors for internal communication?

fast writing

If I write very quick my source code and the changed file is send to fast to the server, he can't handle it so fast. I think, we send the new file to a blocked compiler process, which is busy with compiling the last changed file, and this causes Errors and the hole system will stop with working.

Play + Ace

Play benutzt als Editor-Frontend http://ace.ajax.org/

Das soll erstmal so umgesetzt werden, dass Play eine Datei öffnet und diese Ace anzeigen lässt. Dann soll man im Browser diese Datei bearbeiten können, anschließend speichern -- so dass auf dem Server (da wo Play ausgeführt wird) die überarbeitete Datei zu finden ist.

Falls Ace sich als unpraktisch herausstellt, müssen wir uns halt was anderes ausdenken.

clear user's memory

Every time a (new) user connects, memory will be reserved. But if the user looses the connection to the websocket the memory will remain reserved -> this causes to swell server's memory.

Solution: Every time an user disconnects or looses the connection from the websocket, free up the memory of this user!

os separator

Replace all Windows "" separators to UNIX "/" separators, because Windows can handle "/" and otherwise error can occur.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.