• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
Front

How to study your flashcards.

Right/Left arrow keys: Navigate between flashcards.right arrow keyleft arrow key

Up/Down arrow keys: Flip the card between the front and back.down keyup key

H key: Show hint (3rd side).h key

image

PLAY BUTTON

image

PLAY BUTTON

image

Progress

1/46

Click to flip

46 Cards in this Set

  • Front
  • Back
What were the goals of .net?
1. Component infrastructure - no more use of registry to register components and is now more "plug and play"
2. Language integration - inherit from classes written in different .net languages
What does CLR stand for?
Common Language Runtime
What does the CLR do?
Activates objects, performs security checks on them, lays them out in memory, executes them, and garbage collects them. Also does JIT compiling
What are the parts of the .net framework?
CLR, Framework Base Classes (IO, Security, threading, etc), Data and XML classes (ADO.NET, XML, etc), Web Services, Web Forms, Windows forms
Describe CLR execution
1. Class Loader - loads the classes into memory and prepares them for execution
2. Verifier - Checks that the IL code is type safe meaning type signatures are used correctly
3. JIT Compiler - converts IL to native code
4.Execution support - garbage collection, exception handling, etc
What is the difference between an interface and an abstract class?
1. Multiple inheritance - a class may implement > 1 interface but only extend one abstract class
2. Default implementation - an interface may not provide any default code, but an abstract can provide default code or just stubs
3. Is-a vs Can-do: Interface describes peripheral abilities of a class (Can do). An abstract class defines the core identity of its descendants (Is a)
Why would you use an interface vs an abstract class?
Interface Pros
- Third party convenience - An interface implementation may be added to any existing third party class.
- If all the various implementations share is the method signatures, then an interface works best.

Cons
-If you add a new method to an interface, you must track down all implementations of that interface in the universe and provide them with a concrete implementation of that method

Abstract Pros
- If you add a new method to an abstract class, you can provide a default implementation of it and then all existing code will continue to work without change.
- If the various implementations are all of a kind and share a common status and behavior, usually an abstract class works best.

Cons
- Third party convenience: A third party class must be rewritten to extend only from the abstract class
What is encapsulation?
1. A language mechanism for restricting access to some of the object's components.
2. A language construct that facilitates the bundling of data with the methods operating on that data
What is polymorphism?
The ability of one type, A, to appear as and be used like another type, B.
In C#, this means that type A derives from type B, or type A implements an interface that represents type B.
What is the GAC for?
Global Assembly Cache. A shared DLL is registered in the GAC and must have a unique hash value, public key, locale, and version number. Allows > 1 version of the same dll
Explain Garbage Collection
Each time you use the new operator to create an object, the runtime allocates memory for the object from the managed heap. The garbage collector's optimizing engine determines the best time to perform a collection, based upon the allocations being made. When the garbage collector performs a collection, it checks for objects in the managed heap that are no longer being used by the application and performs the necessary operations to reclaim their memory.
Explain the purpose of a destructor
When you create objects that encapsulate unmanaged resources such as a file or network cnxn, you must explicitly release the unmanaged resources when you are finished using them in your application.
The programmer has no control over when the destructor is called because this is determined by the garbage collector.
Why use a dispose method?
Provides a way to explicitly release the resource before the garbage collector frees the object; improves performance.
What namespace defines classes for ASP.NET web forms?
System.Web.UI
From what class do all asp.net web pages inherit?
Page
Describe the major page events
Init: Raised after all controls have been initialized and any skin settings have been applied. Use this event to read or initialize control properties.

Load: The Page calls the OnLoad event method on the Page, then recursively does the same for each child control, which does the same for each of its child controls until the page and all controls are loaded. Use the OnLoad event method to set properties in controls and establish database connections.

PreRender: Before this event occurs: Each data bound control whose DataSourceID property is set calls its DataBind method. The PreRender event occurs for each control on the page. Use the event to make final changes to the contents of the page or its controls.

Unload: This event occurs for each control and then for the page. In controls, use this event to do final cleanup for specific controls, such as closing control-specific database connections. For the page itself, use this event to do final cleanup work, such as closing open files and database connections.
Session state
Stored on server. Will timeout (default=20 minutes). Data persists across IIS restarts

Sessionstate mode values:
Off

Inproc: stored on local server. Default value. Fastest but won't work in web farms.

StateServer: stored on remote server specified by stateConnectionString

SqlServer: stored in db specified by sqlConnectionString
What is the view state?
State of the page and its controls. Saved in hidden fields that contain the state encoded in a string.

Pros: doesn't consume server resources and doesn't time out

Cons: Not good for lots of data or sensitive data
What is a delegate?
A delegate is a type that references a method.
Any method that matches the delegate's signature, which consists of the return type and parameters, can be assigned to the delegate.

