All Projects → OrPolyzos → spring-web-initializr

OrPolyzos / spring-web-initializr

Licence: MIT license
Spring Web Initializr is a library that helps you easily create Web Apps with Spring Boot.

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to spring-web-initializr

UMVC
UMVC - Model-View-Controller Generator built for Unity
Stars: ✭ 36 (+125%)
Mutual labels:  mvc, mvc-pattern
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 (+187.5%)
Mutual labels:  mvc, mvc-pattern
go-iris-mv
No description or website provided.
Stars: ✭ 21 (+31.25%)
Mutual labels:  mvc
puremvc-delphi-standard-framework
A Delphi implementation of PureMVC (http://puremvc.org/)
Stars: ✭ 44 (+175%)
Mutual labels:  mvc
nuts
Nuts and bolts for building cross-platform UI (HTML, Flutter, CLI) using Dart. Also screw frameworks (React, Vue, Angular).
Stars: ✭ 12 (-25%)
Mutual labels:  mvc
Asp.net MVC5 DDD EF6 IoC
Asp.net C# MVC5, EF6, DDD, IoC
Stars: ✭ 14 (-12.5%)
Mutual labels:  mvc
MVVM-Design-Pattern-Demo
An Xcode 9 project written in Swift 4 code designed using the MVVM design pattern, truly extolling the virtues of MVVM over MVC.
Stars: ✭ 31 (+93.75%)
Mutual labels:  mvc
MvcSimplePager
Simple,lightweight,easy to expand pager for asp.net mvc and asp.net core,针对asp.net mvc 和 asp.net core 设计的通用、扩展性良好的轻量级分页扩展
Stars: ✭ 13 (-18.75%)
Mutual labels:  mvc
RouteManager
iOS模块化,模块间解耦,路由中心设计
Stars: ✭ 45 (+181.25%)
Mutual labels:  mvc
AllInOneFX
All In One JavaFX Application with a curated list of awesome JavaFX libraries, frameworks
Stars: ✭ 26 (+62.5%)
Mutual labels:  mvc
simple-mvc
Simple push & pull MVC framework to realize a test-driven experience.
Stars: ✭ 24 (+50%)
Mutual labels:  mvc
online-training
Online Training website using ASP.Net Core 2.0 & Angular 4
Stars: ✭ 26 (+62.5%)
Mutual labels:  mvc
UPPERCASE
실시간성에 특화된 풀스택 프레임워크 ✨
Stars: ✭ 30 (+87.5%)
Mutual labels:  mvc
sinatras-skeleton
Basic Sinatra Skeleton MVC CRUD App with Sprockets, Warden, ActiveRecord and PostgresQL
Stars: ✭ 13 (-18.75%)
Mutual labels:  mvc
VueAdmin
基于Vue.js的前后端分离Demo
Stars: ✭ 19 (+18.75%)
Mutual labels:  mvc
auction-website
🏷️ An e-commerce marketplace template. An online auction and shopping website for buying and selling a wide variety of goods and services worldwide.
Stars: ✭ 44 (+175%)
Mutual labels:  mvc
adminlte-aspnetcore2-version
Asp.Net Example version of famous and beautiful AdminLTE control panel themes and template.
Stars: ✭ 64 (+300%)
Mutual labels:  mvc
wordpressmvc
Разработка сайтов на Wordpress с помощью MVC подхода
Stars: ✭ 12 (-25%)
Mutual labels:  mvc
community
基于spring boot与mybatis搭建的社区
Stars: ✭ 18 (+12.5%)
Mutual labels:  mvc
Polyel-Framework
⚡️ Voltis Core: A PHP framework based on Swoole from the ground up
Stars: ✭ 22 (+37.5%)
Mutual labels:  mvc

Spring Web Initializr

build tests
code-coverage-92%

release-2.0.0 jdk-8 spring-boot-2.0.0.RELEASE MIT licensed

Spring Web Initializr (will be referenced Swi from now on) is a library that helps you easily create Web Apps with Spring Boot.
It was initially developed in order to support the Swip (Spring Web Initializr Plugin) built for IntelliJ IDEA, but was extended beyond that usage and can be obviously used independently.

TL;DR

<dependency>
    <groupId>io.github.orpolyzos</groupId>
    <artifactId>spring-web-initializr</artifactId>
    <version>2.0.0</version>
</dependency>

Fully working examples can be found at Swi(p) Demo

Table of Contents

Description

Swi is providing implementations for the Create, Read, Update & Delete (CRUD) operations of an Entity (ResourcePersistable)

  • CRUD REST API
    • exposing directly the ResourcePersistable
    • exposing a DTO instead of the ResourcePersistable
  • CRUD MVC API (ServerSide Rendering using a compatible Template Engine of your choice)
    • exposing directly the ResourcePersistable
    • exposing a DTO instead of the ResourcePersistable

Generic Type Parameters

  • R stands for the class of the ResourcePersistable, the one annotated with @Entity (e.g. User)
  • I stands for the class of the primary key of the ResourcePersistable, the one annotated with @Id (e.g. Long)
  • D stands for the class of the DTO that is going to be exposed instead of the ResourcePersistable (e.g. UserDto)

ResourcePersistable<I>

  • Should be implemented by the corresponding Entity (e.g. User)
  • There is only a single method to be implemented
    • I getRpId(); - Should return the primary key field

RpService<R extends ResourcePersistable<I>, I extends Serializable, D> extends ResourcePersistableService<D, I>

  • It is responsible for the communication with the corresponding CrudRepository<R,I>
  • Should be implemented by the @Service for the corresponding ResourcePersistable (e.g. UserService)
  • There are 3 methods to be implemented
    • CrudRepository<R, I> getRepository(); - Should return the corresponding CrudRepository<R,I> (e.g. UserRepository)
    • Function<R, D> getEntityToDtoConverter(); - Should provide a way for the ResourcePersistable to be converted to the DTO
    • Function<D, R> getDtoToEntityConverter(); - Should provide a way for the DTO to be converted to the ResourcePersistable

NoDtoRpService<R extends ResourcePersistable<I>, I extends Serializable> extends RpService<R, I, R>

  • NoDtoRpService should be used if we want to expose directly the ResourcePersistable
  • Everything from RpService applies to NoDtoRpService, with the difference of 2 already implemented methods
    • default Function<R, R> getEntityToDtoConverter() { return Function.identity(); }
    • default Function<R, R> getDtoToEntityConverter() { return Function.identity(); }

RpRestController<D, I extends Serializable> extends ResourcePersistableRestController<D, I>

  • It is responsible for the communication with the corresponding ResourcePersistableService<R, I>
  • Provides a REST API for the CRUD operations of the ResourcePersistable
  • Should be implemented by the @RestController for the corresponding ResourcePersistable (e.g. UserRestController)
  • There is only a single method to be implemented
    • ResourcePersistableService<D, I> getService(); - Should return the corresponding ResourcePersistableService<D,I> (e.g. UserService)

RpViewController<D, I extends Serializable> extends ResourcePersistableViewController<D, I>

  • It is responsible for the communication with the corresponding ResourcePersistableService<R, I, D>
  • Provides a MVC API for the CRUD operations of the ResourcePersistable
  • Should be implemented by the @Controller for the corresponding ResourcePersistable (e.g. UserController)
  • There is only a single method to be implemented
    • ResourcePersistableService<D, I> getService(); - Should return the corresponding ResourcePersistableService<D,I> (e.g. UserService)

Examples

Contributors

Orestes Polyzos
Orestes Polyzos

To contribute to Spring Web Initializr, follow the instructions in our contributing guide

License

Spring Web Initializr is licensed under the MIT license.
Copyright © 2019, Orestes Polyzos

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].