Saturday, July 18, 2009

Partial Types, Class and Method in C#.NET 3.0/2.0

With C# 2.0 Microsoft has added partial keyword in C#. So what is partial keyword used for. Lets go through the partial keyword in greater detail.

First and foremost use of the partial keyword is the you can declare one class or method with more then one declaration and at the compilation time it will have one complete class.So now you can declare a class more then one file at the compile time it will be treated as one class.

For example this is one class

//first file Patial Class
public class partial PartialClass
{
   public void First()
   {
     //First function
   }
}
 Here is the another class
public class partial PartialClass
{
   public void Second()
   {
      // Logic...
   }
}
Now at the compile time it will be treat as single class like following.
public class PartialClass
{
   public void First()
   {
      // Logic...
   }
   public void Second()
   {
      // Logic...
   }
}
Same way you can use partial method it will treated as one method as compile time. Partial method will only available with C# 3.0. It will not be available to C# 2.0.

Practical Usage Of Partial Class:

There are lots of way where partial class is useful like many developer can work on same class via creating different files. There are lost of code generators available in market so you can extend the class functionality via marking them partial. Partial class can also be used for the manage code in separate files instead of creating large files. With C# 3.5 linq to sql designer uses this concept to split custom behaviors outside mapping class.

Share:
Friday, July 17, 2009

My blog post is in Microsft TechEd Online Editors Pick List

Microsoft TechEd online is a great community and always been best to learn new thing. I have been proud of associating my self with great community. It’s a great thing to get acknowledgement from community. Recently one of my blog post-Sending email through System.Net.Mail.Smtpmail in asp.net 3.5/2.0 got place in Microsoft Teched editors pick list. It all because of my blog readers thank you for having faith in me. It’s a great honor to have this post is a part of community. Thanks Again………

TechEd

Here is the link for all blog of Microsoft Tech Ed Online..

http://www.msteched.com/online/blogs.aspx

Share:

Subsonic 3.0 is out now- Next Generation Object Relational Mapper

There lots of ORM(Object Relational Mapper) is available now like entity framework,nhibernate, linq, dlinq but i choose subsonic 3.0 for my next application which will be a question answer site for the following reason

  1. Now subsonic 3.0 is with linq support so you can write your lambda expression and linq queries along with the subsonic
  2. It comes with simple repository.
  3. Built in T4 Templates for 4.0
  4. Linq to subsonic.
  5. Subsonic 3.0 templates.
  6. Can handle thousand of queries at a times.
  7. Full support with asp.net 3.5 features.
  8. Ease of Use.
  9. Great support with asp.net mvc

And another great news is that Rob Conery is hired by the Microsoft and subsonic will official ORM for ASP.net Applications.

You can download subsonic 3.0 from here.

http://www.subsonicproject.com/Download

Happy Coding..

Share:

Photoshop and CSS Tutorials.

I am creating a web template for my forthcoming question answer asp.net mvc site. I need a web 2.0 rich template for my site for that i have search on web and found some great photoshop and css links. Here is collection for that.

Photoshop link:

  1. First is the my link who created design for my blog. http://psdvibe.com/- Its a great resource to learn Photoshop and create professional template. Thanks you for giving me the best template free of charge.
  2. http://www.webdesignbooth.com/32-useful-portable-apps-for-web-designers-and-developers/
  3. http://hv-designs.co.uk- A Great Resource for Photoshop design
  4. http://creativenerds.co.uk/tutorials/70-tutorials-using-photoshop-to-design-a-website/
  5. http://pelfusion.com/
  6. http://bestdesignoptions.com/
  7. http://www.smashingmagazine.com/2009/07/15/clever-png-optimization-techniques/
  8. http://sixrevisions.com/tutorials/web-development-tutorials/coding-a-clean-illustrative-web-design-from-scratch/
  9. http://speckyboy.com/2009/07/06/40-free-and-essential-web-design-and-development-books-from-google/
  10. http://webdesignledger.com
  11. http://sixrevisions.com/
  12. http://photoshoptutorials.ws/
  13. http://www.tutorialized.com/tutorials/Photoshop/1
  14. http://www.absolutecross.com/tutorials/photoshop/
  15. http://www.photoshopsupport.com/tutorials.html

