All Projects → dasniko → ozark-react

dasniko / ozark-react

Licence: MIT license
A ViewEngine for ReactJS templates for the Java EE MVC 1.0 reference implementation Ozark.

Programming Languages

java
68154 projects - #9 most used programming language
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to ozark-react

universal-model-vue
Universal Model for Vue
Stars: ✭ 25 (-41.86%)
Mutual labels:  mvc, universal
retail-banking
Consumer Banking Application
Stars: ✭ 25 (-41.86%)
Mutual labels:  mvc
TeaGo
Simple Go Web Framework
Stars: ✭ 18 (-58.14%)
Mutual labels:  mvc
universal-react-relay-starter-kit
A starter kit for React in combination with Relay including a GraphQL server, server side rendering, code splitting, i18n, SEO.
Stars: ✭ 14 (-67.44%)
Mutual labels:  universal
geronimo
Mirror of Apache Geronimo
Stars: ✭ 35 (-18.6%)
Mutual labels:  javaee
udhr
Universal declaration of human rights
Stars: ✭ 17 (-60.47%)
Mutual labels:  universal
CorePartition
Universal Cooperative Multithread Lib with real time Scheduler that was designed to work, virtually, into any modern micro controller or Microchip and, also, for user space applications for modern OS (Mac, Linux, Windows) or on FreeRTOS as well. Supports C and C++
Stars: ✭ 18 (-58.14%)
Mutual labels:  universal
universal-hot-reload
Hot reload client and server webpack bundles for the ultimate development experience
Stars: ✭ 79 (+83.72%)
Mutual labels:  universal
CtrlUI
CtrlUI (Controller User Interface) is a Windows application, game and emulator launcher for your game controller, DirectXInput converts your game controller to a Xbox (XInput) controller, Fps Overlayer is a tool that shows the frames per second and the cpu, gpu and memory information.
Stars: ✭ 39 (-9.3%)
Mutual labels:  universal
jakartaee-azure
Java/Jakarta EE on Azure
Stars: ✭ 35 (-18.6%)
Mutual labels:  javaee
application-modernization-javaee-quarkus
Application Modernization Sample - From Java EE (2010) to Cloud-Native (2021)
Stars: ✭ 99 (+130.23%)
Mutual labels:  javaee
we-js-logger
Universal logger with transports to Rollbar and Logentries. Uses bunyan under the hood.
Stars: ✭ 14 (-67.44%)
Mutual labels:  universal
php-mvc-skeleton
A PHP OOP web application skeleton that uses MVC architectural pattern to create a basic application that contains login and multi language systems and can be used in any web project.
Stars: ✭ 46 (+6.98%)
Mutual labels:  mvc
grand central
State-management and action-dispatching for Ruby apps
Stars: ✭ 20 (-53.49%)
Mutual labels:  universal
pwa
An opinionated progressive web app boilerplate
Stars: ✭ 355 (+725.58%)
Mutual labels:  universal
mvc.base
Базовый компонент Битрикс для простой реализации MVC
Stars: ✭ 14 (-67.44%)
Mutual labels:  mvc
MicroMVC
Framework:simple、efficient、 easy to project migration, DMVC+C architecture design, only for PHP 7.0+, support nginx+lua mvc architecture
Stars: ✭ 20 (-53.49%)
Mutual labels:  mvc
JavaEE-SSH-Template
javaEE+SSH框架模板项目
Stars: ✭ 26 (-39.53%)
Mutual labels:  javaee
ExpressWebpack
Webpack and Express backend boilerplate
Stars: ✭ 15 (-65.12%)
Mutual labels:  mvc
velox
The minimal PHP micro-framework.
Stars: ✭ 55 (+27.91%)
Mutual labels:  mvc

Isomorphic (Universal) Ozark ReactJS ViewEngine Demo

Release Build Status License

This is a simple demo application demonstrating how to use isomorphic/universal JavaScript with server-side pre-rendered ReactJS templates with the new Java EE MVC 1.0 (JSR-371) reference implementation Ozark.

To establish the use of React.JS on the Java server-side, I created a ViewEngine implementation for Ozark/MVC 1.0, which uses the server-side rendering option of React.JS.

Basics

MVC 1.0 is at a very early stage and this project uses snapshot versions of Ozark. So there might be some not yet known effects/troubles when running the application.

For your convenience, this project comes with all dependencies which are needed to run the application in a pure servlet-container like Apache Tomcat or Jetty. So you don't have to rely on your container to provide all of the technology and libraries (Ozark itself is yet developed for Glassfish only, but this might (hopefully) change in the future).

Getting Started

This project is Gradle based and comes with a Gradle Wrapper, so you don't have to have Gradle installed on your machine. To build the WAR file, just type

$ ./gradlew build

in your console/terminal. This will build a ozark-react.war in the build/libs folder.

The project comes with all mechanisms to install and bundle all dependencies. Not only the Java deps, but also the NPM JavaScript dependencies like React.JS (the actual runtime lib), Webpack and Babel (for transpiling and bundling)

For your convenience, also a Maven pom.xml file is available.

You can deploy this WAR into an Apache Tomcat or Jetty servlet container. After starting your server, you should be able to access the application at this address:

http://localhost:8080/ozark/react

Building the JavaScript artifacts

I worked a lot on building, bundling and packaging (frontend) JavaScript artifacts with toolks like Maven and Gradle, which are not really meant for JavaScript (although it is possible, somehow). But after all, I came (again) to the end, that you should use the right tool for the right job. In case of JavaScript artifacts, this means you should definetely use tools from this ecosystem, like NPM, Webpack, Babel, Grunt, Gulp, and/or whatever.

For this reason, I use Webpack with integrated Babel.js to transpile the JSX/ES6 components into executable JS (ES5) code and bundle it together with React.JS into one app file. This file is then used within the application at runtime (server- and client-side).

Also, if this means that you have two different build tools (like Gradle and NPM here) for one project, the configuration and result of the tools is much better than trying something else. Luckily, it's easily possible, to start the NPM tasks from within the Gradle build process, so it won't become pain in the ass to run both when needed.

Class Diagram / Data Flow

This diagram gives you a rough overview of how the related classes depend on each other, resp. are communicating with each other (it's no correct UML syntax!).

Contribution / Issues

Don't hesitate to contribute to this project in any kind of sending PRs for improvements, enhancements, and/or bug-fixes.

I appreciate every issue that will be reported.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].