Software Fundamental

25
Software Components Interaction Standards  Java 2 Enterprise Edition(J2EE) Windows Communication Foundation(WCF)

Transcript of Software Fundamental

8/8/2019 Software Fundamental

http://slidepdf.com/reader/full/software-fundamental 1/25

Software Components Interaction

Standards

•  Java 2 Enterprise Edition(J2EE)

• Windows Communication Foundation(WCF)

8/8/2019 Software Fundamental

http://slidepdf.com/reader/full/software-fundamental 2/25

 J2EE

 Java Platform

•   J2SE – Java 2 Standard Edition -> Java fordesktop/workstation

•   J2ME – Java 2 Micro Edition -> Java for consumer

device•  J2EE – Java 2 Enterprise Edition -> Java for server

8/8/2019 Software Fundamental

http://slidepdf.com/reader/full/software-fundamental 3/25

What is j2ee?

 J2EE is a platform-independent, Java-centric environment for developing,building and deploying Web-based

enterprise applications online. The J2EE platform consists of a set of 

services, APIs, and protocols that

provide the functionality fordeveloping multitier, Web-basedapplications.

8/8/2019 Software Fundamental

http://slidepdf.com/reader/full/software-fundamental 4/25

Why we require J2EE?

Simplifies application development anddecrease the need for programming.

Programmer training by creating

standardized, reusable modulecomponent and by enabling the tier.

 To develop distributed system like E-Commerce

 To better implementation of MVC(Modelview control)

For better security

8/8/2019 Software Fundamental

http://slidepdf.com/reader/full/software-fundamental 5/25

 J2EE Multitier distributed Application

8/8/2019 Software Fundamental

http://slidepdf.com/reader/full/software-fundamental 6/25

 J2EE clients

Web Client  That contain dynamic WebPages . Some time called thin client.

Application Client Typically have GUI. Abstract windows toolkit May be., command line interface.

8/8/2019 Software Fundamental

http://slidepdf.com/reader/full/software-fundamental 7/25

 Java Server Communication

8/8/2019 Software Fundamental

http://slidepdf.com/reader/full/software-fundamental 8/25

Web Tier and j2ee application

8/8/2019 Software Fundamental

http://slidepdf.com/reader/full/software-fundamental 9/25

 J2ee and ESI tier

8/8/2019 Software Fundamental

http://slidepdf.com/reader/full/software-fundamental 10/25

 J2EE Architect

eb Container

              / 

        R        M        I

        I        I        O        P

        J         N        D        I

        J         T        A

        J         A        F

        J         D        B        C

        J      a     v     a

        M     a

        i        l

        J         M        S

Servlets JSPs

 JB Container

              / 

        R        M        I

        I        I        O        P

        J         N        D        I

        J         T        A

        J         A        F

        J         D        B        C

        J      a     v     a

        M     a

        i        l

        J         M        S

 Session Beans  Entity Beans

J2EEApplication

Server

/HTMLXML

Applet

Client-Applica

tion

JDBC

JavaMail

RMI

IIOP

JNDI

JMS

RDBMS

 Mail Server

CORBA

 Directory Services

Client  Application Logic

Data

8/8/2019 Software Fundamental

http://slidepdf.com/reader/full/software-fundamental 11/25

 J2ee API

RMI : RMI is an API which allows Javaobjects to communicate remotely withother objects. This API has the samepurpose of CORBA from OMG.

 JNDI : provide naming and directoryfunctionality.

 JDBC : Let you invoke SQL command from

 java program. JMS : Messaging standard tat allow to

crate, send, receive and read messages. JavaMail : to create e-mail.

8/8/2019 Software Fundamental

http://slidepdf.com/reader/full/software-fundamental 12/25

Windows communication foundation

8/8/2019 Software Fundamental

http://slidepdf.com/reader/full/software-fundamental 13/25

WCF is an extension of the .NETframework to build and run connectedsystems.

WCF provides a unified framework forbuilding secure and reliable transactedWeb services.

 The WCF framework builds loosely-coupled applications on a serviceoriented architecture that

interoperates more securely and

Introduction

8/8/2019 Software Fundamental

http://slidepdf.com/reader/full/software-fundamental 14/25

 The architectures

8/8/2019 Software Fundamental

http://slidepdf.com/reader/full/software-fundamental 15/25

The WCF Framework Model

8/8/2019 Software Fundamental

http://slidepdf.com/reader/full/software-fundamental 16/25

Architecture

 T h e fo llo w in g

 g ra p h ic illu stra te s

 th e m a jo r la y e rs o f th e W in d o w s

 C o m m u n ica tio n

 Fo u n d a tio n

.a rch ite ctu re

