An SSH-based lab report system

Source: Internet
Author: User
Tags git shell

In fact, it can also be regarded as an operating system. Teachers can publish assignments, experiment content, students submit assignments, and teachers can score scores. The front-end is mainly the front-end of a resource downloaded from csdn. The original author used it very well (the front-end was hard-wired, and there were a few other pages made by students. I would like to thank the original authors and students here, use some images and text ). In fact, the purpose of writing this blog post is to use the code function of csdn. I spent an afternoon Learning about Code help and git tools. The original version control was so fun and convenient. The legendary challenge a programmer has posed to another programmer is the branch of a project.


Home page:



In order to integrate the fragmented content of the framework with the three frameworks, we established SSH and later development. Compared with the development of pure JSP, in general, the framework is difficult before and after (step by step, lie down on the table again and again, and finally get it done). The pure JSP is difficult before and after. The most convenient part is the streamlining of database statements (Object-Oriented) brought about by hibernate ). Struts page Jump Control, spring injection, such as new sessionfactory.


Registration page:



There are still many imperfections in the project, such as the major of the school class. If so many teachers are involved, the cross-department problem is very complicated. In this case, we will only focus on one major. The password is encrypted.


Instructor Logon:



The email notification function is incomplete, that is, javamail.

The job publishing editor uses Baidu's ueditor.



Student Logon:


In fact, the logical relationship in it is not complex. You have completed the arrangement and I have completed the modification. You have changed the result and checked the results in one breath. The main reason is that there are many things to consider after the framework is in place.


The layer (the code below is omitted) is the bean layer of the entity class, such as homework.

Package COM. web. bean; import Java. SQL. timestamp;/*** condition acthomework entity provides the base persistence definition of the * homework entity. @ author myeclipse persistence tools */public class homework implements Java. io. serializable {// fieldsprivate integer ID; private String title; // subject private string subject; private string studentcontent; private string teachercontent; private integer teacherid; private integer studentid; private integer homeworkid; // completion time private timestamp finishdate; // release time private timestamp publishdate; // completion time private timestamp lastdate; // score private integer mark ;}

Action layer, Struts jump, such as login jump loginaction

Public class loginaction extends actionsupport {private int loginid; private string password; private string role; private loginservice; @ overridepublic string execute () throws exception {If (role. equals ("1") {student = new student (); student. setloginid (this. getloginid (); student. setpassword (this. getPassword (); If (loginservice. student_check (student )! = NULL) {// after the verification is successful, the studentmap session = actioncontext is saved to the session. getcontext (). getsession (); Session. put ("student", loginservice. student_check (student); // system. out. println ("true"); Return "student_login ";}}}


Dao abstraction layer, homeworkdao, in fact, abstraction is mainly for future expansion. If my general system is finalized, it is also possible to directly implement the layer.

Public interface homeworkdao {void save (homework); void Update (homework); void Delete (homework); // list of all jobs 

DAO implementation layer, homeworkdaoimpl

public class HomeworkDAOImpl extends HibernateDaoSupport implements HomeworkDAO  {/* (non-Javadoc) * @see com.web.DAO.impl.HomeworkDAO#save(com.web.bean.Homework) */public void save(Homework homework){ this.getHibernateTemplate().save(homework); }}

Util, the function layer, mainly implements some specific functions, such as MD5 encryption.


Service layer and service implementation layer. Homeworkserviceimpl

public class HomeworkServiceImpl implements HomeworkService {private HomeworkDAO homeworkDAO;public HomeworkDAO getHomeworkDAO() {return homeworkDAO;}}

After the overall level is reached, it is the implementation of one function. Each function is saved and named for itself. This is also called version control.


According to the code description, it is found that GitHub's git shell can be used as well, and there is a path problem when Vim is opened.

View attributes

git config --list 
Warehouse Initialization

git init

To add a file, add can update the file to the temporary storage area, or submit the file already in the temporary storage area. For details, see the file status. Add add file to be uploaded.

git add README.md

If you are not familiar with commit-M, you can use git help commit to jump to the explanation text in the browser-M <MSG> to add a message prompt.

Remote add remote repository is stored in the csdn code zone.

Push to the remote warehouse with the master Branch

git commit -m "first commit"git remote add origin [email protected]:iaiti/experimentreportsystem.gitgit push -u origin master


Finally, you can.

Https://code.csdn.net/iaiti/experimentreportsystem/tree/master

An SSH-based lab report system

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.