Cairngorm 3 Questions
In order to use Cairngorm 3 on my project which I would like to do, there are several things I need to know.
1) When will the Module Library be released? Right now it is in Beta.
2) Which parts of Cairngorm have been tested with Parsley 2.3?
3) Which parts of Cairngorm do/do not work with Parsley 2.3 now?
4) Which libraries of Cairngorm 3 will be upgraded to Parsley 2.3 and in what timeframe?
5) Where is the roadmap for Module Library part of Cairngorm?
I would really like to hear from Adobe on this.
Thanks
This is really a question for the folks that are involved in the Cairngorm product. Preferably, people on the Cairngorm team. If there are other developers that have tried Parsley 2.3 libraries with any of the Cairngorm Libraries I would like to know what your experience has been
as well.
Thanks.
Similar Messages
-
A style question, and a Cairngorm question!
Style - When I draw on a component with a backgroundColor, why can't I see it?
Cairngorm -
Sometimes I want to use the result directly in a module that I am showing on the screen. For instance, when I query the server for a group of items in a category. However, I can not add an event listener to the cairngorm result in the module (view) itself. Is the appropriate way to achieve this:
1) Dispatch my Event
2) In the result, populate an arraycollection with the items from the category (using a setter, so I can dispatch event)
3) In module, listen for said event
4) Populate tile from this eventhandler
Is this correct?Well it's pretty simple:
<mx:Canvas id="mainCanvas" backgroundColor="0x000000">
<mx:creationComplete>
<[CDATA[
var g:Graphics = mainCanvas.graphics;
g.beginGradientFill( GradientType.LINEAR, [0xffffff,0xffffff], [1.0,0.0], [0,255], verticalGradientMatrix( 0, 0, mainCanvas.width, mainCanvas.height );
g.drawRect( 0, 0, mainCanvas.width, mainCanvas.height );
g.endFill();
]]>
</mx:creationComplete>
</mx:Canvas>
If I remove the backgroundColor, I can see the gradient. If I leave backgroundColor, I can only see black. -
Can I get Cairngorm questions answered here?
I try...
When My application start up I need to instanciate a VO.
This I do in the entry constructor of the ModelLocator
public function KostModelLocator() {
if ( modelLocator != null )
throw new Error( "Only one KostModelLocator instance should
be instantiated" );
var currentDate : Date = new Date();
selectedDay = new Day(currentDate);
The Day(Date) is defined in the Model\Day.as
I call the Day constructor with the current date.
public class Day
// Constructor
public function Day ( date : Date ) {
setDate(date);
//Public functions
public function setDate ( date : Date ) : void {
day.date = date;
day.dayString = extractDayString(date);
day.dayId = 37;
But now the problem is when I will update the day.dayId. This
should not be a static value (37). But instead I should get some
day id from the database.
How is this done?
I was thinking about initiating a event calling the command
that gets the date id from the database and automatically updates
the id.
But then I don’t think that a model should initiate an
event..
How do I do this?Yeah i registered, but i couldn't find zip file. Could you please tell me where is that example
Thanks,
ApacheFlex. -
Cairngorm and sockets just a question
I have recently started to learn Flex and have started to use
the Cairngorm architecture and was wondering how do sockets come
into play?
I understand the whole service request model where you send
the command along to the service and request the data from the
remote object, httpservice, etc. However I wanted to use a socket
to connect to a Java server for a simple learning exercise and I
was somewhat puzzled as how to do this using the Cairngorm
architecture .
The way I had originally thought and implemented and it works
is to inside the "SocketConnection.as" class when I respond to a
DataEvent ( ie something coming in on the socket ) I create an
"Event" which I had registered with the "Front Controller" which
inturn calls a "Command" which calls a "Delegate" which then
updates the "Model Locator". So ultimately I seem to be ignoring
the result and possibly fault aspects of the "Commands" to send and
receive.
My overall question is are sockets a viable option in the
Cairngorm architecture and if so what is the best way to use them?
Thanks in advance for any responses
Tomas PawliukI am looking for something as well. were you able to get it to work?
-
Cairngorm/Remoting best practice question
Is the fault() function of a Cairngorm command meant for ONLY
for handling failures that aren't expected to happen? (i.e. only
can be caused as the result of a bug or server problem)
Can fault() also be used to handle a "normal" error, such as
doing a search in Active Directory (apparently throws exceptions
for every ******* thing imaginable) when the search returns no
results or too many results?
The way I would think it should work is to only use fault()
for errors that would be caused by code bugs or server
malfunctions. (Unexpected exceptions that aren't handled on the
server, that get passed to FDS/Granite/BlazeDS during a remote
object call.)
If something like a login failure (bad password) or a search
"failure" (no / too many results) happens to throw an exception on
the server wouldn't you want to catch that exception on the server
and then return back a "normal" response to Flex via remoting,
which is then handled appropriately in result()?
I'm currently in a position where I have to argue this case
but I'm not making much headway, so could I get some second
opinions on this one? Am I wrong here? It seems easier to just let
the exceptions be tossed back to Flex where you can display the
exception's detailed message, but I don't trust that to be reliable
and to give decent user-friendly feedback every time.Don't use exceptions for flow control.
so don't throw an exception to tell your client app (flex)
that something failed.
rather do this (pseudo code)
checkName(username, password) {
try {
return isuserLogin(username, password);
} catch(exception) {
return false;
ofcourse you can also return more complex objects to tell the
client application what the reason was why a login was denied, in
that case return a object rather then a premitive value.
Ries -
Question abourt Cairngorm framework?
Hi
I do not understand why we put the following line in main
page.
<control:myController id="controller" />
<business:Services id="services" />
but no code in main page use the IDs for control and
business.
Thanks
MarkThese are creating references to your service.mxml object and
your application controller object that the cairngorm objects use
in looking up events and executing services.
The service.mxml file has all the rpc or web service config
data like:
<mx:HTTPService id="ControlNavLoadService"
url="
http://localhost:8090/febatmon/XML/ControlNav.xml"
/>
The appController object should extend the FrontController
and is used as a central repository for event execution like this:
public class AppController extends FrontController {
public static const LOAD_CONTROL_NAV_EVENT : String =
"LOAD_CONTROL_NAV_EVENT";
public function AppController() {
addCommand( AppController.LOAD_CONTROL_NAV_EVENT,
ControlNavLoadCommand ); -
A question on using Cairngorm with flash media server
Hi,
I want to use the data from a remote sharedobject on FMS with cairngorm framework.
Where should I put the service (connection) to the FMS?
It seems not possible to put it into ServiceLocator.
This service is quite different from the service of HTTPService, RemoteObjects and WebService.
It needs a listener to the SyncEvent while the other 3 do not.
Pls give some hints on how to do this.
Thx a lot.
Best
ChaChaYaThe IP camera would need to have an embedded RTMP publishing client. I don't know of any IP cameras that have such support, but I suppose it couldn't hurt to check with the manufacturer of the camera to find out if it can be done.
-
ArrayCollection question in cairngorm
Hi,
I have a simple cfc, the function is like this,it get a
department list
<cffunction name="getDept" displayname="getDept"
access="remote" output="false" returntype="query">
<cfquery name="getDepartment" datasource="bursary">
SELECT Id, Dept
FROM tlkpDept
</cfquery>
<cfreturn getDepartment />
</cffunction>
2.This is the modellocator .I want to save department list to
the acDept (ArrayCollection)
public class BursaryModel implements IModelLocator {
private static var instance:CESFBursaryModel;
public var acDept : ArrayCollection;
3.This is the Delegate function. this builds a flex function
getDept()
public function getDept():void {
var call:Object = this.service.getDept();
call.addResponder(responder);
4.This is part of the command class
public function result( event:Object ):void {
modelLocator.acDept = event.result;
5 the view page, bind the
private var modelLocator:BursaryModel =
CESFBursaryModel.getInstance();
<mx:ComboBox x="440" y="268" width="142"
dataProvider="{modelLocator.acDept}" />
my error is I get a list and it looks like.
[object Object]
[object Object]
[object Object]
[object Object]
but I want to show the dapartment list,Please help me and
give me a hit how to fix this.
I do not know what the event.result is command class and how
to convert is to a real department list.
Thanks for your help
MarkHi. I am very new to FLEX, but I had something like this at
one time. I found that if I added .toString(), it work. I was
working with XML at the time.
Gary -
I have an item renderer that is a link. When it is clicked, I want a grid to be populated with data. It's not happening.
Renderer segment:
public static const CLICK:String = 'UserAARetrieveEvent';
lb2.addEventListener(MouseEvent.CLICK, retrieveList);
addChild(lb2);
public function retrieveList(event:Event):void
dispatchEvent(new Event(UserAA_NmLk_Renderer.CLICK, true, false));
Events.as:
public static const USER_AA_RETRIEVE_EVENT:String = "UserAARetrieveEvent";
Controller.as:
addCommand( Events.USER_AA_RETRIEVE_EVENT, UserAARetrieveCommand );
UserAARetrieveCommand.as will do the execute/result/fault methods if I could get it to execute.Simply because the command classes implement ICommand and the
signature of the method is:
public function execute( evt : CairngormEvent ) : void
OO concepts... -
Basic question related to Cairngorm.
I have a view in that there is a custom component .View dispatches event that goes through controller to command and to delegate, delegate invokes http service and result comes to command in command I have to remove that particular component and need to add a new component how to do this?
Thanx,
MaheshThere are many ways of doing it, also depending on the view component you're using. Check out the documentation of the Observer library, section "Reducing View Behaviour" to understand one approach.
-
Data Management Services with Cairngorm 2.1
Hello.
I have been using cairngorm 2.0 for a while, and I am now
trying to convert the 2.1 stuff over, including using cairngorm to
manage my DataServices. However I have some questions about it if
you have used it.
Using the command, and passing the command into the delegate,
and then firing the service from the delegate, there is a problem
trying to catch faults. Even though I have a fault method defined
on my command, and I am setting up the responder on the delegate as
the command which called it, the fault handler is not being fired.
I am generating a runtime exception on the java assembler just to
see what happens, and the delegate never fires the fault handler.
However if I remove the runtime excpetion from the java
assembler, and put a simple alert on the result, the delegate sends
to the commands result function, and the alert fires.
If you have any code examples, even if they dont have the
actual assembler behind them, I would really appreciate it. I dont
know if you are supposed to define commands which call DataServices
the same way you would declare a command that calls a RemoteObject.
If so how do you do that? What do you declare on the command to get
it to work?
If you have any ideas, please help.Has this question already been answered on flexcoders? I
think the Cairngorm folks may be more plugged in there than here:
www.yahoogroups.com/group/flexcoders/
Seth -
How to use generated code from "Import Web Services" with Cairngorm Framework
I recently downloaded Flex Builder 3 beta 2 and tried out the
wizard that lets you import web services. The code that is
auto-generated makes if fairly straight forward to consume web
services using the object types defined in the WSDL. No longer does
the developer need to decode the XML payload! The only problem I am
having is how does you integrate the auto- generated code with the
Cairngorm framework? This seems like a huge question for anyone who
might want to leverage Cairngorm and the auto-generated proxy code
in the same project (like me).
Here are the problems that I see so far.
1) How do you configure the generated service class to work
with the Cairngorm service locator? The service constructor only
accepts a “LCDS destination string” which implies that
you must use Lifecycle data services. Unfortunately, the project I
am trying to retrofit currently uses a WebService and does not use
data services. All I really need to do is change the endpoint URL
(ie from local to a development server). This issue is noted in the
bug https://bugs.adobe.com/jira/browse/FB-8456. What I think is
needed is a way to set the endpointURI in the Services.mxml file.
2) Even if I come up with a hack around #1, I do not receive
a callback to my IResponder even though I register it immediately
after the method call. I can register and listener function within
my business delegate and receive the callback, but my Command
object, which implements IResponder, does not receive the call back
even though it is registered. From what I read in the ASDocs it
should but it doesn’t for me!
These are the issues I have observed in 3 hours of messing
with this. I hope this makes sense. I would love to integrate
auto-generated web service proxies into Cairngorm but I don’t
see a straight forward way without re-architecting Cairngorm. Has
any one else run across this issue? If so, do you have any insights
on how to proceed? Any help is appreciated.Since I posted this question, I have abandoned the notion of
auto-generated web services and embraced the good old FDS concept
where the RemoteObject meta-tag does all the conversion work for
me. We are now using the Granite DS package and it is working well
for us. I would love to consume web services, but it just isn't
worth the hassle when all you have to do with Granite (and FDS) is
cast your return objects to the proper object type.
BTW, since this posting, I have investigated competing Flex
app frameworks. After my research, I checked out the PureMVC
framework. Wow!! Cairngorm always left me with an uneasy feeling
and I guess I am not alone. Apparently, Cliff Hall felt the same
way. That is why he started the project. I like his approach alot
more than Cairngorm especially since it includes notifications
which allow me to broadcast my own app level events independent
from the AS Event framework. Check out PureMVC. For what it is
worth, it has my humble endorsement. Cliff was even gracious enough
to acknowledge the other Adobe Consulting guys for their work. Good
for you Cliff, I respect that. Check out a better way at
http://www.puremvc.org/ -
SQLite in Cairngorm architecture
Hi All I am new to MVC and Cairnhorm . I am developing an AIR application where besides the regular services that I define through ServiceLocator I have also SQL database . My question is what is the right place for SQLite in MVC .Should it be accessed through ServiceLocator too and the sql commands queries with regular delegates?
Any help will be appreciated !So I have recently developed a Cairngorm library for persistence. It hasn't been announced yet, but feel free to take a look and try it: http://opensource.adobe.com/wiki/display/cairngorm/How+to+Use+the+Cairngorm+Persistence+Li brary
There is a sample app, which uses a DAO to access the database. It doesn't use the Service Locator. The app is implemented on the Parsley IoC container so the DAO is configured in the context and injected in to the Presentation Model. This is a sample so I would expect in a larger app that there is a domain layer. -
Cairngorm 3 and Commands - best practice
Hi chaps
Excellent work on CG3, it solves a lot of issues and I really like how it integrates with Parsley; definitely a step forward.
About the integration lib and commands - in Cairngorm 2, it would be quite common to fire off a persistence event directly from a model, like this:
public class User
public var name : String;
public function save() : void
new UserEvent( UserEvent.SAVE_USER, this ).dispatch();
However, using CG3, something like:
-- SaveUserCommand.as
public class SaveUserCommand
[Inject]
public var delegate : IDelegate;
[Command]
public function execute( event : SaveUserEvent ) : AsyncToken
return delegate.saveUser( event.user );
-- User.as
[Event( name="saveUser", type="somepackage.event.UserEvent" )]
[ManagedEvents( "saveUser" )]
public class User
public var name : String;
public function save() : void
dispatchEvent( new UserEvent( UserEvent.SAVE_USER, this ) );
unless we do something funky here, Parsley won't know about domain classes as they are not part of the context, therefore won't pick up the [ManagedEvents] metadata. I'm fairly new to Parsley though, so there may well be a simple way of doing this.
Is there a way of hooking domain classes directly to commands or, with this new architecture, should this be the responsibility of the presentation model instead - i.e. myPM.saveUser( myUser )?
Thanks
RichardHi Alex
Thanks for the reply.
"But you definitely need to specify the domain in your Parsley context."
Not sure I follow here - probably a question more for the Parsley forum than here, but could you give me a brief example of what you mean? In this instance do you mean somehow register each individual User with the context or maybe a UserProvider?
Thanks
Richard -
Cairngorm for FlexSDK 4.5.1
Hi
Do Cairngorm 2.x (whatever latest is) swc's upward compatible with FlexSDK 4.5.1 ?
ThanksSame question. Is there a plan to update/maintain the Gairngorm plugin?
If not, where can we find the source code so we can keep it alive?
Maybe you are looking for
-
How to export an alv report directly to crystal report?
hi gurus, we are looking for the possible ways of integrating alv and crystal report. we want to keep the abap reports , because of the logical database and the selection screen, and use alv to present the result data, if users want to tailor the lay
-
"URGENT" adobe form using ABAP
Hi all, I am working with offline interactive form using ABAP for vendor master so anybody could help me for the same my problem is 1. How can we download the form at non sap system. 2. How can we upload the forms to sap system Plz give t
-
Edit listener from ASM instance in OEM
Hi I've installed Oracle Grid Infrastructure for a standalone server, and next installed database 11g. I have ASM and orcl instances. Under ASM (in ORACLE_HOME/grid) I have listener (listener.ora file), and under orcl instance I have only tnsnames.or
-
I am asking help for set up.
I have a 2wire connecting to my internet. I bought a Linksys wireless-G ehternet bridge with the purpose of coonecting it to another computer downstairs wirelessly. I don't know how, no matter how I tried to figure everything out. Do I lack anything,
-
Different applications on multiple computers
Hello, I was wondering if it is possible, with one subscription to Creative cloud (full), to install different applications on multiple computers: I know i can use the apps on two computers with the same subscription but i would like to have one comp