CSS Link:

  1. http://www.freecsstemplates.org/ One of the greatest tutorial i have seen for free.
  2. http://www.free-css-templates.com/
  3. http://www.free-css.com/
  4. http://www.csstemplatesforfree.com/
  5. http://www.westciv.com/style_master/house/
  6. http://www.w3.org/Style/CSS/learning
  7. http://www.jasonbartholme.com/101-css-resources-to-add-to-your-toolbelt-of-awesomeness/
  8. http://speckyboy.com
  9. http://designreviver.com
  10. http://thecssblog.com/tips-and-tricks/image-slicing-and-css-being-smart-with-file-formats/
  11. http://line25.com/articles/15-must-read-articles-for-css-beginners
  12. http://www.smashingmagazine.com/2009/06/25/35-css-lifesavers-for-efficient-web-design/
  13. http://designreviver.com/tips/13-training-principles-of-css-everyone-should-know/
  14. http://arbent.net/blog/40-outstanding-css-techniques-and-tutorials

Happy designing…

Share:
Thursday, July 16, 2009

Sending email through System.Net.Mail.Smtpmail in asp.net 3.5/2.0


For any web application or website the sending email is a necessity for newsletter, invitation or reset password for everything we have to sent a mail to the people. So we need to see how we can send mail. In 1.1 we are sending emails with System.Web.Mail.SmtpMail which is now obsolete. Now in asp.net 2.0 or higher version there is a namespace called System.Net.Mail.Smtpmail in asp.net 3.5. With this namespace we can easily write a code to send mail within couple of minutes.

If you want to sent a mail first thing you need is smtpserver. Smtpserver is a server which will route and send mail to particular system. To use smtpserver we need to configure some settings in web.config following is the setting for the web.config.

<system.net>

    <mailsettings>

       <smtp deliveryMethod="Network">

         <network host="stmp server address or ip"

           port="Smtp port" defaultCredentials="true"/>

        </smtp>     

    </mailsettings>

</system.net>


Here you need to set the all the smtp configuration. This will be used by the smptclient by default. Here is the code for sending email in asp.net 3.5

SmtpClient smtpClient = new SmtpClient();

MailMessage message = new MailMessage();

try

{

   MailAddress fromAddress = new MailAddress("from@site.com","Nameofsendingperson");

   message.From = fromAddress;//here you can set address

   message.To.Add("to@site.com");//here you can add multiple to

   message.Subject = "Feedback";//subject of email

   message.CC.Add("cc@site.com");//ccing the same email to other email address

   message.Bcc.Add(new MailAddress("bcc@site.com"));//here you can add bcc address

   message.IsBodyHtml = false;//To determine email body is html or not

   message.Body =@"Plain or HTML Text";

   smtpClient.Send(message);

}

catch (Exception ex)

{

   //throw exception here you can write code to handle exception here

}


So from above simple code you can add send email to anybody
Adding Attachment to the email:If you want to attach some thing in the code then you need to write following code.

message.Attachments.Add(New System.Net.Mail.Attachment(Filename));


Here file name will the physical path along with the file name. You can attach multiple files with the mail.

Sending email with Authentication: If you want to sent a email with authentication then you have to write following code.

System.Net.Mail.SmtpClient mailClient = new System.Net.Mail.SmtpClient();

     //This object stores the authentication values

     System.Net.NetworkCredential basicCrenntial = 
          new System.Net.NetworkCredential("username", "password");

     mailClient.Host = "Host";

     mailClient.UseDefaultCredentials = false;

     mailClient.Credentials = basicCrenntial;

     mailClient.Send(message);



