Professional Documents
Culture Documents
------------
Indexers enable objects to be indexed in a similar manner to arrays.
A get accessor returns a value. A set accessor assigns a value.
The this keyword is used to define the indexers.
The value keyword is used to define the value being assigned by the set indexer.
Indexers do not have to be indexed by an integer value; it is up to you how to d
efine the specific look-up mechanism.
Indexers can be overloaded.
Indexers can have more than one formal parameter, for example, when accessing a
two-dimensional array.
LINQ
---------
LINQ provides a simple set of standard operators to query in-memory collections
as well as entities. LINQ for SQL allows us to create DAL s quickly but more impor
tantly they are more flexible and robust than the common approach.
LINQ to SQL provides a runtime infrastructure for managing relational data as ob
jects without losing the ability to query. Your application is free to manipulat
e the objects while LINQ to SQL stays in the background tracking your changes au
tomatically. (119 printed pages)
The DataContext object is in charge of converting rows to objects and vice versa
when interacting with our conceptual model, a DataContext object takes a connec
tion string
Next we will look at how we query related entities and look at the SQL generated
by the DataContext to enable these queries. Because we defined the relationship
s between our entities using EntityRef<TEntity>, and EntitySet<TEntity>
Lambada Expressions
---------------------
A lambda expression is an anonymous function that can contain expressions and st
atements, and can be used to create delegates or expression tree types.
Lambdas are used in method-based LINQ queries as arguments to standard query ope
rator methods such as Where.
a lambda expression typically takes the following structure: parameters => expre
ssion.
Extension Methods
--------------------
Extension methods provide a simple mechanism to extend types in the system (valu
e, reference, and interface types) with new methods. These methods extend the or
iginal type and can be called like regular, defined instance methods, but they l
eave the original type and its methods untouched. Extension methods create the i
llusion that they are defined on a real type, but, in reality, no changes are ma
de to the original types.
Trace and Debugging
----------------------
Trace is actually the process of collecting information about the program's exec
ution
Debugging is the process of finding and fixing errors in our program.
Encapsulation:
----------------------
Encapsualation is basically, wrapping up of data memebers and methods.
As you said, You hide the data for security such as making the variables as priv
ate, and expose the property to access the private data which would be public. S
o, when you access the property you can validate the data and set it.
Abstraction:-
------------------
Abstraction have the methods which will be common for all the derived class woul
d need. It contains the skeletion which needs to be implemented by the derived c
lass also, which will be declared as abstract method.
Finalize and Dispose Method
---------------------------------
Can we use both Finalized and disposed method together ? If yes then who would b
e called first?
Dispose() is called by the user of an object to indicate that he is finished wit
h it, enabling that object to release any unmanaged resources it holds. Use IDis
posable to implement it.
Finalize() is called by the run-time to allow an object which has not had Dispos
e() called on it to do the same. However dispose() operates determinalistically,
whereas there is no guarantee that Finalize() will be called immediately when a
n object goes out of scope as it is called by runtime environment itself.
So dispose will be called first and finalize in end by run-time.
Sn.exe is a tool to create a strong name for a dll, what is the difference betwe
en dll with strong name and dll without strong name?
--------------------------------------------------------------------------------
---------------------------------------------------------
Strong name assemblies are used to overcome dll conflicts. It is a simple text n
ame along with version number, culture information (if provided), plus a public
key and a digital signature. It is generated from an assembly file (the file tha
t contains the assembly manifest, which in turn contains the names and hashes of
all the files that make up the assembly), using the corresponding private key.
Obviosuly assembly without strong name will lack these properties.
Dot Net provide two types of mechanism for serialization, one is xmlserializer a
nd other one is soapformatter/ binary formatter.xmlserializer for webservice and
soapformatter/ binary formatter for remoting . If xmlserializer is used for web
service then what is the role of SOAP in webservice?
SOAP is a protocol used for data exchange b/w webservice and application while X
ML serialiser class is used to encode webservices messages.
Scrum is a process skeleton, which contains sets of practices and predefined roles
. The main roles in Scrum are:
the Scrum Master , who maintains the processes (typically in lieu of a project mana
ger)
the Product Owner , who represents the stakeholders
the Team , a cross-functional group of about 7 people who do the actual analysis, d
esign, implementation, testing, etc.
During each sprint , typically a two to four week period (with the length being dec
ided by the team), the team creates a potentially shippable product increment (f
or example, working and tested software). The set of features that go into a spr
int come from the product backlog, which is a prioritized set of high level requir
ements of work to be done. Which backlog items go into the sprint is determined
during the sprint planning meeting. During this meeting, the Product Owner infor
ms the team of the items in the product backlog that he or she wants completed.
The team then determines how much of this they can commit to complete during the
next sprint.[1] During a sprint, no one is allowed to change the sprint backlog
, which means that the requirements are frozen for that sprint. After a sprint i
s completed, the team demonstrates the use of the software.
AGILE
---------
Agile methods are a family of development processes, not a single approach to so
ftware development.
Agile methods break tasks into small increments with minimal planning, and do no
t directly involve long-term planning. Iterations are short time frames ("timebo
xes") that typically last from one to four weeks. Each iteration involves a team
working through a full software development cycle including planning, requireme
nts analysis, design, coding, unit testing, and acceptance testing when a workin
g product is demonstrated to stakeholders. This helps minimize overall risk
ONE WAY BINDING
-----------------
OneWay binding causes changes to the source property to automatically update the
target property, but changes to the target property are not propagated back to
the source property. This type of binding is appropriate if the control being bo
und is implicitly read-only.
TWO WAY BINDING
-----------------
TwoWay binding causes changes to either the source property or the target proper
ty to automatically update the other. This type of binding is appropriate for ed
itable forms
ONE TIME
------------------
Source to Target only when binding creates
Grid -- a table used for positioning objects
Canvas -- used for absoulte positioning
Stack -- used to position objects next to one another
Model
Represents the data
The entity
Not required to know where it gets its data from
* From a WCF service. WCF RIA Services, etc
May contain validation
View
The screen, the UI, the UserControl in Silverlight
Handles UI look and feel
Presentation of information
Communicates with ViewModel through bindings
ViewModel
Main source of logic for the MVVM triad
Connects the Model to the View
Abstracts the View
Public properties that are bound to a View
INotifyPropertyChanged and INotifyCollectionChanged talk to the View through
bindings
Listens for changes from the View through bindings
Invokes services to communicate outside the MVVM triad
The Model View View-Model (MVVM) pattern attempts to provide separation of the U
I from the logic and data being presented by the UI. This separation allows for
better unit testing and a better separation of concerns
PRISM
Prism is designed to help you more easily build modular Windows Presentation Fou
ndation (WPF) and Silverlight client applications. These types of applications t
ypically feature multiple screens, rich, flexible user interaction and data visu
alization, and role-determined behavior. They are "built to last" and "built for
change." This means that the application's expected lifetime is measured in yea
rs and that it will change in response to new, unforeseen requirement
Basically it is similar like the old "C" age function pointer, where functions c
an be assigned like a variable and called in the run time based on dynamic condi
tions. C# delegate is the smarter version of function pointer which helps softwa
re architects a lot, specially while utilizing design patterns.
Delegates
At first, a delegate is defined with a specific signature (return type, paramete
r type and order etc). To invoke a delegate object, one or more methods are requ
ired with the EXACT same signature. A delegate object is first created similar l
ike a class object created. The delegate object will basically hold a reference
of a function. The function will then can be called via the delegate object.