Skip to content

Commit

Permalink
Introduce version 4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
giancosta86 committed Mar 16, 2016
1 parent 69ee953 commit 78bbc72
Show file tree
Hide file tree
Showing 104 changed files with 2,271 additions and 4,990 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.gradle/**
.idea/**
build/**
*.iml
.idea/**
*.iml
875 changes: 201 additions & 674 deletions LICENSE

Large diffs are not rendered by default.

76 changes: 32 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,49 +1,43 @@
# GraphsJ

*Elegant and modern didactic application for running graph algorithms*
*ScalaFX didactic application for running graph algorithms*


## Introduction

GraphsJ is a modern didactic application dedicated to interactively execute graph algorithms; it features both a visual user interface and an SDK to develop *custom scenarios*.
GraphsJ is a modern didactic application dedicated to interactively executing graph algorithms; it features both a visual user interface and a Scenario Development Kit - to create *custom scenarios* based on the [EighthBridge](https://github.com/giancosta86/EighthBridge) toolkit for ScalaFX.

Several students of Operations Research need to easily execute graph algorithms, in order to study them with a "hands-on" approach showing every step: GraphsJ meets this requirement by running, even step-by-step, some well-known algorithms - such as *Dijkstra's shortest path problem* - which often prove to be cross-subject.
Students of Operations Research need to easily run graph algorithms, in order to study them with a practical, step-by-step approach: GraphsJ can meet this requirement for well-known algorithms - such as *Prim's Shortest Spanning Tree* - which often prove to be cross-subject.

On the other hand, research workers want to test their algorithms on a PC, as it's faster and less error-prone, in particular if one wants to perform several tests. However, writing a whole computer program only to test an algorithm is not always at hand - just the creation a GUI is indeed a rather complex, time-consuming task.
On the other hand, researchers may want to test their algorithms on a PC, as it's faster and less error-prone, especially as the number of tests increases; unfortunately, writing a whole computer program only to test an algorithm is not always at hand - just the creation a GUI is a rather complex, time-consuming task.

GraphsJ satisfies both user groups, because it provides an easy-to-use interface as well as a simple Java framework: this means that anyone knowing just a bit of Java can create their own algorithms, without dealing with details such as the creation of a user interface or disk I/O - these features are already provided by the application, so the developer only has to create a few classes, compile them and provide the program with their location, therefore focusing on the business logic making up the algorithms.
GraphsJ satisfies both user groups, providing an easy-to-use interface as well as a minimalist Scala framework: people can therefore focus on the business logic making up their algorithms.

This new version, GraphsJ 3, is mainly oriented to a global refactoring of the software architecture, which is now much simplified and far more elegant; it is based on two open-source libraries developed by me - [Helios](https://github.com/giancosta86/Helios-core) and [Arcontes](https://github.com/giancosta86/Arcontes-core), as well as on a vast set of modern technologies, in particular JavaFX, in order to deliver an enhanced user experience.
This new version, GraphsJ 4, is a ScalaFX-oriented redesign of the original architecture, introducing several concepts from Functional Programming; adding and removing scenarios is also extremely simplified: JAR files copied into a dedicated per-user directory will automatically and immediately provide new scenarios.


## Features

* A modern user interface, based on JavaFX
* *Modern user interface*, employing **ScalaFX**

* Flexible and greatly enhanced canvas to draw and edit your graphs
* *Flexible and vastly enhanced canvas* to draw and edit graphs

* Includes 4 predefined, widely-used algorithms
* ScalaFX-based **SDK**, enabling anyone to easily *create new scenarios*

* Customizable fonts and colors for graph, vertexes and edges. Graphical settings are stored in each scenario file, along with the graph they describe
* **Scenario-discovery engine**, *automatically adding and removing scenarios*

* Java-based SDK, enabling anyone to easily create new scenarios to plug into the program
* *Simplified model*, inspired by **Functional Programming**

* Full source code available, especially for the standard algorithms: developers can create a new algorithm starting from a consolidated base
* *Per-scenario options dialog and help*, customizable by scenario developers

* Per-scenario options dialog and help page, customizable by scenario developers
* **XML-based document files**, to foster *interoperability and compatibility with previous versions*

* XML-based document files, to foster interoperability

* New, redesigned and much more elegant architecture, based on [Helios](https://github.com/giancosta86/Helios-core) and [Arcontes](https://github.com/giancosta86/Arcontes-core).

* Short but complete online help

* Open source and, hopefully, elegant
* **Open source** code available: developers can create a new scenario starting from a consolidated base


## Requirements

Java 8 or later is recommended in order to run GraphsJ or to use its SDK.
Java 8u65 or later is recommended.



Expand All @@ -55,56 +49,50 @@ Otherwise, to start the application:
1. Download and decompress the zip archive
2. Run the file *bin/GraphsJ* (on UNIX) or *bin/GraphsJ.bat* (on Windows)

**Users already having GraphsJ 3 can just run the program: MoonDeploy will automatically update it to GraphsJ 4**


## SDK

GraphsJ SDK is a library providing classes and interfaces to easily create scenarios that you can import and run within GraphsJ.

GraphsJ SDK consists of the following modules:

## Online help

* **graphsj-sdk**: provides classes and interfaces required to create your custom scenarios
GraphsJ features a very user-friendly interface, but ideas and suggestions can be found in the [wiki](https://github.com/giancosta86/GraphsJ/wiki)!

* **graphsj-algorithms**: contains the built-in algorithm classes, whose logic and results can be used within your own algorithms


All the modules are available on [Hephaestus](https://bintray.com/giancosta86/Hephaestus) and can be declared as Gradle or Maven dependencies.
## Scenario development kit

**IMPORTANT**: all the modules provided by the SDK should be referenced as **provided** dependencies, because they are needed only during the compilation of your project, as they are provided by GraphsJ itself at runtime.
For detailed information, please refer to the [SDK project page](https://github.com/giancosta86/GraphsJ-sdk).


## Online help

GraphsJ features a fairly easy-to-use interface, but you can find out more about its commands by looking at the online help, accessible by clicking the menu item *?->Help* within the program.
## Screenshots

You can also consult the [pseudocode](https://github.com/giancosta86/GraphsJ/blob/master/pseudocode.pdf) of the standard algorithms provided by the application.
![Drawing](screenshots/Drawing.png)

![Main window](screenshots/MainWindow.png)

## Examples
![Splash screen](screenshots/SplashScreen.png)

A few example files are available, ready to run within GraphsJ:

[Download the example files](https://github.com/giancosta86/GraphsJ/releases/download/v3.7/GraphsJ_3_Examples.zip)


## Special thanks

Most of the icons in the toolbar are a customization of the [Primo icon set](https://www.iconfinder.com/iconsets/Primo_Icons), by [Double-J Design](http://www.doublejdesign.co.uk/).

Thanks to Paolo Tagliapietra for our interesting chats about architectural and domain-related aspects, as well as for beta testing.

The icons in the menu and toolbar are part of the [Crystal Clear icon set](https://commons.wikimedia.org/wiki/Crystal_Clear), by [Everaldo Coelho](https://en.wikipedia.org/wiki/Everaldo_Coelho).

Special thanks to:

* [Professor Silvano Martello](http://www.or.deis.unibo.it/staff_pages/martello/cvitae.html)
* [Claudia D'Ambrosio](http://www.or.deis.unibo.it/staff_pages/dambrosio/cv_claudia_english.htm)

for their support and advice.
for their suggestions.


## Further references

* [Facebook page](https://www.facebook.com/graphsj)
* [Helios](https://github.com/giancosta86/Helios-core)
* [Arcontes](https://github.com/giancosta86/Helios-core)

* [GraphsJ Scenario Development Kit](https://github.com/giancosta86/GraphsJ-sdk)

* [GraphsJ - Scenarios](https://github.com/giancosta86/GraphsJ-scenarios)

* [EighthBridge](https://github.com/giancosta86/EighthBridge)
69 changes: 27 additions & 42 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,17 @@
===========================================================================
Copyright (C) 2009-2016 Gianluca Costa
===========================================================================
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public
License along with this program. If not, see
<http://www.gnu.org/licenses/gpl-3.0.html>.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
===========================================================================
*/