8/8/2019 Software Fundamental

http://slidepdf.com/reader/full/software-fundamental 17/25

Contracts and Descriptions

v .C o n tra ct d e fin e va rio u s a sp e cts o f th e m e ssa g e syste m

v  T h e d a ta co n tra ct d e scrib e s e ve ry p a ra m e te r th a t m a ke s.u p e ve ry m e ssa g e th a t a se rvice can cre a te o r con su m e

(The message parameters are defined by XML Schema.)d e fin itio n la n g u a g e d o cu m e n ts

v  T h e m e ssa g e co n tra ct d e fin e s sp e cific m e ssa g e p a rts, -u sin g S O A P p ro to co ls a n d a llo w s fin e r g ra in e d co n tro l

,o ve r p a rts o f th e m e ssa g e w h e n in te ro p e ra b ility.d e m a n d s su ch p re cisio n

v  T h e se rvice co n tra ct sp e cifie s th e a ctu a l m e th o d

,sig n a tu re s of th e se rvice a n d is d istrib u te d a s an in te rfa ce in o n e o f th e su p p o rte d p ro g ra m m in g, # .la n g u a g e s su ch a s V isu a lB a sic or V isu a lC

v Policies and bindings stipulate the conditions required tocommunicate with a service.

v

8/8/2019 Software Fundamental

http://slidepdf.com/reader/full/software-fundamental 18/25

Service Runtime

v The service runtime layer contains thebehaviors that occur only during theactual operation of the service, that is,

the runtime behaviors of the service.v Throttling controls how many messagesare processed, which can be varied if the demand for the service grows to a

preset limit.vAn error behavior specifies what occurs

when an internal error occurs on the

service

8/8/2019 Software Fundamental

http://slidepdf.com/reader/full/software-fundamental 19/25

Messaging

v The messaging layer is composed of channels. A channelis a component that processes a message in some way.

v A set of channels is also known as a channel stack .Channels operate on messages and message headers.

v There are two types of channels: transport channels and

 protocol channels.v Transport channels read and write messages from the

network (or some other communication point with theoutside world). Examples of transports are HTTP,named pipes, TCP, and MSMQ. Examples of encodingsare XML and optimized binary.

v Protocol channels implement message processingprotocols, often by reading or writing additional headersto the message. Examples of such

8/8/2019 Software Fundamental

http://slidepdf.com/reader/full/software-fundamental 20/25

Hosting and Activation 

vIn its final form, a service is a program.Like other programs, a service must berun in an executable. This is known as aself-hosted service.

vServices can also be hosted , or run in anexecutable managed by an externalagent, such as IIS or Windows

Activation Service (WAS). Services canalso be manually run as executables (.exe files) or be run automatically as aWindows service. COM+ components

can also be hosted as WCF services.

8/8/2019 Software Fundamental

http://slidepdf.com/reader/full/software-fundamental 21/25

Features of WCF

•Interoperability

v WCF implements modern industry standards for Webservice interoperability. (For more information about thesupported standards, see

Interoperability and Integration.)•Multiple Message Patterns 

v The most common pattern is the request/replypattern, where one endpoint requests data from a

second endpoint. The second endpoint replies. There are other patterns such as a one-waymessage in which a single endpoint sends amessage without any expectation of a reply. A morecomplex pattern is the duplex exchange patternwhere two endpoints establish a connection andsend data back and forth, similar to an instant

8/8/2019 Software Fundamental

http://slidepdf.com/reader/full/software-fundamental 22/25

WCF COMMUNICATION MODEL 

( )  Windows Communication Foundation WCF follows a –client server model to establish.communication between applications Client

 applications can directly access services.through Endpoints exposed by the service

,Endpoints are nothing but locations defined through which messages can be sent or,received and a service can have multiple.endpoints

8/8/2019 Software Fundamental

http://slidepdf.com/reader/full/software-fundamental 23/25

 A WCF Service is comprised of the following major components

Ø  Service ContractØ  Operation Contract

Ø  Data Contract

Ø  Data Member

8/8/2019 Software Fundamental

http://slidepdf.com/reader/full/software-fundamental 24/25

q  ervice Contract Service contract is a contract that specifies the

.direction and type of the messages in a conversation

 It is an interface or a class that defines the service contract in a Windows Communication

( ) .Foundation WCF application

8/8/2019 Software Fundamental

http://slidepdf.com/reader/full/software-fundamental 25/25

q  peration Contract 

An operation contract defines the methods of the service that are accessible by external

.systems

q  ata Contract A data contract defines a

 type with a set of data members or fields that will be used as the composite type in a service

.contractq  ata Member 

A data member specifies thetype which is part of a data contract used as acomposite type member of the contract