Introduction

For over 17 years, JK-Framework has been incrementally developed and evolved over the years by Dr. Jalal Kiswani to be mature, reliable, and consistent. It is currently utilized and implemented in many organizations and systems in different domains such banking, education, government, and technology; Also it has been applied on different scales from single user systems, startups, to large-scale enterprise applications.

In addition of being practically proven, its components are also scientifically discussed in a Masters thesis, PhD dissertation, and scientific research publications.

JK-Framework is owned, developed, and maintained by Dr. Jalal Kiswani, for licensing and support, please Contact the author.

framework 7

Key Benefits

JKFramework provides a many direct benefits for Development, Operations, and DevOps engineers, below are some of them:

  1. Elegant and easy to use Configuration API that covers the needs of applications of all scales, from standalone, monolithic, to microservices-based systems; In addition of a large set of API’s, tools, and wrappers that enable faster and efficient software development, such as Exception Handing API, Caching, Logging, and many others, which all part of JKFramework-Core project.

  2. Elegant and easy to use Data API that utilizes a unified configuration, connection-pool, and components of JDBC, JPA , and NoSQL along with intensive logging, audit-trail, timing and many others using JKFramework-Data project.

  3. Efficient development of Java Web Applications by enabling Faces-4, CDI-4, and Persistence-3.1 on Tomcat-10.1 with zero configurations; in addition of providing a set of defaults, listeners, filters,API’s, and tools using JKFramework-Web project.

  4. Efficient web development approach by providing Embedded Web Server which is mainly a tuned wrapper for Tomcat-10.1 web server, using JKFramework-Standalone project.

  5. Efficient development of both: traditional and mature Microservices development using JKFramework-Service project.

  6. Elegant and easy to use Microservices Client using JKFramework-ServiceClient project.

  7. Fast and easy End-End Java Database Driven Web Application development with zero-configurations, including security , reusable web controllers ,and data-access components using JKFramework-WebStack project.

Basic Usage

All what you need to be able to utilize most of the components in the framework, is to Create Maven Project and replace your pom.xml with the following contents:

<project xmlns="http://maven.apache.org/POM/4.0.0"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>
	<parent>
		<groupId>com.jalalkiswani</groupId>
		<artifactId>jk-app-webstack</artifactId>
		<version>7.0.0-M6</version>
	</parent>
	<artifactId>jk-framework-webstack-example</artifactId>
	<packaging>war</packaging>
</project>

If you are using a Eclipse based IDE, be sure to refresh your project (select your project→ right click→ Maven→ Update Project)

Create a main class with the following contents:

package com.app;

import com.jk.web.embedded.JKWebApplication;

public class App {
	public static void main(String[] args) {
		JKWebApplication.run();
	}
}

If you are using Eclipse based IDE, just copy the code above, and paste it on on the source folder, and eclipse will create the package structure and the java file for you with the contents your pasted

Thats is, now, run your App class., and should your browser opened to localhost:8080 with the following user interface.

webapp

Instant Benefits

With this, you gain the following benefits instantly:*

Maven Benefits:

  1. Compiler plugin set to use JDK 17+

  2. War plugin set to run without complaining about web.xml

  3. All the dependencies aligned to work together smoothly without conflicts.

  4. Ability to load Maven properties from maven.properties file

  5. Proper exclusions of dependencies such as Tomcat Embedded libraries and other runtime libraries, to save developers and deployers time thinking about run-time dependencies issues.

  6. Enable snapshots by default, which could be useful for internal development of components such as libraries and microservices (you can disable if of course if need).

Web Server Benefits:

  1. Embedded Tomcat server configured and launched for your on port 8080 (you can change the port number).

  2. The browser is opened for your on the app root.

Generated Code:

  1. Facelet template created in src/main/webapp/WEB-INF/templates/default.xhtml.

  2. Beans file located in src/main/webapp/WEB-INF/beans.xml, which is required to enable CDI (while beans.xml has become optional in latest JEE versions, Weld still looks for it)

  3. Default faces pages located at src/main/webapp/index.xhtml, which you can use as the template for your faces views/pages.

Data Benefits:

The following configured and ready to run with zero-config:

  1. H2 database.

  2. C3P0 Connection pool.

  3. JPA (Java/Jakarta Persistence API 3.1) based on Hibernate implementation.

  4. Unified Configurations for all your data components such as JDBC, JPA, Connection-Pool, and NoSQL.

Web Benefits:

The following ready and configured to run on TOMCAT 10.1+:

  1. JSF (Java/Jakarta Server Faces 4, CDI-4, JSP-3.1, Omnifaces-4, PrimeFaces 12).

  2. Set of configurations, listeners, and filters that makes your life easier.

Microservices Benefits:

  1. REST Microservices support.

  2. Set of configurations, filters, listeners, and API’s that can save you a lot of headache.

Main Projects

JKFramework is an end-end Java development framework that enables faster and efficient software development. It is consists many sub-projects, following are some of them:

  • JKFramework-Core is a set of libraries, and API’s that includes Configurations Manageemnt, Exception Handling, Context API, Logging, and many other utilities such as I/IO , reflection, String, Collections…​etc.

  • JKFramework-Data is a zero-config DataAccess API that enables the best of JDBC and JPA, with a unified configuration, elegant API, with intensive features around these API’s including ease of development, logging, auditing, timing, and monitoring.

  • JKFramework-Web is a project that enables zero-config setup for Java/JakartaEE-10 Web Apps on Tomcat, it consists of all the needed dependencies and configurations of Faces 4 (JSF), PrimeFaces 12, CDI 4 (Weld), and Omnifaces-4, in addition of a set of Listeners and Filters that enables many features such as automatic configuration detections, logging initializations, and proper bootstraping and shutting-down to enable clean approach of hot deployment.

  • JKFramework-Standalone Is a zero_config wrapper of Tomcat Embedded web server that contains some utilities and enhancements, it enables faster software development by eliminating the need of configuring and running external web server to develop Java Web Applications (JSF, JSP or, Servlets) and Microservice.

  • JKFramework-Service It is a_ zero_config_ project that enables a faster approach toward JakartaEE 10 microservices development, it consists of all the needed dependencies, configurations, and proper listeners and filters to have a reliable software development such as exception handlers and context synchronization.

  • JKFramework-ServiceClient It is a project that helps Java developers calls microservice in an efficient approach that includes: proper configuration, timing, exception handling, unified logging, and others.

  • JKFramework-WebStack It is a zero-config project that enables Java software developers to build end-end Java web applications that communicates with databases or microservices with zero-config including outof the box features such security and and data-management components.