• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
GraniteDS 360|Flex DC
 

GraniteDS 360|Flex DC

on

  • 3,552 views

 

Statistics

Views

Total Views
3,552
Views on SlideShare
2,821
Embed Views
731

Actions

Likes
1
Downloads
46
Comments
3

4 Embeds 731

http://granitedataservices.com 461
http://www.granitedataservices.com 265
http://translate.googleusercontent.com 4
url_unknown 1

Accessibility

Categories

Upload Details

Uploaded via as OpenOffice

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

13 of 3 previous next Post a comment

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • Thank you. I put my more detailed question on forum.
    Are you sure you want to
    Your message goes here
    Processing…
  • GraniteDS integrates with the JBoss container security, so you just have to configure JBoss as for any web application. For example define the security domain in jboss-web.xml and the login module in login-config.xml.
    Please note that the user forums is here: http://groups.google.com/group/graniteds
    Are you sure you want to
    Your message goes here
    Processing…
  • Hello, is there a sample how to use Flex - JBoss 5.x security (DatabaseServerLoginModule - Loads user/role information from a database). In all samples from graniteds authentification and authorization is made using roles.properties and users.properties files. How it is done using database? How to configure SecurityDoman ?
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    GraniteDS 360|Flex DC GraniteDS 360|Flex DC Presentation Transcript

    • ENTERPRISE RIA WITH FLEX, JAVA AND GRANITEDS 2010, September 22 Franck WOLFF and William DRAI
    • A comprehensive open source alternative to Adobe server solutions THE PROJECT OPEN SOURCE : LGPLv2 MATURE : Started late 2006 WEB SITE : http://www.graniteds.org COMMUNITY : 650 members (estimated 5000 users) ADOPTION : Many administrations and corporations in Europe, USA and many other countries
    • PLATFORM STACK
    • AGENDA LIVE DEMO REMOTING TO JAVA SERVICES PERSISTENCE WITH JPA MESSAGING AND DATA SYNCHRONIZATION SECURITY NUMERIC DATA TYPES (new in GDS 2.2) MODEL-DRIVEN VALIDATION (new in GDS 2.2)
    • End-to-end typesafety
      • STANDARD SOLUTION : RemoteObject API
      • Lots of boilerplate code and server-side configuration
      • Not typesafe, no code-completion
      • ALTERNATIVE SOLUTION : Tide API
      • Typesafe client stubs generated by GAS3 for usual Java services (Spring, EJB3, CDI...)
      • IDE code-completion
      • Simplified configuration (annotation scanning)
      • Typesafe remote service injection (Spring, CDI beans only)
      • Numeric types in AS3 are limited to int and Number
      ACCESSING REMOTE SERVICES (1/2)
    • @RemoteDestination public class HelloService { public String hello(String name); } [Inject] public var helloService:HelloService; private function hello(name:String):void { helloService.hello(name, saveResult, saveFault ); } private function saveResult(event:TideResultEvent):void { trace(event.result); } private function saveFault(event:TideFaultEvent):void { Alert.show(event.fault.faultCode); } ACCESSING REMOTE SERVICES (2/2)
    • Simple data management
      • PROBLEMS : Manually write AS3 objects, write a server adapter layer to avoid lazy initialization errors
      • SOLUTION :
      • AS3 entities are generated by GAS3
      • Serialization of JPA detached objects with their full internal state
      • A local entity cache ensures that each instance exists only once
      • Transparent lazy loading of collections
      PERSISTENCE WITH JPA (1/2)
    • @Entity public class Book { @Id private Long id; @Basic private String uid; @Basic private String title; } [Inject] public var bookService:BookService; private function saveBook():void { var book:Book = new Book(); book.title = titleInput.text; bookService.saveBook(book); } @Stateless public class BookServiceBean implements BookService { @PersistenceContext private EntityManager em; public Book saveBook(Book book) { return em.merge(book) ; } } PERSISTENCE WITH JPA (2/2)
    • Gravity can scale to thousands of simultaneous clients
      • PROBLEM : Ensure all clients 'see' the same data
      • POOR SOLUTION : 'Refresh' button
      • RICH SOLUTION : Use of messaging with the Consumer/Producer pattern (chat)
      • GraniteDS includes a performant Comet engine (Gravity) that uses the capabilities of the underlying application server (non-blocking I/O, native APR, Servlet 3.0...)
      MESSAGING (1/2)
    • Tide data cache + Flex binding = easy data synchronization
      • SIMPLIFIED DATA SYNCHRONIZATION :
      • 1. GraniteDS detects data updates and pushes them on a messaging topic
      • 2. The Tide framework merges incoming updates in its local data cache
      • 3. The UI is automatically updated by the Flex data binding mechanism
      MESSAGING (2/2)
    • End-to-end security
      • PROBLEM : Integrate with server authentication and authorization
      • Built-in Flex Identity component integrated with Java security frameworks (servlet containers, Spring security, Seam security)
      • Support for web-based authentication (SSO, OpenID...)
      • Role-based and permission-based authorization
      SECURITY (1/2)
    • [Inject] public var identity:Identity ; private function login():void { identity.login(username, password); } private function logout():void { identity.logout(); } // Retrieve current server authentication state private function creationComplete():void { identity.isLoggedIn (); } Role-based authorization <s:Button label='Delete' enabled=' identity.hasRole( &quot; admin &quot; ) '/> Permission-based authorization <s:Button label='Delete' enabled=' identity.hasPermission(book, &quot; delete &quot; ) '/> SECURITY (2/2)
    • 359.999999999999|Flex Critical for financial data
      • 3 PROBLEMS :
      • Numeric types in AS3 are limited to int, uint and Number with fixed maximum precision and scale
      • Computing with Numbers does not offer fine control over rounding modes
      • Transferring numeric data between Java server and Flex client loses precision
      NUMERIC TYPES (1/2)
    • 360|Flex var a:BigDecimal = new BigDecimal('123.45'); var b:BigDecimal = new BigDecimal('6.789'); var q:BigDecimal = a.divide(b, 5, RoundingMode.FLOOR) ;
      • SOLUTION :
      • Implementation of Long, BigInteger and BigDecimal types in AS3
      • No loss of precision during serialization
      • Simple arithmetic operations implemented, with fine control over decimal expansion
      NUMERIC TYPES (2/2)
    • <mx:StringValidator/> <mx:EmailValidator/> … <mx:RegExpValidator/>
      • PROBLEM : Enforce constraints on the client
      • STANDARD SOLUTION : Flex Validator API
      • Requires one validator per input
      • Requires to manually maintain consistency between client-side and server-side validation
      MODEL-DRIVEN VALIDATION (1/3)
    • public class Book { [Size(min=&quot;5&quot;, max=&quot;20&quot;)] public function get title():String {...} }
      • ALTERNATIVE SOLUTION : Apply Java Bean Validation API (JSR-303) to Flex
      • 1. GraniteDS includes a client validation engine implementing the Bean Validation API
      • 2. The GAS3 generator replicates Bean Validation annotations into AS3 entities
      • 3. The Flex component FormValidator enforces constraints for all inputs in a form
      MODEL-DRIVEN VALIDATION (2/3)
    • <fx:Declarations> <model:Book id='book'/> <v:FormValidator form='{bookForm}' entity='{book}'/> </fx:Declarations> <s:Form id='bookForm'> <s:FormItem label='Title'> <s:TextInput text=' @{book.title} '/> </s:FormItem> </s:Form> MODEL-DRIVEN VALIDATION (3/3)
      • Easy creation of custom constraints
      • Client and server validations are always consistent (Gas3)
      • Custom error messages with bundles
      • Server-side validation errors are also notified to the UI
    • Q/A THANK YOU www.graniteds.org