Vous êtes sur la page 1sur 8

Test Questions – .

NET Senior Architect Level


_______________ _ ______________

.NET Framework

1. Explain the compilation process and runtime environment in .NET

NET languages use the CLR services to compile and create Portable Executable (PE). PE
is a collection of Microsoft Intermediate Language Code (MSIL) and Metadata. The
runtime uses metadata to locate and load classes, lay out instances in memory, resolve
method invocations, generate native code, enforce security, and set run-time context
boundaries.

MSIL is a CPU-independent set of instructions and Meta data is the data that describes to
the runtime the types, members and references in the code.

MSIL includes instructions for loading, storing, initializing and calling methods on
objects as well as instructions for arithmetic and logical operations, control flow,
exception handling. All components developed on .NET carry information (metadata)
about the components and resources they were built against. The runtime uses this
information to ensure that your component or application has the specified versions of
everything it needs.

2. Explain the Exception handling system in .NET. How is it different from the legacy
MS technologies like VB 6.0 etc?

In .NET exception handled using try and catch mechanism and also can be handled using
exception application block mechanism.

3. How does dot net solve versioning conflicts that one faces in most object oriented
environments?

Versioning conflicts are solved by creating public and private keys.


This includes version, culture and key.
This will be used to identify during the execution.

____________________________________________________________________________________
Test Questions – .NET Senior Architect Level
_______________ _ ______________

.NET will enable to run the different version of the application on the same directory.

4. How is Vertical vs. Horizontal Scaling achieved in system architecture?

Vertical scaling is achieved by adding more CPU and increasing the hard disk space
in single box.

Horizontal scaling is achieved by adding group of boxes to improve the performance.

5. What is the maximum amount of memory any single process on Windows can
address? Is this different than the maximum virtual memory for the system? How
would this affect a system design?
It is based on the OS limitation.

6. What is boxing and unboxing? Does it involve any memory related issues?

Converting a value type to object type is called Boxing. Unboxing is the opposite
operation and is an explicit operation.

OO Architecture
7. What is Inversion-of-Control (IoC)?
IOC containers like StructureMap, PicoContainer, and Spring are used in OO designs by
minimizing the effort necessary to utilize existing OO techniques.
IoC moniker refers to the indirection of object instantiation and linkage. Objects do not
directly create and call other objects, StructureMap "injects" dependencies into an object
instance through the object's constructor or public properties.

8. To achieve high scalability and performance, what design patterns would you use?
Explain for Web apps as well as Windows apps.

9. What are the differences between an Interface and an Abstract class? When is it
appropriate to use one over the other?

A class implementing an interface must implement all the methods defined in the
interface, while class extending an abstaract class need not implement any of the
methods defined in the abstact class.

____________________________________________________________________________________
Test Questions – .NET Senior Architect Level
_______________ _ ______________

10. Why is it important to create components that are loosely coupled and highly
cohesive? What do these terms mean?

By loosely coupling will enable us to use the same components by various


applications. It is stateless i.e., components are independent to each other
components.

11. Why are design patterns important? Describe your favorite pattern (other than
Singleton)

Design patterns will ease your application development.


Is a common approach for common problem.

We have used singleton and MVC, observer, Abstract factory, adapter, strategic
patterns.

12. Given a perfectly documented design, how you determine if it is an object-oriented


design? What kinds of design artifacts would you expect to find? What kinds of
things would you look for in the contents of those artifacts?

Web Architecture

13. Describe the life cycle of a Web application: When are Web forms instantiated and
how long do they exist?

14. What are the authentications modes that are supported in .Net web application?
Windows authentications are
Basic.
Digest.
Windows integrated authentication
Passport authentication.
Forms authentication.
None (Custom authentication)

15. How can a web page refresh automatically if some new data has entered the database?

____________________________________________________________________________________
Test Questions – .NET Senior Architect Level
_______________ _ ______________

16. Consider the following use case:


You are appointed to design architecture for a shopping application. You have to
come out with an architecture which will never loose a customer’s shopping cart?
What type of architecture will you create?

I can suggest go for SOA.

MTS/COM/COM+
17. What are the different locking levels provided in COM+?
18. Explain ACID properties?

Transaction must be Atomic (it is one unit of work and does not dependent on
previous and following transactions), Consistent (data is either committed or roll
back, no “in-between” case where something has been updated and something
hasn’t), Isolated (no transaction sees the intermediate results of the current
transaction), Durable (the values persist if the data had been committed even if the
system crashes right after).

19. What are Impersonation and Security call context features in COM+?

20. Describe the design Requirements for an Object to be pooled? What is the difference
between object pooling and Connection pooling?

Object pooling

With object pooling, COM+ creates objects and keeps them in a pool, where they
are ready to be used when the next client makes a request. This improves the
performance of a server application that hosts the objects that are frequently
used but are expensive to create.

Connection pooling
Once a connection has been created and placed in a pool, an application can
reuse that connection without performing the complete connection creation
process

When a user request a connection, it is returned from the pool rather than
establishing new connection and, when a user releases a connection, it is
returned to the pool rather than being released

The main benefit of pooling is performance

____________________________________________________________________________________
Test Questions – .NET Senior Architect Level
_______________ _ ______________

