View, controller, model, persistency - PowerPoint PPT Presentation

1 / 10
About This Presentation
Title:

View, controller, model, persistency

Description:

Data can be stored on the disk in A simple file A database CRUD terminology CRUD commonly used abbreviation Create new data Read existing data Update existing data ... – PowerPoint PPT presentation

Number of Views:46
Avg rating:3.0/5.0
Slides: 11
Provided by: AB2102
Category:

less

Transcript and Presenter's Notes

Title: View, controller, model, persistency


1
Architecture in administrative applications
  • View, controller, model, persistency
  • Larman chapter 30

2
Layers
  • An application consists of several layers
    Larman, page 451
  • Presentation layer
  • GUI
  • Application layer
  • Controller(s)
  • Domain layer
  • Worker classes (alias model)
  • Business layer
  • We wont go into that layer in this note
  • Technical layer
  • Like a database layer
  • Foundation layer
  • Like JDBC

3
Architecture
  • An architecture tells
  • Which layers we need
  • How to send information from one layer to another
  • In this note we consider data
  • Where to put data
  • When to read and update date

4
Persistency
  • Data must be kept on stable storage (usually hard
    disk) to prevent loss of data when the
    application stops.
  • Data can be stored on the disk in
  • A simple file
  • A database

5
CRUD terminology
  • CRUD commonly used abbreviation
  • Create new data
  • Read existing data
  • Update existing data
  • Delete existing data

6
Handling data
  • Data can be handled in many ways in a layered
    application
  • Memory based
  • Memory based, with write through
  • Like memory based
  • But all CUD operation goes directly to the hard
    disk
  • Other users can see the updated data
  • All operations disk based
  • Persistency framework

7
Memory based
  • Application start
  • Read data into collection classes in memory.
  • Application running
  • Do CRUD on the data in memory.
  • Application stop
  • Write the data back to the disk

8
Memory based, with write through
  • Like memory based
  • But all CUD operation goes directly to persistent
    store
  • Other users can see the updated data immediately.

9
All operations are disk based
  • Controllers does CRUD directly on the persistent
    store.
  • No in-memory data.
  • Domain layer not used
  • Domain classes may be used for sending
    information between application and technical
    layer

10
Persistency framework
  • A persistency framework moves objects from memory
    to stable storage (typically a database)
  • Lots of interfaces and abstract classes in the
    technical layer.
  • Reusable
  • For every application
  • For every type of stable storage
  • Simple files
  • Different DBMSes
  • J2EE (Java 2 Enterprise Edition) application
    servers offers a persistency framework
  • Larman, chapter 34 designs a persistency
    framework.
Write a Comment
User Comments (0)
About PowerShow.com