Floating FB popout byF5debug

Interview Questions and Answers on .Net Framework, OOPS, ASP.Net, C#.Net, SQL Server, WCF Series – Part 4

Question 31 – What is an Attribute?

Attributes are declarative tags in code that insert additional metadata into an assembly. Attributes are of Two types:

  • Predefined attributes such as Assembly Version, which already exist and accessed through Runtime Classes;
  • Custom attributes, which you write yourself by extending the System.Attribute class.
  • Example – Custom Attribute for entire assembly
1.  using System;
2.  [assembly : MyAttributeClass] class X {}

 
Question 32 – What is Serialization & DeSerialization?

It is a process of taking an object and converting into a form so that it can be transported across the network or can be persisted in the storage location. This storage location can be physical file, database or ASP.NET Cache. The form contains the state of the object so that by this format, we can construct the same object a later point in time, which is called De-serialization. When the object is subsequently de-serialized, an exact clone of the original object is created. Remoting and Web Services depend heavily on this process.


Question 33 – Where Serialization is used?

  • Used to save session state in ASP.NET.
  • Copy objects to the Clipboard in Windows Forms
  • Remoting to pass objects by value from one application domain to another.


Question 34 – What are the types of Serialization available in .net?

Serialization of 3 types and are as follows.

  • Binary Serialization : Light and compact used in Remoting
  • SOAP Serialization : interoperable use SOAP and used in web Services
  • XML Serialization : Custom Serialization


Question 35 – What is Binary Serialization?

Binary serialization is a mechanism which writes the data to the output stream such that it can be used to re-construct the object automatically. The term binary in its name implies that the necessary information that is required to create an exact binary copy of the object is saved onto the storage media.

 

 

Question 36 – What are the Advantages & Disadvantages of Binary Serialization?

Advantages:

Object can be de-serialized from the same data you serialized it to. It has enhanced performance as it is faster and even more powerful in the sense that it provides support for complex objects, read only properties and even circular references.

Disadvantage:

It is not easily portable to another platform.


Question 37 – What is SOAP Serialization?

The SOAP protocol is ideal for communicating between applications that use heterogeneous architectures. In order to use SOAP serialization in .NET we have to add a reference to System.Runtime.Serialization.Formatters.Soap in the application.


Question 38 – What are the Advantages of SOAP Serialization?

The basic advantage of SOAP serialization is portability. The SoapFormatter serializes objects into SOAP messages or parses SOAP messages and extracts serialized objects from the message.


Question 39 – What is a XML Serialization?

XML serialization converts (serializes) the public fields and properties of an object or the parameters and returns values of methods, into an XML stream that conforms to a specific XML Schema definition language (XSD) document. XML serialization results in strongly typed classes with public properties and fields that are converted to a serial format (in this case, XML) for storage or transport. Because XML is an open standard, the XML stream can be processed by any application, as needed, regardless of platform." Implementing XML Serialization in .Net is quite simple.


Question 40 – What are the Advantages of XML Serialization?

  • Serialization is of XML based.
  • Support for cross platforms programming.
  • Easily readable and editable.

Disclaimer – F5debug Interview Questions & Answers Series:

You may recopy extracts from these pages ("the material") to individual third parties website or to the local system internal websites for their personal information, but only if:

    You acknowledge the www.f5debug.net as the source of the material. Such acknowledgment should include reference to the www.f5debug.net in the copy of the material and should also include the words " © Karthikeyan Anbarasan, www.f5debug.net ". You inform the third party that these conditions apply to him/her and that he/she must comply with them.

About Author: Karthikeyan Anbarasan, Microsoft MVP (Most Valuable Professional) in ASP.NET/IIS Architecture. He is the Founder and Chief Editor of the www.f5debug.net website and has authored books on Windows Phone and Business Intelligence(SSIS). He is also a Passionate Speaker and a Blogger on Microsoft Technologies.

You can Join Me On: Facebook, Twitter, Google Plus, LinkedIn

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

Recent Posts

Random Posts

Most Viewed

URL Shortner

Create your own short urls!!!

Site Counter

free counters

Disclaimer

This is a personal weblog. The opinions expressed here represent my own and not those of my employer. For accuracy and official reference refer to MSDN/ TechNet. I have documented my personal experience on this blog.

