SlideShare uma empresa Scribd logo
1 de 24
Baixar para ler offline
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

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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
 

Destaque

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
 

Destaque (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
 

Semelhante 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
 

Semelhante 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

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 

Último (20)

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 

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