Max2011 Building Enterprise Mobile Apps With Adep

1,605 views

Published on

My MAX 2011 presentation on enterprise mobile development using Data Services.

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,605
On SlideShare
0
From Embeds
0
Number of Embeds
608
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • This slide will be sent to all speakers as a separate attachment. If you could please include as your final slide in your presentations, this will help get more attendees to respond.
  • Make things appear as you talk through them
  • Max2011 Building Enterprise Mobile Apps With Adep

    1. 1. Building Enterprise Mobile Applications with ADEP<br />Mete Atamel | Sr. Computer Scientist @ Adobe<br />meteatamel.wordpress.com<br />@meteatamel<br />
    2. 2. Hand in your surveys to the room monitors<br />One survey per session will be selected as a winner of an Adobe Press e-book or Video <br />Introduction to Adobe Edge<br />Web Design with Muse (code name) from Adobe<br />Android App Development and Design: Learn by Video<br />Winners will be notified via e-mail at the end of each day<br />Turn in your surveys for a chance to WIN!<br />
    3. 3. Assumptions<br />You are an enterprise Flash and/or Java developer<br />You used (or at least heard about) Data Services (or at least BlazeDS) before<br />You are interested in building data-intensive native mobile applications talking to some backend.<br />3<br />
    4. 4. Demos<br />4<br />
    5. 5. Key takeaways from the demo<br />All client applications are native.<br />All clients are talking to the same server.<br />5<br />
    6. 6. Technology Overview — Data Services - Before<br />6<br />AIR<br />Flex<br />
    7. 7. Technology Overview — Data Services - Now<br />7<br />Objective-C<br />Android<br />HTML5/JS<br />Flex/AIR<br />Java<br />
    8. 8. Motivation and Goal<br />Client choice should not dictate server choice.<br />Make sure Data Services benefits are realized in multiple types of clients natively: <br />Efficient data transfer<br />Real-time connectivity<br />Rich and easy-to-use APIs<br />8<br />
    9. 9. Features<br />9<br />
    10. 10. Public APIs<br />10<br />
    11. 11. API Philosophy<br />Keep APIs as simple as possible.<br />Keep APIs as similar as possible across platforms but respect platform differences where it makes sense.<br />Some differences<br />In ActionScript, subclasses of Channel handle encoding, HTTP modes, SSL. In new clients, a single Channel handles these via properties and automatically.<br />In ActionScript, remoting and messaging are event driven. In Java/Android client, remoting is a synchronous call whereas messaging is still event driven.<br />In ActionScript, remoting can make calls to non-existent methods on the client to invoke remote methods on the server. In new clients, “invoke” method is called with the remote method name.<br />11<br />
    12. 12. Code Samples – Creating Channel<br />// ActionScript<br />varchannel:Channel= new AMFChannel(channelId, channelUrl); <br />// Java/Android<br />Channel channel = new Channel(channelId, channelUrl, httpMode, encoding, sslContext);<br />// HTML5/JavaScript<br />varchannel = new flex.client.channels.Channel(channelId, channelUrl, httpMode);<br />// Objective-C<br />DSChannel*channel = [[DSChannelalloc] initWithId:channelIdurl:channelUrlhttpMode:httpMode];<br />12<br />
    13. 13. Code Samples – Creating ChannelSet<br />// ActionScript<br />varchannelSet:ChannelSet= new ChannelSet(); <br />channelSet.addChannel(channel);<br />// Java/Android<br />ChannelSetchannelSet = new ChannelSet(channels);<br />// HTML5/JavaScript<br />varchannelset = new flex.client.channels.ChannelSet(channels);<br />// Objective-C<br />DSChannelSet *channelSet = [DSChannelSetchannelSetWithChannels:[NSArrayarrayWithObjects:channels]];<br />13<br />
    14. 14. Code Samples – Creating RemoteObject<br />// ActionScript<br />varremoteObject = new RemoteObject();<br />remoteObject.destination= destinationId;<br />// Java/Android<br />RemoteObjectremoteObject= new RemoteObject(destinationId);<br />// HTML5/JavaScript<br />varremoteObject = new flex.client.rpc.remoting.RemoteObject(destinationId);<br />// Objective-C<br />DSRemoteObject *remoteObject = [[[DSRemoteObjectalloc] initWithDestinationId:destinationId];<br />14<br />
    15. 15. Code Samples – Invoking RemoteObject<br />// ActionScript<br />remoteObject.echo(“Hello World!”);<br />// Java/Android<br />Object result = remoteObject.invoke(“echo”, “Hello World!”);<br />// HTML5/JavaScript<br />remoteObject.invoke(“echo”, “Hello World!”);<br />// Objective-C<br />[remoteObject invoke:@”echo” args:[NSArrayarrayWithObject:@”Hello World!”] delegate:self selector:@selector(invocationResultHandler:)];<br />15<br />
    16. 16. Code Samples – Creating Producer<br />// ActionScript<br />varproducer:Producer = new Producer();<br />producer.destination = destinationId;<br />// Java/Android<br />Producer producer = new Producer(destinationId);<br />// HTML5/JavaScript<br />var producer = new flex.client.messaging.Producer(destiantionId);<br />// Objective-C<br />DSProducer *producer = [[DSProduceralloc] initWithDestinationId:destinationId];<br />16<br />
    17. 17. Code Samples – Sending Message<br />// ActionScript<br />varmessage:AsyncMessage = new AsyncMessage();<br />message.body = “Hello World!”;<br />producer.send(message);<br />// Java/Android<br />AsyncMessage message = new AsyncMessage();<br />message.setBody(“Hello World!”);<br />producer.send(message);<br />17<br />
    18. 18. Code Samples – Creating Consumer & Subscribing<br />// ActionScript<br />varconsumer:Consumer = new Consumer();<br />consumer.destination = destinationId;<br />consumer.subscribe();<br />// Java/Android<br />Consumer consumer = new Consumer(destinationId);<br />consumer.subscribe();<br />// HTML5/JavaScript<br />var consumer = new flex.client.messaging.Consumer(destinationId);<br />consumer.subscribe();<br />// Objective-C<br />DSConsumer *consumer = [[DSConsumeralloc] initWithDestinationId:destinationId];<br />[consumer subscribe];<br />18<br />
    19. 19. Code Samples – Adding Event Listeners<br />// ActionScript<br />consumer.addEventListener(MessageEvent.MESSAGE, messageHandler);<br />consumer.addEventListener(MessageFaultEvent.FAULT, faultHandler);<br />// HTML5/JavaScript<br />consumer.addEventListener(flex.client.messaging.events.MessageEvent.MESSAGE,<br />messageHandler);<br />consumer.addEventListener(flex.client.messaging.events.MessageFaultEvent.FAULT, faultHandler);<br />19<br />
    20. 20. Code Samples – Receiving Message<br />// ActionScript<br />private function messageHandler(messageEvent:MessageEvent):void<br />{<br /> // Consumer received message: messageEvent.message.body;<br />}<br />// HTML5/JavaScript<br />function messageHandler(messageEvent)<br />{<br /> // Consumer received message: messageEvent.getMessage().getBody();<br />}<br />20<br />
    21. 21. Data Services 4.6 Preview<br />Data Services 4.6 Preview Now Available on Adobe Labs:<br />labs.adobe.com/technologies/adep_dataservices_jee<br />21<br />
    22. 22. QUESTIONS?<br />meteatamel.wordpress.com<br />@meteatamel<br />22<br />

    ×