Expand All @@ -30,44 +28,41 @@ buildscript {
}

dependencies {
classpath 'info.gianlucacosta.moonlicense:moonlicense-gradle:4.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.1'
classpath 'info.gianlucacosta.aurora:aurora:2.1'
classpath 'info.gianlucacosta.moonlicense:moonlicense-gradle:4.0'
}
}


import org.apache.tools.ant.filters.ReplaceTokens

apply plugin: 'java'
apply plugin: 'application'

apply plugin: 'scala'
apply plugin: 'info.gianlucacosta.aurora'
apply plugin: 'application'


group = 'info.gianlucacosta.graphsj'
archivesBaseName = 'graphsj'
version = '3.8'
version = '4.0'

description = 'Elegant and modern didactic application for running graph algorithms'
description = 'ScalaFX didactic application for graph algorithms'

project.ext.facebookPage = 'https://www.facebook.com/graphsj'


mainClassName = "info.gianlucacosta.graphsj3.Main"

mainClassName = "info.gianlucacosta.graphsj.App"


dependencies {
compile 'info.gianlucacosta.helios:helios-xml:1.7'
compile 'info.gianlucacosta.helios:helios-spring:1.7'
compile 'info.gianlucacosta.graphsj:graphsj-algorithms:3.5'
compile 'log4j:log4j:1.2.17'
compile 'info.gianlucacosta.graphsj:graphsj-sdk:4.0'

runtime 'org.slf4j:slf4j-log4j12:1.7.2'
compile 'org.scala-lang:scala-xml:2.11.0-M4'
compile 'com.thoughtworks.xstream:xstream:1.4.8'
compile 'org.reflections:reflections:0.9.10'
}



