What could be good question to decide if candidate has strong or atleast fair knowledge working with Flex and ActionScript.
问题:
回答1:
- What is difference between [Binding] , [Binding("eventName")]
- What is difference between x:XClass = XClass(y) and x:XClass = y as XClass
- How to set style values in action script
- What is ChangeWatcher, suppose ChangeWatcher does not exist, can you create one?
- How to access query string parameter of html hosting your flex app
- What is of labelFunction in List,DataGridColumn etc, how to use it
- How to use inline anonymous functions, and when to use
- Show an example of how will you use Function as arguments to methods
- What does operator >>>, ===, !== do?
- What is difference between encodeURI and encodeURIComponent
- How to do conditional compiling like #ifdef and #define in "C/C++/C#"
- What is difference between for..in and for each..in
- What does with keyword do
- Is there "Long" data type in flex (NO)
- How to set "#text" element of given element name in XML e.g. below...
how to add #text of child in
<parent><child/></parent>
as
<parent><child>child text</child></parent>
given name of child will be determined at runtime..
var x:XML = <parent><child/></parent>;
var n:String = "child";
Answer is
x.*[n] = "child text";
回答2:
- Basic understanding of OO concepts
- Event handling (bubbling, difference between stop propagation and stop immediate propagation etc)
- Why
stage
is null when accessed from my custom movie clip's constructor?addChildAt
andswapChildren
- what do they do?
- Data binding concepts
- Accessing media/data from a different domain than the originating one:
- What does crossdomain.xml do?
- Item renderers and the implications of the fact that they're reused:
- Why should you always use overriden set data to customize an item renderer?
- Ever heard of
outerDocument
?
- How do you implement an ActionScript interface in mxml
- Ask him to rewrite a not-so-complex-mxml component in pure ActionScript. You may or may not have to do this in a real project, but someone who knows how to do this will have a good understanding about the internals of Flex. If he says you can't do this with ActionScript, he has been mostly copy pasting from tutorials.
- Basic e4x
回答3:
I like to ask the interviewee to describe the component lifecycle. You can usually judge how knowledgeable they are by how in-depth they go.
回答4:
Grant Skinner has a great series of lecture notes on what every Flash dev should know, though it's obviously debatable. See here: http://www.gskinner.com/talks/things/ (it's in a very pretty wrapper too)
I think that the kind of knowledge he highlights is more valuable than language trivia, which can be learned on the job if necessary (and probably won't come up much in real situations).
回答5:
Memory management is important on any platform. Here are a few Flex specific questions:
Is there a delete operator in ActionScript?
Yes, there is, but it removes values from collections, it doesn't release memory. Only the garbage collector is able to release memory.How to prevent memory leaks?
Null-ify members to make the garbage collector release them; addEventListener adds references to the object, so each addEventListener should have a corresponding removeEventListener.Explain weak references.