Monday, January 9, 2017

Difference between the SOAP and RestAPI

1)      SOAP is a protocol.                                                          REST is an architectural style.
2) SOAP stands for Simple Object Access Protocol.                 REST stands for REpresentational State Transfer.
3) SOAP can't use REST because it is a protocol.                    REST can use SOAP web services because it is a concept and can use any protocol like HTTP, SOAP.
4) SOAP uses services interfaces to expose the business logic. REST uses URI to expose business logic.
5) JAX-WS is the java API for SOAP web services.                 JAX-RS is the java API for RESTful web services.
6) SOAP defines standards to be strictly followed.                 REST does not define too much standards like SOAP.
7) SOAP requires more bandwidth and resource than REST.         REST requires less bandwidth and resource than SOAP.
8) SOAP defines its own security.                                 RESTful web services inherits security measures from the underlying transport.
9) SOAP permits XML data format only.                         REST permits different data format such as Plain text, HTML, XML, JSON etc.
10) SOAP is less preferred than REST.                         REST more preferred than SOAP.

Thursday, December 29, 2016

Increase performance of IF ELSE condition ASP.NET

static void Main(string[] args)
{
Stopwatch obj=new Stopwatch();
obj.Start();
for(int i=0;i<10000;i++)
{
string str=getdesignation('M');
}

obj.Stop();

console.WriteLine(obj.ElaspsedTicks.ToString());
}


When user login mostly give top wrost performance
public static string getdesignation(char c)
{
if(c=="M")
return "Manager";
else if(c=="W")
return "Worker";

}
Increase Performance:
public static string getdesignation(char c)
{
if(c=="W")
return "Worker";
else  if(c=="M")
return "Manager";


}

GET Connection String in asp.net?

Open the Notepad.exe


Save file "myconection.udl"

then open notepad the Get conecting string details

What are different types of JIT?


  1. Normal JIT Compilation dynamic stored in memory
  2. Econo JIT dynamic  not stored in memoery
  3. pre JIt Full Compilation(ngen.exe)

What is JIT?

JIT
Its is configuration  code to machine language OS Hardware config



Just In time Complier

How types of Just In time Complier?

Per File
PEr Method/Function
Code Fragment