Jun 1, 2010

Array vs List vs ArrayList: When to use which?


Arrays
An array allows a collection of values of the same type to be stored and accessed via a single variable. Each item is accessed in the array variable through the use of an index value into the array.
A C# array may be created in a number of different ways.
  • SingleDimensional array
  • MultiDimensional array
  • Jagged Arrays
  1. A jagged array is an array whose elements are arrays. The elements of a jagged array can be of different dimensions and sizes. A jagged array is sometimes called an "array of arrays."
  2. When you Preper array - You know the size of an array at the time that it is created.
  3. You should not use arrays when you don't know the size of the array, or the size is likely to change. However, if you have a fixed length array, they are an easy way of retrieving elements by index.

Since resizing arrays is expensive.


LIST <T>
  • Represents a strongly typed list of objects that can be accessed by index. Provides methods to search, sort, and manipulate lists. The List class is the generic equivalent of the ArrayList class.
  • It implements the IList generic interface using an array whose size is dynamically increased as required.
  • If you're going to be adding/removing elements a lot, just use a List. If it's multidimensional, you can always use a List<list<int>>

ArrayList
  • Array List is untyped list, it doesn't know what is in there (and indeed,you could add any combination of objects).
  • The ArrayList is not guaranteed to be sorted. You must sort the ArrayList prior to performing operations (such as BinarySearch) that require the ArrayList to be sorted.
  • The capacity of a ArrayList is the number of elements the ArrayList can hold. As elements are added to a ArrayList, the capacity is automatically increased as required through reallocation. The capacity can be decreased by calling TrimToSize or by setting the Capacity property explicitly.
  • Elements in this collection can be accessed using an integer index. Indexes in this collection are zero-based.
  • The ArrayList collection accepts null as a valid value, allows duplicate elements.
  • Using multidimensional arrays as elements in an ArrayList collection is not supported.

The conclusions
  • Always use arrays or List's when possible, when working with valuetypes. The big overhead is probably due to the boxing that takes place (an Int32 object has to be created for every number, and a reference to it is stored in the ArrayList).
  • When working with reference-type data (like strings) it's typically not worth the effort to change it to Lists unless you are dealing with really big amounts of data. The List is only around 110 ms faster than the arraylist when dealing with 8 mil. items and both seem to scale linearly.
  • When possible it really does help a lot to initialize your list or ArrayList to the expected size. It makes the performance approach that of a normal array.When Microsoft claims that they've improved performance a great deal for collection-types in framework 2.0, it's only true for the "new" types like List. There's almost no difference in ArrayList performance!
  • ArrayLists are essentially deprecated as they're untyped - you need to use casts with them - and they're slower and less space efficient for value types because they require the items to be boxed.
  • Generic lists were introduced with .Net 2.0 and are the way to go. Often a List is better than an array, with few downsides.
  • You cannot compare the performance of Array and List, since the arrays I simply threw in as a baseline, since most lists internally uses array (in various combinations) to store their data.

When to use which?

  1. Array is Best : when its fixed length.
  2. List is Best : When typed list of objects.
  3. ArrayList is Best : When adding multiple combination of objects.

May 25, 2010

Features removed from SharePoint Server 2010

The following features and functionality are no longer available in SharePoint Server 2010.
  • 32-bit operating systems
  • Side-by-side installation
  • Gradual upgrade
  • Office Web Components
  • Web discussions
  • SQL Server 2000 data sources
  • ODBC data sources
  • Version 3 themes
  • Storage Management page
  • Web bot software agents
  • E-mail enabled groups and Microsoft SharePoint Directory Management service (DMS)
  • Permissions for sub-webs
  • Shared Services Provider (SSP)
  • Internationalized domain names
  • Site directory template
  • News portal template
  • Collaboration portal template

32-bit operating systems

SharePoint Server 2010 requires a 64-bit operating system. Running SharePoint Server 2010 on 32-bit operating systems is no longer supported.
Reason for change: SharePoint Server 2010 has numerous features that benefit from the performance provided by 64-bit operating systems.
Migration path: Install SharePoint Server 2010 on 64-bit operating systems.


