Git Product home page Git Product logo

ng-spring-boot's Introduction

Rapid prototyping with Spring Boot and AngularJS

This example demonstrates how Spring Boot, Spring Data JPA and in the front-end AngularJS can be used together to write web applications easily. In this code example I'm demonstrating this by providing a full CRUD-based web application in about 150 lines of code (100 lines of Java code and 50 lines of JavaScript code).

Frameworks

Front-end

Twitter Bootstrap

For rapidly creating prototypes of a web application, a UI toolkit or library will become really handy. There are many choices available, and for this example I chose Twitter Bootstrap.

AngularJS

AngularJS is a MVC based framework for web applications, written in JavaScript. It makes it possible to use the Model-View-Controller pattern on the front-end. It also comes with several additional modules. In this example I'm also using angular-resource, which is a simple factory-pattern based module for creating REST clients.

Back-end

Spring Boot

One of the hassles while creating web applications using the Spring Framework is that it involves a lot of configuration. Spring Boot makes it possible to write configuration-less web application because it does a lot for you out of the box. For example, if you add HSQLDB as a dependency to your application, it will automatically provide a datasource to it. If you add the spring-boot-starter-web dependency, then you can start writing controllers for creating a web application.

Spring Data JPA

Spring Data JPA allows you to create repositories for your data without even having to write a lot of code. The only code you need is a simple interface that extends from another interface and then you're done. With Spring Boot you can even leave the configuration behind for configuring Spring Data JPA, so now it's even easier.

Installation

Installation is quite easy, first you will have to install some front-end dependencies using Bower:

bower install

Then you can run Maven to package the application:

mvn clean package

Now you can run the Java application quite easily:

cd target
java -jar ng-spring-boot-1.0.0.jar

ng-spring-boot's People

Contributors

g00glen00b avatar webcane avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.