Happy Coding…
Share:
Monday, July 13, 2009

Google SMS Channel –Subscribe my post via SMS

Mobile has been very useful device since its launched. Now days we can not live without mobile. Think if you have your own sms channel and you can send message to your subscribers about your thought your blogs. It seems like a dream but now dream comes true. Google has launched new sms channel through which you can sent any thing to your subscribers. Now you guys can have my blog post via sms. I have created my channel at Google sms channel. You just need to subscribe that channel that’s it. You will have all my updates of blog on your mobile.

Here is the link for subscribing my blog post.

http://labs.google.co.in/smschannels/subscribe/DotNetJaps

Click this link and subscribe this channel and you will have all my blog updates on your mobile. Its free any one can create his/here channel. Go to http://labs.google.co.in/smschannels and try create new channel link and that’s it you are having your own sms channel.

GoogleLabs

Share:
Sunday, July 12, 2009

Wave.Google.com –A new communication tool.

Google wave is a new communication and sharing tool coming this year. With wave people can do lots of this things in a single browser like communication,videos,map link sharing, rich formatted text etc.

You can have a group chat and any participant can reply anywhere in message. edit content and add participant at any point any time.

You can also do lots of things like created gadgets thanks to wave api available on wave.Google.com.wave.Google.com is having key technologies like natural language processing, Real time conversation etc. Here is the some video for that.

Natural Language Processing:

Another one live collaborative editing.

If you want to play with wave google api then here is the link for that.

http://code.google.com/apis/wave/

And here is the Google developer preview video.

Happy surfing…

Share:

Windows Live Writer 2009 Available for download now.

I am using windows live writer more then a year for blogging. Its a great tool to blog the things. There lots of inbuilt features are there. Like you can insert videos,Format HTML, Insert hyperlink, insert picture directly from the desktop etc.

BlogPost_thumb1

A new version of window live writer is having all this functionality. As well as its having plug ins that can be very use full when you are professionally blogging the things. There lots of plug in available like twitter update,dig this and flicker

As well as all this you can directly insert videos from YouTube,soapbox etc.

Here is the link for the downloading the windows live writer.

http://windowslivewriter.spaces.live.com/

Share:
Wednesday, June 10, 2009

IIS 7.0-Search Engine Optimization toolkit-Microsoft

Before few days Microsoft has launched new Search Engine Optimization Toolkit which will increase search engine optimization for the site hosted by Microsoft IIS Servers. IIS search engine optimization toolkit will help web server administrators, hosting provider to improve their search engine optimization. It will controls the site content more search engine friendly. It has some of the following features.

- Improve search engine optimization by site analysis. Site analysis module contains lots of report which will help to improve your site for search engine optimization.

- It also control how search engine access and display your site pages and content with robot Exclusion modules

-It also has Sitemap and Sitemap Index features which will display user sitemap into simple user interface.

Following are some of link for more details about search engine optimization tool kit for IIS.

http://www.iis.net/extensions/SEOToolkit

http://learn.iis.net/page.aspx/639/using-iis-search-engine-optimization-toolkit/

http://learn.iis.net/page.aspx/640/using-site-analysis-to-crawl-a-web-site/

http://forums.iis.net/1162.aspx

http://learn.iis.net/page.aspx/641/using-site-analysis-reports/

http://blogs.iis.net/bdela/archive/2009/06/05/search-engine-optimization-using-iis-seo-toolkit.aspx

http://weblogs.asp.net/scottgu/archive/2009/06/03/iis-search-engine-optimization-toolkit.aspx

http://blogs.msdn.com/cdndevs/archive/2009/06/03/the-art-of-seo-and-iis.aspx

You can download Search Engine Optimization toolkit from here.

http://www.iis.net/extensions/SEOToolkit

Cheers.. Happy Programming..

Share:

What’s new in asp.net 4.0 and .net Framework 4.0?