Why use a delegate? This ability to refer to a method as a parameter makes delegates ideal for defining callback methods. For example, a sort algorithm could be passed a reference to the method that compares two objects. Separating the comparison code allows the algorithm to be written in a more general way.
Why use a delegate vs an interface?
Use a delegate when:
- An eventing design pattern is used.
- The caller has no need access other properties, methods, or interfaces on the object implementing the method.
- A class may need more than one implementation of the method.

Use an interface when:
- There are a group of related methods that may be called.
- A class only needs one implementation of the method.
- The method being implemented is linked to the type or identity of the class: for example, comparison methods.
Application state
Allows for global variables, dictionaries. Info lost on IIS reset.Won't work on a web farm b/c it's specific to a single process on a single processor
What is SOAP?
Simple Object Access Protocol: a way to structure data before transmitting it, is based on XML standard
How do you expose a method to web service consumers?
1. Mark it public
2. [WebMethod] attribute placed before the method declaration
What types can a web service use for parameters or return values?
1. Primitive data types like Integer, Double, String, DateTime, Object.
2. arrays and ArrayLists of primitive types.
3. User defined classes as long as all class variables are public and of type 1 or 2.
4. Dataset
What is WSDL?
Web Service Description Language.
An XML-based language that provides a model for describing Web services.
What is SOA?
Service Oriented Architecture. SOA describes an information technology architecture that enables distributed computing environments with many different types of computing platforms and applications.
Where on the Internet would you look for Web Services?
www.uddi.org
What is UDDI?
UDDI stands for Universal Description, Discovery and Integration. It is an open, Internet-based specification that offers directory service for storing information about web services.
Describe asynchronous web services
The client event handler calls the Begin<web method name> on the proxy, passing in the delegate for the callback method. When the server completes the method, it returns the result to the proxy which calls the callback method, passing an object which implements IAsyncResult. The client then passes that back to the proxy's End<web method name> method, which returns the data to the client
Can you give examples of C# generics?
List<T>
Dictionary<TKey,TValue>
Why would you use a Generic collection instead of one from System.Collections?
type safety without having to derive from a base collection type and implement type-specific members
Describe an algorithm for finding all the prime numbers from 1-100.
//1 is not a prime
for i=2 to 100
{
bool isPrime=true
for j=2 to i-1
{
if i%j=0
{
isPrime=false
break
}//end if
}//end inner loop
if isPrime = true
{
add i to a list of ints
}
}//end outer loop
What is an abstract class?
Abstract classes may not be instantiated, and require subclasses to provide implementations for the abstract methods
What is database normalization?
In a properly normalized database, there will be only one field in one table for a particular piece of data, eliminating possibility for conflicting values for the same piece of data.

A process in database design which groups data into various tables which are then crosslinked by a particular field.
What are the forms of database normalization?
First Normal Form: No repeating groups, e.g. Person table can't have > 1 telephone # in the PhoneNumber column

Second normal form: the non-key columns depend upon the whole of the composite primary key rather than just a part of it, e.g. if Employee+Skill makes up the key, then address is only tied to employee, not skill, and therefore the table is not 2NF
(High level - HR) Give an example of how you recently used C#
TBD
(High level - HR) Give an example of how you recently used ASP.NET
TBD
(High level - HR) Give an example of how you recently used Javascript
TBD
(High level - HR) Give an example of how you recently used SSRS
TBD
What parts of SDLC have you been involved in?
All
Planning: milestone dates, etc
Analysis: design docs as reqs, getting and inputting feedback on reqs
Design: design docs
Implementation
Maintenance: hotfixes
What's the difference between DELETE TABLE and TRUNCATE TABLE commands?
DELETE TABLE is a logged operation, so the deletion of each row gets logged in the transaction log, which makes it slow. TRUNCATE TABLE also deletes all the rows in a table, but it won't log the deletion of each row, instead it logs the deallocation of the data pages of the table, which makes it faster. TRUNCATE TABLE can be rolled back.
Sql Server: What's the difference between a clustered index and a non-clustered index?
When you create a clustered index on a table, all the rows in the table are stored in the order of the clustered index key. So, there can be only one clustered index per table. Non-clustered indexes have their own storage separate from the table data storage.
What are some things that can cause poor performance of a query?
No indexes, table scans, blocking, poorly written query with unnecessarily complicated joins, too much normalization
What's the difference between a primary key and a unique key?
Both primary key and unique enforce uniqueness of the column on which they are defined. But by default primary key creates a clustered index on the column, where are unique creates a nonclustered index by default. Another major difference is that, primary key doesn't allow NULLs, but unique key allows one NULL only.
What is the difference between a user control and a custom control?
Custom control: inherit from a Control class like Button or System.Web.UI.WebControls.WebControl. Easily used by > 1 application. Can be added to the Toolbox in Visual Studio

User control: Easy to create, composite of other existing controls. Can't be added to the toolbox in Visual Studio. Not so easy to use in > 1 application
What is a partial class and why would you use one?
A partial class allows you to split a class definition into multiple parts, e.g. in more than one source file. This could be useful to allow > 1 developer to work on the same class simultaneously. Also when working with automatically generated source, code can be added to the class without having to touch the generated file.