Table of Contents
Youtube video |
---|
https://youtu.be/ny15aofvGCI |
👋 Welcome to this laboratory project!
🛠 What is it?
This is a modern web application built on theJavaServer Faces
framework. Its architecture uses2 facelets templates
for flexibility and modularity. The starting page provides general information and redirects to the main page with functionality. Server logic is implemented usingManaged Beans
, ensuring flexible and scalable data processing.🎯 The goal of the site
To make the process of entering coordinates of points and checking their hit in a given area as convenient and intuitive as possible. MyUI
was developed with a focus on goodUX
😎
📌 Main features
- 🖥 Interactive Data Entry: Use intuitive interface elements to enter coordinates.
- 📊 Dynamic Graph: Visualization of the area and points on the coordinate plane in real-time.
- 🔒 Server-Side Validation: Reliable verification of entered data is ensured through Managed Beans.
🚀 Want to know more? Check out the user manual and dive into the amazing world of this web application! 💻
-
Managed Beans
: Managed beans that contain server-side data processing logic. -
index.xhtml
: The starting page containing general information and redirecting to the main page. -
main.xhtml
: The main application page with a web form for entering coordinates and displaying results.
- Header: Full name, group number, variant number.
- Interactive Clock: Shows the current date and time, updates every 10 seconds.
- Link: allows you to go to the main page of the application.
- A set of components: To set the coordinates of the point and the radius of the area according to the task variant. The use of additional component libraries may be required - ICEfaces (prefix "ace") and PrimeFaces (prefix "p").
- Form: Sends data to the server via Managed Beans.
- A set of fields: For setting the coordinates of the point and the radius of the area.
- Validation: JavaScript- or JSF-validation of entered data.
- 🟠 Interactive Element:
- Dynamic visualization of results on the graph.
- Graph update after each request.
- An adaptive graph that changes its state depending on the selected radius.
- The color of the points should depend on the fact of hitting/not hitting the area.
- Results: A table with the results of previous checks, stored in a Managed Bean.
- A link that allows you to return to the start page.
- All verification results must be stored in a PostgreSQL-managed database.
- Access to the DB must use the ORM EclipseLink.
- A Session-scoped Managed Bean should be used to manage the list of results.
- The configuration of managed beans should be set using parameters in the configuration file.
- The rules of navigation between the pages of the application should be defined in a separate configuration file.
- The developed web application must be deployed on the
WildFly
server in standalone configuration, ports must be configured in accordance with the issuedportbase
, access to the http listener must be open to all IPs.
-
JavaServer Faces
technology. Features, differences fromservlets
andJSP
, advantages and disadvantages. Structure of a JSF application. - Using
JSP pages
andFacelets templates
in JSF applications. -
JSF components
- implementation features, class hierarchy. Additional component libraries. Theevent processing model
in JSF applications. - Data converters and validators.
- Presentation of the
JSF
page on theserver side
. UIViewRoot class. -
Managed beans
- purpose, configuration methods. Managed beans context. - Configuration of JSF applications. The faces-config.xml file. FacesServlet class.
- Navigation in JSF applications.
- Access to the DB from Java applications.
JDBC
protocol, query formation, working with DBMS drivers. -
ORM concept
. ORM libraries in Java applications. Main APIs. Integration of ORM providers with JDBC drivers. - ORM libraries
Hibernate
andEclipseLink
. Features, API, similarities and differences. -
JPA technology
. Features, API, integration with ORM providers.
Tip
For a quick setup to view the project (not suitable for profiling for the OPI course and Docker is not available on Helios)
git clone [email protected]:worthant/interactive-graph-ui.git
cd interactive-graph-ui
mvn clean package
docker-compose up --build
Connect in browser:
http://localhost:32318/interactive-graph-ui-1.0-SNAPSHOT/
Note
I've included a fully functional standalone.xml config in the resources - you can check it out as an example and use it for the project.
- Follow all the steps from my guide
- Don't forget to create a database in studs:
Connect with
psql -h pg -d studs
CREATE TABLE point_model {
id SERIAL PRIMARY KEY,
x DOUBLE PRECISION NOT NULL,
y DOUBLE PRECISION NOT NULL,
r DOUBLE PRECISION NOT NULL
}
- Also, don't forget to forward the ports:
ssh -L port:localhost:port [email protected] -p 2222
- Done, go to the browser and enter:
http://localhost:port/interactive-graph-ui-1.0-SNAPSHOT/
- JavaServer Faces: Official JSF documentation
- ORM EclipseLink: EclipseLink documentation
- Lecture from se.ifmo: internet.pdf
- Sergei Nazemtsev's theory: theory.md
- ACID-transactions: habr
- JSF Lifecycle: java-online
- Lombok: complete guide
- CSS Battle: css is fun!)
- Responsive CSS: vk - HASH
- Tailwind CSS: tw
- Tailwind Components: for error pages and beautiful buttons