A Javafx Library for building MVC Applications.

Overview

A JavaFx Library For Making MVC Type Desktop Applications Say Thanks! Readme Score

Installation

  • requires Java jdk > 7 for windows
  • requres openjdk-7 or 8 and openjfx for linux

Download the Binaries and Jar file

Or Clone the repo

git clone https://github.com/othreecodes/APX.git

Demo Project

For a sample project check out this repo othreecodes/apxdemo

Adding Directory to PATH

After cloning the repo, Open the binaries folder and add the correct folder to path for your corresponing OS

Also, You will need to add the apx.jar file to your library class path

Starting a new project

Open a terminal (cmd for windows users) in the directory in which you want to start the project and run

apx start MySampleProject

MySampleProject Being the name of your project NB: Do not use java keywords to create a project

Directory Structure

The Project is Structured in such a way as to help you keep track of your where all files are being placed.

  • layout (FXML files) go in the views directory

  • controllers go in the controllers directory

  • Stylesheets go in the stylesheet directory

You get the point eh? Your Project can then be easily imported into your favourite IDE without stress

Heres the best part

There's a project.apxprop file that marks the project as an apx project (Do Not delete or Edit !!!) It contains basic info about your project. With that in place, you can

Generate pages

apx g page Login

This will generate 3 files.

  • A LoginView.fxml automatically Linked to
  • A LoginController.java
  • A LoginStylesheet.css already linked to the LoginView.fxml

Create tables in database (db.sqlite)

Using Sqlite with Java NB: No need to download the jDBC sqlite Driver. Its already included in apx.jar

apx create model database.json

The next parameter after model is the file location of the json file to read from

sample database.json
{
    "table": "user",
    "properties": {
        "username": {
            "type": "string",
            "null": true,
            "unique": true,
            "default":"Anonymous",
            "title":"The Username of the LoggedIn individual",
            "description":"Whatever This is meant to do"
        },
        "pin": {
            "type": "integer",
             "null": true,
            "unique": false,
            "default":1234
        },
        "number": {
            "type":"number",
             "null": true,
            "unique": false
        }

    }
}

will generate

package com.othree.apx;

import com.google.gson.annotations.SerializedName;
import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable(tableName = "user")
public class User {

    /**
     * This is compulsory for both the database and to access models
     * 
     */
    @DatabaseField(generatedId = true, columnName = "id")
    @SerializedName("id")
    private int id;
    /**
     * The Username of the LoggedIn individual
     * <p>
     * Whatever This is meant to do
     * 
     */
    @DatabaseField(columnName = "username", canBeNull = true, unique = true)
    @SerializedName("username")
    private String username = "Anonymous";
    @DatabaseField(columnName = "pin", canBeNull = true, unique = false)
    @SerializedName("pin")
    private int pin = 1234;
    @DatabaseField(columnName = "number", canBeNull = true, unique = false)
    @SerializedName("number")
    private double number;

    /**
     * No args constructor for use in serialization
     * 
     */
    public User() {
    }

    /**
     * 
     * @param number
     * @param pin
     * @param username
     */
    public User(String username, int pin, double number) {
        super();
        this.username = username;
        this.pin = pin;
        this.number = number;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
    }

    /**
     * The Username of the LoggedIn individual
     * <p>
     * Whatever This is meant to do
     * 
     * @return
     *     The username
     */
    public String getUsername() {
        return username;
    }

    /**
     * The Username of the LoggedIn individual
     * <p>
     * Whatever This is meant to do
     * 
     * @param username
     *     The username
     */
    public void setUsername(String username) {
        this.username = username;
    }

    /**
     * 
     * @return
     *     The pin
     */
    public int getPin() {
        return pin;
    }

    /**
     * 
     * @param pin
     *     The pin
     */
    public void setPin(int pin) {
        this.pin = pin;
    }

    /**
     * 
     * @return
     *     The number
     */
    public double getNumber() {
        return number;
    }

    /**
     * 
     * @param number
     *     The number
     */
    public void setNumber(double number) {
        this.number = number;
    }

}

This command will create a single Table with corresponding columns And also create a model file as seen above

Why is apx.jar ~7mb?

This is because in contains certain libraries needed for a simple MVC REST applictaion

  1. GSON: A Java serialization/deserialization library that can convert Java Objects into JSON and back. link to project: Google Gson
  2. SQLite JDBC Driver: SQLite JDBC, developed by Taro L. Saito, is a library for accessing and creating SQLite database files in Java. link to project Xserial SQLite JDBC
  3. Unirest: Unirest in Java: Simplified, lightweight HTTP client library. http://unirest.io/java link to project Mashape Unirest-java
  4. ORMLite Database Library ORMlite.com
  5. JSONSchema2pojo Generates Java types from JSON Schema (or example JSON) and annotates those types for data-binding with Jackson 1.x or 2.x, Gson, etc http://www.jsonschema2pojo.org Project Link

All Libraries Remain work of the original Author

Useful Links and resources

Todos

  • Generate Models (done)
  • Include support for Other databases
  • Make http connections neater
  • A lot... Feel free to contribute.

License

The MIT License (MIT). Please see LICENSE.md for more information.

Copyright (c) 2016 Obi Uchenna David

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software
is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
You might also like...

A library for JavaFX that gives you the ability to show progress on the Windows taskbar.

A library for JavaFX that gives you the ability to show progress on the Windows taskbar.

A clean and easy way to implement this amazing native Windows taskbar-progressbar functionality in javaFX Background Since Windows 7 there is a taskba

