Coder Social home page Coder Social logo

jsoagger / jsoagger-fx Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 2.0 26.56 MB

Build JavaFX (ios, Android, Desktop, Embedded) client applications. JSoaggerFX generates views from JSON files.

Home Page: http://www.jsoagger.tech

License: Apache License 2.0

Shell 0.02% Java 86.59% Batchfile 0.02% CSS 13.30% HTML 0.07%
java javafx11 xml json javafx12 okhttp rest responsive-design mobile gluonhq-javafx

jsoagger-fx's Introduction

                                                                                    License

Concept

« JSoaggerFX » concept is to build JavaFX IHM from « XML » or « JSON » configuration file.

Each node on the scene is a reusable, configurable and injectable component, described by a configuration file.

The visual IHM is a group of independent components, integrated at runtime by a dependency injection Framework. By default we use « Spring Framework » to assemble the view at runtime. But application framework have been configured to support custom IOC framework.

Builded UI is Responsive, Adaptative and material designed. It can be easily connected to remote cloud server.

View Processor

With JSoaggerFX, views are described by XML/JSON files and processed by JSoaggerJFX processor.

That's why « JSoaggerFX » upon JavaFX gives developers ability to quickly realise multiplatform application and reuse components as library through mutiple projects.

Bean Instances management and IOC

JSoaggerFX uses a container to manage bean instance. Best practice is to not intanciate manually a component but get an instance from bean manager.

IComponent component = Services.getBean("MyTableViewIdentifier");
component.build(controller, configuration);

JSoaggerFX can be launched with Spring framework as IOC container and bean instances manager. All spring XML configuration files are already packaged inside framework.

    ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext();
    context.setConfigLocation("classpath:get-started-application-context.xml");
    context.refresh();
    context.registerShutdownHook();

    this.viewStructure = (ViewStructure) Services.getBean("platformViewStructure");
    this.viewStructure.buildStructure();

In fact Spring is a RUNTIME ONLY DEPENDENCY, i.e, there is no spring annotation nor spring class used inside framework, except the application launcher.

Components configuration overriding

JSoaggerFX uses XMLCombiner to manage component XML configuration. XMLCombiner gives us ability to merge multiple XML files while removing/adding nodes in output file.

It gives us the ability te reuse and by the way override some attributes of a component, while keeping the source code clean and maintenable.

Example, display the same view without primary menu

  1. The view With primary menu
<view id="Root" combine.keys="id">
	<component id="Content" combine.keys="id">
		<properties combine.keys="name">
			<property name="headerView" value="PrimaryHeaderToolbarView" />
			<property name="primaryMenuView" value="PrimaryMenuView" />
			<property name="contentRootStructure" value="GetStartedRSContentView" />
		</properties>
	</component>
</view> 
  1. Same view Without primary menu
<view id="Root" combine.keys="id">
	<component id="Content" combine.keys="id">
		<properties combine.keys="name">
			<property name="primaryMenuView" combine.self="remove" />
		</properties>
	</component>
</view> 

Responsive and adaptative

Each component can be made responsive and adaptative by defining a responsive matrix. Responsive matrix describes the component behaviour according to its parent width.

<util:list id="NavigationBarResponsiveMatrixDefinition" list-class="java.util.ArrayList" value-type="java.lang.String">
	<value>0:830#0.50:fixed|500:0.50#:minimize:</value>
	<value>830:1000#0.30:0.30:0.40#minimize::</value>
	<value>1000#0.40:0.20:0.40#::</value>
</util:list>

This examples configure header component toolbar to behave like following :

  • minimize the component on its center and set its width to 500
  • set the left node size to 0.50% of remaining
  • set the right node size to 0.50% of remaining

Build

Javafx libraries are not included with JDK11, JavaFX runtime must be configured as maven dependencies.

> java -version
java version "1.8.0_65"
Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)
mvn package 

Running the demo application

Demo application shows part of JSoaggerFX capabilities.

  • Download a version of the demo for your OS from following links:

 

Platform Status Download Demo
MacOs Build Status Download
Linux Build Status Download
Windows Build Status Download

 

  • Unzip it
> unzip jsoagger-jfxcore-demoapp-macos-11.0.3.zip

> cd jsoagger-jfxcore-demoapp-macos-11.0.3
  • Run
> run.sh desktop

> run.sh mobile

> run.sh xpad
DESKTOP PAD

 

MOBILE

Links

JSoaggerFX Wiki

JSoaggerFX components library

Creating cross platform Java application

Creating mobile application with JSoaggerFX

Project

Contributing

contributions welcome

Please read [CONTRIBUTING.md] for details on our code of conduct, and the process for submitting pull requests to us.

Authors

Licence

License This project is licensed under Apache Licence V2

jsoagger-fx's People

Contributors

rmvonji avatar

Stargazers

 avatar

Watchers

 avatar

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.