当前位置:网站首页>Microblogging system based on BS architecture
Microblogging system based on BS architecture
2022-07-20 21:34:00 【biyezuopinvip】
pick want
Since the end of last century . Internet technology is developing rapidly . With the advent of the information age , We can do it in a short time 10 See the charm of the Internet during the year . The Internet is everywhere in our life , The explosive development of information has also expanded . How to get information .
Information exchange platform sharing microblog is particularly important in the information age , People can freely search and publish information , Get the latest and most timely consultation , Timeliness and high interactivity have . With the popularity of Weibo among netizens , The influence of online celebrities and hot words on the Internet has gradually formed . Weibo system adopts B/S framework , Realize the original foundation . We improve the user experience by adding problem rewards to the existing Weibo system and introducing new functions such as points . implementation technique , Page using JSP、JavaScript、ajax And other technologies to enhance the interaction between system pages and users . The background to use Java Language , Server usage Tomcat The server , Use SSM. It uses a framework MySQL Database to achieve specific functions to store data .
key word : Microblogging ;B/S framework ;java;SSM frame ;MySQL;
ABSTRACT
From the end of the last century.Internet technology has developed rapidly.With the advent of the information age, we can see the charm of the Internet in just 10 years.The Internet is everywhere in our lives, and the information explosion expands.How to get the information.
In the information age of information exchange platform, sharing microblog is particularly important. People can freely search and release information, obtain the latest and most timely consultation, timely and highly interactive.With the popularity of Weibo among netizens, the influence of web celebrity and hot words on the Internet has gradually formed.The microblog system adopts the B / S architecture to realize the original foundation.We improve the user experience by adding problem rewards to existing microblogging systems and introducing new features such as points.Implement the technology, the page uses JSP, JavaScript, ajax and other technologies to enhance the interaction of the system page with users.The background uses the Java language, the server uses the Tomcat server, and uses SSM.It uses a framework MySQL database to implement specific functionality to store the data.
Key words: Weibo; B / S architecture; java; SSM framework; MySQL;
Keywords: Weibo;B/S architecture;java;SSM framework;MySQL;
Objective record
Chapter one Clue On 1
Chapter two Related technology introduction 2
2.1 Architecture Overview 2
2.2 Introduction to key technologies 2
2.3 development tool 3
2.4 Summary of this chapter 4
The third chapter System requirements analysis 5
3.1 Feasibility analysis 5
3.1.1 Technical feasibility 5
3.1.2 Economic feasibility 5
3.1.3 Operational feasibility 5
3.2 Demand analysis 6
3.2.1 Overall system requirements 6
3.2.2 Use case diagram requirements 7
Chapter four System function design 11
4.1 System class analysis 11
4.1.1 Entity class 11
4.1.2 The controller class 12
4.1.3 Business logic class 14
4.1.4 Database interaction class 16
4.2 Key business design 17
4.2.1 Landing system 17
4.2.1 User information system 18
4.2.2 Weibo module 19
4.2.3 Friends module 19
4.2.4 Conch module 20
4.2.5 Background administrator module 20
4.3 Database design 21
4.3.1 summary 21
4.3.2 conceptual design 22
4.3.3 Database table 23
The fifth chapter System function realization 28
5.1 Landing system 28
5.2 User information system 30
5.3 Weibo module 33
5.4 Friends module 37
5.5 Conch module 43
5.6 Background administrator module 46
Chapter six The system test 56
6.1 Overview of system testing 56
6.2 The test case 56
6.2.1 User registration module 56
6.2.2 User login module 57
6.2.3 Modify the user information module 58
6.2.4 Weibo module 59
6.2.5 User friend module 60
6.2.6 User conch module 61
6.2.7 Administrator module 62
6.3 Test and analysis 63
6.4 Summary of this chapter 64
Chapter vii. total junction 65
reference 66
Cause thank 67
The fifth chapter System function realization
5.1 Landing system
After the user enters the email address on the system login registration page , The mailbox entered by the user passes ajax Send to the background controller , And in Service The layer calls the corresponding method . stay Service In the method , call Dao Layer interface to find user mailbox , If you register , Whether registered or not , Will pass through the front end JavaScript Show on page , Remind the user that the email has been registered . Enter the basic information and click Register , The registration information entered by the user is sent to http://1278.cn/ The controller , The controller controls the forwarding page of the request , Send to user . Initialize some basic information of users in the service , Such as the registration information of the service 、 Default Avatar 、 Default state 、 Initialize user points and other actions , Assemble user data sources , call Dao Layer method saves user registration do. The information is shown in the figure below 5.1. Here is the core code :
user.setRegisterTime(nowDate()); // Use the current time as the user registration time
user.setLastLogin(nowDate());
user.setBirthday("2017-1-1");
User addUser = addIntegral(user, Constant.REGISTER); // Increase user points
action = userDao.findIntegral(Constant.REGISTER); // Find the result of the registration operation PointAction
record = new PointRecord(action, addUser.getEmail(), nowDate());
addIntegralRecord(record); // Save integral operation
userDao.saveUser(addUser); // Save user registration information
Login function , Then click auto login password , Click to log in , First, pass the user name and password information to the service layer for business processing , And then call Dao The layer interface verifies whether the mailbox and password information are correct . If correct , Save the email name and password in the browser the next time you click login cookie in , Store the logged in user in session in , Judge whether the current login time and the last login time of the user are the same. The user is http ://1287.cn One day in the service of processing login , Otherwise, increase the user's login points , Modify the number of points in the user database , Then enter the homepage of Weibo ./5.2. Here is the core code :
findUser = userDao.findUserByEmailAndPassword(userId, password);
if(findUser == null){
throw new UserServiceException(" Wrong user name or password ");
}else{
Date lastLogin = findUser.getLastLogin(); // Last login time
Date now = nowDate(); // current time
if(lastLogin.getYear()!=now.getYear() || lastLogin.getMonth()!=now.getMonth() || lastLogin.getDate()!=now.getDate()){
// Judge if the last login time is different from this login time , Add login points for users
findUser=addIntegral(findUser, Constant.LOGIN); // Save points
saveIRecord(findUser, Constant.LOGIN); // Keep score records
findUser.setLastLogin(now); // Change the last login time to the current time
userDao.updateUser(findUser); // Change user information
}
}
Reprinted from :http://www.biyezuopin.vip/onews.asp?id=16471
边栏推荐
- MySQL basic learning day06
- 深挖数据红利,英特尔与产业加速数字经济落地
- CDN架设
- Vmware解决无法识别USB的问题
- Blueprint class view method
- go 操作 Excel
- Link list of daily Niuke questions
- Redis 核心篇:唯快不破的秘密
- Redis log: the killer mace of rapid recovery without fear of downtime
- Easy gene chip SEQ analysis method: practical workflow and advanced applications
猜你喜欢
Given the preorder traversal and the inorder traversal order of a binary tree, find the postorder traversal of the tree
ENVI_ Idl: synthesize and linearly stretch the data band of FY-4 satellite, and generate TIFF format and JPEG format respectively
Embedded sharing collection 16
DBC2000有什么作用?DBC2000的安装与配置
What are the four differences between intranet and extranet?
2022年最新内蒙古建筑安全员模拟题库及答案
服务器带宽和家用宽带的区别?
Animation, and basic use of animation
適合送禮的藍牙耳機有哪些?2022藍牙耳機排行榜10强
LVGL 8.2 Span
随机推荐
NFT access tool premint was hacked, with a loss of more than 370000 US dollars
面试官一口气问了MySQL事务、锁和MVCC,我
源码 | OpenCV DNN + YOLOv7目标检测
ThreadLocal夺命11连问
数组与指针
What is dbc2000? Dbc2000 database file details
Introduction and use cases of iterator
67亿美元!瑞萨电子收购IDT获得最终审批通过!
你来追我呀!Flutter 实现追逐动画
最受IT公司欢迎的 30 款开源软件
Redis core: the only secret that cannot be broken quickly
Array of daily questions for Niuke
Part of the second Shanxi Network Security Skills Competition (Enterprise Group) WP (V)
Gson 学习笔记
牛客每日刷题之数组
[quick start tutorial 2] crazy shell · open source formation UAV - Introduction to hardware resources
Some suggestions: for creators who want to enter Web3
Redis 高可用篇:你管这叫 Sentinel 哨兵集群原理
getdata table 表格数据 join mysql方法
Redis 很屌,不懂使用规范就糟蹋了