• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Java MVC Web Application

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I need help understanding how to create a Java MVC web application for this assignment...

Create an Object-Oriented To-Do List manager. Your program must allow users to:
1. Create lists of tasks
2. Add to and remove tasks from task lists
3. Mark tasks as done
4. Save lists to a data store
5. Load lists from a data store
6. Display all available task lists and select a given list to modify
 
Saloon Keeper
Posts: 15484
363
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, first of all you need to be able to display a simple web page. Have you worked with an MVC framework before? I think Spring is the best known one, but from personal experience I can also really recommend Jersey.
 
Saloon Keeper
Posts: 7582
176
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Are you allowed to use a 3rd party framework for this? Or are you merely supposed to use the MVC pattern? It sounds like an assignments where you're supposed to write all the code.
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Perhaps this article could give you an understanding of the patterns involved.
 
Pete Yanchek
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We are just supposed to use the MVC pattern, I believe. I saw no mention of 3rd party frameworks.
The teacher posted this link https://docs.oracle.com/javase/tutorial/jaxp/, a PowerPoint on Java MVC Web App Design, and some additional slides on Servlets.
Frankly, I'm not sure what to do with it. I had an easy time understanding how to work with a Derby database, but now I am very lost. I missed the last few classes, but this project is due next week, regardless.
 
Pete Yanchek
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Can someone please walk me through how everything is interrelated? I don't mean to seem so out of it, but I really did miss some time and I managed to get lost.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This diagram from the article I linked to describes MVC at its simplest:



A request is sent to a servlet which serves as the controller (the C in MVC).

This interacts with the Model (the M in MVC) which fetches information from the DB and puts it into appropriate classes (usually beans) for passing back to the controller.

The bean(s) are sent to a JSP view (the V in MVC) as scoped variables via a forward, and the generated HTML page is sent as the response.

Further refinements are needed for industrial-stregth apps (separation of task and page controllers, additions of front controller and so on), but the above is a good starting point for MVC web apps.
 
Pete Yanchek
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks. I will learn that diagram! The annoying part is that we never did anything with the web previous to this assignment.
It is literally me trying to figure out how to use web pages with Java all by myself.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yeah.... that seems pretty poor. There are a lot (and I mean a lot) of new concepts involved. Personally, I would be introducing them gradually and in order. But I haven't taught in over 20 years.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic