https://www.quora.com/What-is-the-best-backend-arquitecture-using-spring-framework

The most modern architecture is one based on Spring as a backend, with a Javascript framework on the frontend. A good alternative is Spring as a full stack framework, using Thymeleaf for server generated JSP pages, see Tutorial: Thymeleaf + Spring, but nowadays people expect web pages to be dynamic and fast responsing, and this is harder to do with server generated UI.

In this case, Spring will act as a RESTful service (Understanding : REST) and the JS framework will request and use it to generate Web pages. Actually, the most used frameworks are:

You’ll surely find a ton of other alternatives as valid as these. My personal suggestion is to start with AngularJS 2, avoid the 1.x branch which suffered from various issues.

ReactJS is probably most performant and has more hype, but it requires to be assembled with other libraries to start working, while Angular is an all-in-one tool.

DDD is a design approach where entities “drive” the overall architecture. So, you have a OO model and, around it, a layer of services which manage them.

Casually it’s what Spring does by default :)

If a storage is needed, you have to choice between SQL or noSQL. Then you have to choice between direct SQL access or an ORM framework. ORM, usually by Hibernate, simplifies table <-> entity mapping, but it’s another framework to learn…

This is a guide about using SQL with Spring Accessing Relational Data using JDBC with Spring and this is about using an ORM Accessing Data with JPA

Having your DB mapped to OO entities, you now need to throw them to the JS framework. The right way is to serialize your output as Json, so the (simplified) path is:

DB -> (by SQL/ORM repository)-> Object -> (by Services) -> HTTP Resource -> (by Controller) -> Json

Going from your DB-loaded entities (or some representation of them) to Json is very easy, by using RestControllers, usually you simply return the entity, and Spring will do the serialization, using FasterXML/jackson.

This is a guide about REST controllers: Spring MVC 4 RESTFul Web Services CRUD Example+RestTemplate - WebSystique

As I usually write, there is a lot of work to do, compared to PHP/Ruby/Python couterparts. This is justified by a better organization of your code, and the advantages become more clear on size growing. For little or simple problems all this work has objectively no justification.

【转载】Spring最佳后台框架的更多相关文章

  1. Spring Boot(5)一个极简且完整的后台框架

    https://blog.csdn.net/daleiwang/article/details/75007588 Spring Boot(5)一个极简且完整的后台框架 2017年07月12日 11:3 ...

  2. 关于vue 框架与后台框架的混合使用的尝试------转载

    这几天我在研究前台框架和后台框架融合的问题,进行了一些尝试; 我前台选择的是 vue,当然也可以选择 react 等其他 mvvm 框架,不过 vue 对于我来说是最熟悉的; 后台话,我选择的是 ph ...

  3. 2016年7款最佳 Java 框架

    毫无疑问,Java 是目前最为流行的编程语言之一,这里我们挖掘出了一些比较受欢迎的框架的有效信息,它们可以减轻全球软件开发人员的日常工作. RebelLabs的一项调查显示,通过在线Java用户论坛( ...

  4. Spring Batch 批处理框架介绍

    前言 在大型的企业应用中,或多或少都会存在大量的任务需要处理,如邮件批量通知所有将要过期的会员,日终更新订单信息等.而在批量处理任务的过程中,又需要注意很多细节,如任务异常.性能瓶颈等等.那么,使用一 ...

  5. 为什么选择 Spring 作为 Java 框架

    1. 概述 在本文中,我们将讨论 Spring 作为最流行的 Java 框架之一的主要价值体现. 最重要的是,我们将尝试理解 Spring 成为我们选择框架的原因.Spring 的详细信息及其组成部分 ...

  6. Spring的JDBC框架

    转自: http://www.cnblogs.com/windlaughing/p/3287750.html Spring JDBC提供了一套JDBC抽象框架,用于简化JDBC开发. Spring主要 ...

  7. 【Spring】Spring系列7之Spring整合MVC框架

    7.Spring整合MVC框架 7.1.web环境中使用Spring 7.2.整合MVC框架 目标:使用Spring管理MVC的Action.Controller 最佳实践参考:http://www. ...

  8. Struts2+Spring+Hibernate 三大框架的合并集成

    这次来看看Struts2+Spring+Hibernate三大框架的整合应用,主要是Spring和Hibernate框架的整合,因为前边已经将Strtus2+Spring整合过了基本一样.  首先看一 ...

  9. (文件)图片上传,Spring或SpringMVC框架

    spring或springMVC框架图片(文件)上传 页面部分,用一个简单的form表单提交文件,将图片或文件提交到服务端.一个输入框,用于输入图片的最终名称,一个file文件选择,用于选择图片. 页 ...

随机推荐

  1. Linq in条件查询

    Linq 实现sql中的not in和in条件查询   T-SQL的IN: Select ProductID, ProductName, CategoryID From dbo.Products Wh ...

  2. CentOS如何挂载U盘(待更新)

    使用Linux系统时,经常需要用到U盘,下面介绍以下如何再CentOS上挂载U盘. 首先,切换到root用户. 首先,切换到root用户. 首先,切换到root用户. 重要的事情说三遍,很多同学都说, ...

  3. vue+SSM验证码实现

    源码:https://github.com/HannahLihui/StudentManager-SSM/tree/master/SSM-git/StudentManager-SSM-master 1 ...

  4. 扩充巴科斯-瑙尔范式 ABNF简介

    扩充巴科斯-瑙尔范式(ABNF)是一种基于巴科斯-瑙尔范式(BNF)的元语言,但它有自己的语法和派生规则.ABNF的原动原则是描述一种作为双向通信协议的语言. ABNF是由第68号互联网标准(&quo ...

  5. maven(视频学习)

    一.maven的介绍 二.maven的环境搭建 三.maven的结构 四.maven常用的构建命令 五.maven自动创建目录骨架 六.maven中的坐标和仓库 七.在eclipse中安装maven插 ...

  6. hdu 2030 统计汉字个数

    汉字统计 Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submis ...

  7. mysql行转列,列转行

    行转列,列转行是我们在开发过程中经常碰到的问题.行转列一般通过CASE WHEN 语句来实现,也可以通过 SQL SERVER 2005 新增的运算符PIVOT来实现.用传统的方法,比较好理解.层次清 ...

  8. 修改input被选中的默认样式

    input:focus{    outline: none;     border: 1px solid #fff; } 或者 input[type=text]:focus{   outline: n ...

  9. CSS-带尖角的对话框

    效果图: box1的代码: .box{ position: relative; width: 200px; height: 200px; border: 2px solid #000; backgro ...

  10. jQuery基础(动画篇 animate,显示隐藏,淡入淡出,下拉切换)

    1.jQuery中隐藏元素的hide方法   让页面上的元素不可见,一般可以通过设置css的display为none属性.但是通过css直接修改是静态的布局,如果在代码执行的时候,一般是通过js控制元 ...