Side-by-side installation

The ability to perform side-by-side installation of Office SharePoint Server 2007 and SharePoint Server 2010 on the same server is being removed. This change is related to the removal of support for Gradual upgrade.
Reason for change: Compatibility and performance issues prevent side-by-side installation.
Migration path: Perform upgrade-in-place installation on the same hardware, or perform database attach to a new farm. Use new hardware if both Office SharePoint Server 2007 and SharePoint Server 2010 versions of a farm must exist at the same time.


Gradual upgrade

Support for the gradual upgrade feature is being removed as part of the removal of Side-by-side installation.
Reason for change: Compatibility and performance issues prevent side-by-side installation.
Migration path: Use the read-only database capability of Office SharePoint Server 2007 with the database attach upgrade capability of SharePoint Server 2010 to minimize downtime.

For long upgrade periods where you must maintain both Office SharePoint Server 2007 and SharePoint Server 2010 versions of a farm, you can use the alternate access mapping (AAM) URL redirection capability provided in SharePoint Server 2010. Upgrades that use AAM URL redirection are performed by using database attach upgrade command-line operations instead of timer job-based events that are scheduled from the user interface (UI).

Office Web Components

SharePoint Server 2010 no longer supports Office Web Components (OWC). The PivotChart, PivotTable, and Trend Chart report types are no longer available as options in the SharePoint Dashboard Designer.
Reason for change: This is a 2007 Microsoft Office system feature that is now replaced by the features available in Excel Services in Microsoft SharePoint Server 2010 in SharePoint Server 2010.
Migration path: In SharePoint Server 2010, use Excel Services instead of Office Web Components.

Web discussions

Web discussions enable users to add comments about documents and pages without modifying their actual content. SharePoint Server 2010 does not support Web discussions.
Reason for change: This feature was deprecated in Office SharePoint Server 2007 because of its low adoption rate. The feature has now been removed from the product.
Migration path: The Note Board feature in SharePoint Server 2010 now provides this functionality.

SQL Server 2000 data sources

SQL Server 2000 data sources are no longer supported in SharePoint Server 2010.
Reason for change: SQL Server 2000 does not fully support many of the newer data features available in SharePoint Server 2010.
Migration path: Use data sources that are on Microsoft SQL Server 2005 or Microsoft SQL Server 2008.

ODBC data sources

ODBC data sources are no longer supported in SharePoint Server 2010.
Reason for change: Newer and more versatile database connection options have replaced the functionality of ODBC.
Migration path: ODBC is no longer listed as an option for connecting to a data source. Use another data connection type.

Version 3 themes

A theme is a set of colors, fonts, and decorative elements that enable you to quickly change the appearance of a site. The functionality provided in the version 3 themes is not available in the newly designed version 4 themes.
Reason for change: Version 4 themes are redesigned to simplify the process of generating themes. The new architecture is not compatible with the architecture of version 3 themes.
Migration path: Version 3 themes are still supported if the UI mode is kept at version 3. Version 3 themes are not supported in version 4 UI mode.


Storage Management page

The Storage Management (storman.aspx) page is now removed from the Central Administration Web site.
Reason for change: This feature can cause dramatic performance issues in a SharePoint farm. Site administrators who use this feature were often unaware of the performance slowdown that it was imposing on users.
Migration path: Site administrators can no longer use this feature.


Web bot software agents

A Web bot software agent is a dynamic object on a Web page that is evaluated when the page is saved or, in some cases, when the page is opened in a Web browser. Search crawlers and indexers are examples of Web bots. Developers can no longer use Web bot entry points and users cannot add Web bots to SharePoint Server 2010 sites.
Reason for change: This functionality is replaced by Web Parts.
Migration path: Use Web Parts instead of Web bots.


E-mail enabled groups and Microsoft SharePoint Directory Management service (DMS)

