当前位置:网站首页>MVC mode and three-tier architecture
MVC mode and three-tier architecture
2022-07-22 17:20:00 【endorphinnnn】
MVC Pattern
Layered development mode , among :
- M:Model, business model , Deal with business
- V:View, View , Interface display
- C:Controller, controller , Processing requests , Call models and views
controller (serlvlet) Used to receive requests sent by the browser , Controller call model (JavaBean) To get data , For example, query data from the database ; After the controller obtains the data, it is handed over to the view (JSP) Show the data .
Three layer architecture
Divide the project into three levels : The presentation layer 、 Business logic layer 、 Data access layer
- Data access layer : On the database CRUD Basic operation
- Business logic layer : Encapsulate business logic , Basic functions in composite data access layer , Form complex business logic functions . for example Register business functions , We'll call it first Data access layer Of selectByName() Method to determine whether the user name exists , If it doesn't exist, call again Data access layer Of insert() Method to add data
- The presentation layer : Receiving request , Encapsulated data , Call the business logic layer , The response data
And the whole process is , Browser send request , Expressional Servlet Receive the request and call the method of business logic layer for business logic processing , The business logic layer method calls the data access layer method to operate the data , Return to serlvet, then servlet Leave the data to JSP To display
- The presentation layer : com.xxxx.controller perhaps com.xxxx.web
- Business logic layer :com.xxxx.service
- Data access layer :com.xxxx.dao perhaps com.xxxx.mapper
边栏推荐
- Simple use of UE4 terrain tool
- Matlab function: filtfilter -- zero phase digital filtering
- IO流的分类和方法
- 分享我们的首次Otherside之旅
- [reprint] UE4 interview Basics (II)
- Crack PLSQL by deleting the registry
- The aboveboard water stickers come from people's perception of summer vacation
- Shell (I) (updating)
- ruoyi-antd使用yarn install 报错 : 无法加载文件 C:\Users\Administrator\AppData\Roaming\npm\yarn.ps1
- 浏览器页面的渲染流程
猜你喜欢
Ora-16525 DG broker not available
UE4 keyboard keys realize door opening and closing
Apache自带的ab压力测试工具如何实现
How to download and install xshell plus6
UE4 build terrain with grayscale map
注意力机制的分类
接招吧。最强“高并发”系统设计 46 连问,分分钟秒杀一众面试者
MATLAB函数:filtfilt——零相位数字滤波
Zen administrator forgets password and retrieves password
论文阅读【6】Autoaugment: Learning augmentation strategies from data
随机推荐
tf.placeholder
C语言分支结构和循环结构(1)
[reprint] UE4 interview Basics (II)
apache虚拟主机配置的方式有哪些
Apache自带的ab压力测试工具如何实现
ig,ax = plt.subplots()
UE4 key to open the door
怎么使用js实现计算器和计时器功能
一种跳板机的实现思路
MATLAB函数:filtfilt——零相位数字滤波
【机器学习】pytorch如何加载自定义数据集并进行数据集划分
一文带你了解redux的工作流程——action/reducer/store
Upgrade MySQL 5.6 to 8.0 on Windows
Pytoch deep learning practice lesson 11 (CNN)
Win11闪白屏无法控制如何解决?
Use OpenCV to achieve the halo effect
tf.reduce_ sum()
Are you still writing code for adding, deleting, modifying and checking? Direct one click generation
使用OpenCV实现哈哈镜效果
分享我们的首次Otherside之旅