Skip to content

World's lightest toolkit to quickly and easily add a GUI to your Java programs and bring them online.

License

Notifications You must be signed in to change notification settings

epeios-q37/atlas-java

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

The Atlas toolkit is available for:

Java Node.js Perl Python Ruby

To see the Atlas toolkit in action:

Version 0.13

Java version of the Atlas toolkit

Version 0.13 license: MIT Documentation

A GUI with Java in a couple of minutes

Click the animation to see a screencast of programming this "Hello, World!" program with Java in a matter of minutes:

Building a GUI in with Java in less then 10 minutes

Same video on Peertube: https://s.q37.info/qs4dx4rm.

Click to see the corresponding source code
import info.q37.atlas.*;

class Hello extends Atlas {
 private static String BODY =
  "<fieldset>" +
  " <input id=\"Input\" xdh:onevent=\"Submit\" value=\"World\"/>" +
  " <button xdh:onevent=\"Submit\">Hello</button>" +
  " <hr/>" +
  " <fieldset>" +
  "  <output id=\"Output\">Greetings displayed here!</output>" +
  " </fieldset>" +
  "</fieldset>";

  @Override
  public void handle(String action, String id)
  {
    switch(action) {
    case "":
      dom.inner("", BODY);
      break;
    case "Submit":
      String name = dom.getValue("Input");
      dom.begin("Output", "<div>Hello, " + name + "!</div>");
      dom.setValue("Input", "" );
      break;
    }
    dom.focus("Input");
  }

  public static void main(String[] args)
  {
    launch(() -> new Hello());
  }
}

See for yourself right now - it's quick and easy!

  • on Windows (pay attention to the ; on last line):
# You can replace 'github.com' with 'framagit.org'.
# DON'T copy/paste this and above line!
git clone https://github.com/epeios-q37/atlas-java
cd atlas-java/examples/Hello
java -cp .;../../Atlas.jar Hello
  • on other platforms (pay attention to the : on last line):
REM You can replace 'github.com' with 'framagit.org'.
REM DON'T copy/paste this and above line!
git clone https://github.com/epeios-q37/atlas-java
cd atlas-java/examples/Hello
java -cp .:../../Atlas.jar Hello

Your turn

If you want to take your code to the next level, from CLI to GUI, then you found the right toolkit.

With the Atlas toolkit, you transform your programs in modern web applications (SPA) without the usual hassles:

  • no JavaScript to write; only HTML(/CSS) and Java,
  • no front and back end architecture to bother with,
  • no web server (Apache, Nginx…) to install,
  • no need to deploy your application on a remote server,
  • no incoming port to open on your internet box or routeur.

The Atlas toolkit is written in pure Java, with no native code and no dependencies, allowing the Atlas toolkit to be used on all environments where Java is available.

And simply by running them on a local computer connected to internet, applications using the Atlas toolkit will be accessible from the entire internet on laptops, smartphones, tablets…

Content of the repository

The atlastk directory contains the Java source code of the Atlas toolkit.

atlastk.jar is the file you have to reference in the classpath in order to use the Atlas toolkit in your own program.

The examples directory contains some examples.

To run an example, go inside its directory (Blank, Chatroom…) and launch:

  • under Windows: java -cp .;../../atlastk.jar <Name> (with semi-colon as classpath separator),
  • under other platforms: java -cp .:../../atlastk.jar <Name> (with colon as classpath separator).

where <Name> is the name of the example (Blank, Chatroom…).

About

World's lightest toolkit to quickly and easily add a GUI to your Java programs and bring them online.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project