Skip to main content

Home/ SoftwareEngineering/ Group items tagged Gas3

Rss Feed Group items tagged

kuni katsuya

3. Gas3 Template Language - Confluence - 0 views

kuni katsuya

3. Gas3 Code Generator - Confluence - 0 views

  • 3. Gas3 Code Generator
  • Known Limitations
  • Gas3 does not support inner classes
  • ...26 more annotations...
  • except of enum type
    • kuni katsuya
       
      not quite sure what this means...
  • must declare your classes in separated source files if you want them to be correctly handled by the generator
  • Java enums
  • enum.gsp
  • JPA entity beans
  • entity.gsp
  • Java interfaces
  • interface.gsp
  • Java services
  • remote.gsp
  • Java events
  • bean.gsp
  • All other Java classes
  • bean.gsp
  • beanBase.gsp
  • beanBase.gsp
  • remoteBase.gsp, or tideRemoteBase.gsp
  • entityBase.gsp, or tideEntityBase.gsp
  • @Entity
  • @MappedSuperclass
  • @RemoteDestination
  • @TideEvent
  • templates are bundled in the granite-generator.jar
  • accessible as resources via the class loader
  • GraniteDS comes with an ActionScript3 code generator that writes AS3 beans for all externalized JavaBeans, with specific support for lazily loaded EJB 3 entities
  • 3. Gas3 Code Generator
kuni katsuya

GraniteDS: Gas3 template for complex enums | Javalobby - 0 views

  • GraniteDS: Gas3 template for complex enums
  • changed enum.gsp from class:org/granite/generator/template/enum.gsp
  • I posted  a new version on github (master-branch) that
  • ...3 more annotations...
  • works with GraniteDS 3.0.0. 
  • https://github.com/graniteds/graniteds_builder 
  • fixed and committed to github
kuni katsuya

Chapter 5. AS3 Code Generator - 0 views

  • 5.2. Generated ActionScript 3 Classes
  • Gas3 uses the principle of "Base" and customizable inherited classes that let you add methods to generated classes without facing the risk of losing them when a new generation process is executed
  • 5.3. Java Classes and Corresponding Templates
  • ...13 more annotations...
  • summary of templates used by the generator depending on the kind of Java class it encounters:
  • these templates are bundled in the granite-generator.jar archive, in the org.granite.generator.template package and accessible as resources via the class loader
  • class: protocol is used because all standard templates are available in the classpath
  • Alternatively, you may use the file: protocol to load your template from the filesystem. These templates can be specified either by using absolute paths (eg. file:/absolute/path/to/mytemplate.gsp) or paths relative to your current Eclipse project root directory (eg. path/to/mytemplate.gsp).
  • ActionScript 3 generator is able to write AS3 typed client proxies for exposed remote services
  • Compared to the usual Flex RemoteObject, this can greatly help development by bringing
  • auto-completion
  • improved type-safety
  • in Flex when using remote services.
  • replicate validation annotations in order to use the Flex side validation framework
  •  Known Limitations
  • Gas3 does not support inner classes
  • must declare your classes in separated source files if you want them to be correctly handled by the generator
kuni katsuya

