All Projects → dragome → dragome-sdk

dragome / dragome-sdk

Licence: Unknown, Apache-2.0 licenses found Licenses found Unknown LICENSE Apache-2.0 dragome-LICENSE.txt
Dragome is a tool for creating client side web applications in pure Java (JVM) language.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to dragome-sdk

imgui-java
JNI based binding for Dear ImGui
Stars: ✭ 270 (+241.77%)
Mutual labels:  binding, jvm
gchisto
GC日志分析工具,网上不容易找到源码,这里备份一个。不确定工具是否正确,不确定是否有时间研究。
Stars: ✭ 32 (-59.49%)
Mutual labels:  jvm
doc
QuickPerf documentation: https://github.com/quick-perf/doc/wiki/QuickPerf
Stars: ✭ 22 (-72.15%)
Mutual labels:  jvm
LLVM-JVM
[W.I.P] A Just-In-Time Java Virtual Machine written in Haskell
Stars: ✭ 22 (-72.15%)
Mutual labels:  jvm
pitifulvm
A shabby implementation of Java virtual machine in C
Stars: ✭ 124 (+56.96%)
Mutual labels:  jvm
necktie
Necktie – a simple DOM binding tool
Stars: ✭ 43 (-45.57%)
Mutual labels:  binding
Kaguya
C++ binding to Lua
Stars: ✭ 247 (+212.66%)
Mutual labels:  binding
jstackSeries.sh
Script for capturing a series of thread dumps from a Java process using jstack (on Linux and Windows)
Stars: ✭ 28 (-64.56%)
Mutual labels:  jvm
luacc
Lua Code Combine
Stars: ✭ 36 (-54.43%)
Mutual labels:  binding
jsvm
Embeddable JavaScript Virtual Machine interface for Android, powered by Duktape.
Stars: ✭ 18 (-77.22%)
Mutual labels:  binding
mleap
R Interface to MLeap
Stars: ✭ 24 (-69.62%)
Mutual labels:  jvm
java-server-sdk
LaunchDarkly Server-Side SDK for Java
Stars: ✭ 71 (-10.13%)
Mutual labels:  jvm
Computer-Science-Learn-Notes
CS(Computer Science)生涯:读书笔记,集成Java知识体系!(Java基础、JVM、JUC、Spring系列、面试八股文、力扣刷题笔记,数据结构和算法、SpringBoot整合其他框架等)
Stars: ✭ 141 (+78.48%)
Mutual labels:  jvm
VIZIA
A declarative GUI library written in Rust
Stars: ✭ 551 (+597.47%)
Mutual labels:  binding
sconfig
Scala configuration library supporting HOCON for Scala, Java, Scala.js, and Scala Native
Stars: ✭ 99 (+25.32%)
Mutual labels:  jvm
Rustler
Safe Rust bridge for creating Erlang NIF functions
Stars: ✭ 3,052 (+3763.29%)
Mutual labels:  binding
play-scala-fileupload-example
An example Play application showing custom multiform fileupload in Scala
Stars: ✭ 29 (-63.29%)
Mutual labels:  jvm
haskell-tree-sitter
Haskell bindings for tree-sitter
Stars: ✭ 123 (+55.7%)
Mutual labels:  binding
odin-imgui
Odin binding for Dear ImGui
Stars: ✭ 37 (-53.16%)
Mutual labels:  binding
java2typescript
Java Processor to generate Typescript Definition from Java classes - This is to help developing on JVM javascript engine (ie Nashorn) using Typescript
Stars: ✭ 24 (-69.62%)
Mutual labels:  jvm

Join the chat at https://gitter.im/dragome-sdk/

What is Dragome?

Dragome is an open source tool for creating client side web applications in pure Java (JVM) language.
Based on bytecode to javascript compilation, you can execute applications written in Java directly on browsers.
You may use your favorite IDE, your favorite Java frameworks and tools because Dragome is totally transparent.


See it in action: how Eclipse and Chrome interact on debug mode and production mode.

ScreenShot

Also take a look at these example applications


Why Dragome

  • Full Java stack web applications, code everything in Java (server side and client side). It will be transformed to javascript automatically.
  • Fast GUI development using components, builders and two-way databinding, using similar AngularJs concepts.
  • Debug mode for debugging in your favorite Java IDE.
  • No IDE plugins or browser plugins required.
  • Java 8 ready. Build your pages using lambda expressions, default methods, streams
  • You can use Dynamic Proxies and Java Reflection API
  • Get rid of callbacks hell: Make async calls with no callbacks! How? See Callback Evictor Tool!
  • Use continuation in your development: you can pause your resulting js program and continue it whenever you need.
  • Unit testing integration: you can also run your Junit tests on a browser.
  • Javascript native interface for low level component construction.
  • Very powerful template engine. No logic in HTML files, only ids for locating templates placeholders.
  • ... more at Features

Also see Dragome Todos for more info about the future


Dragome SDK modules

