{"id":15069821,"url":"https://github.com/dragome/dragome-sdk","last_synced_at":"2025-04-10T17:33:53.418Z","repository":{"id":18115706,"uuid":"21189569","full_name":"dragome/dragome-sdk","owner":"dragome","description":"Dragome is a tool for creating client side web applications in pure Java (JVM) language.","archived":false,"fork":false,"pushed_at":"2022-12-23T18:11:54.000Z","size":8213,"stargazers_count":80,"open_issues_count":53,"forks_count":20,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-09-30T13:41:28.053Z","etag":null,"topics":["binding","bytecode","compiler","dynamic-proxies","gui","java","jvm","reflection"],"latest_commit_sha":null,"homepage":"http://www.dragome.com","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dragome.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-06-25T03:51:50.000Z","updated_at":"2024-03-31T14:14:57.000Z","dependencies_parsed_at":"2022-09-09T20:20:52.021Z","dependency_job_id":null,"html_url":"https://github.com/dragome/dragome-sdk","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragome%2Fdragome-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragome%2Fdragome-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragome%2Fdragome-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dragome%2Fdragome-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dragome","download_url":"https://codeload.github.com/dragome/dragome-sdk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219854827,"owners_count":16556182,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["binding","bytecode","compiler","dynamic-proxies","gui","java","jvm","reflection"],"created_at":"2024-09-25T01:44:52.794Z","updated_at":"2024-10-13T04:20:39.289Z","avatar_url":"https://github.com/dragome.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Join the chat at https://gitter.im/dragome-sdk/](https://badges.gitter.im/dragome-sdk.svg)](https://gitter.im/dragome-sdk?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n# What is Dragome?\nDragome is an open source tool for creating client side web applications in pure Java (JVM) language.  \nBased on bytecode to javascript compilation, you can execute applications written in Java directly on browsers.  \nYou may use your favorite IDE, your favorite Java frameworks and tools because Dragome is totally transparent.  \n\n----------\n\n### See it in action: how Eclipse and Chrome interact on debug mode and production mode.\n[![ScreenShot](doc/crud-debugging-screenshot.jpg)](http://youtu.be/WyseTuRZkNk)\n\nAlso take a look at these [example applications](https://github.com/dragome/dragome-examples) \n\n----------\n\n## Why Dragome\n* Full Java stack web applications, code everything in Java (server side and client side). It will be transformed to javascript automatically.\n* Fast GUI development using components, builders and two-way databinding, using similar AngularJs concepts.\n* Debug mode for debugging in your favorite Java IDE.\n* No IDE plugins or browser plugins required.\n* Java 8 ready. Build your pages using lambda expressions, default methods, streams\n* You can use [Dynamic Proxies][2] and [Java Reflection API][3]\n* Get rid of callbacks hell: Make async calls with no callbacks! How? See [Callback Evictor][4] Tool!\n* Use continuation in your development: you can pause your resulting js program and continue it whenever you need.\n* Unit testing integration: you can also run your Junit tests on a browser.\n* Javascript native interface for low level component construction.\n* Very powerful template engine. No logic in HTML files, only ids for locating templates placeholders.\n* ... more at [Features][5]\n\n\nAlso see [Dragome Todos](doc/todos.md) for more info about the future\n\n----------\n\n## Dragome SDK modules\nDragome SDK can be divided into following six major parts:\n\n* **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.\n* **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.\n* **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.\n* **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.\n* **Callback evictor**: In charge of getting rid of callback hell, it uses bytecode instrumentation and dynamic proxies to do it.\n* **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.\n\n### Execution modes\nDragome 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. \n\n----------\nSDKs comparison\n\n\n| Features  |Dragome|GWT|\n|:---------|:-----------------------|:----|\n| Generates js from | bytecode (produced by several JVM languages) | java source code\n| Requirements for debug | Any modern browser, no plugin required for IDE or browser | IDE plugin and Browser plugin, not available for all browsers\n| JDK changes impact | Almost no impact because bytecode rarely changes | Big impact in every new JDK version because java syntax changes frequently\n| Incremental compiler | yes | -\n| Java 8 | Lambda expressions, Stream API, default methods, and static interface methods available | not supported\n| Continuation | yes (through javaflow) | -\n| Reflection | yes | -\n| Dynamic Proxies | yes | -\n| Bytecode instrumentation | yes | -\n| DOM level debug | yes | -\n| Code permutations | - | yes\n| Split compiling | - | yes\n| Template Engine | yes | - \n| Two-way databinding for UI | yes | -\n| Make async calls with no callbacks | yes | -\n| Decouple from HTML/CSS using abstractions | yes | -\n\n\n----------\n\n[Learn how to bind components in Dragome in 5'][1]\n\n----------\n\n###Start working with Dragome\n#### Using maven archetype\n```shell\nmvn archetype:generate -DarchetypeGroupId=com.dragome -DarchetypeArtifactId=simple-webapp-archetype -DarchetypeVersion=1.0 -DgroupId={your-package-name} -DartifactId={your-app-name}\n```\n----------\n\n#### Using maven dependency in your project\n``` xml\n\u003cdependency\u003e\n  \u003cgroupId\u003ecom.dragome\u003c/groupId\u003e\n  \u003cartifactId\u003edragome-sdk\u003c/artifactId\u003e\n  \u003cversion\u003e0.95.1-beta1\u003c/version\u003e\n  \u003ctype\u003epom\u003c/type\u003e\n\u003c/dependency\u003e\n```\n----------\n\n#### Clone and build\n[How to build the SDK][6]\n\n----------\n\n#### Setup example application\n[Setup your application](doc/app-setup.md)\n\n----------\n\n###How is programming web apps with Dragome?\n**pure Java, pure HTML, runs as js inside browser!**\n\n\n### Debug your application in Java with your favorite IDE\n[![ScreenShot](doc/crud-debugging-screenshot.jpg)](http://youtu.be/ktlMWKNVhgo)\n\n\n----------\n\n### Want to contribute?\n\n* Fork the project on Github.\n* Create an issue or fix one from the [issues list](https://github.com/dragome/dragome-sdk/issues).\n* Share your ideas or ask questions on mailing list - don't hesitate to write a reply - that helps us improve javadocs/FAQ.\n* If you miss a particular feature - browse or ask on the [mailing list](https://groups.google.com/d/forum/dragome) - don't hesitate to write a reply, show us a sample code and describe the problem.\n* Write a blog post about how you use or extend Dragome.\n* Please suggest changes to javadoc/exception messages when you find something unclear.\n* 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.\n\n----------\n\n###Take a look at the following source code:\n\nThis is the complete source code for a simple hello world application using a service. \n\nFor more details see [Hello World Application][7]\n\n**Service definition**\n``` Java\npublic interface HelloWorldService\n{\n\tpublic abstract String getGreetingsFor(String name);\n}\n```\n\n**Service implementation**\n``` Java\npublic class HelloWolrdServiceImpl implements HelloWorldService\n{\n\tpublic String getGreetingsFor(String name)\n\t{\n\t\treturn \"Hello \" + name + \"! (\" + new Date() + \")\";\n\t}\n}\n```\n\n**Service consumer - GUI**\n``` Java\npublic class HelloWorldPage extends DragomeVisualActivity\n{\n\tHelloWorldService helloWorldService= serviceFactory.createSyncService(HelloWorldService.class);\n\n\tpublic void build()\n\t{\n\t\tfinal VisualLabel\u003cString\u003e label= new VisualLabelImpl\u003cString\u003e(\"message\");\n\t\tfinal VisualButton button= new VisualButtonImpl(\"button\", v -\u003e label.setValue(helloWorldService.getGreetingsFor(\"World\")));\n\t\tmainPanel.addChild(label);\n\t\tmainPanel.addChild(button);\n\t}\n}\n```\n\n**HTML**\n``` Html\n\u003chtml\u003e\n\u003chead\u003e\n\u003cscript type=\"text/javascript\" src=\"dragome/dragome.js\"\u003e\u003c/script\u003e\n\u003c/head\u003e\n\n\u003cbody\u003e\n\tMessage: \u003cb data-template=\"message\"\u003etext\u003c/b\u003e \u003cbr\u003e\n\t\u003cbutton data-template=\"button\"\u003eSay hello!\u003c/button\u003e\n\u003c/body\u003e\n\n\u003c/html\u003e\n```\n\n\n  [1]: doc/simple-examples.md#DRAGOME%205'%20TUTORIAL\n  [2]: http://docs.oracle.com/javase/7/docs/api/java/lang/reflect/Proxy.html\n  [3]: http://docs.oracle.com/javase/tutorial/reflect/\n  [4]: doc/callback-evictor.md\n  [5]: doc/features.md\n  [6]: doc/how-to-build.md\n  [7]: doc/helloworld-app.md\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdragome%2Fdragome-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdragome%2Fdragome-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdragome%2Fdragome-sdk/lists"}