0

Currently I have the following project structure:

packages:

  • view
  • controller
  • service
  • model
  • repository
  • config
  • util

The view package contains the view classes of Vaadin.

Example case: I would like to retrieve some data from mongoDB database after clicking a button. The way to retrieve the data from MongoDB database could be MainView <-> Controller <-> Service <-> Repository, right?

Actually I am not sure how to structure my project. Could someone help me please?

tqnone
  • 13
  • 7
  • We can not decide what architecture makes most sense for your project. Check the MV* patterns, try them in an isolated branch for one part of your application and decide _for your usecase_. There are no silver bullets. – cfrick Jan 24 '20 at 11:33

1 Answers1

0

Google is your best friend, see this blog/tutorial how to set this up: https://www.journaldev.com/18156/spring-boot-mongodb

Kevin
  • 506
  • 6
  • 13
  • I know how to use mongoDB. The problem is that I dont know how these layers are connected in my case... Thank you anyways. – tqnone Jan 24 '20 at 10:02