Microsoft.NET Framework 4.0 beta version is out now. Let’s see the what’s new in asp.net 4.0 for the developer purpose. There are lots of features are there. Some of them are following.

1) Extensible Output Caching:

ASP.NET 4.0 adds an extensibility to output caching now you can create your cache provider and will can use this provider for the caching. So now you can use your own data source for you caching.

2) AutoStart Webapplication

Before asp.net 4.0 you have to use application_load or application_start event for the extensive data processing before application pages loads. But now you can use auto start features of asp.net 4.0. A new scalability feature named auto-start that directly addresses this scenario is available when ASP.NET 4.0 runs on IIS 7.5 on Windows Server 2008 R2. The auto-start feature provides a controlled approach for starting up an application pool, initializing an ASP.NET application, and then accepting HTTP requests.

3) Permanently Redirecting a page

Before asp.net 4.0 you need to use response.redirect method to go to another page from new page. ASP.NET, developers have traditionally handled requests to old URLs by using by using the Response.Redirect method to forward a request to the new URL. However, the Redirect method issues an HTTP 302 Found (temporary redirect) response, which results in an extra HTTP round trip when users attempt to access the old URLs. Now permanent redirect will solve this. Its will also benefit for the Search Engine Optimization.

4) Compressed Session State:

ASP.NET 4.0 will have new option for session stored in sql server or in state service. You can compress your serialized session using GZip Compression

5) Page.Keywords and Page.Description Properties

In asp.net 4.0 now you can create dynamic keywords and description for a page using Page.Keywords and Page.Description Properties

6) Enabling View state for Individual Controls

In earlier version of the asp.net if you disable your parent control view state it will disable your child control view state but now with asp.net view state is not dependent on parent child control view state.

7) Routing in asp.net 4.0

Now you can have build in routing for your pages. You don’t have to write your url rewriting modules. It introduces a WebFormRouteHandler routing class which will take care of routing.

8) ClientID

In earlier asp.net version clientId is system generated and if you want to change you have to override it . ASP.NET by default generated a big string for the clientid which will increase your html kb. With asp.net you have small client id using different options Legacy,Static,Predictable,Inherit

There are several other features are also there like following

Live Data Binding

Observer pattern using JavaScript and JavaScript objects

ADONetServiceProxy Class

Formview Control Ehancements

Ajax Improvements in asp.net 4.0

I have just list some of the features you can have all the features available in asp.net 4.0 white paper from the following link.

http://www.asp.net/learn/whitepapers/aspnet40/

Cheers… Happy Programming…

Share:
Sunday, May 31, 2009

Microsoft Bing –Search Engine by Microsoft

Microsoft on Thursday announced the new search engine bing. They are rebranding there search engine from live search to the bing search and will replace the live search in the future. It’s a good search product and beat some way to Google. Bing is not available to public yet bug we don't have wait too much. From June 1 some user will get the user will get the beta version. It is new version of the old project called kumo from the Microsoft.

Bing

Microsoft will introduce the new tools with the bing family of search like cash backs on search,price predictor etc. For more details visit the following links

http://www.decisionengine.com/Letter.html

http://www.bing.com

http://news.cnet.com/8301-17939_109-10251432-2.html

http://twitter.com/bing

http://www.microsoft.com/presspass/press/2009/may09/05-28NewSearchPR.mspx

Share:

DataSet Vs Datareader

Before some time a reader  vamsi asked me in my increase asp.net application performance post that why should i prefer data reader over dataset. Both data reader and dataset are usually use to fetch data from the database but both are having different mechanism for fetching data from database. First we looked into that and then we decide in which condition we need to use dataset and in which condition we need to use data reader.

DataReader:

Datareader fetch data one by one from the database. You can have one row(record)  at a time in datareader. Once you read next row with read method of the datareader the older record is destroyed from memory and new record will take place instead of it. You can do that only forward only and you can not modify the data. It also require a database connection to stayed open while fetching data. You can use CommandBehavior.CloseConnection property to close connection after data reader finish reading data from database.

