• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 530
  • Last Modified:

cairngorm framework

hi guys

i want to get started with cairngorm framework and use it in my framework.
are there any sample project i can download for learning purpose?


thanks
0
royjayd
Asked:
royjayd
  • 6
  • 4
1 Solution
 
dgofmanCommented:
0
 
royjaydAuthor Commented:
ok , after i go home. dont have permission to check vedios from work :)
do you have any simple sample project i can use to learn it quickly.

thx.

0
 
dgofmanCommented:
Please try this website at least http://www.davidtucker.net/category/cairngorm/
I cannot explain cairngorm features in EE its takes for me 2 Hr. :)
0
Has Powershell sent you back into the Stone Age?

If managing Active Directory using Windows Powershell® is making you feel like you stepped back in time, you are not alone.  For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why.

 
royjaydAuthor Commented:
Haha...sure I will read and get back
Thx
0
 
royjaydAuthor Commented:
do i need to download  version2.2 or version3 ?
0
 
royjaydAuthor Commented:
working with 2.2 for now as david tucker says.
0
 
royjaydAuthor Commented:
the tutorials are pretty useful. thanks.Do you have any good examples for invoking web services using flex (using cairngorm framework)

thanks.
0
 
dgofmanCommented:
Ha, ha ...
First, I think youtube tutorial providing an example of Web Service communication
Second, how many webservices do you have one or two WSDL urls or 10 and up?
Third, I hate design of  cairngorm framework for webservices with two reasons
1)      I have to embed sebservices classes to some MXML file and add hundreds event listeners for each API in my WSDL files
2)      It’s so difficult to debug and understand code by written some programmer (not yourself) because you are getting magic results from dispatcher classes but you don't have no idea who is caller…
0
 
royjaydAuthor Commented:
yeah just one or two  wsdl
ok i see what you are saying , a lot of proxies are created which can be hard to understnad, i agree with you.

whats a good way to use webservices with flex other than cairngorm. any sample tutorials you think are worth lookng at?

thanks.
0
 
dgofmanCommented:
You can create simple ActioScript class and define all WSDL API (Controller)

package
{
	import mx.rpc.AsyncToken;
	import mx.rpc.soap.mxml.WebService;
	
	public class WebServiceControls
	{
		private static const TIMEOUT:uint = 120;
		private var _webService:WebService;
		
		public function WebServiceControls(wsdlURL:String=null)
		{
			_webService = new WebService();
			_webService.loadWSDL(wsdlURL + "?wsdl");
			_webService.requestTimeout = TIMEOUT;
			_webService.showBusyCursor = true;
			_webService.useProxy = false;
		}
		public function getTest(value:String):AsyncToken
		{
			var out:Object = new Object();
			out["testValue"] = value;
			return new PendingCall(_webService).call("CallJavaTestAPI", out);
		}
	}
}
import mx.rpc.AsyncToken;
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
import mx.rpc.soap.mxml.Operation;
import mx.rpc.soap.mxml.WebService;
		
class PendingCall
{
	private var _webService:WebService;
	private var _token:AsyncToken;
	
	public function PendingCall(webService:WebService){
		_webService = webService;
	}
	
	public function call(operationName:String, args:Object, resultFormat:String="object"):AsyncToken
	{
		var operation:Operation = _webService[operationName];
		operation.resultFormat = resultFormat;
		operation.addEventListener(FaultEvent.FAULT, function(event:FaultEvent):void{
			_token.dispatchEvent(event);
		});
		operation.addEventListener(ResultEvent.RESULT, function(event:ResultEvent):void{
			_token.dispatchEvent(event);
		});
		if(args is Array){
			_token = operation.send(args);
		}else{
			operation.arguments = args;
			_token = operation.send();
		}
		return _token;
	}
}

Open in new window

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now