当前位置:网站首页>MVC three-tier architecture
MVC three-tier architecture
2022-06-23 05:08:00 【Don't want to be a programmer】
When MVC:Model View Controller
Servlet and JSP Can write Java Code ; Easy to maintain and use in the future ;
- Servlet Focus on processing requests , And control view jump
- JSP Focus on displaying data
| Controller– controller | View View layer | Model |
|---|---|---|
| Servlet | JSP | JavaBean |
| Receive user requests | Show the data model | pojo、entity |
| Leave it to the business layer to do | Provide user operation | |
| View jump |

User direct access control layer , The control layer can directly operate the database
servlet--CRUD--> database
disadvantages : The program is very bloated , Not conducive to maintenance servlet In the code of : Processing requests 、 Respond to 、 View jump 、 Handle JDBC、 Processing logic code
framework : Nothing can't be solved by adding a layer

Model
- Business processing : Business logic (Service)
- Data persistence layer :CRUD(Dao)
View
- Display data
- Provide links to initiate Servlet request (a, form, img…)
Controller(Servlet)
- Receive requests from users :(req: Request parameters 、Session Information )
- Give it to the business layer to process the corresponding code
- Control the jump of the view
Sign in --- Receive login requests from users ---> Handle user requests ( Get user login parameters ,username,password)---> Leave it to the business layer to handle the login business ( sentence
Whether the user name and password are correct : Business )--->Dao The layer queries whether the user name and password are correct --> database
边栏推荐
- centos7部署docker,安装mysql
- 微信小程序:全新趣味测试
- Actual combat | multiple intranet penetration through Viper
- Course design C for freshmen -- clothing management system
- WPF 基础控件之 TabControl样式
- TabControl style of WPF basic control
- GNSS速度解算的三种方法
- ② Cocoapods principle and podspec file uploading operation
- PRCS-1016 : Failed to resolve Single Client Access Name
- go学习记录二(Window)
猜你喜欢

Emergency response HW review

Meituan's good article: understand swift, Objective-C and the mixing mechanism from the perspective of precompiling

Function declaration and call of 17 generator

UI自动化定位利器-xpath实战

使用teqcplot对teqc 质量分析结果进行可视化展示

Win10 view my Ini path

Metadata management Apache Atlas Compilation (embedded) deployment and various error records encountered

图片降噪DeNoise AI

Laravel 8.4 routing problem. At the end is the cross reference table on the left side of the editor, which can be understood by Xiaobai

WPF 基础控件之 TabControl样式
随机推荐
dolphinscheduler海豚调度升级代码改造-UpgradeDolphinScheduler
Talk about the composite pattern in C #
Flask Foundation: environment setup + configuration + mapping between URL and attempt + redirection + database connection
《微信小程序-基础篇》带你了解小程序的路由系统(二)
UI自动化定位利器-xpath实战
如何更好地组织最小 WEB API 代码结构
Decompile
rtklib2.4.3 b34 单点定位的一个bug
Arduino温湿度传感器DHT11(含代码)
QT elidedtext only works for Chinese conformity, but not for English
微信小程序:拼图工具箱
云原生数据库如荼如火,未来可期
Parameter passing of 18 generator function
Abnova PSMA bead solution
【毕业季_进击的技术er】送别过去两年迷茫的自己。重整旗鼓,大三我来啦
【图论】—— 二分图
单行或多行文本溢出,省略号代替
【Mac】安全性与隐私中没有任何来源选项
[C language] keyword
8年经验之谈:月薪3000到30000,测试工程师的变“行”记