Skip to main content

Posts

MVC Pattern

The main purpose of MVC pattern is to decouple the graphical user interface (GUI) from the data.It gives the ability to provide multiple views for the same data. MVC pattern separates objects into three important sections: Model It is specially for maintaining the data. Its is actually where your business logic, querying database, etc are implemented. This section is represented by data view, dataset, typed dataset, business components, business entity model etc. This section can be tied upto either windows application or web UI. Views Displaying all or some portions of data, or probably different view of data. View is responsible for look and feel, sorting, etc. ASPX, ASCX, or windows application UI etc. Controller They are event handling section, which affect either model or view. In ASP.NET the Code behind.

Shouldserialize

Whats  Shouldserialize? Shouldserialize is an optional method that you can provide for a property, if the property does not have a simple default value. Why I used this in my project  In  fortnight period, some projects broken several times because,  some properties defined as nullable and do not have any default value. So while you creating a property if it do not have any default value or  is nullable, please use the service of shouldserilaize optional method J. Example:- Property:-                 Public _MyCar As Nullable(Of String) = Nothing _ Public Property MyCar() As Nullable(Of String) Get Return _MyCar End Get Set(ByVal value As Nullable(Of String)) _MyCar = value End Set End Property Should Serilalize method:- Public Function ShouldSerializeMyCar() As Boolean Return (MyCar...

Concept of web parts

Web part is a window of information inside webpage which can be edited, closed, minimised and dragged by the end user. We can say web part is providing the customization to the end user. Costomization can be, You can add or remove the control from the web page. Users can modify or edit the appearence of the window control Cantrol can be dragged into the different position of the web page. Different web part manager The web part manager manages all the webpart on a web page. Its not visible, but it control evey operation of the web control from back ground. web part manager can be operated in different modes( Browse, display, edit, catalog, connect ).       In browse mode we can not edit or drag the web part. In this mode we can only minimize and close the web part. Code:- Dim wpManager as new webpartmanager                    wpManager.Displaymode= WebpartManage...

Data base questions Continue....

Cursors       SQL statements are good for set at a time operations. So it is good for for handling a group of data. But there are scenarios when you want to update a row depending upon a some specific criteria, like loop through the rows and update the row. This time we are using cursors There are different steps to create cursors 1.Declare 2.Open 3.Fetch 4.Operation 4.Close and deallocate. Difference between delete and truncate statements? Delete is data manipulation language Truncate is  data definition language Truncate Cannot be rollnacked while delete can be Can not use trancate on a table referenced be foreign key Delete table sysntax logs the delete, truncate table does not log any information but it logs information about deallocation of data page of table. Delete can have criteria while truncate can not Trucate reset the identity of the table, while delete do not reset the identity.

Some Database questions

Normalization Normalization is a set of rules used for the design of database tables and table are meant to be connected through relation ship. This set of rules are know as normalization. Normalization will avoid the repetitive entries, reduces the storage space, will avoid the need to restructure the table to accommodate new data. By doing the normalization you can increase the speed and flexibility of queries, summaries etc. First normal form Data must be broken into the smallest unit as possible and should not contain any repetitive group of fields. ID      Name                 Pet1   Pet2     Hours  Days  TotalHours/Week 1       Adarsh Soman    Cat    Cat2      5         5        25 Here name can be broken as first name and last name and pet repeating. So based on the first normal form the table wil...

Continues.....

What are the different ways we can maintain the state? .Session(various modes of storing sessions are inproc, stateserver, sql server) session end occurs only in inproc mode. Hidden Field -data cached on client side View state- Internally maintained as hidden filed (hashed) Hidden frames Query string- its is the info sent to the server appended at the end of the page Cookies Object Role Model(ORM) ORM is the process of creating the diagrams to represent real world concepts that influence the software. ORM contains objects(entity), relationship between the objects,  and the attribute that define that object.( after hearing that we could think ea can use er diagram for this(ER diagram related with database) ORM offer purely logical modelling tool for users, business analysts, developers, architects etc.ORMs are creating for the users requirements. Quality of Service requirement(QOS) -Defines a contractual, or non-functional requirement that the system must be m...

Some Interview .NET Questions - part 1

1) Difference between the .NET frame works Frame work 1.1- Basic frame works + Web services+ Common language run time (CLR) Frame work2.0- Generics, partial classes etc Framework 3.5- LINQ, AJAX etc 2)Web Services- Web Services are the BL (business logic) component . Its providing services via internet using the standard internet protocols like HTTP.  In order to expose the business functionality  web services uses a SOAP(Simple object access protocol, uses XML format). XML format make it platform independent. So services can written using windows can communicate with different platforms like Unix and Linux. 3)Strong names:- Its like GUID. Strong name are used by the global assembly cache, to differentiate between different versions. 4)Dispose Method:-Dispose is from Disposable interface. If you want to clean up an unmanaged resource best way to implement the IDisposable interface and override the Dispose method. 5) Enum-...