- requires Java jdk > 7 for windows
- requres openjdk-7 or 8 and openjfx for linux
git clone https://github.com/othreecodes/APX.gitAfter 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
Open a terminal (cmd for windows users) in the directory in which you want to start the project and run
apx start MySampleProjectMySampleProject Being the name of your project NB: Do not use java keywords to create a project
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
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
apx g page LoginThis will generate 3 files.
- A LoginView.fxml automatically Linked to
- A LoginController.java
- A LoginStylesheet.css already linked to the LoginView.fxml
Using Sqlite with Java NB: No need to download the jDBC sqlite Driver. Its already included in apx.jar
apx create table database.jsonThe next parameter after table is the file location of the json file to read from
{
"table": "users",
"columns":[
{
"name":"name",
"type":"String",
"null":"true",
"unique":"false"
},
{
"name":"age",
"type":"Integer",
"null":"true",
"unique":"false"
}
]
}
This command will create a single Table with corresponding columns (NB: I Plan to automatically create models matching to the table being created in a future release)
This is because in contains certain libraries needed for a simple MVC REST applictaion
- GSON: A Java serialization/deserialization library that can convert Java Objects into JSON and back. link to project: Google Gson
- 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
- Unirest: Unirest in Java: Simplified, lightweight HTTP client library. http://unirest.io/java link to project Mashape Unirest-java
All Libraries Remain work of the original Author
- Generate Models
- Include support for Other databases
- Make http connections neater
- A lot... Feel free to contribute.
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


