Interview Tips Interview Tips, Interview Questions and Answers

13May/100

What are the main advantages of binary serialization?

An object is stored in a file, a database or even in the memory. However, data to be transferred over a network needs to be in a linear form for which serialization and deserialization are used.

Advantage of serialization is the ability of an object to be serialized into a persistent or a non-persistent storage media and then reconstructing the same object later by de-serializing the object.

Also Binary Serialization is faster, supports complex objects too with read only properties and even circular references.

19Apr/100

.NET interview: What are the main advantages of binary serialization

An object is stored in a file, a database or even in the memory. However, data to be transferred over a network needs to be in a linear form for which serialization and deserialization are used.

Advantage of serialization is the ability of an object to be serialized into a persistent or a non-persistent storage media and then reconstructing the same object later by de-serializing the object.

Also Binary Serialization is faster, supports complex objects too with read only properties and even circular references.

18Feb/100

asp.net interview questions: cache

(1) what is the difference between Cache object and application object?

The main difference between the Cache and Application objects is that the Cache object provides cache-specific features, such as dependencies and expiration policies.

(2) What are dependencies in cache and types of dependencies?

When you add an item to the cache, you can define dependency relationships that can force that item to be removed from the cache under specific activities of dependencies. Example if the cache object is dependent on file and when the file data changes you want the cache object to be update. Following are the supported dependency:-
. File dependency: - Allows you to invalidate a specific cache item when a disk based file or files change.
. Time-based expiration: - Allows you to invalidate a specific cache item depending on predefined time.
. Key dependency:- Allows you to invalidate a specific cache item depending when another cached item changes.

(3) How can get access to cache object?

The Cache object is defined in the 'System.Web.Caching' namespace. You can get a reference to the Cache object by using the Cache property of the Http Context class in the 'System.Web' namespace or by using the Cache property of the Page object.

7Feb/100

What is Web.config?

In classic ASP all Web site related information was stored in the metadata of IIS. This had the disadvantage that remote Web developers couldn't easily make Web-site configuration changes. For example, if you want to add a custom 404 error page, a setting needs to be made through the IIS admin tool, and you're Web host will likely charge you a flat fee to do this for you. With ASP.NET, however, these settings are moved into an XML-formatted text file (Web.config) that resides in the Web site's root directory. Through Web.config you can specify settings like custom 404 error pages, authentication and authorization settings for the Web sitempilation options for the ASP.NET Web pages, if tracing should be enabled, etc.
The Web.config file is an XML-formatted file. At the root level is the tag. Inside this tag you can add a number of other tags, the most common and useful one being the system.web tag, where you will specify most of the Web site configuration parameters. However, to specify application-wide settings you use the tag.

For example, if we wanted to add a database connection string parameter we could have a Web.config file like so.

2Feb/100

Asp.net Interview Question: What are dependencies in cache and types of dependencies?

When you add an item to the cache, you can define dependency relationships that can force that item to be removed from the cache under specific activities of dependencies. Example if the cache object is dependent on file and when the file data changes you want the cache object to be update. Following are the supported dependency:-

    1. File dependency: - Allows you to invalidate a specific cache item when a disk based file or files change.

    2. Time-based expiration: - Allows you to invalidate a specific cache item depending on predefined time.

    3. Key dependency:- Allows you to invalidate a specific cache item depending when another cached item changes.

      22Dec/090

      5 Frequently asked JSP Interview Questions

      Q:  What is a Expression?
      A: An expression tag contains a scripting language expression that is evaluated, converted to a String, and inserted where the expression appears in the JSP file. Because the value of an expression is converted to a String, you can use an expression within text in a JSP file. Like
      <%= someexpression %>
      <%= (new java.util.Date()).toLocaleString() %>
      You cannot use a semicolon to end an expression

      Q: What is a Declaration?
      A: A declaration declares one or more variables or methods for use later in the JSP source file.

      A declaration must contain at least one complete declarative statement. You can declare any number of variables or methods within one declaration tag, as long as they are separated by semicolons. The declaration must be valid in the scripting language used in the JSP file.

      <%! somedeclarations %>
      <%! int i = 0; %>
      <%! int a, b, c; %>

      Q:  What is a Scriptlet?

      A: A scriptlet can contain any number of language statements, variable or method declarations, or expressions that are valid in the page scripting language.Within scriptlet tags, you can

      1.Declare variables or methods to use later in the file (see also Declaration).

      2.Write expressions valid in the page scripting language (see also Expression).

      3.Use any of the JSP implicit objects or any object declared with a <jsp:useBean> tag.
      You must write plain text, HTML-encoded text, or other JSP tags outside the scriptlet.

      Scriptlets are executed at request time, when the JSP engine processes the client request. If the scriptlet produces output, the output is stored in the out object, from which you can display it.