Now, SWX Java has a Date converter.

Filed under: Releases, swxjava — Wrote by ken on Monday, December 10th, 2007 @ 1:06 am

DataType test suites I’ve implemented Date converter for AVM1 assembler. AS Date value is converted from java.util.Date, java.util.Calendar, java.sql.Date and java.sql.Timestamp. You can find a updated swx.jar file here.  

Requirements for practical use?

Filed under: swxjava — Wrote by ken on Monday, November 5th, 2007 @ 8:50 pm

These are just ideas(features) for ease of RIA development based on my experiences.If you have any good idea, feel free to participate.Server side features:

  1. Conversion support for recursive references.
  2. Context driven bean converter(To reduce conversion and transportation overheads)
  3. Custom pre-processor for the SWX RPC request.(ex. To use a custom interface and an abstract class in the signature.) 
  4. Support for AVM1 and AVM2 assemblers.
  5. Annotation configuration.

Client side features:

  1. AS class mapping for DTOs.
  2. Expression support for recursive references.

SWX Java alpha released!

Filed under: Releases — Wrote by ken on Tuesday, October 16th, 2007 @ 8:13 am

The alpha version of SWX Java was released on Google code.
This is an alpha test version so that developers and users can find out about SWX Java, and make comments on how to improve it.
Here is a quick guide on how to use SWX Java.

How to use :

  1. Copy swxjava.jar and json_simple.jar to WEB-INF/lib directory of your web-app.
  2. Create a service class in java.
  3. Edit the config files (web.xml and swx.xml).

    - web.xml

    <web-app id="swx">
    <servlet>
    <servlet-name>swx-gateway</servlet-name>
    <display-name>SWX Gateway Servlet</display-name>
    <description>SWX Gateway Servlet</description>
    <servlet-class>org.swxjava.servlet.SwxGatewayServlet</servlet-class>
    <init-param>
    <param-name>debug</param-name>
    <param-value>true</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>swx-gateway</servlet-name>
    <url-pattern>/swx/*</url-pattern>
    </servlet-mapping>
    </web-app>

    - swx.xml under the WEB-INF directory

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE swx PUBLIC “-//DTD SWX Java 0.1//EN”
    “http://swxjava.org/dtds/swx-01.dtd”>
    <swx>
    <allow>
    <convert converter=”bean” match=”org.swxjava.examples.*” />
    <service name=”TestDataTypes” locator=”new”>
    <param name=”class” value=”org.swxjava.examples.TestDataTypes” />
    </service>
    </allow>
    </swx>

  4. Deploy your web app.
  5. Make swx call.

    import org.swxformat.SWX;
    // Set up SWX gateway
    var swx:SWX = new SWX();
    swx.gateway = “http://localhost:8080/YOUR_APP_NAME/swx/gateway”;
    swx.debug = true;
    var callParameters:Object =
    {
    serviceClass: “TestDataTypes”,
    method: “testArray”,
    result: [this, this[”testArrayHandler”]]
    }
    swx.call(callParameters);
    function testArrayHandler(event:Object) {
    trace(”Result : ” + event.result);
    }

TODO :

  • Documentation
  • Performance enhancement
  • Cool examples
  • Support for SWX Tools
  • Error handling
  • Logging
  • Date converter
  • AVM2 support
  • Annotation
  • Context driven JavaBean converter

There is an mailing list on Google groups, if you have any questions and suggestions. You could join swxjava group.
SWX Java is Open Source, available under the MIT License.

Ready to use java data types!

Filed under: swxjava — Wrote by ken on Monday, October 8th, 2007 @ 12:23 pm

TestDataTypes  Finally, SWX Java passed TestDataTypes! Listed  below are the supported Java data types and their associated ActionScript types.  SWX Java provides a BeanConverter which convert Custom JavaBean class to Map and finally ActionScript Object automatically. 

Java Type ActionScript type
java.lang.Void, void null
Custom class (JavaBean) Object
java.lang.String String
java.lang.Boolean, boolean  Boolean
java.lang.Byte, byte Number
java.lang.Short, short Number
java.lang.Integer, int Number
java.lang.Long, long Number
java.lang.Float, float Number
java.lang.Double, double Number
java.lang.Character, char String
java.util.Collection Array
java.util.Map Object
Array Array

SWX Java project page just launched!

Filed under: swxjava — Wrote by ken on Monday, October 8th, 2007 @ 12:18 am

Coming soon …

I’m happy to announce that swx java project page just launched. 

Now, SWX Java assembler and servlet gateway is almost working correctly in my environment. So I will release SWX Java beta in some days. 

SWX Java provides cool features to Java developers:

     
  • Compatible with SWX ActionScript Library
  • SWX Java will run on standard servlet engines like Tomcat, JBoss, etc.
  • Debug mode using SWX Tools (SWX Data Analyzer. Plan to support SWX Service Explorer)
  • JSON and Java mapping
  • Spring Framework integration support

Keep going with SWX!