-
Notifications
You must be signed in to change notification settings - Fork 114
2015 12 10 spring mvc in action
JimmyLv edited this page Jan 29, 2021
·
9 revisions
layout: session title: 思沃讲堂:Spring MVC 实战 categories: [演讲] tags: [Spring, MVC, Web] speaker: Jimmy Lv transition: move files: /assets/slide.js,/assets/slide.css,/js/zoom.js highlightStyle: kimbie.light theme: color published: True
[slide]
by Jimmy Lv
[slide]
[slide]
GET: hello {name}!
via Spring Web MVC DispatcherServlet.
[slide]
// given
GET: show all books in index page.
// when
// then
implement fetch book details
functionality.
[slide]
// given
a ready-to-wear form
for book information.
// when
// then
implement create new book
functionality.
[slide]
Edit / Delete / ...
[slide]
- What's Spring IoC & DI?
- Service interface => different implementation
- Data Repository => using different database
- Split front-end & back-end => return data with JSON format
[slide]
- 先把书架 CURD 的功能,使用后端 MVC的形式完善。
- 当然你可以改用其他模板语言,比如 Jade 什么的,这儿用的是 Thymeleadf。
- 然后再改用JSON 格式返回,而不再需要后端模板。
- 为了前后端分离,😂 以下形式就 Okay: