Posts

Showing posts from March, 2012

What are mdf,ldf and ndf in sql server

In sql server data and log information are never stored in a single file. So we can devide the whole sql files into 3 . Primary data files Primary data file is the starting point of the database. It points to the other files in the database. Therefore, every database has one primary data file. Also, all the data in the database objects (tables, stored procedures, views, triggers.. etc.) are stored in the primary data files. This is indicated by .mdf Secondary data files You can only have one primary data file for a database. Rest made up by secondary data files. But its not necessary to have a secondary data file. Therefore some databases may not have any secondary data file. But its also possible to have multiple secondary data files for a single database. It is indicated by .ndf. Log files Log files are used to store all the log information. These log files can be used to recover databases in later.           ...

A Simple MVP Program with code

Image
             Problem Consider a Human Resource Management System (HRMS) application with functionality to manage employee information. One of the actions would be to edit the information of an existing employee. The following are the main features which be discussed in the below sections. Once the employee is selected for editing, the status should be shown in green color if the person’s retirement date is NULL There should be a mechanism to write automated unit tests against this feature.              Solution MVP pattern can be used to develop this presentation layer which will help solve the above problem. The following diagram shows the classes, interface and the relation among each. The diagram consists of the following.   IEditEmployeeView This interface will abstract all the data input elements on the View. This will also ...

Basics Of MVP

Image
   Model View Presenter Pattern Model-View-Presenter іѕ a user interface design pattern engineered to facilitate automated unit testing and improve the separation of concerns in presentation logic. One of the keys to MVP is the separation of layers introduced by the creation of a view interface. The presenter doesn't know what implementation of a view, it will be talking to; it just knows that it will be able to call any of the methods defined by those interfaces.  MVP pattern allows us to think at a higher level of abstraction and test implementations of the core interfaces without manually running the application.     The three major components of MVP are Model, View, and Presenter  Model: The model is an interface defining the data to be displayed or otherwise acted upon in the user interface. View: The view is an interface that displays data (the model) and routes user commands (events) to the presenter to act upon tha...