Skip to content

Dependency Injection and html templates framework for J2CL. Relaxed implementation of Jakarta CDI

License

Notifications You must be signed in to change notification settings

crysknife-io/crysknife

Folders and files

NameName
Last commit message
Last commit date

Latest commit

34c3da4 · Mar 17, 2022
Dec 28, 2021
Nov 5, 2021
Dec 28, 2021
Dec 4, 2021
Nov 25, 2021
Feb 12, 2020
Mar 17, 2022
Mar 16, 2022
Mar 16, 2022
Mar 17, 2022
Apr 9, 2021
Oct 2, 2020
Oct 2, 2020
Jul 30, 2021
Oct 10, 2021
Jan 12, 2022

Repository files navigation

crysknife

This project is a proof of concept for a CDI-like Dependency Injection framework with a support of some popular features. It’s based on annotation processors code generation and has no GWT2 dependencies.

Demo: https://crysknife.cloud.unispace.io

At this point Crysknife supports:

  • @Singleton and @Dependent scopes
  • lazy fields and constructor injections
  • @PostConstruct
  • transitive injections
  • @Named qualifiers and @Produces for custom objects like Elemental2 widgets
  • HTML templates
  • Data binding

Demo shows how Crysknife is used on a simple page compiled with J2CL (with j2cl-maven-plugin).

Please, remember that this is a POC, nothing more at this moment. Feel free to comment and criticize.

How to build:

  1. 'git clone git@github.com:treblereel/crysknife.git'
  2. 'mvn clean install'
  3. To run demo, run 'mvn clean j2cl:watch' within crysknife/demo folder
  4. Open another console and run 'mvn tomcat7:run'
  5. Open in browser: http://127.0.0.1:8080/demo
  6. To build a .war, run 'mvn clean package -Pbuild' within crysknife/demo folder

###Information for Intellij Idea users: Project requires maven plugins to build and run, and therefore you should enable option in your IDE:

  1. Open Maven settings in the Maven tool window.
  2. Click Maven and from the list, select Runner.
  3. On the Runner page, select Delegate IDE build/run actions to maven.

Have fun and let J2CL win !