Flex Pasta » 2010 » August

2 1/2 years ago I published annotations for BlazeDS that allowed for placing tags on Java getters/setters to determine if a value is serialized to the Flex client.  Soon I will publish a 3 part BlazeDS extension that does the following(with annotations of course).

  1. Serialization Profiles with BlazeDS - This was mentioned in a previous post and I will be releasing this soon along with the rest of the annotations code.
  2. Mate Code Generator - More details to come, but if you are familiar with the Mate Framework, this code generator will create complete EventMaps/DataManagers/Events from Java services(and it runs for the life of the project).
  3. Model Code Generator  - This isn’t the kind where a button is pressed once to create Flex remote object bean classes.  I don’t like code generators that only generate the file initially.  I also don’t like when a code generator creates generated code that then the developer must extend(ex: Customer extends _Customer).  I have created a code generator that does neither but still can be run endless times for the life of the project.  Here is an example output file.  The developer can add any code to the area marked as such in comments.  Every time the generator is run it will clear out the rest of the file and regenerate the properties from the matching Java class.
    /* File Generated by FlexPastaDomainGenerator v. 1.0
    * Only edit the file in the designated area.
    * All other changes will be lost
    */
    package com.company.model
    {[Bindable]
    [RemoteClass(alias=”com.company.model.Address”)]
    public class Address
    {
    public var country:String;
    public var lot:String;
    public var parcel:String;
    public var state:String;
    public var streetName:String;
    public var streetNumber:String;
    public var subdivision:String;
    public var uuid:String;
    public var zipCode:String;

    //**********EDIT AREA**********

    //**********END EDIT**********
    }
    }

Looks for more details in the coming weeks!