Monday, 27 May 2013

Packet Switching In Computer Networking

Packet Switching In Computer Networking


PACKET SWITCHING  :  Packet Switching is a digital networking communication method that groups all transmitted data, regardless of content, type or structure in a suitably sized block called "Packet".

Packet switching features delivery of variable bit rate data stream over a shared network, when traversing network adapters, switches, routers etc.

Packets are buffered and queued, resulting in variable delay and throughput depending  on the traffic load in the N/W .

Best example of packet switching is Internet  and LAN.

Division of Packet Switching 

Circuit Switching            Packet Switching         Message Switching
  
  
Packet Switching

ConnectionLess                                              Connection Oriented
  (datagram)                                                        (virtual circuit)

 ConnnectionLess Packet Switching :

 All packets have header including all address information as source address, destination address and port number.
Each packet treated independently.
Connection less protocol are => Ethernet, Ip & Udp  

 Connection Oriented Packet Switching :

 A connection is defined and preallocate in each involve node during a connection phase before any packet is transferred.
All packet include connection ID rather than address info.
 Connection Oriented protocols are => x.25, frame-relay

X.25
It is a reliable protocol based on node to node automatic repeat request.  
 It is a network layer protocol.

Frame Relay :
 Non reliable protocol 
It is a further development of x.25, fast & more cost effective.
It is a data link layer protocol.
It does not provide logical address & routing , it is only used for semi-permanent connections. 

 



 

Monday, 2 July 2012

Data Binding In Flex

Data Binding In Flex

Hello Friends,

                   Today I am going to explain you about data binding, with some examples in flex.

Data Binding :   Basically Data binding is the process of tying the data in one object to another  
                                 object. Data binding requires a source property, a destination property, and a triggering event that indicates when to copy the data from the source to the destination. An object dispatches the triggering event when the source property changes.

Data Binding with Flex :  Flex provide 3 ways to implement data binding. we will discuss 
                                               them one by one :

1st ) The curly Braces ( { } ) method :   Inside the curly braces we give the name of source 

property with the binding expression. When the value of the source property changes, Flex copies the current value of the source property.

Example : 

 
<?xml version="1.0"?>
<!-- binding/BasicBinding.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

    <mx:TextInput id="myTI" text="Enter text here"/>
    <mx:Text id="myText" text="{myTI.text}"/>
</mx:Application>





2nd)  <mx:binding> tag method

When you use the <mx:Binding> tag, you provide a source property in the <mx:Binding> tag's source property and a destination property in its destination property.

same example with <mx:binding> method :

<?xml version="1.0"?>
<!-- binding/BasicBindingMXML.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">

    <mx:TextInput id="myTI"/>
    <mx:Text id="myText"/>   

    <mx:Binding source="myTI.text" destination="myText.text"/>
</mx:Application>


 


3rd ) In Action Script 

The curly braces syntax and the <mx:Binding> tag both define a data binding at compile time. You can also use ActionScript code to define a data binding at run time.

Example :

<?xml version="1.0"?>
<!-- binding/BasicBindingAS.mxml -->
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
    
    <mx:Script>
      <![CDATA[
        import mx.binding.utils.*;

        // Define data binding.
        public function initBindingHandler():void {
            BindingUtils.bindProperty(myText, "text", myTI, "text");
        }
      ]]>    
    </mx:Script>

    <mx:TextInput id="myTI"/>
    <mx:Text id="myText" preinitialize="initBindingHandler();"/>
</mx:Application>


 


In this example, we use the static BindingUtils.bindProperty() method to define the binding. You can also use the BindingUtils.bindSetter() method to define a binding to a function.

Notice in this example that you use the preinitialize event to define the data biding. This is necessary because Flex triggers all data bindings at application startup when the source object dispatches the initialize event.


So friends : try this ..

This is all about one way binding i mean when changing to destination property doesn't effect on source property . 

Thank you :

Pooja Arora
























































































Search This Blog

Total Pageviews