Giter Site home page Giter Site logo

swa-en-christian-sommer's Introduction

SWA Module, Graded Exercise

Project

You might choose between following Java applications:

  • Contact list
  • Library

The delivered application should be composed of multiple modules resp. should generate multiple jars.

The frontend (or view - probably in its own module/component) might be a REST API or Server Pages based. If you implement a REST API, then you will have to provide me a client (i.e., React) or you will have to tell how I can realise the minimum requirements (see below).

To start the application, you might use one of the following mechanisms:

  • Using Java modules.
  • Repacking a multi-modules Spring Boot application into a single jar.
  • Using -classpath Java option.

Minimum requirements

The application should be able to, at least, do the following:

  • List the entities
  • Create/edit one entity

You will have to use a repository (or database), where you will persist the entities. This repository could be a real database (deployed via Docker for instance), an in-memory one or a simple file.

Suggested course of action

  1. Think about the components you will need
  2. Draw a component/class diagram
  3. Start to code

Possible extensions

  • Delete
  • Entity:
    • Magazine (as extension of Book)
    • Company (as extension of Person)
  • Image upload (in its own module)

Reference applications

Project delivery

License

Copyright 2020 Christian Sommer <[email protected]>

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Requirements

  • JDK 14
  • Node.Js >15
  • Maven
  • IntelliJ IDE (recommended)

How to start the project:

BACKEND

To start the backend run AddressBookApplication.java in the web module (package ch.fhnw.swa.web).

abb0.png

The server can reached over: http://localhost:8080/entries or http://localhost:8080/entries/1 etc...

The following HTTP methods are available on the server side:

  • [GET] /entries - returns all entries in the address book.
  • [GET] /entries/{id} - returns an entry by ID.
  • [DELETE] /entries/{id} - deletes an entry by ID.
  • [PUT] /entries/{id} - updates an entry by ID.
  • [POST] /upload/{id}- post an avatar for the entry by ID.

so possible actions are, create an entry, edit an entry, delete entry, add an avatar to an entry, edit avatar on the entry over curl or the frontend-app UI.

Frontend

To start the frontend run npm install and then npm start module (frontend-app folder).

  1. C:\Users\example\Documents\GitHub\swa-en...\frontend-app> npm install
  2. C:\Users\example\Documents\GitHub\swa-en...\frontend-app> npm start

the frontend can be reached via the url http://localhost:3000/. Navigation in the frontend should be self-explanatory.

!For the frontend to work, the backend must also be started.

Test the project

All tests can be started with a right mouse click Run 'All Tests' on the java folder in the test directory of the web module.

abb1.png

External contributions:

none

Other comments:

  1. I generated the basic structure of the frontend app with npx. npx create-react-app frontend-app

  2. UML diagrams and description can be found in the pdf UML diagrams and description for SWA assignment 20HS 3Ib from Christian Sommer.pdf in the main project folder.

proud of

I'm particular proud of: that images can be uploaded and are validated by size and type

Project grading

Very nice delivery! You uploaded a multi-modules application, based on a given template. You spent some time on details, and I liked it. Highest grade well deserved!

Kindly Refer to GradedExercise.xlsx for grading details.

Grade: 6.0

swa-en-christian-sommer's People

Contributors

zc9syil5ya avatar

Watchers

James Cloos avatar  avatar Christian Ribeaud 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.