processResources {
filesMatching('**/App.properties.xml') {
filter ReplaceTokens, tokens: [
Expand All @@ -83,6 +78,7 @@ processResources {
}



startScripts {
def originalWindowsTemplateString = windowsStartScriptGenerator.template.asString()
def javawTemplateString =
Expand All @@ -94,9 +90,8 @@ startScripts {
}



aurora {
docTask = 'javadoc'
docTask = 'scaladoc'
gitHubUser = 'giancosta86'

author {
Expand All @@ -109,28 +104,18 @@ aurora {
user = project.bintrayUser
key = project.bintrayKey
repo = 'Hephaestus'
licenses = ['GPL-3.0']
labels = ['GraphsJ', 'graphs', 'didactic', 'application', 'Java']
licenses = ['Apache-2.0']
labels = ['GraphsJ', 'graphs', 'didactic', 'application', 'Java', 'Scala', 'JavaFX', 'ScalaFX']
}
}


moonLicense {
license = gpl3
license = apache2

productInfo {
productName = 'GraphsJ'
inceptionYear = 2009
copyrightHolder = 'Gianluca Costa'
}
}


task('zipExamples', type: Zip) {
from 'examples'
include '*.gj3'


archiveName = 'GraphsJ_3_Examples.zip'
destinationDir = new File("${project.buildDir}/distributions")
}
Binary file removed examples/Example1.gj3
Binary file not shown.
Binary file removed examples/Example2.gj3
Binary file not shown.
Binary file removed examples/Example3.gj3
Binary file not shown.
Binary file removed examples/Example4.gj3
Binary file not shown.
Loading

0 comments on commit 78bbc72

Please sign in to comment.