Giter Club home page Giter Club logo

simplewebapp's Introduction

Simple-Web-Application

A simple Web app using Apache-Tomcat, SQL and Hibernate.

Setup

What you will need
  • Tomcat v9.0 Server
  • SQL
Building the project
  1. First we need to create the SQL database which our program communicates with.
    (Default password to access the database is admin/admin)
    • Create the schema for our tables CREATE SCHEMA webapp
    • Create a table users with the specified fields :
      • id : INT, Primary Key, Not Null, Auto Increment
      • name : Varchar length 20 ( can be modified)
      • surname : Varchar length 20 (can be modified)
      • gender : varchar length 20 (can be modified)
      • birthdate : Date
	CREATE TABLE webapp.users (  
	    id INT PRIMARY KEY NOT NULL AUTO_INCREMENT,  
	    name VARCHAR(20),  
	    surname VARCHAR(20),  
	    gender VARCHAR(20),  
	    birthdate DATE  
	);
  • Create a table home_address with the specified fields
    • id : INT, Primary Key, Not Null, Auto Increment
    • user_id : INT, Not Null and the foreign key that connects home_address table with users
    • homeAddress : varchar length 255 (can be modified)
    CREATE TABLE webapp.home_address (
        id INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
        user_id INT NOT NULL,
        homeAddress VARCHAR(255),
        FOREIGN KEY (user_id) REFERENCES webapp.users(id)
    );
  • Create a table work_address with the specified fields
    • id : INT, Primary Key, Not Null, Auto Increment
    • user_id : INT, Not Null and the foreign key that connects work_address table with users
    • workAddress : varchar length 255 (can be modified)
    CREATE TABLE webapp.work_address (
        id INT PRIMARY KEY NOT NULL AUTO_INCREMENT,
        user_id INT NOT NULL,
        workAddress VARCHAR(255),
        FOREIGN KEY (user_id) REFERENCES webapp.users(id)
    );
  1. Import project as a Maven project and update.
  2. Add project to the installed Tomcat server and run.
Running the Application

In the home screen you are welcomed with a title and 2 options

  • Register a user
    • Registering requires to complete name, surname, gender and birthdate fields.
      Home and work addresses are not mandatory.
  • Display users
    • List of all registered users from which :
      1. we can search from the search bar for a specific name or surname
      2. click on a user and view his data.
    • Clicking on a user gives us the options to :
      1. Delete the user via a prompt message
      2. Edit the users data

simplewebapp's People

Contributors

fotissp avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.