[#GDS-933] GAS3 does not handle Java generics with abstract class implementations - Gra... - 0 views

  • GAS3 does not handle Java generics with abstract class implementations
  • Fix Version/s: 3.0.0.M1
kuni katsuya

Adobe Community: Updated Groovy template for GraniteDS Builder (gas3) - 0 views

  • Updated Groovy template for GraniteDS Builder (gas3)
  • also stripped out the specialized GraniteDS datatypes in favor of the LCDS serialization convention that Adobe uses (i.e. a Java map should translate to an 'Object' type, a Java enum should translate to a 'String', and Java collections should always serialize as 'ArrayCollection')
  • didn't do a 'base' version and a version that doesnt get touched by the code generator, but you could easily do so by modifying this template
  • ...3 more annotations...
  • two versions
  • for Managed entities:
  • meant for non managed entities:
kuni katsuya

Chapter 5. AS3 Code Generator - 0 views

  • AS3 Code Generator
  • GraniteDS comes with an ActionScript3 code generator that writes AS3 beans for all Java beans
  • ActionScript 3 generator is able to write AS3 typed client proxies for exposed remote services
  • ...6 more annotations...
  • Gas3 may also replicate validation annotations in order to use the Flex side validation framework
  • implemented as an Eclipse plugin
  • Ant task.
  • Maven Plugin (Flexmojos)
  • flexmojos-maven-plugin
  • org.sonatype.flexmojos
kuni katsuya

Release Notes - GraniteDS - Version 3.0.0.M1 - HTML format - Granite Data Services - 0 views

  • Release Notes - GraniteDS - Version 3.0.0.M1
  • GAS3 does not handle Java generics with abstract class implementations
  • Generated as3 has compilation warnings: missing constructor
  • ...1 more annotation...
  • Rename flex-filter to server-filter and @FlexFilter to @ServerFilter
kuni katsuya

Chapter 15. Data Management - 0 views

  • Data Management
  • Tide provides an integration between the Flex/LCDS concept of managed entities and the server persistence context (JPA or Hibernate)
  • Tide maintains a client-side cache of entity instances and ensures that every instance is unique in the Flex client context
  • ...5 more annotations...
  • highly recommended to use JPA optimistic locking in a multi-tier environment (@Version annotation)
  • Tip The easiest and recommended way for getting Tide enabled managed entities is to generate them from Java classes with Gas3 or the GDS Eclipse builder using the tide="true" option.
  • In a typical Flex/app server/database application, an entity lives in three layers: the Flex client the Hibernate/JPA persistence context the database
  • only invariant is the id.
  • id reliably links the different existing versions of the entity in the three layers
kuni katsuya

In Relation To...  Bean Validation for Flex developers - 0 views

  • Bean Validation for Flex developers
  • GraniteDS have added support for Bean Validation into their project and hence Bean Validation is usable by all Flex users
  • Because they do not run on the JVM, they basically have reimplemented the full specification in Flex: you can annotate your ActionScript3 objects with constraints: it supports all the standard constraints and you can write your own constraints you can execute the validation logic and retrieve the error report you can make use of most of the feature including advanced ones like groups, group sequence etc
  • ...3 more annotations...
  • for GraniteDS users keeping their Java domain model and ActionScript3 domain model in sync via Gas3, the constraints are kept in sync
  • a couple of gotchas to be aware of
  • the constraint implementation is in the same class as the constraint declaration (not a problem in a dynamic language) @Pattern has a sightly different semantic because the regexp engine in Flex is a bit different. instead of the features provided by ConstraintValidatorContext, you can define a properties attribute in your constraints to make it belong to several sub-properties. not as flexible but good enough in many cases.
kuni katsuya

Chapter 4. Remoting and Serialization - 0 views

  • 4.3. Mapping Java and AS3 objects
  • data conversions are done during serialization/deserialization
  • Externalizers and AS3 Code Generation
  • ...21 more annotations...
  • Due to the limited capabilities of the ActionScript 3 reflection API than cannot access private fields, it is necessary to create an externalizable AS3 class (implementing flash.utils.IExternalizable and its corresponding externalizable Java class
  • writeExternal
  • In both classes you have to implement two methods
  • the Gas3 generator can automatically generate the writeExternal and readExternal methods.
  • With GraniteDS automated externalization and without any modification made to our bean, we may serialize all properties of the Person class, private or not
  • In order to externalize the Person.java entity bean, we must tell GraniteDS which classes we want to externalize with a
  • externalize all classes named com.myapp.entity.Person by using the org.granite.hibernate.HibernateExternalizer
  • you could use this declaration, but note that type in the example above is replaced by
  • instance-of:
  •             <include annotated-with="javax.persistence.Entity"/>             <include annotated-with="javax.persistence.MappedSuperclass"/>             <include annotated-with="javax.persistence.Embeddable"/>
  • : type
  • annotated-with
  • Instead of configuring externalizers with the above method, you may use the
  • feature:
  • precedence rules for these three configuration options:
  • <granite-config scan="true"/>
  • autoscan
  • GraniteDS will scan at startup all classes
  • found in the classloader of the GraniteConfig class, and discover all externalizers (classes that implements the GDS Externalizer interface)
  • DefaultExternalizer
  • this externalizer may be used with any POJO bean.
  •  
    4.3. Mapping Java and AS3 objects
1 - 18 of 18
Showing 20 items per page