January 2008 - Posts
There are lots of debates and information about developing n-tier application using Microsoft .net framework. Every one has its own mechanism. I found a interesting article at Microsoft site. It is very good and with the source code.
Here are the link for that article:
http://www.microsoft.com/belux/msdn/nl/community/columns/hyatt/ntier1.mspx
It explains every aspects of developing n-tier application with Microsoft .net framework.
Happy Programming
I have found a very good site with provide the comparison of Microsoft sql server, Microsoft and mdse capabilities on the basis of following.
- Number of instances per server
- Number of databases per instance / server
- Number of objects per database
- Number of users per database
- Number of roles per database
- Overall size of database (excluding logs)
- Number of columns per table
- Number of rows per table
- Number of bytes per row
- Number of columns per query
- Number of tables per query Size of procedure / query
- Number of input params per procedure / query
- Size of SQL statement / batch Depth of sub query nesting
- Number of indexes per table
- Number of columns per index
- Number of characters per object name
- Number of concurrent user connections
here is the link for that site:
http://sqlserver2000.databases.aspfaq.com/what-are-the-capacities-of-access-sql-server-and-msde.html
Some Times we want to retrive data fastly without wasting time to retrive it. SQL Server Indexes can greatly help to make data retrival fast and provide quick access to tables.
Therer are four type of indexes in SQL Server 2000/2005.
1) Unique Key Index
2) Clustered Index
3) Non Clustered Index
4) Compsite Key Index
Unique Key Index:
As the name suggest this index does not allow duplicate values in rows. So it checks whether the data is unique or it Other wise it will give a error.
Clustered Index:
Clustered Index dictates the physical storage order of the data in the table. A table can have only one clustered index.
Non Clustered Index:
A non clustered index is a seperate index structure indepedent of the physical storage order of data. Sql Server 2000 alllowed 249 indexes per table.
Compsite Key Index:
As the name suggest in the composite key index two or more columns of tables to make a single unit. Sql Server 2000 allow 16 indexes per table.
Performance is one of most important factor at the time of the application developement. If your application or website is not responding fast to user queries then it's accepted by the users.
Here are the some tips to make fast retrival of data from sql server.
1) Create Index- Indexes are great way to improve your performance. It uniquely indetifys the each row in table.
2) Avoid Cursor- Cursors are time consuming so avoid cursors as much as you can do more work with queries.
3) Avoid Joins- Joins are also time consuming so avoid it.
4) Create Primary and Foreign keys in tables
5) Be sure your tables must have atleast one column that uniquely indetifys each rows
Oracle and sql server both are great database management system and have great features. Often developer need to know what type of DBMS he should use for a particular needs.I have found a great comparison articles for oracle 9i and sql server 2000. Which describe all the feature of both DBMS and compare based on features.
here is the link for that article..
http://www.dotnetspider.com/kb/Article3289.aspx
Linq is the one of the most hottest release from Microsoft. Still lots of people don't know what linq is. I have found a great articles from Saqib Ullah.
This articles covers all the aspects of Linq in each and every way.
Following is the link for that article...
http://geekswithblogs.net/technetbytes/archive/2007/04/30/112129.aspx
here is the data layer class example.....
///here is the enum
public enum OprationType
{
Add = 1,
Update = 2,
Delete = 3
}
//here is the Interfae
public interface IDataStatndard
{
void Operation(OperationType enumOperationType);
}
//here is the user data class
public class UserData : IDataStatndard
{
#region PrivateMemeber
private DashBoardCollection.UserCollection _objUserCol;
private Database _db;
private string _commandName;
private DbCommand _dbCommand;
#endregion
#region Constructors
public UserData()
{
}
public UserData(DashBoardCollection.UserCollection obj)
{
_objUserCol = obj;
}
#endregion
#region Methods
public void Operation(OpertaionType enumOperationType)
{
switch (enumOperationType)
{
case OperationType.Add:
this.Add();
break;
case OperationType.Update:
this.Update();
break;
case OperationType.Delete:
this.Delete();
break;
}
}
private void Add()
{
}
private void Update()
{
}
private void Delete()
{
}
public bool CheckUserLogin()
{
_db = DatabaseFactory.CreateDatabase("SopraConnect");
_commandName = "usp_CheckUserLogin";
_dbCommand = _db.GetStoredProcCommand(_commandName);
_db.AddInParameter(_dbCommand, "username", DbType.String, this._objUserCol.UserName);
_db.AddInParameter(_dbCommand, "password", DbType.String, this._objUserCol.Password);
_db.AddOutParameter(_dbCommand, "isvalid", DbType.Byte, 1);
_db.ExecuteNonQuery(_dbCommand);
Byte isValid = Convert.ToByte( _db.GetParameterValue(_dbCommand, "isvalid"));
if (isValid == 1)
return true;
else
return false;
}
#endregion
}
//here is the example of business logica layer class
public class UserBll
{
#region Private Memebers
private DashBoardData.UserData _objUserData;
private DashBoardCollection.UserCollection _objUserCol;
#endregion
#region Methods
public UserBll()
{
}
public UserBll(DashBoardCollection.UserCollection obj)
{
_objUserCol = obj;
}
#endregion
#region Methods
public void Add()
{
_objUserData = new DashBoardData.UserData(this._objUserCol);
_objUserData.Operation(DashBoardData.OpertaionType.Add);
}
public void Update()
{
_objUserData = new DashBoardData.UserData(this._objUserCol);
_objUserData.Operation(DashBoardData.OpertaionType.Update);
}
public void Delete()
{
_objUserData = new DashBoardData.UserData(this._objUserCol);
_objUserData.Operation(DashBoardData.OpertaionType.Delete);
}
public Boolean CheckUserLogin()
{
_objUserData = new DashBoardData.UserData(this._objUserCol);
return _objUserData.CheckUserLogin();
}
#endregion
}
ASP.NET 2.0 allows us to create some folders via right clicking project. But lots of people are don't know why we need to create that folder.
Here are the description for the each folder in asp.net 2.0 that we have to create for diffrent purpose.
App_Code:
App_code folder contains the code files for the classes, structures,enums etc. It also contains .wsdl files for web services. Typed data set files are also reside in this folder.Any of this item automatically available to whole application.
App_Themes
ASP.NET supports themes to enable visual styles on web page. This folder contains the themes skin and .css(Cascading Style Sheet) files.
App_Data
App_Data contains the database for a application and other data files like .mdf,xml,text and .csv files used in web application.This folder are used to stored data related entities.
App_GlobalResources
ASP.NET allows us to create resource files. There are two types of resources files one is global and another one is local. The global resources files are available to whole application. While local resouces files are available to specific page only. This folder store global resource files with .resx extensions.
App_LocalResources
This folder stored local resources files.
App_WebReferences
This folder store web reference of web service from a asp.net 2.0 application. You can web reference via right click project in solutions explorer and then click add web reference.
App_Browsers
The App_Browsers folder holds browser files, which are XML files used to describe characteristics and capabilities of these browsers
Bin
This folder contains assembly files for controls and web pages.Assembly files are basically a .dll files. Any .dll files found this folder automatically links to whole application.
This folder structure are basically supported by asp.net 2.0. You can also create your own folder structure by right click project name in solution explorer. and add new folder
More Posts
Next page »