Thursday, April 30, 2009

CHARACTERISTICS OF API

1.Easy to learn.
2.Easy to use, even without documentation.
3.Hard to misuse.
4.Easy to read and maintain code that uses it.
5.Sufficiently powerful to satisfy requirements.
6.Easy to extend.
7.Appropriate to audience.

API

An application programming interface (API) is a set of routines, data structures, object classes and/or protocols provided by libraries and/or operating system services in order to support the building of applications.
An API may be:
Language-dependent:
i.e., available only in a particular programming language, using the particular syntax and elements of the programming language to make the API convenient to use in this particular context.
Language-independent:
i.e., written in a way that means it can be called from several programming languages (typically an assembly/C-level interface).
This is a desired feature for a service-style API that is not bound to a particular process or system and is available as a remote procedure call.

DATAGRID EVENTS

DataGrid columns have an ‘IsReadOnly’ property.
When set to false, the cell is an editable one.
To get the changed values and for updating the data source, the DataGrid provides the following events:
1.BeginningCellEdit
2.CommitCellEdit
3.CommittingCellEdit
4.CommittingRowEdit
5.CurrentCellChanged

DATAGRID PROPERTIES

The DataGrid supports a text box column, check box column, and a template column for customizing content.
Text box column:
The text box column will show content in a text block control in non-editing mode and in a text box control in editing mode.
Check box column:
The check box column renders content in a check box control.
It provides an IsThree state property when set to true.
The state of the check box can be Checked, Unchecked, or Indeterminate.
Template column:
For custom content/controls on the column, we can use the template column.
CellTemplate and CellEditing template columns can be used for changing content in edit mode.

DATAGRID

The DataGrid is one of the powerful controls in Silverlight 2.0.
Data binding is a powerful way to create a connection between our UI and a source of data.
This simple technique can be used to create a clean separation between our user interface and its underlying data.

STORYBOARD

A Storyboard is the container that we can put animation objects in.
We have to make the storyboard a resource that is available to the object that we want to animate.

Wednesday, April 29, 2009

SOCKET CLASS

The Socket class allows you to perform asynchronous data transfer using the following methods:
· ConnectAsync - Starts an asynchronous request for a connection to the remote host.
· SendAsync - Writes outgoing data from one or more buffers on a connected socket.
· ReceiveAsync - Reads incoming data into one or more buffers from a connected socket.
· Shutdown - Finishes any pending send operations, and signals the remote endpoint that the connection should be closed. If Send is specified, data may still be received until the remote computer closes its end of the connection (indicated by receiving 0 bytes).
· Close - Closes the remote host connection and releases all managed and unmanaged resources associated with the socket.