Nov 28, 2022

A JavaFX 3D Visualization and Component Library

A JavaFX 3D Visualization and Component Library

FXyz3D FXyz3D Core: FXyz3D Client: FXyz3D Importers: A JavaFX 3D Visualization and Component Library How to build The project is managed by gradle. To

Aug 23, 2020

A library for creating and editing graph-like diagrams in JavaFX.

A library for creating and editing graph-like diagrams in JavaFX.

Graph Editor A library for creating and editing graph-like diagrams in JavaFX. This project is a fork of tesis-dynaware/graph-editor 1.3.1, which is n

Jan 1, 2023

Provides a Java API to use the JavaScript library d3.js with the JavaFx WebView

Provides a Java API to use the JavaScript library d3.js with the JavaFx WebView

javafx-d3 Provides a Java API for using the JavaScript library d3.js with JavaFx Applications. Many thanks to the authors of the projects gwt-d3 [1] a

Dec 19, 2022

Kubed - A port of the popular Javascript library D3.js to Kotlin/JavaFX.

Kubed: A Kotlin DSL for data visualization Kubed is a data visualization DSL embedded within the Kotlin programming language. Kubed facilitates the cr

Dec 28, 2022

A JavaFX library containing tiles that can be used for dashboards.

A JavaFX library containing tiles that can be used for dashboards.

TilesFX A JavaFX library containing tiles for Dashboards. Donations are welcome at Paypal Intro The Tile is a simple JavaFX Control that comes with di

Dec 30, 2022

Flow Visualization Library for JavaFX and VRL-Studio

Flow Visualization Library for JavaFX and VRL-Studio

VWorkflows Interactive flow/graph visualization for building domain specific visual programming environments. Provides UI bindings for JavaFX. See htt

Dec 29, 2022

RXControls is a JavaFX custom component library.

RXControls is a JavaFX custom component library.

RXControls RXControls Version 8.x.y need javafx8 RXControls Version 11.x.y need javafx11+ 一个javafx的自定义组件库, 密码可见组件, 轮播图组件, 动态按钮组件等, 音频频谱可视化组件,歌词组件 等...

Jan 1, 2023

A JavaFX library that contains different kind of charts

A JavaFX library that contains different kind of charts

Charts A library for scientific charts in JavaFX. This is still a work in development, but here are some of the charts being worked on so far. The cha

Jan 2, 2023
Releases(v0.0.2)
Owner
Obi Uchenna David
Talk about greatness whenever you speak about me. engr @cowrywise
Obi Uchenna David
Tray Icon implementation for JavaFX applications. Say goodbye to using AWT's SystemTray icon, instead use a JavaFX Tray Icon.

FXTrayIcon Library intended for use in JavaFX applications that makes adding a System Tray icon easier. The FXTrayIcon class handles all the messy AWT

Dustin Redmond 248 Dec 30, 2022
A 3D chart library for Java applications (JavaFX, Swing or server-side).

Orson Charts (C)opyright 2013-2020, by Object Refinery Limited. All rights reserved. Version 2.0, 15 March 2020. Overview Orson Charts is a 3D chart l

David Gilbert 96 Sep 27, 2022
A 2D chart library for Java applications (JavaFX, Swing or server-side).

JFreeChart Version 2.0.0, not yet released. Overview JFreeChart is a comprehensive free chart library for the Java(tm) platform that can be used on th

David Gilbert 946 Jan 5, 2023
To quickly integrate your applications into the EdgeGallery platform, we provide the toolchain project to help developers quickly modify code and migrate applications to the platform.

Toolchain 工具链 工具链是MEC Developer开发者平台中的一个重要特性,当x86平台的App想要上车ARM平台时,底层的代码不可避免的需要进行修改或重写。 App提供者可以通过MEC Developer开发者平台中集成的工具链进行源代码分析,定位需要修改的源代码并根据指导意见进行修

EdgeGallery 19 Jan 7, 2022
Auto updating launcher for JavaFX Applications

FXLauncher Auto updating launcher for JavaFX Applications. Combined with JavaFX native packaging, you get a native installer with automatic app update

Edvin Syse 694 Dec 27, 2022
A lightweight RCP framework for JavaFX applications.

WorkbenchFX The one and only framework to build large JavaFX Applications! Maven To use this framework as part of your Maven build simply add the foll

DLSC Software & Consulting GmbH 471 Jan 8, 2023
Lib-Tile is a multi Maven project written in JavaFX and NetBeans IDE 8 and provides the functionalities to use and handle easily Tiles in your JavaFX application.

Lib-Tile Intention Lib-Tile is a multi Maven project written in JavaFX and NetBeans IDE and provides the functionalities to use and handle easily Tile

Peter Rogge 13 Apr 13, 2022
An Android library that allows you to easily create applications with slide-in menus.

An Android library that allows you to easily create applications with slide-in menus. You may use it in your Android apps provided that you cite this project and include the license in your app. Thanks!

Jeremy Feinstein 11.1k Jan 4, 2023
A library of +70 ready-to-use animations for JavaFX

AnimateFX A library of ready-to-use animations for JavaFX Features: Custom animations Custom interpolators Play/Stop animation Play an animation after

Loïc Sculier 366 Jan 5, 2023
A JavaFX library that allows Java2D code (Graphics2D) to be used to draw to a Canvas node.

FXGraphics2D Version 2.1, 3 October 2020. Overview FXGraphics2D is a free implementation of Java's Graphics2D API that targets the JavaFX Canvas. It m

David Gilbert 184 Dec 31, 2022