The Microsoft SharePoint Directory Management service (DMS) connects SharePoint sites to an organization's user directory to provide enhanced e-mail features. If a SharePoint farm is using DMS, users cannot enable SharePoint groups to use e-mail.
Reason for change: The type of authentication used in DMS is being replaced with claims authentication.
Migration path: This feature is not available in SharePoint Server 2010. Use claims authentication instead.

Permissions for sub-webs

When you assign a permission level to a parent site, that permission level is inherited by all sub-webs of the parent site by default. In Office SharePoint Server 2007, if you wanted a sub-web to have different permissions from its parent, you could edit the inherited permission level definition at the sub-web scope. The result was that you would have two permission levels with the same name but different permissions, depending on their scope. For example, suppose you assigned the Design permission level to a parent site, but you want to change the permissions on a sub-web so that users will not be able to apply style sheets to pages in that sub-web. In Office SharePoint Server 2007, you could edit the Design permission level on the sub-web itself, remove the Apply Style Sheets permission, and save the permission level as Design. It would not be possible, just by looking at permission levels, to determine that the sub-web actually had a different set of permissions than its parent site.
Migration path: In SharePoint Server 2010, if you want to give different permissions to a sub-web, you must assign a separate permission level to the sub-web. Site collections that are upgraded from Office SharePoint Server 2007 and have these unique permission level structures will continue to work. However, the user interface in SharePoint Server 2010 does not have a way to edit an inherited permission level at the sub-web scope, so you cannot change them or create new permission level definitions of this type. If you have a specific business need for continuing to use the Office SharePoint Server 2007 process, use the SharePoint Server 2010 object model.

Shared Services Provider (SSP)

Shared Services Providers (SSPs) do not exist in SharePoint Server 2010.
Reason for change: Service applications replace this functionality.
Migration path: Use service applications for many of the features that were supported and configured in SSPs.


Internationalized domain names

Although Microsoft Office SharePoint Server 2007 supported internationalized domain names (IDNs), SharePoint Server 2010 does not.
Reason for change: Support of internationalized domain names (IDNs) has been deprecated.
Migration path: If you currently use IDNs with Office SharePoint Server 2007 and you plan to upgrade or migrate to SharePoint Server 2010, you must stop using IDNs, delete all IDN settings, and then set up an environment that does not use IDN before doing so.


Site directory template

This site template is not available as an option in SharePoint Server 2010.
Reason for change: The functionality provided in this template is now replaced by Enterprise Content Management (ECM) solutions.
Migration path: Use the social tagging features in SharePoint Server 2010 to get much of the functionality provided by the site directory template. For more information, see Social tagging overview (SharePoint Server 2010) and Privacy and security implications of social tagging (SharePoint Server 2010).


News portal template

This site template is not available as an option in SharePoint Server 2010.
Reason for change: The functionality provided in this template is now replaced by Enterprise Content Management (ECM) solutions.
Migration path: This template can still be accessed and used programmatically by developers. It is also still available as options in the UI if the SharePoint Server 2010 farm is upgraded from Microsoft Office SharePoint Server 2007. Use the publishing sites template to replace this template.


Collaboration portal template

This site template is not available as an option in SharePoint Server 2010.
Reason for change: The functionality provided in this template is now replaced by Enterprise Content Management (ECM) solutions.
Migration path: This template can still be accessed and used programmatically by developers. It is also still available in the UI if the SharePoint Server 2010 farm is upgraded from Office SharePoint Server 2007. Use the publishing sites template to replace this template.

Changes from MOSS 2007 to SharePoint Server 2010

  • Deprecated features
  • Features removed from SharePoint Server 2010

Deprecated features

The following features are shipped with SharePoint Server 2010 but will be removed from subsequent versions.

  • Stsadm command-line tool
  • Site Directory feature
  • Scorecard export to Reporting Services
  • Business Data Catalog

Stsadm command-line tool

The Stsadm command-line tool has been deprecated.
Reason for change: The Stsadm command-line tool will be superseded by Windows PowerShell 2.0.
Migration path: The Stsadm command-line tool is included to support compatibility with previous product versions. You should use Windows PowerShell 2.0 when performing command-line administrative tasks.

