Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Enterprise application architecture

 
Ranch Hand
Posts: 153
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I took a look at someone's code here and I am trying to understand its architecture:
We are looking at a classic enterprise architecture using Spring core for dependency injection.

FavoriteService


User


UserDao


UserDaoWithMap


Users


I understand the following enterprise roles are in place:
service: FavoriteService
model: User
dao: UserDao, UserDaoWithMap

However, I don't understand what enterprise role the 'Users' class fulfills. I don't see where in the architecture it fits - it looks to me like some sort of helper class. Though, it does look like it has business value because it uses the UserDao.
Does anyone see any standard pattern here? Does the 'Users' class have an enterprise purpose or is it just some custom helper class?

I think it is a Manager/Controller type of class.
 
Saloon Keeper
Posts: 22498
151
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Looks to me like a Data Model object. The DAO works with it, not the other way around. It's just a POJO.
 
Saloon Keeper
Posts: 12264
259
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It just looks like a Facade around your data access object. It adapts the UserDao for use by FavoriteService, so you could say it's in the same layer as the FavoriteService class. Think of it as a service to the FavoriteService.
 
Ryan McClain
Ranch Hand
Posts: 153
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Indeed, Mr. van Hulst, that seems to be it. Thank you.
 
Bring out your dead! Or a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic