Monday 9 April 2012

WSDL.

    Web Services Description Language is an XML format for describing Web services. WSDL enables one to separate the description of the abstract functionality offered by a service from concrete details of a service description such as "how" and "where" that functionality is offered.
    - Data type information for all message requests and message responses
    - Binding information about the transport protocol to be used
    - Interface information describing all publicly available functions
    - Address information for locating the specified service

Operation patterns supported by WSDL.      One way
          The service receives a message.
     Request - Response
          The service receives a message and sends a response.
     Solicit - Response
          The service sends a message and receives a response.
     Notification
          The service sends a message.

Java - Annotations - Reflection

A Metadata Facility for the Java Programming Language.

Built-in Annotations in Java:
             @Override
                          Essentially tells to the compiler that method must be an overridden method. If not, then the compilers can report them as errors
             @SuppressWarnings
             @Deprecated

User-defined Annotations:
             Things that we need to consider while creating user defined annotation is as follows. (the same will be used for all annotations)
             Target Annotation
                              @Target(ElementType.METHOD) (Constructor, Field, Type, etc)
              Retention Annotation
                             @Retention(RetentionPolicy.CLASS) (Source Code, Class file, Run-time)

Reflection:
               Information related to Annotation types using Reflection(java Reflection API) for any type of java elements like class, interface, method, variables, etc.

UML - Class diagram.

 - The class diagram is a Static diagram.
 - Visualizing, documenting and describing different aspect of a system.
 - Shows collection of classes, interfaces, associations, collaboration and constrains.

Purpose.

 - Analysis and design of the state view of an application.
 - Describe responsiblities of a system.
 - Base for component and deployment diagrams.
 - Forward and reverse engineering.

Type of Uml diagrams.

 - Structural Diagram.
 - Class Diagram.
 - Object Diagram.
 - Component Diagram.
 - Deployment Diagram.
 - Behavior Diagram.
 - Use case diagram.
 - Sequence Diagram.
 - Collaboration Diagram.
 - Statechart Diagram.
 - Activity Diagram.

http://www.tutorialspoint.com/uml/uml_class_diagram.htm

ArrayList vs LinkedList

Both implements List interface.

       1) ArrayList is implment re sizable array.
       2) LinkedList is implment doubly Linkedlist.

Difference.

       1) Data structure of both is different.
       2) ArrayList - Getting and searching operation is fast(Getting from array index), Where remove opeation is too costly since it require rearrange all the index.
       3) On linkedList we need to iterate through all elements, Does not provide random or indexed base access.
       4) Insertion are very easy in Linkedlist since its not reuqire to rearranging an index.
       5) Linkedlist is more over head then arraylist, Since the node have data and address of the next and previous data.

When to use LinkedList:

                Since application inserts or remove more than retrieval then Linkedlist  is better option.
                If application can live with out random data access then Linkedlist is better option.