MethodBuilder

The MethodBuilder class is a class that follows the Builder pattern, the intention is to abstract steps of construction of objects so that different implementations of these steps can construct different representations of objects.

You can create a new remote method with one of the following syntax

var method:IRemoteMethod = new MethodBuilder().against("processLogin").usingParam(view.username, view.password).returning(UserInfo).createOn("", "User")


or

var method:IRemoteMethod = new MethodBuilder().against("processLogin").usingParam(view.username, view.password).returning(UserInfo).create()


The difference is that in the first sample you change the destination of the remote class on which you want to call the method and in the second one you don't have the need to change the class against which the remote procedure is called.

1.1.2-pro © 2008-2009 agile42 all rights reserved (this page was served in: 0.31000 sec.)