SlideShare una empresa de Scribd logo
1 de 24
Descargar para leer sin conexión
Integration of Spring with
Blaze DS and Cairngorm UM
Deepdive by N.S.Devaraj

http://nsdevaraj.wordpress.com/
twitter : @nsdevaraj
Agenda for this season

    What is Spring?

    Why Spring with Flex?

    Why Spring BlazeDS Integration?

    What is & Why Cairngorm UM?

    What is & why generic DAO?

    What is & Why CairnSpring?
WHAT IS SPRING?

  The result is looser coupling between
 components. The Spring IoC container has
    proven to be a solid foundation for
  building robust enterprise applications.
                   `


The components managed by the Spring IoC
     container are called Spring beans.
WHAT IS SPRING?


The Spring framework includes several other
      modules in addition to its core IoC
                 container.
     http://www.springframework.org.
WHY WE NEED FLEX ACCESS
        SPRING?

Flex is the obvious choice when a Spring
Developer is looking at RIA.

Can reuse your server-side Spring to move
into RIA.
WHY WE NEED FLEX ACCESS
          SPRING?
 In scenario of the Remoting and Data
   Management Services approaches:

  It enable the tightest integration with
  Spring. There is no need to transform
 data, or to expose services in a certain
 way: the Flex application works directly
with the beans registered in the Spring IoC
                container.
WHY WE NEED FLEX ACCESS
         SPRING?
The BlazeDS Remoting enables binding your
 valueobjects with Java pojo Classes easily
               by metadata
 [RemoteClass(alias=”com.adobe.pojo.ob”]

  By using the Spring Security 2.0 we can
      make our application secured for
                transactions.
WHAT is BlazeDS?
BlazeDS provides a set of services that lets you connect
  a client-side application to server-side data, and pass
   data among multiple clients connected to the server.
   BlazeDS implements real-time messaging between
                           clients.
    Browser                           application
     or AIR
                                          .swf


                                                 http(s)
                       domain
                         blazeds server

      External                             Remote
      Services         Service
                                          Procedure        Messaging
                        Proxy
                                            Calls
BlazeDS Server
                                 servlet
                       /{context}/messagebroker/*
                                                                          core
              config
         proxy-config.xml

              config                                         config

       messaging-config.xml                         services-config.xml

              config
flex    remote-config.xml
                              domain
             library                                config
              .jar                                  .class
                                    Classes
Lib
BLAZE DS WAY
 Using the “dependency lookup” approach
of the SpringFactory feels opposite to the
"Spring Way"

The burden of configuration is multiplied.
Potential for deep integration beyond just
remoting is limited.
BLAZEDS SPRING INTEGRATION
 Bootstrap the BlazeDS MessageBroker as a
Spring-managed bean (no more web.xml or
 MessageBrokerServlet config needed).

Route http-based Flex messages to the
MessageBroker through the Spring
DispatcherServlet.

Expose Spring beans for remoting by namespace
TRADITIONAL BLAZE DS WAY

The BlazeDS configuration first imports the 'remoting-config.xml',The parameters in the URL 'server.name' and
    'server.port' are supplied by the Flex runtime. The 'context.root' parameter needs to be supplied during
    compilation using the 'context-root' compiler option.
    services-config.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <services-config>
       <services>
        <service-include file-path="remoting-config.xml" />
          <default-channels>
            <channel ref="person-amf"/>
          </default-channels>
       </services>
       <channels>
          <channel-definition id="person-amf" class="mx.messaging.channels.AMFChannel">
             <endpoint url="http://{server.name}:{server.port}/{context.root}/spring/messagebroker/amf"
    class="flex.messaging.endpoints.AMFEndpoint"/>
          </channel-definition>
       </channels>
    </services-config>
SPRING BLAZEDS INTEGRATION
Example:
 WEB.XML
 Spring BlazeDS Integration servlet
   <servlet>
      <servlet-name>spring-flex</servlet-name>
      <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
      <init-param>
        <param-name>contextConfigLocation</param-name>

        <param-value>/WEB-INF/flex-servlet-context.xml</param-value>
      </init-param>
      <load-on-startup>1</load-on-startup>
   </servlet>
 Mapping Spring BlazeDS Integration servlet to handle all requests to '/spring/*
   <servlet-mapping>
      <servlet-name>spring-flex</servlet-name>
      <url-pattern>/spring/*</url-pattern>
   </servlet-mapping>
SPRING BLAZE DS EXAMPLE
flex-servlet-context.xml
<?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="
    http://www.w3.org/2001/XMLSchema-instance"
    xmlns:p="http://www.springframework.org/schema/p"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:flex="http://www.springframework.org/schema/flex"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans.xsd
    http://www.springframework.org/schema/context
    http://www.springframework.org/schema/context/spring-context.xsd
    http://www.springframework.org/schema/flex
    http://www.springframework.org/schema/flex/spring-flex-1.0.xsd">
  <context:component-scan base-package="org.springbyexample.web.service" />
  <flex:message-broker/> ----Spring BlazeDS Integration configuration of the BlazeDS message broker, which
     handles remoting and messaging requests.
 <flex:remoting-destination ref="personDao" /> ---Exposes the personDao bean as a BlazeDS remoting destination
</beans>
SPRING BLAZEDS INTEGRATION
 PersonService.java
     @Service
     @RemotingDestination
     public class PersonService {
        private final PersonDao personDao;
        /**
         * Constructor
         */
        @Autowired
        public PersonService(PersonDao personDao) {
            this.personDao = personDao;
        }
        public void remove(int id) {
            Person person = personDao.findPersonById(id);
            personDao.delete(person);
        }
     }
 PersonDeleteCommand.as
          var ro:RemoteObject = new RemoteObject("personDao");
          ro.remove(id);
          ro.addEventListener(ResultEvent.RESULT, updateSearch);
Cairngorm with UM Extensions

    Universal Mind Cairngorm Extensions
( UM – CGX is easy to migrate from CG)

    Event – Business logic combined together

    Command logic can be aggregated to
    context-specific   command        classes
    (minimizes the number of classes)

    Support for easy queue of delegate calls
    (SequenceGenerator)
Cairngorm with UM Extensions

    Create Responder in view

    Add responder to event

    Cache/Store responder from event to
    command

    In Command, on success/failure call back
    these responders

    On view handle success/failure to control
    view states
Cairngorm with UM Extensions
  View Layer       Model Layer            Control Layer

                    ModelLocator            via IResponder
                                                               tcp/ip
                   via databinding
    View                              Command       Delegate            Server
               via eventdispatching

                MVC Classic Usage
  View Layer                      Business Layer
  via IResponder                            via IResponder
                                                               tcp/ip

    View                              Command       Delegate            Server
                   via eventdispatching



               Using View Notifications
J2EE – DAO INTRODUCTION

    All database access in the system is made
    through a DAO to achieve encapsulation.

    Each DAO instance is responsible for one
    primary domain object or entity. If a domain
    object has an independent lifecycle, it should
    have its own DAO.

    The DAO is responsible for creations, reads (by
    primary key), updates, and deletions -- that
    is, CRUD -- on the domain object.
generic DAO
 For creating a new DAO we need →
a Hibernate mapping file,
a plain old Java interface,
and 10 lines in your Spring configuration
  file.

Resource:
http://www.ibm.com/developerworks/java/library/j-
   genericdao.html
CairnSpring
The CairnSpring includes both Caringorm UM,
 Generic DAO along with the Spring BlazeDS
                Integration.

       It also enables Paging request.

  http://www.code.google.com/p/cairnspring
RemoteObject
Channels                      Producer                Consumer          Dataservice




                                              NIO Long         NIO
              HTTP          NIO Polling                                    RTMP
                                               Polling      Streaming

                                                Long
              AMF             Polling                       Streaming    Piggyback
                                               Polling



           Messaging              Remoting               Data Mgmt
                                                                           Proxy
Services




                                                          Change
              Pub/Sub                   RPC
                                                          Tracking

           Real Time Push               AMF               Data Sync
                                                                            PDF
Adapters




              JMS             SQL              Java         Hibernate    ColdFusion


             WSRP             Spring          Security
QUESTIONS

Más contenido relacionado

La actualidad más candente

Restful communication with Flex
Restful communication with FlexRestful communication with Flex
Restful communication with FlexChristian Junk
 
(ATS3-PLAT01) Recent developments in Pipeline Pilot
(ATS3-PLAT01) Recent developments in Pipeline Pilot(ATS3-PLAT01) Recent developments in Pipeline Pilot
(ATS3-PLAT01) Recent developments in Pipeline PilotBIOVIA
 
Cloud Foundry Anniversary: Technical Slides
Cloud Foundry Anniversary: Technical Slides Cloud Foundry Anniversary: Technical Slides
Cloud Foundry Anniversary: Technical Slides marklucovsky
 
Dave Carroll Application Services Salesforce
Dave Carroll Application Services SalesforceDave Carroll Application Services Salesforce
Dave Carroll Application Services Salesforcedeimos
 
Plongée en eaux profondes dans l'architecture du nouvel Exchange 2013
Plongée en eaux profondes dans l'architecture du nouvel Exchange 2013Plongée en eaux profondes dans l'architecture du nouvel Exchange 2013
Plongée en eaux profondes dans l'architecture du nouvel Exchange 2013Microsoft Décideurs IT
 
6 develop web20_with_rad-tim_frnacis_sarika-s
6 develop web20_with_rad-tim_frnacis_sarika-s6 develop web20_with_rad-tim_frnacis_sarika-s
6 develop web20_with_rad-tim_frnacis_sarika-sIBM
 
5 rqm gdd-sharmila-ramesh
5 rqm gdd-sharmila-ramesh5 rqm gdd-sharmila-ramesh
5 rqm gdd-sharmila-rameshIBM
 
vFabric - Ideal Platform for SaaS Apps
vFabric - Ideal Platform for SaaS AppsvFabric - Ideal Platform for SaaS Apps
vFabric - Ideal Platform for SaaS AppsVMware vFabric
 
Syer Monitoring Integration And Batch
Syer Monitoring Integration And BatchSyer Monitoring Integration And Batch
Syer Monitoring Integration And BatchDave Syer
 
Classloader leak detection in websphere application server
Classloader leak detection in websphere application serverClassloader leak detection in websphere application server
Classloader leak detection in websphere application serverRohit Kelapure
 
Managing Enterprise Services through Service Versioning & Governance - Impact...
Managing Enterprise Services through Service Versioning & Governance - Impact...Managing Enterprise Services through Service Versioning & Governance - Impact...
Managing Enterprise Services through Service Versioning & Governance - Impact...Prolifics
 
Kerberos: The Four Letter Word
Kerberos: The Four Letter WordKerberos: The Four Letter Word
Kerberos: The Four Letter WordKenneth Maglio
 

La actualidad más candente (20)

Exchange Server 2013 Architecture Deep Dive, Part 2
Exchange Server 2013 Architecture Deep Dive, Part 2 Exchange Server 2013 Architecture Deep Dive, Part 2
Exchange Server 2013 Architecture Deep Dive, Part 2
 
Restful communication with Flex
Restful communication with FlexRestful communication with Flex
Restful communication with Flex
 
(ATS3-PLAT01) Recent developments in Pipeline Pilot
(ATS3-PLAT01) Recent developments in Pipeline Pilot(ATS3-PLAT01) Recent developments in Pipeline Pilot
(ATS3-PLAT01) Recent developments in Pipeline Pilot
 
Cloud Foundry Anniversary: Technical Slides
Cloud Foundry Anniversary: Technical Slides Cloud Foundry Anniversary: Technical Slides
Cloud Foundry Anniversary: Technical Slides
 
Exchange Server 2013 Architecture Deep Dive, Part 1
Exchange Server 2013 Architecture Deep Dive, Part 1Exchange Server 2013 Architecture Deep Dive, Part 1
Exchange Server 2013 Architecture Deep Dive, Part 1
 
Blaze Ds Slides
Blaze Ds SlidesBlaze Ds Slides
Blaze Ds Slides
 
Enterprise Service Bus Part 2
Enterprise Service Bus Part 2Enterprise Service Bus Part 2
Enterprise Service Bus Part 2
 
Dave Carroll Application Services Salesforce
Dave Carroll Application Services SalesforceDave Carroll Application Services Salesforce
Dave Carroll Application Services Salesforce
 
Shalini xs10
Shalini xs10Shalini xs10
Shalini xs10
 
Plongée en eaux profondes dans l'architecture du nouvel Exchange 2013
Plongée en eaux profondes dans l'architecture du nouvel Exchange 2013Plongée en eaux profondes dans l'architecture du nouvel Exchange 2013
Plongée en eaux profondes dans l'architecture du nouvel Exchange 2013
 
6 develop web20_with_rad-tim_frnacis_sarika-s
6 develop web20_with_rad-tim_frnacis_sarika-s6 develop web20_with_rad-tim_frnacis_sarika-s
6 develop web20_with_rad-tim_frnacis_sarika-s
 
3 customer presentation
3 customer presentation3 customer presentation
3 customer presentation
 
Oracle OSB Tutorial 2
Oracle OSB Tutorial 2Oracle OSB Tutorial 2
Oracle OSB Tutorial 2
 
Server 2008 R2 Yeniliklər
Server 2008 R2 YeniliklərServer 2008 R2 Yeniliklər
Server 2008 R2 Yeniliklər
 
5 rqm gdd-sharmila-ramesh
5 rqm gdd-sharmila-ramesh5 rqm gdd-sharmila-ramesh
5 rqm gdd-sharmila-ramesh
 
vFabric - Ideal Platform for SaaS Apps
vFabric - Ideal Platform for SaaS AppsvFabric - Ideal Platform for SaaS Apps
vFabric - Ideal Platform for SaaS Apps
 
Syer Monitoring Integration And Batch
Syer Monitoring Integration And BatchSyer Monitoring Integration And Batch
Syer Monitoring Integration And Batch
 
Classloader leak detection in websphere application server
Classloader leak detection in websphere application serverClassloader leak detection in websphere application server
Classloader leak detection in websphere application server
 
Managing Enterprise Services through Service Versioning & Governance - Impact...
Managing Enterprise Services through Service Versioning & Governance - Impact...Managing Enterprise Services through Service Versioning & Governance - Impact...
Managing Enterprise Services through Service Versioning & Governance - Impact...
 
Kerberos: The Four Letter Word
Kerberos: The Four Letter WordKerberos: The Four Letter Word
Kerberos: The Four Letter Word
 

Destacado

Best Apps and Websites for Classroom Management
Best Apps and Websites for Classroom ManagementBest Apps and Websites for Classroom Management
Best Apps and Websites for Classroom ManagementKaren VItek
 
Introduction to ClassDojo
Introduction to ClassDojoIntroduction to ClassDojo
Introduction to ClassDojoClassDojo
 
About ClassDojo
About ClassDojoAbout ClassDojo
About ClassDojoClassDojo
 
Presentación class dojo
Presentación class dojoPresentación class dojo
Presentación class dojoHéctor Pino
 
elektronik portfolyo nedir nasıl hazırlanır
elektronik portfolyo nedir nasıl hazırlanırelektronik portfolyo nedir nasıl hazırlanır
elektronik portfolyo nedir nasıl hazırlanırMerve Şimşek
 

Destacado (6)

Best Apps and Websites for Classroom Management
Best Apps and Websites for Classroom ManagementBest Apps and Websites for Classroom Management
Best Apps and Websites for Classroom Management
 
Introduction to ClassDojo
Introduction to ClassDojoIntroduction to ClassDojo
Introduction to ClassDojo
 
About ClassDojo
About ClassDojoAbout ClassDojo
About ClassDojo
 
Presentación class dojo
Presentación class dojoPresentación class dojo
Presentación class dojo
 
elektronik portfolyo nedir nasıl hazırlanır
elektronik portfolyo nedir nasıl hazırlanırelektronik portfolyo nedir nasıl hazırlanır
elektronik portfolyo nedir nasıl hazırlanır
 
ClassDojo PD
ClassDojo PDClassDojo PD
ClassDojo PD
 

Similar a BlazeDS

BlazeDS
BlazeDS BlazeDS
BlazeDS Priyank
 
Flex And Java Integration
Flex And Java IntegrationFlex And Java Integration
Flex And Java Integrationrssharma
 
Windows Azure Design Patterns
Windows Azure Design PatternsWindows Azure Design Patterns
Windows Azure Design PatternsDavid Pallmann
 
Flex And Java Integration
Flex And Java IntegrationFlex And Java Integration
Flex And Java Integrationravinxg
 
A Walking Tour of (almost) all of Springdom
A Walking Tour of (almost) all of Springdom A Walking Tour of (almost) all of Springdom
A Walking Tour of (almost) all of Springdom Joshua Long
 
Camel on Cloud by Christina Lin
Camel on Cloud by Christina LinCamel on Cloud by Christina Lin
Camel on Cloud by Christina LinTadayoshi Sato
 
Simplify Cloud Applications using Spring Cloud
Simplify Cloud Applications using Spring CloudSimplify Cloud Applications using Spring Cloud
Simplify Cloud Applications using Spring CloudRamnivas Laddad
 
Leveraging BlazeDS, Java, and Flex: Dynamic Data Transfer
Leveraging BlazeDS, Java, and Flex: Dynamic Data TransferLeveraging BlazeDS, Java, and Flex: Dynamic Data Transfer
Leveraging BlazeDS, Java, and Flex: Dynamic Data TransferJoseph Labrecque
 
Introducing SOA and Oracle SOA Suite 11g for Database Professionals
Introducing SOA and Oracle SOA Suite 11g for Database ProfessionalsIntroducing SOA and Oracle SOA Suite 11g for Database Professionals
Introducing SOA and Oracle SOA Suite 11g for Database ProfessionalsLucas Jellema
 
OpenShift Meetup - Tokyo - Service Mesh and Serverless Overview
OpenShift Meetup - Tokyo - Service Mesh and Serverless OverviewOpenShift Meetup - Tokyo - Service Mesh and Serverless Overview
OpenShift Meetup - Tokyo - Service Mesh and Serverless OverviewMaría Angélica Bracho
 
Multi client Development with Spring
Multi client Development with SpringMulti client Development with Spring
Multi client Development with SpringJoshua Long
 
Automated integration testing of distributed systems with Docker Compose and ...
Automated integration testing of distributed systems with Docker Compose and ...Automated integration testing of distributed systems with Docker Compose and ...
Automated integration testing of distributed systems with Docker Compose and ...Boris Kravtsov
 
Spring in the Cloud - using Spring with Cloud Foundry
Spring in the Cloud - using Spring with Cloud FoundrySpring in the Cloud - using Spring with Cloud Foundry
Spring in the Cloud - using Spring with Cloud FoundryJoshua Long
 
Application Model for Cloud Deployment
Application Model for Cloud DeploymentApplication Model for Cloud Deployment
Application Model for Cloud DeploymentJim Kaskade
 
RIAs with Java, Spring, Hibernate, BlazeDS, and Flex
RIAs with Java, Spring, Hibernate, BlazeDS, and FlexRIAs with Java, Spring, Hibernate, BlazeDS, and Flex
RIAs with Java, Spring, Hibernate, BlazeDS, and Flexelliando dias
 
Sap xi online training
Sap xi online trainingSap xi online training
Sap xi online trainingVenkat reddy
 
Deep Dive into SpaceONE
Deep Dive into SpaceONEDeep Dive into SpaceONE
Deep Dive into SpaceONEChoonho Son
 
WS-VLAM workflow
WS-VLAM workflowWS-VLAM workflow
WS-VLAM workflowguest6295d0
 

Similar a BlazeDS (20)

BlazeDS
BlazeDS BlazeDS
BlazeDS
 
Enterprise service bus part 2
Enterprise service bus part 2Enterprise service bus part 2
Enterprise service bus part 2
 
Flex And Java Integration
Flex And Java IntegrationFlex And Java Integration
Flex And Java Integration
 
Windows Azure Design Patterns
Windows Azure Design PatternsWindows Azure Design Patterns
Windows Azure Design Patterns
 
Flex And Java Integration
Flex And Java IntegrationFlex And Java Integration
Flex And Java Integration
 
A Walking Tour of (almost) all of Springdom
A Walking Tour of (almost) all of Springdom A Walking Tour of (almost) all of Springdom
A Walking Tour of (almost) all of Springdom
 
Camel on Cloud by Christina Lin
Camel on Cloud by Christina LinCamel on Cloud by Christina Lin
Camel on Cloud by Christina Lin
 
Simplify Cloud Applications using Spring Cloud
Simplify Cloud Applications using Spring CloudSimplify Cloud Applications using Spring Cloud
Simplify Cloud Applications using Spring Cloud
 
Leveraging BlazeDS, Java, and Flex: Dynamic Data Transfer
Leveraging BlazeDS, Java, and Flex: Dynamic Data TransferLeveraging BlazeDS, Java, and Flex: Dynamic Data Transfer
Leveraging BlazeDS, Java, and Flex: Dynamic Data Transfer
 
Introducing SOA and Oracle SOA Suite 11g for Database Professionals
Introducing SOA and Oracle SOA Suite 11g for Database ProfessionalsIntroducing SOA and Oracle SOA Suite 11g for Database Professionals
Introducing SOA and Oracle SOA Suite 11g for Database Professionals
 
OpenShift Meetup - Tokyo - Service Mesh and Serverless Overview
OpenShift Meetup - Tokyo - Service Mesh and Serverless OverviewOpenShift Meetup - Tokyo - Service Mesh and Serverless Overview
OpenShift Meetup - Tokyo - Service Mesh and Serverless Overview
 
Multi client Development with Spring
Multi client Development with SpringMulti client Development with Spring
Multi client Development with Spring
 
Automated integration testing of distributed systems with Docker Compose and ...
Automated integration testing of distributed systems with Docker Compose and ...Automated integration testing of distributed systems with Docker Compose and ...
Automated integration testing of distributed systems with Docker Compose and ...
 
Spring in the Cloud - using Spring with Cloud Foundry
Spring in the Cloud - using Spring with Cloud FoundrySpring in the Cloud - using Spring with Cloud Foundry
Spring in the Cloud - using Spring with Cloud Foundry
 
Application Model for Cloud Deployment
Application Model for Cloud DeploymentApplication Model for Cloud Deployment
Application Model for Cloud Deployment
 
RIAs with Java, Spring, Hibernate, BlazeDS, and Flex
RIAs with Java, Spring, Hibernate, BlazeDS, and FlexRIAs with Java, Spring, Hibernate, BlazeDS, and Flex
RIAs with Java, Spring, Hibernate, BlazeDS, and Flex
 
Sap xi online training
Sap xi online trainingSap xi online training
Sap xi online training
 
Deep Dive into SpaceONE
Deep Dive into SpaceONEDeep Dive into SpaceONE
Deep Dive into SpaceONE
 
SOA patterns
SOA patterns SOA patterns
SOA patterns
 
WS-VLAM workflow
WS-VLAM workflowWS-VLAM workflow
WS-VLAM workflow
 

Último

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard37
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 

Último (20)

ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 

BlazeDS

  • 1. Integration of Spring with Blaze DS and Cairngorm UM Deepdive by N.S.Devaraj http://nsdevaraj.wordpress.com/ twitter : @nsdevaraj
  • 2. Agenda for this season  What is Spring?  Why Spring with Flex?  Why Spring BlazeDS Integration?  What is & Why Cairngorm UM?  What is & why generic DAO?  What is & Why CairnSpring?
  • 3. WHAT IS SPRING? The result is looser coupling between components. The Spring IoC container has proven to be a solid foundation for building robust enterprise applications. ` The components managed by the Spring IoC container are called Spring beans.
  • 4. WHAT IS SPRING? The Spring framework includes several other modules in addition to its core IoC container. http://www.springframework.org.
  • 5. WHY WE NEED FLEX ACCESS SPRING? Flex is the obvious choice when a Spring Developer is looking at RIA. Can reuse your server-side Spring to move into RIA.
  • 6. WHY WE NEED FLEX ACCESS SPRING? In scenario of the Remoting and Data Management Services approaches: It enable the tightest integration with Spring. There is no need to transform data, or to expose services in a certain way: the Flex application works directly with the beans registered in the Spring IoC container.
  • 7. WHY WE NEED FLEX ACCESS SPRING? The BlazeDS Remoting enables binding your valueobjects with Java pojo Classes easily by metadata [RemoteClass(alias=”com.adobe.pojo.ob”] By using the Spring Security 2.0 we can make our application secured for transactions.
  • 8. WHAT is BlazeDS? BlazeDS provides a set of services that lets you connect a client-side application to server-side data, and pass data among multiple clients connected to the server. BlazeDS implements real-time messaging between clients. Browser application or AIR .swf http(s) domain blazeds server External Remote Services Service Procedure Messaging Proxy Calls
  • 9. BlazeDS Server servlet /{context}/messagebroker/* core config proxy-config.xml config config messaging-config.xml services-config.xml config flex remote-config.xml domain library config .jar .class Classes Lib
  • 10. BLAZE DS WAY Using the “dependency lookup” approach of the SpringFactory feels opposite to the "Spring Way" The burden of configuration is multiplied. Potential for deep integration beyond just remoting is limited.
  • 11. BLAZEDS SPRING INTEGRATION Bootstrap the BlazeDS MessageBroker as a Spring-managed bean (no more web.xml or MessageBrokerServlet config needed). Route http-based Flex messages to the MessageBroker through the Spring DispatcherServlet. Expose Spring beans for remoting by namespace
  • 12. TRADITIONAL BLAZE DS WAY The BlazeDS configuration first imports the 'remoting-config.xml',The parameters in the URL 'server.name' and 'server.port' are supplied by the Flex runtime. The 'context.root' parameter needs to be supplied during compilation using the 'context-root' compiler option. services-config.xml <?xml version="1.0" encoding="UTF-8"?> <services-config> <services> <service-include file-path="remoting-config.xml" /> <default-channels> <channel ref="person-amf"/> </default-channels> </services> <channels> <channel-definition id="person-amf" class="mx.messaging.channels.AMFChannel"> <endpoint url="http://{server.name}:{server.port}/{context.root}/spring/messagebroker/amf" class="flex.messaging.endpoints.AMFEndpoint"/> </channel-definition> </channels> </services-config>
  • 13. SPRING BLAZEDS INTEGRATION Example: WEB.XML Spring BlazeDS Integration servlet <servlet> <servlet-name>spring-flex</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>/WEB-INF/flex-servlet-context.xml</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> Mapping Spring BlazeDS Integration servlet to handle all requests to '/spring/* <servlet-mapping> <servlet-name>spring-flex</servlet-name> <url-pattern>/spring/*</url-pattern> </servlet-mapping>
  • 14. SPRING BLAZE DS EXAMPLE flex-servlet-context.xml <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xmlns:context="http://www.springframework.org/schema/context" xmlns:flex="http://www.springframework.org/schema/flex" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/flex http://www.springframework.org/schema/flex/spring-flex-1.0.xsd"> <context:component-scan base-package="org.springbyexample.web.service" /> <flex:message-broker/> ----Spring BlazeDS Integration configuration of the BlazeDS message broker, which handles remoting and messaging requests. <flex:remoting-destination ref="personDao" /> ---Exposes the personDao bean as a BlazeDS remoting destination </beans>
  • 15. SPRING BLAZEDS INTEGRATION PersonService.java @Service @RemotingDestination public class PersonService { private final PersonDao personDao; /** * Constructor */ @Autowired public PersonService(PersonDao personDao) { this.personDao = personDao; } public void remove(int id) { Person person = personDao.findPersonById(id); personDao.delete(person); } } PersonDeleteCommand.as var ro:RemoteObject = new RemoteObject("personDao"); ro.remove(id); ro.addEventListener(ResultEvent.RESULT, updateSearch);
  • 16. Cairngorm with UM Extensions  Universal Mind Cairngorm Extensions ( UM – CGX is easy to migrate from CG)  Event – Business logic combined together  Command logic can be aggregated to context-specific command classes (minimizes the number of classes)  Support for easy queue of delegate calls (SequenceGenerator)
  • 17. Cairngorm with UM Extensions  Create Responder in view  Add responder to event  Cache/Store responder from event to command  In Command, on success/failure call back these responders  On view handle success/failure to control view states
  • 18.
  • 19. Cairngorm with UM Extensions View Layer Model Layer Control Layer ModelLocator via IResponder tcp/ip via databinding View Command Delegate Server via eventdispatching MVC Classic Usage View Layer Business Layer via IResponder via IResponder tcp/ip View Command Delegate Server via eventdispatching Using View Notifications
  • 20. J2EE – DAO INTRODUCTION  All database access in the system is made through a DAO to achieve encapsulation.  Each DAO instance is responsible for one primary domain object or entity. If a domain object has an independent lifecycle, it should have its own DAO.  The DAO is responsible for creations, reads (by primary key), updates, and deletions -- that is, CRUD -- on the domain object.
  • 21. generic DAO For creating a new DAO we need → a Hibernate mapping file, a plain old Java interface, and 10 lines in your Spring configuration file. Resource: http://www.ibm.com/developerworks/java/library/j- genericdao.html
  • 22. CairnSpring The CairnSpring includes both Caringorm UM, Generic DAO along with the Spring BlazeDS Integration. It also enables Paging request. http://www.code.google.com/p/cairnspring
  • 23. RemoteObject Channels Producer Consumer Dataservice NIO Long NIO HTTP NIO Polling RTMP Polling Streaming Long AMF Polling Streaming Piggyback Polling Messaging Remoting Data Mgmt Proxy Services Change Pub/Sub RPC Tracking Real Time Push AMF Data Sync PDF Adapters JMS SQL Java Hibernate ColdFusion WSRP Spring Security