- Matriculation Number: 16-665-176
- Evento-ID: 10003529
- E-Mail: [email protected]
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.
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.
- Think about the components you will need
- Draw a component/class diagram
- Start to code
- Delete
- Entity:
Magazine
(as extension ofBook
)Company
(as extension ofPerson
)
- Image upload (in its own module)
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.
- JDK 14
- Node.Js >15
- Maven
- IntelliJ IDE (recommended)
To start the backend run AddressBookApplication.java
in the web
module (package ch.fhnw.swa.web
).
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.
To start the frontend run npm install
and then npm start
module (frontend-app
folder).
C:\Users\example\Documents\GitHub\swa-en...\frontend-app> npm install
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.
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.
none
-
I generated the basic structure of the frontend app with npx.
npx create-react-app frontend-app
-
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.
I'm particular proud of: that images can be uploaded and are validated by size and type
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