Friday, January 29, 2010

Difference between synchronous and asynchronous communication?

Asynchronous:
-asynch comm there is no need to establish a connection before data transmission.
-asynch comm is used in packet swithed networks
-widely used for PC communication and is commonly used for e-mail applications, Internet access, and asynchronous PC-to-PC communications.
-data is transmitted one byte at a time with each byte containing one start bit, eight data bits, and one stop bit, thus yielding a total of ten bits.
- Disadvantage: overhead because every byte sent contains two extra bits (the start and stop bits) and therefore a substantial loss of performance.

Synchronous:
-first connection will be established and the communication
will take place.
-synch comm is used in circut swithed netwoks.
-data is transmitted as frames of large data blocks rather than bulky individual bytes. One advantage of synchronous is that control information is easily inserted at the beginning and end of each block to ensure constant timing, or synchronization.
-Another advantage of synchronous is that it is more efficient than asynchronous. For example, a 56 Kbps dial-up synchronous line can carry 7000 bytes per second (56000/8) compared to a 56 Kbps dial-up asynchronous line which can only carry 5600 bytes per second (56000/10).When transmitting large amounts of information, this translates into a significant increase in speed and performance.

Wednesday, January 6, 2010

Web Part Life Cycle:

- OnInit – Configuration values set using WebBrowsable properties and those in web part task pane are loaded into the web part.
- LoadViewState – The view state of the web part is populated over here.
- CreateChildControls – All the controls specified are created and added to controls collection. When the page is being rendered for the first time the method generally occurs after the OnLoad() event. In case of postback, it is called before the OnLoad() event. We can make use of EnsureChildControls() - It checks to see if the CreateChildControls method has yet been called, and if it has not, calls it.
- OnLoad
User Generated Event – for e.g. button click on the web part.
- OnPreRender – Here we can change any of the web part properties before the control output is drawn.
- RenderContents – Html Output is generated.
- SaveViewState - View state of the web part is serialized and saved.
- Dispose
- UnLoad.