|
|
Interviewer
Insights
|
|
|
|
About Us
|
|
|
|
Comments,
Suggestions
or General Feedback
|
|
|
|
Interested
in writing for
Tech Talk Tips?
|
|
|
|
|
|
|
|
Application
Developer
Early
and late binding
|
|
|
|
by
Mark Horninger
|
This months software application development question
is on VB and is written by Mark Horninger. When interviewing
developers you need to make sure they understand how to apply
the most effective coding principles for the job. Here is a
question for your to use that mid-level developers with at least
2 years experience with Visual Basic should get correct.
What
is the difference between early and late binding and which is
better? Why?
What to look for in your candidate's response:
Early binding is generally better since it is faster based on
the type info that is compiled into the application at compile
time. Late binding requires extra calls to determine object
information at run time that makes it slower. Early binding
affects the speed at which an object's methods can be accessed
using the object variable. A compiler will provide error checking
of the object variables if they are early bound versus late
bound. However, it may be desirable to declare an object variable
without a type library (example: Dim oX as object) if the developer
needs to be able to pass any kind of object as an argument to
a procedure. When an object variable is declared "as object"
it is not strongly typed and it's binding will be late.
When interviewing candidates, probe their understanding of why
early binding is better, rather than accepting the answer 'it's
better'.
Early binding examples:
Dim oX as excel.Spreadsheet
or
Dim oX as New excel.Spreadsheet
Late
Binding Example
Dim oX as object
set oX = createobject("excel.Spreadsheet")
About the author
Mark Horninger, A+, MCSE+I, MCSD, MCDBA
is President and founder of Haverford
Consultants Inc., located in the suburbs of Philadelphia,
PA. He develops custom applications and system engineering solutions,
specializing primarily in Microsoft operating systems and Microsoft
BackOffice products. He has over 10 years of computer consulting
experience and has passed 24 Microsoft Certified Exams. During
his career Mark has worked on many extensive and diverse projects
including database development, application development, training,
embedded systems development and Windows NT and 2000 project
rollout planning and implementations. Mark lives with his wife
Debbie and two children in Havertown, Pa.
|
REVIEWNET is a trademark and service mark of ReviewNet Corporation
©
1997-2001,
Jenkintown, PA - All Rights Reserved. This information is
confidential and proprietary
to ReviewNet Corporation. Use, duplication or misappropriation
is strictly prohibited.
|
|
|