Site Directory feature

The Site Directory provides a list of links to all sites within a site collection.
Reason for change: This functionality will be replaced by the social features of the User Profile service.
Migration path: Use the Tags and Notes feature to search on any tag that has been entered into the system and see the sites associated with it, as well as other tags and notes that are associated with that site. For a more structured approach to lists of links, every site collection comes with the ability to create lists of links, and workflows so that editorial control can be defined. A script or timer job can create and update a custom links list, or you can staple a feature to the Create Site Collection page in Central Administration.

Scorecard export to Reporting Services

SharePoint Server 2010 no longer supports exporting a scorecard to SQL Server Reporting Services.
Reason for change: This functionality had a low adoption rate.

Business Data Catalog

In Office SharePoint Server 2007, external data was integrated into solutions by using the Business Data Catalog, which was a shared service in the context of the Shared Service Provider framework.
Reason for change: In SharePoint Server 2010, external data is integrated into solutions using the new Business Data Connectivity service, which no longer runs in the context of the Shared Service Provider framework and instead fits into the new shared services framework of SharePoint Server 2010.
Migration path: The Business Data Connectivity service object model is not backward compatible with the object model used in the Business Data Catalog. To support the upward compatibility of Office SharePoint Server 2007 Business Data Catalog solutions with SharePoint Server 2010, an additional service, the Application Registry Service, is available in SharePoint Server 2010 that supports the object model used in the Business Data Catalog. We recommend that new solution development not be done on the Application Registry Service, which is provided only to guarantee upward compatibility of 2007 Microsoft Office system solutions.

Features removed from SharePoint Server 2010

The following features and functionality are no longer available in SharePoint Server 2010.
  • 32-bit operating systems
  • Side-by-side installation
  • Gradual upgrade
  • Office Web Components
  • Web discussions
  • SQL Server 2000 data sources
  • ODBC data sources
  • Version 3 themes
  • Storage Management page
  • Web bot software agents
  • E-mail enabled groups and Microsoft SharePoint Directory Management service (DMS)
  • Permissions for sub-webs
  • Shared Services Provider (SSP)
  • Internationalized domain names
  • Site directory template
  • News portal template
  • Collaboration portal template

Click here for Detail

May 23, 2010

Sharepoint 2010 vs MOSS 2007

Microsoft modified the Sharepoint Pillars
Sharepoint 2010





MOSS 2007



Pillars of SharePoint

SharePoint 2007
SharePoint 2010
Portal
Compositions
Content Management
Content
Collaboration
Communities
Business Intelligence
Insights
Business Forms
Search
Search
Platform Services
Sites


Download the SharePoint 2007 vs 2010 Version Feature Comparison here as Excel

May 22, 2010

What is Sharepoint 2010?

Its an Latest Version of SharePoint (2001 --> 2003 --> 2007 --> Now 2010)

Microsoft SharePoint 2010
The SharePoint 2010 is the business Collaboration Platform for the Enterpriseand the Web that enables you to connect and empower people throught an intergrated set of rich features. Whether deployed on-premises or as hosted services, Sharepoint 2010 helps you cut costs with a unified infrastructure while allowing you to rapidly respond to your business needs. To Summarize it Sharepoint 2010 is the next wave of SharePoint technology formerly code named SharePoint 14.











What's New in SharePoint 2010?

  • Improvements to UI and accessibility features
  • Better tools for Developers and Designers
  • End-to-end Intergration with PowerShell
  • Improvements to lists and events
  • New WSS integration with LinQ
  • New Client-Side Object Model and runtime
  • Enhanced Support for developing Workflow applications
  • New Extensible architecture for service application
  • Evolving story for Integrating Sharepoint with external Data.
  • New Connector framework enhances Search architecture
  • User Solutions and Partially Trusted Code
  • The Shift to Claim-based security
Major Shifts in Sharepoint UI
  • Server Ribbon


  • InPlace Editing