Dataset:

You can call dataset a mini database in your memory. Dataset support disconnected architecture as once you fill dataset with data then no connection is required. A database can contain multiple tables also its supports relationship between them. You can insert,update and delete records from dataset and you can update them also in database.

Where i should use dataset over database?

When you are required to display only data then use datareader.Dataset will fetch data once a time. So if you are having millions of records then it will consume your server memory while datareader will have just one record at a time in database. And you need not to display millions of records at time.

Following are the link from which you can find which is best suited for your need.

http://www.simple-talk.com/dotnet/.net-framework/should-you-use-ado.net-datareader-or-dataset/

http://aspnet.4guysfromrolla.com/articles/050405-1.aspx

http://www.netnewsgroups.net/group/microsoft.public.dotnet.framework.aspnet/topic740.aspx

Share:
Thursday, May 28, 2009

My blogs posts are appearing on Microsoft TechEd

Its a great honor to be part of the Microsoft TechNet and TechEd community and i have found that my blog entries are also appearing on the TechNet sites. So thanks Microsoft and TechEd editors for considering my post in TechEd blogs.

Here is link for TechEd blogs.

http://www.msteched.com/online/blogs.aspx

Share:

What is the difference between User Control and Custom Control

Custom controls are compiled code(Dlls) easier to use,difficult to create and can be place in toolbox. You can drag and drop controls, Attributes of this control are visually set at design time. A custom control can be used in multiple application as shared DLLS. Any one can copy DLL of custom control in bin directory and add reference and use them. Normally custom controls are designed to provide custom functionality independent of consuming application.

User controls are similar to those of asp include files easy to create, can not be placed into the toolbox and dragged dropped from it. A User controls can share single application files. Normally designed to provided functionality that is reusable for the particular application.

Share:

JavaScript Events

Following are some of the events that are provided by JavaScript

OnChange:

Occurs when user changes values in an input control. In text controls this event fire after user changes focus to other controls

OnClick:

This event occurs when a user clicks on the button control.This event is also occurs when a form is submitted to server.

OnMouseOver:

This events occur when user moves the mouse pointer over a control.

OnMouseOut:

Occurs when the user move mouse pointer over a control.

OnKeyUp:

Occurs when user release a pressed key.

OnSelect:

Occurs when the User selects a portion of a text in a user control.

OnFocus:

Occurs when a control receive focus.

OnBlur:

Occurs when a focus leaves controls.

OnAbort:

Occurs when user cancels image download.

OnError:

Occurs when an image can’t be downloaded

Onload:

Occurs when a new page finishes downloading.

OnUnLoad:

