« goToAndSay Episode 2 | Main | Time/Date Change screwed up my Flex.. »
May 11, 2006
Noobie's Cairngorm
Alrighty, I'm not ashamed to admit that I have little to zero experience with Caringorm - any version. I mean after all, I was a little bandwagoner that hopped on with at the Flex2 juncture so I don't feel at all ashamed that I haven't full heartedly adopted the popular, even de facto framework for RIA dev in Flex.
So today I finally got around to implementing it for the start of a fair sized RIA that will be one of those applications that will be constantly being updated, features added - yes, the word is scalable I suppose.
Wrapping your head around the framework really isn't that bad, and once you have it in place its pretty damn intuitive. One thing I ended up doing, was extending the interfaces ( Command and Responder in particular ) to have the naming follow the conventions I'm used to now in Flex, so I now have ICommand and IResponder, which to me makes more sense - if only because multiple people will inevitably be on this project and it gives them common footing stepping into the code to know immediately by the I, that we're dealing with an interface.
So just getting my feet wet, but am I liking it? Yes. Why? Because I'm all for organization and structure and if nothing else, it affords this to team development. It means if i start setting stuff up with this framework ( it could be any framework really, as long as its strictly adhered to) that I'm encouraging team development and efficiency.
Posted by bitch at May 11, 2006 10:16 PM
Comments
Nice sharing your experiences with Caringorm from a Noobie's perspective. Hope there's some more posts on this topic in the future :)
Posted by: Dave Rosen at May 12, 2006 12:30 AM
I'm also exploring Cairngorm at the moment. As far as I can tell it's a very thought-out concept. Steven Webster, one of the masterminds behind the Cairngorm framework, announced on the Flexcoders mailing list that they are going to publish an updated version of the Cairngorm sample store. This sample app came with the 0.99 version. But since things have changed in recent versions of Flex and Cairngorm it needs a major overhaul. I hope to learn more from the source code of this app.
Posted by: Stefan Schmalhaus at May 12, 2006 06:08 AM
Don't you think your colleagues will get the hint that is written before the Interface name:
class MyCommand implements Command {
}
or do you think the implements is too cryptic?
Posted by: ilya Devèrs at May 12, 2006 08:04 AM
Ilya-
OF course i don't think its too cryptic. My point is more in making sure I am descriptive as possible, so that anyone can even look at the name of the file and get an idea of what its does - much like Flex in that sense. I know by the naming conventions alone, that the interfaces are. So if someone loads up the project in lets say Flex and doesn't even open up the file, it can see from the navigator view, which classes are Interfaces, even Factory classes, etc.
Some people would consider this anal in terms of naming conventions, but if you work on a team where workloads are getting constantly changed and shifted and you want to maintain efficiency in workflow and productivity without sacrificing the quality of the end product, you need to give people as much consistentcy as possible and make things as self-explanatory as possible. That's my view and realization from a lot of team development. And i don't necessarily mean having an extra person jumping in to help you on a project, I mean scenerios where two people might jump onboard for a week, or a project might be put on someone else's plate entirely, someone who might not know anything about it.
Posted by: stacey at May 12, 2006 01:53 PM
Absolutely use ICommand! It allows people that are coming to the framework to know that it's an interface without having to open the file to see what it is. I know I'd consider it a class unless I had looked at it.
Overall Cairngorm has stuff that I've been using personally for quite some time (and stuff that I haven't)...only they had the brains to say THIS IS CAIRNGORM and declare it a framework. Sounds like a good thing to stick to. In fact, I'm looking at using it for our regular Flash projects around here.
Cheers,
Brentholio
Posted by: Brent Bonet at May 12, 2006 05:08 PM
I find it most of the time very annoying to put the type of something in the name (variables, class names, attributes etc.). I believe names should represent the (busines) objects we are trying model. you shouldn't muddle the model...
And it goes straight against the DRY principle (don't repeat yourself). First you define something is an interface (in the code where you declare) then you give it an i in the name, and then you have to say something implements it....
In the generated documenation of Cairngorm you see it is an interface, as it sits with the interfaces of the package.
Last but not least, Flexbuilder will put a nice I on your class if it is an interface....
And why wouldn't you open a file, knowing it is "just" an interface, if you are browsing through the code?
one last point, most of the time new members on my team don't have to know all the inns and outs of cairngorm immediately, they just follow the pattern allready laid out... Sometimes it confuses them more then anything else. It will come when it comes.
just some points on why they aren't in the framework, and if you change the names, you will have to do so also the next time you upgrade from cairngorm 2.x.m to 2.x.n
now, your strapped for time team will have to do unproductive work for sure, going and change the names of all the classes and all the cairngorm internal classes...., breaking the generated doc etc.
I would suggest having the cairngorm swc in your project and the code somewhere else, and never change it...
its just bad practice...
Posted by: ilya at May 12, 2006 09:41 PM
All really good points - some i have considered, others I haven't, hence my "noobie" title in the post.
Just to clarify I didn't change the names of the files in the C framework, I left that alone. It exists as it always has.
I see things from both sides believe me, I know Eclipse does a lot of nice stuff for you in terms of idenification. I think i've just become used to the Flex framework of identifying classes which is with the "I" preface.
Posted by: stacey at May 12, 2006 10:34 PM
Post a comment