- State Management is retaining some value in the server and reusing that value.We have Client Side and Server Side state management.
- Http is a stateless protocol, it gives current response for a current request means it will not maintain the previous state.Once the response is given the process of request is deleted.
- Due to this disadvantage of http we go for State Management.
- Hidden input fields like are sent back as name/value pairs in a Form POST exactly like any other control,except they are not rendered.
- Viewstate is client side State Management.
- The datatype of viewstate is "statebag".
- Viewstate for every web browser is different.It is used for posting roundtrips of the same form,not for refreshing or resending the same request.
- It is a property of a page so it is page level.
- It has both Key/Value pairs like the session object,but renders itself as a hidden field with the name"__VIEWSTATE" like this
- ViewState serailizes the objects with a special binary formatter called the LOSFormatter.
- LOS stands for Limited Object Serialization.It serializes any kind of object, but it is optimized to contain strings,arrays, and hashtables.
- ViewState can store custom object and can be programmed in client.
- QueryString is client side State Management.
- QueryString used for passing data from one page to another page.
- Incredibly simple and often convenient if you want your URLs to be modified directly by the end user.
- It can pass/send little data only that is it cannot hold lot of information.
- Inappropriate for sensitive data.Easily modified by the end user.
- Cookie is also a client side State Management.
- Cookies should be used only to store non-sensitive information or information that can be retrived from an authoritative source.
- Cookie has a time out which has default time as 30 minutes which means the coookie expires after 30 minutes.
- Cookies are passed back and forth on every request.That means you are paying for the size of your cookie during every HTTP GET and HTTP POST.
- Cookies can be stolen,sniffed, and faked.
- Your application should attempt to heal itself if cookies are found missing or if they are larger than excepted.
Wednesday, October 29, 2008
Client Side State Management
Tuesday, October 21, 2008
Steps For Publishing Website On Your Local Machine
Publishing Website
- Right click on your website and find "publish website" click on it.
- Wait for the process until u see publish succeeded in the status bar of the visual studio.
- Create a folder in your local system where u want to store the complete class files, like in d: drive folder publish so your path will be D:/Publish.
- Now type inetmgr in notepad.
- You will be in internet manager, where u have to expand the + symbol before your system name.
- After that now u can find websites folder which again should be expanded in which u find the Default Web Site.
- Right click on Default Web Site u get an option in new--> virtual directory you get a virtual directory wizard in which you have to click Next button.
- After clicking you get the next page of the wizard where you should mention the alias name for your website and again click Next button.
- Now you go to another page where we should give the path of the folder which you created earlier by pressing the browse, and then click Next and again Next and then u should click Final.
- Now you have completed the task of publishing your website successfully.
- To know your website Link/URL open some of your website pages by right clicking on it and clicking on Browse you can view your website.
- See the path on the url bar and that is your path of the website you have published.
- You can access your website from any of your LAN connected computers with this link.
Friday, October 17, 2008
Important Points in .Net
- Windows 95 does not support .Net Framework.
- .Net application is language independent and platform independent.
- In .Net we have no memory management only unreferencing the objects is done.
- "Visual Studio" is an IDE (Integrated Development Environment).
- We can have max of 253 foreign keys in a table.
- We can have maximum of 16 columns as primary key columns i.e called as composite primary key.
- Primary Key is used to identify a row, it will join one row of one table to another row of second table.
- CLR (Common Language Runtime) is the heart of .Net Framework and will be involved in the execution process and gives out the MSIL code which is common to all languages.
- MSIL code in bytes i.e in binary form is called PE (Portable Executable) file, with the extension '.dll' or '.exe'.
- (IL)Intermediate Language is also known as MSIL (Microsoft Intermediate Language) or CIL (Common Intermediate Language). All .NET source code is compiled to IL. This IL is then converted to machine code at the point where the software is installed, or at run-time by a Just-In- Time (JIT) compiler.
- For VC++ " MSCRT40.DLL", VB6 "MSVBVM60.DLL" , Java has "Java Virtual Machine" etc. Similarly for .NET we have CLR at the runtime to take care of the code execution of the program.
- CLR uses JIT and compiles the IL code to machine code and then executes. CLR also
determines depending on platform what is optimized way of running the IL code.
Thursday, October 16, 2008
Final and Finally
Final
Finally
- Final is a keyword which can be placed in front of a method or variable or a class.
- If final is used in front of a variable then the value of it will not get changed.
- If the final keyword is placed in front of a method then that method cannot be overridded or overloaded also.
- If final is placed in front of a class then the class cannot be instantiated.
Finally
- Finally is a block of code written after the try catch blocks.
- This block is executed even if an exception has occurred and not handled.
- In this block we can write the code which should be compulsorily executed like closing the connection object even if exception occur.
- There can be only 1 finally block per try block and it must be the last block after all catch blocks if present.
- In finally, you cannot use GoTo or Return Statements.
Difference Between Cookies and Sessions
Cookie
- Cookies can store only "string" datatype
- They are stored at Client side
- Cookie is non-secure since stored in text format at client side
- Cookies may or may not be individual for every client
- Due to cookies network traffic will increase.Size of cookie is limited to 40 and number of cookies to be used is restricted to 20.
- Only in few situations we can use cookies because of no security
- We can disable cookies
- Since the value is string there is no security
- We have persistent and non-persistent cookies
- Session can store any type of data because the value is of datatype of "object"
- These are stored at Server side
- Session are secure because it is stored in binary format/encrypted form and it gets decrypted at server
- Session is independent for every client i.e individual for every client
- There is no limitation on size or number of sessions to be used in an application
- For all conditions/situations we can use sessions
- we cannot disable the sessions.Sessions can be used without cookies also(by disabling cookies)
- The disadvantage of session is that it is a burden/overhead on server
- Sessions are called as Non-Persistent cookies because its life time can be set manually
Stored Procedure
Stored Procedure
- A Stored Procedure is a pre-compiled set of sql statements which are stored at database in server.
- These are called explicitly.
- Stored procedures will be complied once and executed number of times.
Types Of Stored Procedures
- User-defined Stored Procedures
- Extended Stored Procedures
- System Stored Procedures
Generic Syntax for SELECT Statement in SQL
"Select top n* (or) column names from
where
groupby
having
orderby asc/desc"
Top n -- Top statement used to get the top most rows of result.
asc -- for getting in ascending order and is defaultly available for every query
desc --for getting descending order
where
groupby
having
orderby
Top n --
asc -- for getting in ascending order and is defaultly available for every query
desc --for getting descending order
Wednesday, October 15, 2008
SDLC(Software Design Life Cycle)
Stage 1 -Analysis/Impact Analysis
Stage 2 -Design
1.High Level Design
2.Low Level Design
Stage 3 -Coding/Development(Build+Unit Testing)
Stage 4 -System and Integration Testing (SIT) Done by others who did not develop the project or by the testers
Stage 5 -Deployment(Maintainance Engineering)
Stage 6 -Maintainance
Stage 2 -Design
1.High Level Design
2.Low Level Design
Stage 3 -Coding/Development(Build+Unit Testing)
Stage 4 -System and Integration Testing (SIT) Done by others who did not develop the project or by the testers
Stage 5 -Deployment(Maintainance Engineering)
Stage 6 -Maintainance
Most Common FAQ's In .Net
1)What is .Net full form?
A)Network Enabled Technology
2)What is .Net Framework?
A).Net Framework is a collection of classes and interfaces and how these classes and interfaces are used.It includes 2 main components
i)The.Net Class Library
ii)The Common Language Runtime
3)What is State Management?
A)Maintaining state(start time and end time) of an object is called state management.
4)What is Managed Code?
A)The data for which the memory management is taken care by .Net runtime's garbage collector, and this includes tasks for allocation de-allocation.
5)What are oops concepts?
A)They are basically divide into 3
Encapsulation- Binding of data and behavior i.e functionality of an object within a secured and controlled environment is encapsulation.
Inheritance- The process of acquiring the existing functionality of the parent and with new added features and functionality by a child object is called inheritance.
Polymorphism- An object in different forms and in each form it exhibits the same functionality but implemented in different ways.
6)What is an Interface?
A)An Interface is a collection of related methods and properties without implementation.
7)What is Overloading?
A)When we add a new method with same name in a same/derived class but with different number/types of parameters ,the concept is called overload and this ultimately implements polymorphism.
8)What is Overriding?
A)when we need to provide different implementation in a child class than the one provided by base class,we define the same method with same signatures in the child class and this is called overriding.
9)What is Boxing and Unboxing?
A)Boxing is the process where any value type can be implicitly converted to a reference type object while Unboxing is the opposite of boxing process where the reference type is converted to a value type.
10)What is CLR?
A)CLR is the foundation of .Net Framework.The Common Language Runtime manages code at execution time.It does Memory management thread management,and runs the code on different platforms (Client or Server).It enforces strict variable type definitions,security, and robustness.
A)Network Enabled Technology
2)What is .Net Framework?
A).Net Framework is a collection of classes and interfaces and how these classes and interfaces are used.It includes 2 main components
i)The.Net Class Library
ii)The Common Language Runtime
3)What is State Management?
A)Maintaining state(start time and end time) of an object is called state management.
4)What is Managed Code?
A)The data for which the memory management is taken care by .Net runtime's garbage collector, and this includes tasks for allocation de-allocation.
5)What are oops concepts?
A)They are basically divide into 3
Encapsulation- Binding of data and behavior i.e functionality of an object within a secured and controlled environment is encapsulation.
Inheritance- The process of acquiring the existing functionality of the parent and with new added features and functionality by a child object is called inheritance.
Polymorphism- An object in different forms and in each form it exhibits the same functionality but implemented in different ways.
6)What is an Interface?
A)An Interface is a collection of related methods and properties without implementation.
7)What is Overloading?
A)When we add a new method with same name in a same/derived class but with different number/types of parameters ,the concept is called overload and this ultimately implements polymorphism.
8)What is Overriding?
A)when we need to provide different implementation in a child class than the one provided by base class,we define the same method with same signatures in the child class and this is called overriding.
9)What is Boxing and Unboxing?
A)Boxing is the process where any value type can be implicitly converted to a reference type object while Unboxing is the opposite of boxing process where the reference type is converted to a value type.
10)What is CLR?
A)CLR is the foundation of .Net Framework.The Common Language Runtime manages code at execution time.It does Memory management thread management,and runs the code on different platforms (Client or Server).It enforces strict variable type definitions,security, and robustness.
Friday, October 3, 2008
What Is PDB File
- It is a file which will be added in the bin folder.
- PDB means "program database" in which all debug symbols are present.
- A program database (PDB) file holds debugging and project state information that allows incremental linking of a debug configuration of your program.
- A PDB file is created when you build with /debug (Visual Basic/C#). You can build Visual Basic and Visual C# applications with /debug:full or /debug:pdbonly.
Subscribe to:
Comments (Atom)