Occurs when a page is unloaded(This typically occurs when a new url has been entered_

Share:

Authentication and authorization in asp.net

Authentication is the process that determines the identity of a user after a user has been authenticated, a developer can determine if the identified use has authorization to proceed.

Authorization is the process of determining whether an authenticated user is permitted access to other any part of application or access to specific data view that application provides.

There are three types of authentication method is provided by the asp.net users.

  1. Windows Authentication –Basic, Digest .
  2. Forms Authentication.
  3. Passport and integrated authentication.

Windows Authentication:

Windows authentication is used together with IIS authentication. When IIs Authentication is complete,ASP.NET uses the authenticated identity to authorize access. This is default settings.

Forms Authentication:

In forms authentication request that are no authenticated are redirect to an html form using HTTP client side redirection. The user provides his login information and submits the form. If application the request, the system issues a form that contains credentials or a key or a identity

Passport Authentication:

It is a centralized authentication service provided by Microsoft that offers single login and core profile services for member sites. This mode of authentication was de-emphasized by Microsoft at the end of 2004 year.

How to set authentication in web.config:

You can set the authentication mode in web.config as follows.

<Authentication Mode=”WindowsFormsPassportNone”></Authentication>

Share:
Wednesday, May 27, 2009

Increase Performance in asp.net application

For every enterprise level application the key to make that application success is the responsiveness of application. ASP.NET also offers great deal of the features for developing web based enterprise application but some times due to avoiding best practice to write application the performance of application performance of application is not so fast as it should be. Here are the some use full suggestion to make your application super fast.

  1. Always set debug=”false” in web.config production environment.
  2. Always set trace=”false” in web.config production environment
  3. If you are using asp.net 2.0 or higher version then always use precompiled version of your code and also prefer web application project over website. If you are using website then always publish it and then upload that precompiled version of your site in production environment.
  4. Always compile your project in Release Mode before uploading application to production environment.
  5. Decrease your html kb as much as you can for that use tables less html using div’s and if possible then do not give big name to your control it will increase your html kb as asp.net uses client Id to differentiate all the controls. If you are creating custom controls then you can overwrite your clientid and uniqueId.
  6. Use cache api as much as possible it will decrease your server roundtrip and boost application performance. ASP.NET 2.0 or higher version provides functionality called sqlcachedependancy for your database caching. It will validate cache with your database operation like insert,update and delete and if not possible with it then use the file base caching.
  7. Remove blank spaces from your html it will increase your kb. You can use regular expression to remove white spaces. I will post the code for removing white spaces next posts.
  8. For asp.net 2.0 and higher version use master pages. It will increase your performance.
  9. Prefer database reader over dataset unless and until you have specific reason to use database.
  10. Use ADO.NET asynchronous calls for ado.net methods. asp.net 2.0 or higher version is supporting your performance. If you are using same procedure or command multiple time then use ADO.NET Prepare command it will increase your performance.
  11. Do IIS performance tuning as per your requirement.
  12. Disable view state for your controls if possible. If you are using asp.net 2.0 or higher version then use asp.net control state instead of view state. Store view state in session or database by overriding the default methods for storing view state.
  13. User Server.Transfer instead of response.redirect.
  14. Always use inproc session state if possible.
  15. Use Ajax for your application wisely. Lots of Ajax calls for a page will also decrease your performance.
  16. Measure your application performance with tools like redgate profiler,firebug and whyslovw from yahoo.
  17. User System.Text.StringBuilder for string concatenation its 4 times more faster then the normal strings.
  18. Right JavaScript in .Js files and place it as bottom of the application.
  19. Use Separate CSS files for styling of application.
  20. User database paging over normal paging while displaying huge amount of data.
  21. Call web service from java script instead of server side. Use asynchronous calls to call a web method from web service.

That’s it!!…..Happy Programming..

Share:
Tuesday, May 26, 2009

Microsoft Visutal Studio 2010 Beta Available for download now

We all .NET developers are waiting for the visual studio .NET 2010 for long time. Microsoft just have enabled download for all beta users. Following is the link for downloading the visual sutdio 2010.

http://www.microsoft.com/visualstudio/en-us/products/2010/default.mspx.

From this link you will know all the things related to visual studio 2010.

Following are the some glimpse of the features of visual studion 2010.

  1. F# Support
  2. Java Script code compilation and debugging
  3. JQuery is included in visual studio 2010
  4. UML
  5. Better display of code in editor.
  6. Parrallel Programing facilities.
Share:

Implementing repository pattern with the ado.net entity model

There are lots of ways to implement repository pattern but with ado.net entity model you can create repository pattern within 10 to 15 minutes.

If you are creating asp.net mvc application then just right click->Model folder->Add->Net Item->select ado.net entity data model.



From database explorer right click and drag your tables to your database explorer. It will create a entity class. For example i have created a notes table for my sample and it will create a notes entity class in my ado.net entity data model.



After creating the entity class not its time to create a interface for repository pattern which will contain my all the operations related to notes entity.

Following is the interface which we will implement use for repository.

namespace DotNetJapsMVC.Models.Respository.Interface
{
interface INotesRepository
{
void CreateNotes(Notes notesToCreate);
void EditNotes(Notes notesToEdit);
void DeleteNotes(Notes notesToDelete);
Notes GetNotes(Guid noteId);
IEnumerable ListNotes();
}
}

Now we will create a class that will implement this repository interface. Here is the coding for that.


using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace DotNetJapsMVC.Models.Respository.Class
{
public class NotesRepository:Interface.INotesRepository
{
private DotNetJapsEntities _myEntities = new DotNetJapsEntities();

public void CreateNotes(Notes notesToCreate)
{
_myEntities.AddToNotes(notesToCreate);
_myEntities.SaveChanges();
}

public void EditNotes(Notes notesToEdit)
{
var originalNotes = (from n in _myEntities.Notes
where n.NoteId == notesToEdit.NoteId
select n).FirstOrDefault();

_myEntities.ApplyPropertyChanges(originalNotes.EntityKey.EntitySetName, notesToEdit);
_myEntities.SaveChanges();

}

public void DeleteNotes(Notes notesToDelete)
{
var originalNotes = GetNotes(notesToDelete.NoteId);
_myEntities.DeleteObject(originalNotes );
_myEntities.SaveChanges();
}

public Notes GetNotes(Guid noteId)
{
return (from n in _myEntities.Notes
where n.NoteId == noteId
select n ).FirstOrDefault();
}

public IEnumerable ListNotes()
{
return _myEntities.Notes.ToList();
}

}
}

That's it we have created the repository classes and repository interface. You can use as following in your class or pages.

private  INotesRepository _repository;

public List LoadNotes()
{
 return _repository.ListNotes();
}

Advantage Of Repository Pattern:
  1. Make application loosely coupled so if you want to change the something then you don't need to change everything from scratch.
  2. With the repository pattern we can have nice abstraction which will separate our business logic as well as database logic.
  3. You can prevent dependency injection through the repository pattern.
Happy Programming
Share:
Friday, May 22, 2009

Which .NET Object Relational Mapper is fastest? In .NET Nhibernate,Linq 2 SQL,Entity Framework Or SubSonic, NHibernate

There are lots of ORM(Object Relational Mapper) tools are available for the Microsoft.NET like linq 2 sql, ado.net entity framework, nhibernate, subsonic and so many others. Developer often confuses which technlogy he should choose but i think a developer should deternmine his requiremnt first then he has check the pros and cons of every tool there .

I have used ado.net entity framework for my application as i like it most and its easy to use.
Following are some good article which will help you to choose right orm tool for your applications.

http://ayende.com/Blog/archive/2007/06/03/On-SubSonic-amp-NHibernate.aspx

http://blog.wekeroad.com/blog/aspnet-mvc-choosing-your-data-access-method/

http://dotnet.netindonesia.net/?0::41743

http://geekswithblogs.net/diadiora/archive/2009/01/12/best-.net-orm-tool.aspx


http://madgeek.com/Articles/ORMapping/EN/mapping.htm


Happy Programming...
Share:
Thursday, January 15, 2009

Member of class - Object Oriented Programming


Definitions Of Object:
An object is combination and collection of data and code designed to emulate a physical abstract enmity.You can create number object of class. The properties, Variable and Methods define in class are called Members of class.

  1. Private Member Of Class: Private member of a class have strict access control Only the member function of same class can access this members.
  2. Protected Member of Class: A Protected member is accessible to member of its own calls and to any of the class member in a derived class.
  3. Public Member Of Class: A public member of class can be accessible from any where.
  4. Public and Private Static Member Of a Class: The static member of a class can be access without creating a object of class. While to access other member of class you have to create a object of class. The public static member can be accessed using access specifier while private static member can be accessed only the member functions.
Inheritance and Member Accessibility:
  1. A private member is accessible only to members of the class in which private member is declared. They cannot be inherited
  2. A private member of the base class can be accessed in the derived class through the member of the base class.
  3. A protected member is accessible by member of its own class and to any of the class member in a derived class.
Share:

Diffrent Type Of Inheritance- Object Oriented Programing

Following are different type of inheritance..
1) Single Inheritance:
Derivation of class from only one base class is called single inheritance.
2) Multiple Inheritance:
Derivation of class from several base class is called multiple inheritance.
3) Hierarchical Inheritance:
Derivation of several classes from a single class is called hierarchical inheritance.
4) Multilevel Inheritance:
Derivation of a class from another derived class is called multiple inheritance.
5) Hybrid Inheritance:
Derivation of a class involving more then one form of inheritance is called hybrid class.
6) Multi path Inheritance:
Derivation of a class from another derived classes which are derived from the same base class is called multi path inheritance.


