Project: A simple graphics editor The goal of this project is to create a drawing application that runs in a web browser. For this purpose you have to develop two components: Back-end API Service...

This project represents a simple graphic editor in java. The attached file TO_DO explains it in detail. I've attached the code with current implementation below. The task is to implement 2 design patterns into the project- proxy and decorator pattern. For proxy my idea is that, instead of communicating directly, the client sends a request to the proxy, which then forwards the request to the server. I don't have an idea where and how to implement a decorator.


Project: A simple graphics editor The goal of this project is to create a drawing application that runs in a web browser. For this purpose you have to develop two components: Back-end API Service (Server) A server-based service that offers a fully specified API for the creation and manipulation of graphic components. The service should provide the capabilities of a drawing library and mimic a typical drawing application such as Inkscape5. This means that it should be possible to draw different graphic shapes on a canvas and interact with these components (e.g., resize, recolour). Users should also be able to define custom shapes of their own to extend the shapes library. Regarding the implementation, we recommend developing a Java service (listening on a specific port) that returns a HTML5 output, which includes a SVG rendering. Webclient (Client) A client that runs in a web browser and makes calls to the service API in order to interact with the service. The client’s main task is to handle user input and render the service output. Regarding the implementation, we recommend developing a Javascript client that renders the HTML5 output including the SVG image and passes any user interaction through a graphical user interface to the service. Functional Requirements (FRs) FR1 The following graphic elements must be supported: • lines • circles • ellipses • triangles • quadrangles • n-gons with n at least up to 10 (pentagons etc.) • stars • text FR2 The canvas must support the following operations regarding graphic elements: • addition of an element • deletion of an element • editing of an element • movement of an element FR3 The canvas must support at least three layers, which hold the graphic elements. The visibility of a layer can be toggled on or off. FR4 The canvas output must be storable as a file in SVG format. Quality Requirements (QRs) QR1 Comment your code and provide a code documentation in an appropriate manner (e.g., use JavaDocs for Java). QR2 Your implementation must be in compliance with a style guide (e.g., use Google Java Style Guide7 for Java) QR3 Use common coding practices (see lecture slides). QR4 Use defensive programming (see lecture slides). QR5 Use key design principles (see lecture slides). QR6 Make sure that your implementation works properly by testing your implementation thoroughly (e.g., using JUnit). QR7 Your implementation must use the following design patterns whenever it is appropriate. Although some frameworks may already contain default implementations for some of the patterns, use your own implementation of each pattern at least once. • Observer Pattern • Strategy Pattern • Iterator Pattern • Composite Pattern • Proxy Pattern • Abstract Factory Pattern • Factory Method Pattern • Decorator Pattern
Dec 16, 2020
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here