Tuesday, August 23, 2005

Answers For Great .Net Developer (2)

Mid-Level .NET Developer
  • Describe the difference between Interface-oriented, Object-oriented and Aspect-oriented programming.
    Interface-oriented : a contract between two parities, not care the implentation. Example : COM
    Object-Oriented look at things behaviorally.(Methods and property)
    Aspect-oriented programming: It identifies the aspects of a program - separates out what's essential (functionality wise) and what's repetitive(or not so essential from functionality perspective).
  • Describe what an Interface is and how it’s different from a Class. Interface defines a contract not executable code. It is implemented by class.
  • What is Reflection?
    Discover which class/method/property they are in running time.
  • What is the difference between XML Web Services using ASMX and .NET Remoting using SOAP? (Not sure the answer)
    Web Service : Cross-Platform and interoperable
    .Net Remoting : extensible.
  • Are the type system represented by XmlSchema and the CLS isomorphic?
    don't know.
  • Conceptually, what is the difference between early-binding and late-binding?
    Data type is checked in compiling time for early-binding while it is in running time checked for late-binding.
  • Is using Assembly.Load a static reference or dynamic reference?
    Dynamic reference. The result will depend on different parameter with Assembly.Load
  • When would using Assembly.LoadFrom or Assembly.LoadFile be appropriate?
    don't know
  • What is an Asssembly Qualified Name? Is it a filename? How is it different?
    Assembly Qualified Name is strong name including “Assembly name”, “ version”,”public key ”.
    It is not a file name. Because it allows for signing and versioning.
  • Is this valid? Assembly.Load("foo.dll");
    No. The parameter should not be file name but (“file name + version number + public key token)
  • How is a strongly-named assembly different from one that isn’t strongly-named?
    The strongly named assembly usually is placed in GAC and is signed with using public/private key. It also has the version number and public key name. User then can identify different version assemblies.
  • How is a strongly-named assembly different from one that isn’t strongly-named?
    The strongly named assembly usually is placed in GAC and is signed with using public/private key. It also has the version number and public key name. User then can identify different version assemblies.
  • What is the JIT? What is NGEN? What are limitations and benefits of each?
    Just In Time. It allows for better compilation logic. But it needs long starup time.
    Native image generator. It allows for compile ahead of time and save the data type in the local cache of machine But because it does not know too much about data type. It may not be the perfect compiling logic. Faster starup time.
  • How does the generational garbage collector in the .NET CLR manage object lifetime? What is non-deterministic finalization?
    Three generational collector are defined in .Net CLR manage object life time: 1.short lived . 2 and 3 are long term lived.
    Non-deterministic finalization means the object ‘s memory is not instantly released when this object is out of scope. The system will determine when to release all the memory for this object.
  • What is the difference between Finalize() and Dispose()?
    Finalize is automatically called by system when object destroyed .(should only call Finalize when you explicitly release object )
    To control resources outside CLR , such as window handlers or data connection ,and support Garbage collection, .Net using Dispose to release objects.(Dispose has to be called by user not automatically )
  • How is the using() pattern useful? What is IDisposable? How does it support deterministic finalization?
    Make it hard to forget to release system resource. When out of “ using” scope, the current object’s Dispose method is automatically called to release resource. It is not for memory but only for GC.
    IDisposable is an interface to define a way to dispose of objects in a deterministic manner.
  • What does this useful command line do? tasklist /m "mscor*"
    Display all the current tasks having dll like “mscor*” loaded.
  • What is the difference between in-proc and out-of-proc?
    In-proc means all the functions are running in current local process.
    Out-of-proc means the functions are running in different process.
    in-proc means the component is compiled as a shared library file like .dll Out-of-proc means the component is compiled as executable file like .exe. To call the out-of-proc component, the marshalling is needed between two processes and thus slower
  • What technology enables out-of-proc communication in .NET?
    Remoting. Remoteing enable user to use any other object in current computer or any other computer available in its network.while an out-of-proc can be implanted in any number of other ways,someone using the term almost always means Remoting..
  • When you’re running a component within ASP.NET, what process is it running within on Windows XP? Windows 2000? Windows 2003?
    Aspnet_wp.exe ( the following is the process flow for a regular http requests:HttpRequest--->Inetinfo.exe-->AspNet_ISAPT.dll--->Aspnet_wp.exe---> HttpRuntime-->HttpApplication Factory-->HttpApplication-->HttpModule-->HttpHandler Factory-->HttpHandler-->HttpHandler.ProcessRequest()
    Inetinfo.exe if in debug mode(Inetinfor.exe is primarily used for debugging IIS)

0 Comments:

Post a Comment

<< Home