Posts

Types of Architects

 1.Infrastructure Architect 2.Software Architect 3.Enterprise Architect Now we can see the above with some more detail. 1.Infrastructure Architect                  This architect is responsible for all non-software components such as Network,VM and so on. 2.Software Architect                This architect always looks at the  end result first, and only the starts looking at technologies, methodologies etc. They focus on fast, secure, reliable and easy to maintain software.

Important MVC concepts -1

Today we are going to learn some of the important concepts from Dot Net MVC. 1.What's action in MVC? Each public method of the controller represents actions. 2.What are the 3 main components of MVC pattern? i. Model ii. View iii. Controller 3. What are the disadvantages of ASP.NET Web Forms overcome by MVC? i. Limited control over the generation of HTML ii. Coupling with business code and UI iii. Hard to grasp iv. Complex page life cycle  4. How does bundling  beneficial?      We bundle our static files into one file because for each static file, browser will make separate request to the server and retrieve. If we have 50 css and js files, then 50 requests will be triggered to server. We can reduce these 50 requests to 1 by bundling. 5. What are the roles of controller?        Controllers are responsible for handling requests,communicating with models and generating the views.

Find and replace number with string using C#

Find and replace number with string using C# Input: "1 2 are working in the 3 company" Output :"one two are working in the three company" using System; using System.Text; using System.Collections.Generic; namespace Coding.Exercise {     public class Exercise     {                 // TODO: fix this method - fix bugs, make more efficient, and return correct result         public static string ReplaceDigits(string sentence)         {           // int length =sentence.Length;            StringBuilder  sb = new StringBuilder ();            //string result =sentence; char[] characters = sentence.ToCharArray(); for(int i =0; i<characters.Length;i++ ) { char a =characters[i]; Console.WriteLine(characters[i]); if(char.IsDigit(a)) {     // Console.WriteL...

What is HTTP Protocol?

Hyper Text Transfer Protocol - Set of rules that govern communication. - Application protocol . - Stateless protocol. - Follows Request -Response pattern. - Designed for Distributed Hypermedia systems. - Standards were developed by Internet Engineering Task Force (IETF) and World Wide Web Consortium (W3C). - Current version=> HTTP/2

Value types in C#

It's the type of memory in C#. It stores both datatype and value. For instance int a=5; It will be stored as    _____ a |int|5|    ______ Examples to value types 1.All int data types 2.bool 3. Enum 4. Struct Value types are available in both heap and stack.

What's the main role of Garbage collector in C#?

Garbage collection is a background process. It's deallocating the memories of dereferenced objects. Garbage collector has some stages to do this. Such Gen0, Gen 1 and so on.

What's the main purpose of Stack in C#?

Stack is used to trace the method calls of C#. It's handled by Common Language Runtime. Stack has lots of Stack frames. Each stack frame has 3 parts. 1. Parameters 2. Return Address 3.Local variables  Stack frame will be removed from stack when the specific method call completes. In this time the local variables will go out of scope.