Building applications with a db-back-end Content: DD2471 (Lecture - - PowerPoint PPT Presentation

building applications with a db back end
SMART_READER_LITE
LIVE PREVIEW

Building applications with a db-back-end Content: DD2471 (Lecture - - PowerPoint PPT Presentation

Building applications with a db-back-end Content: DD2471 (Lecture 09) Modern database systems & their applications Spring 2011 1 / 16 Building applications with a db-back-end Content: Program architecture DD2471 (Lecture 09) Modern


slide-1
SLIDE 1

Building applications with a db-back-end

Content:

DD2471 (Lecture 09) Modern database systems & their applications Spring 2011 1 / 16

slide-2
SLIDE 2

Building applications with a db-back-end

Content:

◮ Program architecture

DD2471 (Lecture 09) Modern database systems & their applications Spring 2011 1 / 16

slide-3
SLIDE 3

Building applications with a db-back-end

Content:

◮ Program architecture ◮ Back-end

DD2471 (Lecture 09) Modern database systems & their applications Spring 2011 1 / 16

slide-4
SLIDE 4

Building applications with a db-back-end

Content:

◮ Program architecture ◮ Back-end ◮ Front-end

DD2471 (Lecture 09) Modern database systems & their applications Spring 2011 1 / 16

slide-5
SLIDE 5

Building applications with a db-back-end

Content:

◮ Program architecture ◮ Back-end ◮ Front-end ◮ Middle-tier (where things happen)

DD2471 (Lecture 09) Modern database systems & their applications Spring 2011 1 / 16

slide-6
SLIDE 6

Building applications with a db-back-end

Content:

◮ Program architecture ◮ Back-end ◮ Front-end ◮ Middle-tier (where things happen) ◮ (Very little on) distributed systems.

  • DD2471 (Lecture 09)

Modern database systems & their applications Spring 2011 1 / 16

slide-7
SLIDE 7

What will we do on the lab assignments

  • Content. . . :

DD2471 (Lecture 09) Modern database systems & their applications Spring 2011 2 / 16

slide-8
SLIDE 8

What will we do on the lab assignments

  • Content. . . :

◮ Build back-ends in more than one way

DD2471 (Lecture 09) Modern database systems & their applications Spring 2011 2 / 16

slide-9
SLIDE 9

What will we do on the lab assignments

  • Content. . . :

◮ Build back-ends in more than one way ◮ With pluggable front-ends (in more than one way)

DD2471 (Lecture 09) Modern database systems & their applications Spring 2011 2 / 16

slide-10
SLIDE 10

What will we do on the lab assignments

  • Content. . . :

◮ Build back-ends in more than one way ◮ With pluggable front-ends (in more than one way) ◮ Build an application (logic layer/middle-tier)

DD2471 (Lecture 09) Modern database systems & their applications Spring 2011 2 / 16

slide-11
SLIDE 11

What will we do on the lab assignments

  • Content. . . :

◮ Build back-ends in more than one way ◮ With pluggable front-ends (in more than one way) ◮ Build an application (logic layer/middle-tier) ◮ With authentication

  • DD2471 (Lecture 09)

Modern database systems & their applications Spring 2011 2 / 16

slide-12
SLIDE 12

Application architecture

In the past application programs were centered around the database and it was accepted that everything except database management was lousy.

DD2471 (Lecture 09) Modern database systems & their applications Spring 2011 3 / 16

slide-13
SLIDE 13

Application architecture

In the past application programs were centered around the database and it was accepted that everything except database management was lousy. Interaction was a catastrophy and error management a nightmare.

DD2471 (Lecture 09) Modern database systems & their applications Spring 2011 3 / 16

slide-14
SLIDE 14

Application architecture

In the past application programs were centered around the database and it was accepted that everything except database management was lousy. Interaction was a catastrophy and error management a nightmare. 4GL (as they were called) still exist and have their place in rapid prototyping but have to a large extent been replaced by EGL (Enterprise Generation Languages) that can deliver almost full-fledged application programs, but mostly need some final tweaking.

  • DD2471 (Lecture 09)

Modern database systems & their applications Spring 2011 3 / 16

slide-15
SLIDE 15

Application architecture . . .

Monolithic programs are often called 1-tier as there is no separation of concern at

  • all. Smalltalk (1979) changed the situation with the introduction of their division of

programs in a model containing a data structure and the operations on data in that data structure, a controller that managed all user stimuli and a view component managing all visualization, called Model-View-Controller (MVC).

View Application program Model Controller User

  • DD2471 (Lecture 09)

Modern database systems & their applications Spring 2011 4 / 16

slide-16
SLIDE 16

Application architecture . . .

There are variations to the concept

View Application program Model Controller User View Application program Model Controller User

  • DD2471 (Lecture 09)

Modern database systems & their applications Spring 2011 5 / 16

slide-17
SLIDE 17

Application architecture . . .

There was some criticism (it was difficult to spearate view and controller) and

  • ther models popped up, e.g. PAC* (Presentation-Abstraction-Control), that

focused on the MVC shortcomings and on making the same separation of concerns on all levels of the program.

DD2471 (Lecture 09) Modern database systems & their applications Spring 2011 6 / 16

slide-18
SLIDE 18

Application architecture . . .

There was some criticism (it was difficult to spearate view and controller) and

  • ther models popped up, e.g. PAC* (Presentation-Abstraction-Control), that

focused on the MVC shortcomings and on making the same separation of concerns on all levels of the program. For a while there were many different systems but today only MVC and PAC* have

  • survived. Many of them were agent-based: MVC, PAC*, ALV, LIM and York. They

implemented modules that worked as “free agents” responding to stimuli from

  • ther “agents”.
  • DD2471 (Lecture 09)

Modern database systems & their applications Spring 2011 6 / 16

slide-19
SLIDE 19

Application architecture . . .

Presentation Abstraction Controller P C A P C A P C A P C A P C A

  • DD2471 (Lecture 09)

Modern database systems & their applications Spring 2011 7 / 16

slide-20
SLIDE 20

Application architecture . . .

The difference between MVC and PAC* is small. In MVC the view is responsible for output to the GUI and the controller takes care of user stimuli (from the GUI) while in PAC* all interaction is managed by the presentation module.

DD2471 (Lecture 09) Modern database systems & their applications Spring 2011 8 / 16

slide-21
SLIDE 21

Application architecture . . .

The difference between MVC and PAC* is small. In MVC the view is responsible for output to the GUI and the controller takes care of user stimuli (from the GUI) while in PAC* all interaction is managed by the presentation module. MVC arrived with Smalltalk in 1979 and never changed since 1980 (during interaction “childhood”) and PAC* appeared 1987 and got its final design 1997.

DD2471 (Lecture 09) Modern database systems & their applications Spring 2011 8 / 16

slide-22
SLIDE 22

Application architecture . . .

The difference between MVC and PAC* is small. In MVC the view is responsible for output to the GUI and the controller takes care of user stimuli (from the GUI) while in PAC* all interaction is managed by the presentation module. MVC arrived with Smalltalk in 1979 and never changed since 1980 (during interaction “childhood”) and PAC* appeared 1987 and got its final design 1997. MVC is designed by a few people during the early days of interaction design while PAC* is the result of many researchers work during a lot of years. Still they are strikingly alike – honor to the Smalltalk team that pioneered the work (and later built the first MacOS . . . )

  • DD2471 (Lecture 09)

Modern database systems & their applications Spring 2011 8 / 16

slide-23
SLIDE 23

Application architecture . . .

V C M User P C A User

  • DD2471 (Lecture 09)

Modern database systems & their applications Spring 2011 9 / 16

slide-24
SLIDE 24

Application architecture . . .

About 1985 applications programs started to appear that had a distinct internal

  • rganization:

Persistence layer Presentation layer Business logic layer

DD2471 (Lecture 09) Modern database systems & their applications Spring 2011 10 / 16

slide-25
SLIDE 25

Application architecture . . .

About 1985 applications programs started to appear that had a distinct internal

  • rganization:

Persistence layer Presentation layer Business logic layer where the persistence layer manages data storage and reading from stored data, the business logic layer does the actual processing and the presentation layer manages presentation and the reception of user stinuli.

  • DD2471 (Lecture 09)

Modern database systems & their applications Spring 2011 10 / 16

slide-26
SLIDE 26

Application architecture . . .

But . . . there were short-cuts to get better performance. I even have a book on how to avoid the logic layer when presenting information. The image is from the book:

XLib X Toolkit Intrinsics Motif Toolkit GUI

  • DD2471 (Lecture 09)

Modern database systems & their applications Spring 2011 11 / 16

slide-27
SLIDE 27

Application architecture . . .

Computer are better, faster and have much more primary memory today. Short-cuts are exploitation possibilities for people with insidious objectives.

DD2471 (Lecture 09) Modern database systems & their applications Spring 2011 12 / 16

slide-28
SLIDE 28

Application architecture . . .

Computer are better, faster and have much more primary memory today. Short-cuts are exploitation possibilities for people with insidious objectives. Security is often more important than performance and performance is mostly better than just good enough, maybe with an exception for graphics in certain games.

  • DD2471 (Lecture 09)

Modern database systems & their applications Spring 2011 12 / 16

slide-29
SLIDE 29

Application architecture . . .

MVC is the buzzword of the day in industrial applications, though in a PAC*-like variant (it is actually more PAC* than MVC). Even the subparts of the programs are layered to allow for isolation and as sparse as possible communication between all parts of the application.

DD2471 (Lecture 09) Modern database systems & their applications Spring 2011 13 / 16

slide-30
SLIDE 30

Application architecture . . .

MVC is the buzzword of the day in industrial applications, though in a PAC*-like variant (it is actually more PAC* than MVC). Even the subparts of the programs are layered to allow for isolation and as sparse as possible communication between all parts of the application. In large applications with many programmers / programmer teams this is the only feasible road to success.

  • DD2471 (Lecture 09)

Modern database systems & their applications Spring 2011 13 / 16

slide-31
SLIDE 31

Application architecture . . .

OS

DBMS

GUI

Business logic

Persistence layer communication

  • DD2471 (Lecture 09)

Modern database systems & their applications Spring 2011 14 / 16

slide-32
SLIDE 32

Application architecture . . .

Sun (nowadays ORACLE) recommend J2EE as infrastructure for full-fledged applications.

UDDA ebXML RMI−IIOP Entity Bean Session Bean driven Bean Java Applet Java Application HTML−client EJB Message− Session Bean Session Bean Session Bean Persistence layer Business layer Servlet JSP Web server Message client C++−client Business system SOAP WSDL HTTPS HTTP RMI−IIOP RMI−IIOP CORBA/IIOP Message sending Application server Presentation layer

  • DD2471 (Lecture 09)

Modern database systems & their applications Spring 2011 15 / 16

slide-33
SLIDE 33

Application architecture . . .

But it is a heavy and “invading” architecture that is suitable if you use all of it. There are stubs for all standard components which generate massive amounts of calls even if you don’t implement components. Performance suffer a great deal unless you can make use of it all and if you don’t have a competent server.

DD2471 (Lecture 09) Modern database systems & their applications Spring 2011 16 / 16

slide-34
SLIDE 34

Application architecture . . .

But it is a heavy and “invading” architecture that is suitable if you use all of it. There are stubs for all standard components which generate massive amounts of calls even if you don’t implement components. Performance suffer a great deal unless you can make use of it all and if you don’t have a competent server. There are newer architectures that are not as “invading” and well worth an analysis both on usage of the infrastructure and also on scalabitlity.

  • DD2471 (Lecture 09)

Modern database systems & their applications Spring 2011 16 / 16