Protected by Copyscape Web Plagiarism Finder

Site Meter
F5debug | Windows Azure – Azure Storage and SQL Azure

Floating FB popout byF5debug

Windows Azure – Azure Storage and SQL Azure

 

Introduction:

In this article we are going to see what is an azure storage and different types of storage options available with Azure. Azure has two options to have storage, one is the Azure storage and the other one is the SQL Storage. In this article we will see more on the options available for the Azure storage section. In the later section we will see some small outline of the SQL Azure as well to get clear idea on the differences.

[more]

Types:

Azure storage has very good advantage over the SQL azure, first of all its inexpensive and can be used on a vast area when compared to the SQL Azure. Azure storage is charged at 15cents per gigabytes spent on the server when compared to SQL Azure which charges 10$ for each gigabytes spend on the server per month. Azure storage can be expanded as and when the process required to and its scalable and has many advantages when compared to SQL Azure.

SQL Azure is nothing but the SQL version running on a cloud environment, we can’t simply justify the statement since some of the features normally SQL Server 2008 have are not available with the SQL azure. Microsoft has provided a list of limitations and can be viewed at the link http://msdn.microsoft.com/en-us/library/ee336245.aspx

Windows Azure Types:

Windows azure has 4 types of Azure storage section as shown below

1. Table Storage

2. Blob Storage

3. Queue Storage

4. Azure drives

Let us see on what are the purpose and uses of each storage.

Table Storage:

This storage is used to store structured data, which are similar to a table but are not relational. Table storages are used in better way to stored Business entities in a structured format and its advantages in many ways compared to the other ones. They are composed of collection of properties, entities and properties further classified with collection of name, types etc. Only disadvantage we can see with the table storage is as and like data access procedure we can’t use ADO.net to connect to the database, instead we need to use REST ful access using http://f5debug.table.core.winodws.net/mylearn

Blob Storage:

Blob (Binary large Objects) as most of the developers should be familiar of is used to store images, documents or Videos which are larger than something normally we store in a database like a sting or an id. Basically blob storage is used to storage binary data which are not easily compatible for storing larger data. This blog storage stores the data in containers which are of two types as mentioned below

  • Block blob
  • Page blob

Block blob are limited to 200GB while page blob are limited to 1TB which are very much used to store large data’s as and when required. Same like the table storage it has the same disadvantage of not accessible using the normal ADO.Net concept instead we can use the REST full access using http://f5Debug.blob.core.windows.net/containername/blobname.

Queue Storage:

Queue storages are used to do a message transport between applications as normally we can consider a MSMQ do that in cloud. This storage can be used to do transactions real time in sending and receiving messages. Queue messages are used to send messages of 8kb each and are not suitable for sending large objects as messages. So for doing transactions for the large objects in real time we can use an URI of the blob as a message for the transaction.

The messages will be remained in the queue unless it’s been deleted. If messages are read by one application then that message will be marked as invisible to the other application and will not be available online. Because of this we will not be sure on which order the process will happen for the message queues.

Azure Drives:

This storage drives allow access using the standard NTFS like we normally have it locally. The application which has the storage locally can be used to update the status locally and if we want to migrate this type of application to the cloud then Azure drives are used.

Conclusion:

In this article we have seen the different storage options available with windows Azure. In the upcoming articles we will see on how to implement each and every storage and the advantages of using them.

About Author: Karthikeyan Anbarasan, Microsoft MVP (Most Valuable Professional) in ASP.NET/IIS Architecture. He is the Founder and Chief Editor of the www.f5debug.net website and has authored books on Windows Phone and Business Intelligence(SSIS). He is also a Passionate Speaker and a Blogger on Microsoft Technologies.

You can Join Me On: Facebook, Twitter, Google Plus, LinkedIn

Pingbacks and trackbacks (1)+

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

Recent Posts

Random Posts

Most Viewed

URL Shortner

Create your own short urls!!!

Site Counter

free counters

Disclaimer

This is a personal weblog. The opinions expressed here represent my own and not those of my employer. For accuracy and official reference refer to MSDN/ TechNet. I have documented my personal experience on this blog.

Protected by Copyscape Web Plagiarism Finder

Site Meter