Share:
Wednesday, January 14, 2009

Basic Concept Of Object Oriented Programming

Following are the basic concepts of object oriented programming.
1) Objects:
Object are the basic run time entities in the object oriented system. They may represent a person, a palace, a bank account, a table data or anything that a program can handle.
2) Classes:
A class encloses both the data and function that operate on the data into a single unit.
3) Data abstraction and Encapsulation:
The wrapping of data and function in a single unit is know as encapsulation. It is a mechanism that associate into the single unit and keeps them safe from external interference and misuse.
Abstraction refers to the act of representing essential features without including the background details or explanations.
4) Inheritance:
Inheritance is the process by which objects of one class acquire the properties of objects of another class.
5) Polymorphism:
Polymorphism means ability to take more then one form. For example as operation may execute different behaviour in different conditions. The behaviour depends on type of data used in operations.
6) Dynamic Binding:
Binding refers to the linking of a procedure call to be executed in response to the call. Dynamic binding means that the code associated with a given procedure call is not know until the time of call at run time. Virtual functions are the best examples of dynamic binding.
7) Message Communications:
An object oriented program consists of a set of objects that communicate with each other. Object
communicate with one another by sending data receiving information much same way as people passes messages to one another. A message for an object is a request for the execution of a procedure and therefore will invoke function in the receiving object that generates desire results.
8) Extensibility:
It is a feature which allows the extension of the functionality of the existing software components.
9) Delegation:
It is a alternative to the class inheritance. Delegation is a way of making object composition as powerful as inheritance. In delegation two objects are invoked in handling a request, receiving object delegates operation to its delegate. This is analogues to the child class sending a request to the parent class.
10) Generaticity:
It is a technique for defining software components that have more then one interpretation depending on the typoe of parameters.
Share:

Object Oriented Interview Question Part 1- Benefits Of Inheritance

Following are the benefits of the inheritance...
  1. Through inheritance we can eliminate the redundant code and extend the user of the existing classes.
  2. We can build program from the standard working modules that can communicate with the one another rather then having start writing code from beginning.
  3. It is possible to have multiple instances of objects of class without any interface.
  4. It is easy to partion the work.
  5. Object oriented system can be easily upgraded from the small to the large systems.
  6. Easily modifying and extending implementations of components without having to recode everything from scratch.
Share:
Tuesday, January 13, 2009

Happy New Year 2009

Hello Guys,

I am jalpesh vadgama wishing you a very happy and healthy new year ahead. Sorry i was busy with my projects so not able to post anything related to dot net. Now i am back with the all the things and promise to be regular post. If you want to listen anything from me then please post comment.

Last year was hectic to me as lots of things are going on now my house is also shifted and i have broadband connection at my home. We can have conservation regularly.
Share:

Support this blog-Buy me a coffee

Buy me a coffeeBuy me a coffee
Search This Blog
Subscribe to my blog

  

My Mvp Profile
Follow us on facebook
Blog Archive
Total Pageviews