Dragome SDK can be divided into following six major parts:

  • Bytecode to JavaScript compiler : Dragome compiler is used to translate all the application code written in Java into JavaScript. Within compilation process there is a bytecode instrumentation chain that could be configured to add your custom manipulations. Examples of this configuration are CallbackEvictor and MethodLogger plugins, which add javaflow enhancer and custom ASM enhancer to achieve each functionality.
  • JRE Emulation library : Dragome includes a library that emulates a subset of the Java runtime library. Including metaprogramming tools such as reflection and dynamic proxies.
  • GUI Toolkit: The toolkit contains a set of visual basic components such as: Button, Label, Checkbox, Radiobutton, List, Combo, Panel, etc. These components works together with a template engine capable of locating them into HTML logicless templates. Components and template engine are totally decoupled from HTML and css, allowing the addition of other UI targets such as Android, IOS, wxWidgets, etc in a near future.
  • Form Bindings: Based on gwt-pectin project this module provides easy data bindings capabilities. It uses a declarative style API (guice style) for defining the models, commands and forms as well as binding them to components. In addition to gwt-pectin classes there is a small layer named "component builder" that helps to create components and binding with less effort.
  • Callback evictor: In charge of getting rid of callback hell, it uses bytecode instrumentation and dynamic proxies to do it.
  • Method logger: Simple method interceptor for automatic model changes detection, it also make use of bytecode instrumentations. It's commonly used by component builder layer to detects model changes in two-ways databinding.

Execution modes

Dragome provides two execution modes, production mode for executing everything in client side, and debug mode that executes all in Java Virtual Machine without compiling to javascript and make remotes updates to browser DOM.


SDKs comparison

Features Dragome GWT
Generates js from bytecode (produced by several JVM languages) java source code
Requirements for debug Any modern browser, no plugin required for IDE or browser IDE plugin and Browser plugin, not available for all browsers
JDK changes impact Almost no impact because bytecode rarely changes Big impact in every new JDK version because java syntax changes frequently
Incremental compiler yes -
Java 8 Lambda expressions, Stream API, default methods, and static interface methods available not supported
Continuation yes (through javaflow) -
Reflection yes -
Dynamic Proxies yes -
Bytecode instrumentation yes -
DOM level debug yes -
Code permutations - yes
Split compiling - yes
Template Engine yes -
Two-way databinding for UI yes -
Make async calls with no callbacks yes -
Decouple from HTML/CSS using abstractions yes -

Learn how to bind components in Dragome in 5'


###Start working with Dragome

Using maven archetype

mvn archetype:generate -DarchetypeGroupId=com.dragome -DarchetypeArtifactId=simple-webapp-archetype -DarchetypeVersion=1.0 -DgroupId={your-package-name} -DartifactId={your-app-name}

Using maven dependency in your project

<dependency>
  <groupId>com.dragome</groupId>
  <artifactId>dragome-sdk</artifactId>
  <version>0.95.1-beta1</version>
  <type>pom</type>
</dependency>

Clone and build

How to build the SDK


Setup example application

Setup your application


###How is programming web apps with Dragome? pure Java, pure HTML, runs as js inside browser!

Debug your application in Java with your favorite IDE

ScreenShot


Want to contribute?

  • Fork the project on Github.
  • Create an issue or fix one from the issues list.
  • Share your ideas or ask questions on mailing list - don't hesitate to write a reply - that helps us improve javadocs/FAQ.
  • If you miss a particular feature - browse or ask on the mailing list - don't hesitate to write a reply, show us a sample code and describe the problem.
  • Write a blog post about how you use or extend Dragome.
  • Please suggest changes to javadoc/exception messages when you find something unclear.
  • If you have problems with documentation, find it non intuitive or hard to follow - let us know about it, we'll try to make it better according to your suggestions. Any constructive critique is greatly appreciated. Don't forget that this is an open source project developed and documented in spare time.

###Take a look at the following source code:

This is the complete source code for a simple hello world application using a service.

For more details see Hello World Application

Service definition

public interface HelloWorldService
{
	public abstract String getGreetingsFor(String name);
}

Service implementation

public class HelloWolrdServiceImpl implements HelloWorldService
{
	public String getGreetingsFor(String name)
	{
		return "Hello " + name + "! (" + new Date() + ")";
	}
}

Service consumer - GUI

public class HelloWorldPage extends DragomeVisualActivity
{
	HelloWorldService helloWorldService= serviceFactory.createSyncService(HelloWorldService.class);

	public void build()
	{
		final VisualLabel<String> label= new VisualLabelImpl<String>("message");
		final VisualButton button= new VisualButtonImpl("button", v -> label.setValue(helloWorldService.getGreetingsFor("World")));
		mainPanel.addChild(label);
		mainPanel.addChild(button);
	}
}

HTML

<html>
<head>
<script type="text/javascript" src="dragome/dragome.js"></script>
</head>

<body>
	Message: <b data-template="message">text</b> <br>
	<button data-template="button">Say hello!</button>
</body>

</html>
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].