21. Explain COM+ Threading Models

RDBMS / SQL-Server
22. Consider the following scenario:
You have 10000’s of records that a user can select from & update the properties of all
the records to a single value, what type of SQL would you write to update the
records?
23. Explain the concept of referential integrity.
24. Explain the advantages of log shipping.
25. Explain the advantages of the Linked Server concept.
26. Explain the concepts of clustered and non-clustered index? What is the difference?
27. What are global variables in SQL server for a particular user RPC session?

MMC/WMI/.Net Profiling
28. Explain major technical differences between .NET Remoting and Distributed COM.
29. Explain major technical differences between .NET Remoting and Web Services.

Remoting can be done only for .net based application and webservices can be used for
any platforms. Non-microsoft application also can call webservice and can be created
webservices.

Remoting is faster than webservices

Remoting is complex than writing webservices.

ASP.NET
30. Describe the role of inetinfo.exe, aspnet_isapi.dll and aspnet_wp.exe in the page
loading process
31. Explain what a DiffGram is, and a good use for one?
32. How does the XmlSerializer work? What ACL permissions does a process using it
require?
33. In the context of a comparison, what is object identity versus object equivalence?
34. What does this do? gacutil /l | find /i “about”
35. From constructor to destructor (taking into consideration Dispose() and the concept of
non-deterministic finalization), what are the events fired as part of the ASP.NET
System.Web.UI.Page lifecycle. Why are they important? What interesting things can
you do at each?

____________________________________________________________________________________
Test Questions – .NET Senior Architect Level
_______________ _ ______________

Threading
36. What is a deadlock? How do you avoid creating one?
Deadlock situation will arise when two or more threads try to access the same object.

Deadlock can be avoided using mutex, using waitHandle.WaitAll() static method,


which can request a lock on more than one mutex simultaneously.

37. What is the difference between a mutex and a semaphore?

Mutex will not allow more than one thread to access the object, but in case of
semaphore it allows a certain number of threads to execute simultaneously.
Ex. If three threads to be able to access some resource simultaneously.
Situation

Database connection where there is some limit on the number of simultaneous


connections.

Such limits may be imposed either for license reasons or performance reasons.

38. In .Net, how do you share data between threads?

In .Net thread can cross AppDomain boundaries, and a method in one thread can call
a method in another AppDomain. Therefore, here is better definition of an
AppDomain a logical process inside of a physical process.

39. Describe the relationship between wait(), Pulse(), and PulseAll().


Wait() -
Pulse() -
PluseAll() –

Waiting of a thread can be achieved by wait() method.


Awaiting thread can always be activated using the Pulse() method. So thread will until it
is activated using pulse().

____________________________________________________________________________________
Test Questions – .NET Senior Architect Level
_______________ _ ______________

Monitor –
Enables you to serialize variable access in blocks of managed code by means of
lock and signals.

Example;
Method that updates database and that cannot be executed by two or more threads
at the same time. If the work is being performed by this method is especially time-
consuming and you have multiple threads, any of which might call this method, you
could have serious problems. This where monitor class comes in.

I have database.savedata method needed to finish updating multiple tables before being
called by another thread.

Use enter method attempts to obtain monitor lock on the object.


If another thread already has the lock, the method will block until the lock has been
released.

Monitor.exit – to release the lock.

Mutex – use to serialize access to code as you use a monitor


lock.

Mutexes are much slower because of their increased flexibility.

Only one thread can obtain monitor lock for a given object

When to use threads

Use when u are striving for

increased concurrency

simplified design

better utilization of CPU time.

____________________________________________________________________________________
Test Questions – .NET Senior Architect Level
_______________ _ ______________

How do I stop a thread?

There are several options.


First, you can use your own communication mechanism to tell the ThreadStart method to
finish.
Alternatively the Thread class has in-built support for instructing the thread to stop.
The two principle methods are Thread.Interrupt() and Thread.Abort().
Thread Interrupt() cause a ThreadInterruptedException to be thrown on the thread when it
next goes into a WaitJoinSleep state. In other words, Thread.Interrupt is a polite way of
asking the thread to stop when it is no longer doing any useful work.
In contrast, Thread.Abort() throws a ThreadAbortException regardless of what the thread
is doing.
Furthermore, the ThreadAbortException cannot normally be caught (though the
ThreadStart's finally method will be executed).
Thread.Abort() is a heavy-handed mechanism which should not normally be required

ADO.Net

40. How do typed data sets differ from untyped data sets, and what are the advantages of
typed data sets?
41. Explain the difference between handling transactions at the data set level and at the
database level.
42. What is serialization? Is it possible to serialize a dataset?

Serialization is the process of converting objects, such as arrays, controls, etc., into a
stream of bytes for storage

The .NET Framework includes the following classes for serializing and deserializing objects:
BinaryFormatter Enables you to serialize and deserialize objects to a binary format.
This is the class that we'll be using in these examples.
SoapFormatter Enables you to serialize and deserialize objects to a SOAP format
(SOAP is covered with more detail in Chapter 17)
XMLSerializer Enables you to serialize and deserialize objects to an XML format

____________________________________________________________________________________

Vous aimerez peut-être aussi