Monday, February 15, 2010
NHibernate.MappingException: No persister for ...
Thursday, January 14, 2010
cannot be opened because its project type (.csproj) is not supported by this version of the application.
"
To open it, please use a version that supports this type of project."
Finally today I got the solution and it works fine for me .... :) Might be it will be a bug for VS-2008 :(
Here is the solution for it.
Go to Start> All Programs > Visual Studio 2008 > Visual Studio Tools > Click Visual Studio 2008 Command Prompt. Type the below command and press enter.
devenv.exe /resetskippkgs
It opens Visual Studio 2008 IDE and finally everything was OK .Cheers by
Anand Ranjan Pandey
Tuesday, September 8, 2009
Code Snipet : Step by step guideline from creation to installation of a snippet
Contents
A. Introduction: What is Code Snippet??
B. Can we create our own code snippet ??
Create a .snippet file (Step by Step)
C. How to Manage Code Snippets inside VS Editor ??
Add/Register a snippet
Remove a snippet
Modify an existing snippet
D. Code Snippet Functions
GenerateSwitchCases( EnumerationLiteral )
ClassName()
SimpleTypeName( TypeName )
E. Is it possible to share it with all of my team mates ??
Create a vsi installer (Step by Step)
F. An example
Singleton Pattern Example: 1
Singleton Pattern Example: 2
A. Introduction: What is Code Snippet??
Code snippets are ready-made snippets of code we can quickly insert into our code.
We can use code snippets to type a short alias, and then expand it into a common programming construct.
For example, the prop code snippet creates an empty property block.
Benefits
- Write once use anywhere: Reduce the repeatable writing of code effort.
- Define/Maintain a Coding Standard to be used for any Project/Organization.
- Provide easier way to write/define a group of code. Like a code snippet can generate a Switch case statement only through its shortcut (as myswitch)
- Easy to use as well as create and also easily maintainable.
- Share management with other developers
How to Use
Step 1. In the Code Editor by typing a short name for the alias or a code snippet shortcut
Step 2. Press two times Tab key. It will generate a Property block automatically
Step 3. Once a code snippet has been chosen, the text of the code snippet is inserted automatically at the cursor position. At this point, any editable fields in the code snippet are highlighted in light green, and the first editable field is selected automatically.
When a field is selected, users can type a new value for the field. Pressing TAB cycles through the editable fields of the code snippet; pressing SHIFT+TAB cycles through them in reverse order. Clicking on a field places the cursor in the field, and double-clicking on a field selects it.
Only the first instance of a given field is editable; when that field is highlighted, the other instances of that field are outlined. When you change the value of an editable field, that field is changed everywhere it is used in the code snippet.
B. Can we create our own code snippet ??
Yes we can create and utilize custom code snippets, in addition to the code snippets that are included with Visual Studio by default.
IntelliSense Code Snippets are XML files with a .snippet file name extension that adhere to the IntelliSense Code Snippet XML schema.
To create a .snippet file
- Go to File è New è File.
- From Template select XML File and then click Open, it will open a blank XML file for editing.
- On the File menu, click Save <XMLFileName>.
- In the Save as type box, select All Files (*.*).
- In the File name box, enter a file name with the .snippet file name extension.
- Click Save.
Writing the Code
Now we have an XML file, we need to write the XML code that makes up our code snippet.
- Below the automatically generated line of XML, add a CodeSnippets element with the proper xmlns attribute value, and a CodeSnippet element to create an individual code snippet. For example:
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
</CodeSnippet>
</CodeSnippets>Note : This is the standard defined by VS that every snippet file must start with the
CodeSnippetstag, identifying the namespace that defines the code snippet schema. Within these tags, each snippet is defined using theCodeSnippettag, which will in turn contain the definition of the snippet itself: - Add a header section to the code snippet. Each code snippet has a header area and a body area, known as the
HeaderandSnippet, respectively. TheHeaderarea mainly contains three tags:Title: The name of the snippetDescription: The description of the snippetShortcut: Shortcut names provide a way for us to insert IntelliSense Code Snippets into our code by typing a shortcut name and then pressing Tab.
Apart from these Tags we can also use Author , SnippetTypes tags like:
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Property</Title>
<Shortcut>propcs</Shortcut>
<Description>Code snippet to define a property .</Description>
<Author>Anand Ranjan</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
</CodeSnippet>
</CodeSnippets>What is what : A snapshot of Code Snippet Manager – Uses of Header Tag elements
What is what : A snapshot of VS Editor – Uses of Header Tag elements
- Add the elements that define the code snippet itself. For example:
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Property</Title>
<Shortcut>propcs</Shortcut>
<Description>Code snippet to define a property .</Description>
<Author>Anand Ranjan</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Code Language="csharp">
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets> - Inside the Code element of Snippet Tag, add the C# code for the snippet. All snippet code must be placed between
<![CDATA[and]]>brackets. For example<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Property</Title>
<Shortcut>propcs</Shortcut>
<Description>Code snippet to define a property .</Description>
<Author>Anand Ranjan</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Code Language="csharp">
<![CDATA[
/// <summary>
/// Property to set a $property$
/// </summary>
private $type$ $defaultValue$;
public $type$ $property$
{
get
{
return $defaultValue$;
}
set
{
$defaultValue$ = value;
}
}
$end$]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets> - We may have portions of code snippets that we want to be replaced by the person inserting them. Code Snippets provide this ability with the Literal and Object elements.
The Literal element is used to identify a replacement for a piece of code that is entirely contained within the snippet, but will likely be customized after it is inserted into the code. For example, literal strings, numeric values, and some variable names should be declared as literals. The optional
<Declarations>section is used to define replaceable sections in the snippet. Replaceable sections are denoted with$namein the<Code>section and are the sections displayed green and configurable by the developer using the snippet.
To create a literal replacement
- Locate the Snippet element of the code snippet.
- Add a Declarations element as a child of the Snippet element. The Declarations element is used to group replacement declarations.
- Add a Literal element as a child of the Declarations element. The Literal element specifies an individual literal. A code snippet may have more than one literal replacement.
- Add an ID element as a child of the Literal element. The text value of this element specifies the name that you will use to reference the literal in the Code element.
- Add a Default element as a child of the Literal element. The text value of the Default element specifies the default value of the literal when you insert the code snippet.
- Optionally, add the Function and/or ToolTip elements.
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Property</Title>
<Shortcut>propcs</Shortcut>
<Description>Code snippet to define a property .</Description>
<Author>Anand Ranjan</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>type</ID>
<ToolTip>Property type</ToolTip>
<Default>int</Default>
</Literal>
<Literal>
<ID>property</ID>
<ToolTip>Property name</ToolTip>
<Default>Value</Default>
</Literal>
<Literal>
<ID>defaultValue</ID>
<ToolTip>The default value for this property.</ToolTip>
<Default>intValue</Default>
</Literal>
</Declarations>
<Code Language="csharp">
<![CDATA[
/// <summary>
/// Property to set a $property$
/// </summary>
private $type$ $defaultValue$;
public $type$ $property$
{
get
{
return $defaultValue$;
}
set
{
$defaultValue$ = value;
}
}
$end$]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>
What is what : A snapshot of VS Editor – Generated code using snippet
Creating an Object Replacement
The Object element is used to identify an item that is required by the code snippet but is likely to be defined outside of the snippet itself. For example, Windows Forms controls, ASP.NET controls, object instances, and type instances should be declared as objects. Object declarations require that a type be specified.
To create an object replacement
- Locate the Snippet element of the code snippet.
- Add a Declarations element as a child of the Snippet element. The Declarations element is used to group replacement declarations.
- Add an Object element as a child of the Declarations element. The Object element specifies an individual object. A code snippet may have more than one object replacement.
- Add an ID element as a child of the Object element. The text value of this element specifies the name that you will use to reference the object in the Code element.
- Add a Type element as a child of the Object element The text value of the Default element specifies the type of the object.
- Add a Default element as a child of the Object element. The text value of the Default element specifies the default value of the object when you insert the code snippet.
- Optionally, add the Function and/or ToolTip elements.
Example :
<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Property</Title>
<Shortcut>getcustomer</Shortcut>
<Description>Code snippet to interact with database .</Description>
<Author>Anand Ranjan</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<!-- Add additional Snippet information here -->
<Declarations>
<Literal>
<ID>SqlConnString</ID>
<ToolTip>Replace with a SQL connection string.</ToolTip>
<Default>"SQL connection string"</Default>
</Literal>
<Object>
<ID>SqlConnection</ID>
<Type>System.Data.SqlClient.SqlConnection</Type>
<ToolTip>Replace with a connection object in your application.</ToolTip>
<Default>dcConnection</Default>
</Object>
</Declarations>
<Code Language="CSharp">
<![CDATA[
daCustomers = new SqlClient.SqlDataAdapter();
selectCommand = new SqlClient.SqlCommand($SqlConnString$);
daCustomers.SelectCommand = selectCommand;
daCustomers.SelectCommand.Connection = $SqlConnection$;
]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>C. How to Manage Code Snippets inside VS Editor ??
The Code Snippets Manager allows us to set the directories and individual snippets that we want available to insert into your code.
To access the Code Snippets Manager
- On the Tools menu, click Code Snippets Manager or alternately we can use
Key ctrl + KB
This will open a code snippet manager dialog box like
To add a directory to the Code Snippet Manager
- In the Language list, select the language that you want to add a directory to.
- Click Add. This opens the Code Snippets Directory window.
- Select the directory that we want to add to the Code Snippets Manager and click OK.The directory will now be used to search for available code snippets.
To remove a directory from the Code Snippet Manager
- Select the directory that you want to remove.
- Click Remove.
To import a code snippet into the Code Snippet Manager
- In the Language list, select the language that you want to add the code snippet.
- Select the existing folder that you want to place the imported code snippet into.
- Click Import. This opens the Code Snippets Directory window.
- Select the code snippet file that you want to add to the Code Snippets Manager and click OK.The code snippet is now available for insertion into the code editor.
Select the location for code snippet and click on finish
To modify an existing Snippets
IntelliSense Code Snippets are XML files with a .snippet file name extension that can be easily modified using any XML editor, including Visual Studio 2005.
To modify an existing IntelliSense Code Snippet
D. Code Snippet Functions
There are three functions available to use with Visual C# code snippets,
- GenerateSwitchCases( EnumerationLiteral )
Generates a switch statement and a set of case statements for the members of the enumeration specified by the EnumerationLiteral parameter. The EnumerationLiteral parameter must be either a reference to an enumeration literal or an enumeration type.
For example:
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>myswitch</Title>
<Shortcut>myswitch</Shortcut>
<Description>Code snippet for switch statement</Description>
<Author>Microsoft Corporation</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>expression</ID>
<ToolTip>Expression to switch on</ToolTip>
<Default>switch_on</Default>
</Literal>
<Literal Editable="false">
<ID>cases</ID>
<Function>GenerateSwitchCases($expression$)</Function>
<Default>default:</Default>
</Literal>
</Declarations>
<Code Language="csharp">
<![CDATA[
switch ($expression$)
{
$cases$
}
]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>Usage example :
What is what : A snapshot of VS Editor – To select a snippet
Replace swich_on ( Highlighted in green) with our enum and press two times enter.
What is what : A snapshot of VS Editor – End result using snippet
- ClassName()
Returns the name of the class that contains the inserted snippet.
For example to write a constructor for a class with an input parameter,
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Common constructor pattern</Title>
<Shortcut>myconstructor</Shortcut>
<Description>Code Snippet for a constructor</Description>
<Author>Anand Ranjan Pandey</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>type</ID>
<Default>int</Default>
</Literal>
<Literal>
<ID>name</ID>
<Default>field</Default>
</Literal>
<Literal Editable="false">
<ID>classname</ID>
<ToolTip>Class name</ToolTip>
<Function>ClassName()</Function>
<Default>ClassNamePlaceholder</Default>
</Literal>
</Declarations>
<Code Language="CSharp" Kind="CData">
<![CDATA[
public $classname$ ($type$ $name$)
{
this._$name$ = $name$;
}
private $type$ _$name$;
]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>Usage Example :
What is what : A snapshot of VS Editor – End result using snippet
- SimpleTypeName( TypeName )
It reduces the TypeName parameter to its simplest form in the context in which the snippet was invoked.
For example : below example shows how to use the SimpleTypeName function. When this snippet is inserted into a code file, the $SystemConsole$ literal will be replaced with the simplest form of the Console type in the context in which the snippet was invoked.
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Console_WriteLine</Title>
<Shortcut>mycw</Shortcut>
<Description>Code snippet for Console.WriteLine</Description>
<Author>Anand Ranjan Pandey</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal Editable="false">
<ID>SystemConsole</ID>
<Function>SimpleTypeName(global::System.Console)</Function>
</Literal>
</Declarations>
<Code Language="csharp">
<![CDATA[
$SystemConsole$.WriteLine();
]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>Usage example :
What is what : A snapshot of VS Editor – End result using snippet
E. Is it possible to share it with all of my team mates ??
Yes, To get a code snippet to appear in the code editor, it must be placed on a user's computer and imported with the Code Snippet Manager. To make this process easier, we can place our snippet file inside of a Visual Studio Installer (.vsi) file and use the Visual Studio Content Installer to place the file in the correct location. The .vsi file can then be easily shared with other developers throughout the community.
Steps to create a .vsi file :
Visual Studio Content Installer (.vsi) files are used to exchange Visual Studio content in the developer community. A .vsi file is a renamed .zip file that contains these components:
- An XML .vscontent file that describes the content.
- The content files.
Step 1: File è New è File
Step 2: Select XML file type from Template
Step 3: Add the files/files inside the <FileName> Tag as per given Schema. For schema information, see Visual Studio Content Installer Schema Reference
In my case the .vscontent file has included all the above examples:
<?xml version="1.0" encoding="utf-8"?>
<VSContent xmlns="http://schemas.microsoft.com/developer/vscontent/2005">
<Content>
<FileName>getCustomer.snippet</FileName>
<FileName>myconstructor.snippet</FileName>
<FileName>mycw.snippet</FileName>
<FileName>myswitch.snippet</FileName>
<FileName>propcs.snippet</FileName>
<FileName>singletonts.snippet</FileName>
<FileName>singletontswl.snippet</FileName>
<DisplayName>Sample Code Snippet</DisplayName>
<Description>A code snippet created for this example</Description>
<FileContentType>My Code Snippet</FileContentType>
<ContentVersion>1.0</ContentVersion>
<Attributes>
<Attribute name="language" value="csharp"/>
</Attributes>
</Content>
</VSContent>Step 4: Save the file with extension .vscontent like MyCodeSnippet.vscontent
Step 5: keep the .vscontent file in the same directory as the other files that are related to the community component
Step 6: Select the folder right-click, select Send To, and click Compressed (zipped) Folder. The selected files are compressed into a single .zip file.
Step 7: Rename the extension of the .zip file to .vsi
Step 8: Go to C:\...\My Documents\Visual Studio <version>\Addins\
Step 9: Paste the early created .vsi file into this folder. In my case I am using Visual
Studio 2008
Step 10: Now your newly created Code Snippets is ready to use inside Visual Studio
2008 Editor.
F. An example
Let us take an example of Singleton class which is almost used in every project. In this example I will create a code snippet, which will generate the code using the concept of Singleton class.
Singleton Example 1 :
In this code snippet the implementation is thread-safe. The thread takes out a lock on a shared object, and then checks whether or not the instance has been created before creating the instance. This takes care of the memory barrier issue (as locking makes sure that all reads occur logically after the lock acquire, and unlocking makes sure that all writes occur logically before the lock release) and ensures that only one thread will create an instance (as only one thread can be in that part of the code at a time - by the time the second thread enters it, the first thread will have created the instance, so the expression will evaluate to false). Unfortunately, performance suffers as a lock is acquired every time the instance is requested.
File name: singletontswl.snippet
Code :
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Thread safe Singleton Pattern with Lock</Title>
<Shortcut>singletontswl</Shortcut>
<Description>Code Snippet for a singleton class : Thread-safe with locks</Description>
<Author>Anand Ranjan Pandey</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>instancename</ID>
<Default>instance</Default>
</Literal>
<Literal>
<ID>instanceobject</ID>
<Default>Instance</Default>
</Literal>
<Literal>
<ID>lockobject</ID>
<Default>padlock</Default>
</Literal>
<Literal Editable="false">
<ID>classname</ID>
<ToolTip>Class name</ToolTip>
<Function>ClassName()</Function>
<Default>ClassNamePlaceholder</Default>
</Literal>
</Declarations>
<Code Language="CSharp" Kind="CData">
<![CDATA[
static $classname$ $instancename$ =null;
static readonly object $lockobject$ = new object();
$classname$()
{
}
public static $classname$ $instanceobject$
{
get
{
lock ($lockobject$)
{
if ($instancename$==null)
{
$instancename$ = new $classname$();
}
return $instancename$;
}
}
}
]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>Now we register this snippet using Code Snippet Manager and used in our singleton class as
After pressing Tab the end result is :
Singleton Example 2:
In this code snippet the implementation is thread-safe without using lock.
File name: singletonts.snippet
Code :
<?xml version="1.0" encoding="utf-8"?>
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
<CodeSnippet Format="1.0.0">
<Header>
<Title>Thread safe Singleton Pattern</Title>
<Shortcut>singletonts</Shortcut>
<Description>Code Snippet for a singleton class : Thread-safe without using locks</Description>
<Author>Anand Ranjan Pandey</Author>
<SnippetTypes>
<SnippetType>Expansion</SnippetType>
</SnippetTypes>
</Header>
<Snippet>
<Declarations>
<Literal>
<ID>instancename</ID>
<Default>instance</Default>
</Literal>
<Literal>
<ID>instanceobject</ID>
<Default>Instance</Default>
</Literal>
<Literal Editable="false">
<ID>classname</ID>
<ToolTip>Class name</ToolTip>
<Function>ClassName()</Function>
<Default>ClassNamePlaceholder</Default>
</Literal>
</Declarations>
<Code Language="CSharp" Kind="CData">
<![CDATA[
static readonly $classname$ $instancename$=new $classname$();
// Explicit static constructor to tell C# compiler
// not to mark type as beforefieldinit
static $classname$()
{
}
$classname$()
{
}
public static $classname$ $instanceobject$
{
get
{
return $instancename$;
}
}
]]>
</Code>
</Snippet>
</CodeSnippet>
</CodeSnippets>Now we register this snippet using Code Snippet Manager and used in our singleton class as
After pressing Tab the end result is :
That’s all for Code Snippets. Hope you will enjoy it.
How to use Code
Note: To use the sample example follow these steps:
- Unzip the folder MyCodeSnippets.zip any directory you want.
- Open Code Snippet Manager and add folder MyCodeSnippets
- Now snippets are ready to use.
Note: All above mentioned examples are included in MyCodeSnippets.zip file which you can download Here
Anand Ranjan Pandey
Thursday, August 20, 2009
Framework for .Net application rather then Visual Studio
From past months I've been researching in Spring.net framework to maximize the consistency, maintainability, reusability, and performance of any application while minimizing the repetitive boilerplate development tasks that can plague enterprise development.
For the .NET Framework platform, I've have found these 4 well known frameworks Castle Project, Spring.NET, Enterprise Library, and CSLA.
The Castle Project is perhaps best known for its Rails-inspired MVC framework, MonoRail. That being said, it has grown to include a full feature set of components useful at all levels of development. The Castle Project appears to be a popular and well-tested choice. If we compare Spring.Net and Castle things get trickier there is a lot of overlap in functionality between the frameworks, but they both do things a bit differently. Each one has some things that the other one doesn't. Both Spring.Net and Castle are modular and non-invasive so we can use only the modules that we are interested in and ignore others.
Enterprise Library is a set of integrated libraries produced by the Microsoft Patterns and Practices team or we can say, is simply a collection of useful "blocks”, where each block encapsulates best design practices. EntLib blocks do not overlap with Spring in any way, because they focus on things such as caching, logging, etc. where Spring focuses on providing a solid programming model and architectural foundation for your application. One area where might be quite abit of overlap is EntLib Data Acces Block and Spring.Data module, because they both provide an easier and more consistent way to write data access code. In cases like this, you really need to evaluate both options for yourself and decide which one works better for you. This would be a good choice for creating robust base class libraries while sticking with standard Windows Forms or Web Forms development for the UI.
CSLA is more about designing your applications using business objects (or domain model) and providing a patterns for persistence and location transparency of those objects. It is strongly focused on the business object layer and for that reason may not have quite the feature list of the others but is very mature, refined, and well tested. Unless we absolutely require some features not found here, this is one to strongly consider. The only negative I find is that it takes a long time to learn…. J and that it does require some fine tuning of the business objects at the end which is not really documented anywhere…. :(
Spring.NET is a reimplementation of Java's Spring Framework for .NET. It seems to be most strongly suited for full-stack development of web applications and while it may not yet have all the features of the Java version it has a very impressive feature set. This .NET version is relatively new but is quickly gaining notoriety. It is suitable for building enterprise .NET applications easier. Providing components based on proven design patterns that can be integrated into all tiers of any application architecture, Spring helps increase development productivity and improve application quality and performance.
Feature Summary:
Below is a feature summary. Please keep in mind that I am not an expert in any of these technologies so there may be some errors or omissions.
| | Spring.NET | Castle Project | | CSLA |
| Dependency Injection | yes | yes | yes | |
| Object-Relational Mapping | yes | yes | | yes |
| Transaction Services | yes | yes | yes | yes |
| Logging Services | yes | yes | yes | |
| ASP.NET Web Framework | yes | yes | | |
| Component Caching | yes | yes | yes | |
| Component Remoting | yes | | | yes |
What differentiates Spring.Net from many others is that it exists for both J2EE and .NET, and supports the same programming model on both platforms. This is very valuable in the enterprise environment because it makes developer transition from Java to .NET and vice-versa much easier.
Cheers by,
Anand Ranjan
Thursday, February 12, 2009
Try to find out the way to make urself happy...:) :) :)
A friendly Smile...
A word of Cheer... and then,
A special wish...
that you will soon be feeling well against the RECESSION.
What are you doing when you heard or discuss or watch the news about current Recession??? Are you buying into the idea that we are in Recession?
It is said that “Our deepest fear is not that we are inadequate. Our deepest fear is that we are powerful beyond measure.” And the truth is we are!
We’re definitely 100% responsible for what we decide to believe and 100% responsible for the choices we make consciously and unconsciously. You are so powerful, that if you say you can, you can, and if you say you cannot, you cannot. You are always right. So, you determine what recession means to you. Is it about disaster or opportunity?
If you are okay, everything else will be okay. It is not the other way around. You tell yourself, “When the economy is better, then I will be happy. When we have a new Prime Minister, then I will be happy. When the IT market comes back, then I will be happy.” Instead, learn to see the blessing behind every challenge. There is a gift for you hidden in the recession. The first step towards finding the hidden gift and changing any pain in your life is to be willing to just say “Thank you” to the recession and to any adversity in your life.
This is the time to think and act differently,
the time you need to trust that you can do it too.
This is the time to do what you love,
the time to allow your passion to be your guide.
Follow your gut instinct instead of your intellect, because no matter how many university degrees or how much money you have, your intellect doesn’t know anything. Wake up!! Exercise your FREE will, your FREE choice. Realize the power of your thoughts. You are the creator and you create through your thoughts. Your thoughts are like magnets. Ask yourself, “What am I attracting into my life right now?” and you will find out what you are thinking. Realize that your thoughts about the concept of Recession and how you’ve decided to relate to these very same thoughts are the reason why you’re reacting in a certain way. This way of being is causing you an inner recession. This is the only Recession that actually exists. There is no out there! Only the thoughts you choose to believe exist.
Ashok Bhaiya said,
Dear Anand,
dont worry..this is part and parcel of life :).
I have been through all these.
I would suggest you to do 2 things now.
1) save money. dont spend un necessarily.
all things start with money..so even if you loose job as long as you have some money in your account you wont feel much tensed :)
2) update your skill. Go back to basics..learn, update your knowledge.
3) search for new job..dont wait till last time...just start searching for new job.
Since you have experience in your resume..you dont have to worry...u r situation is better than many people.
Thank you Ashok Bhaiya.... to help me to "Find the way to make myself HaPpY".
Countdown begins for " BYE BYE RECESSION "
Cheers by Anand Ranjan
Saturday, November 8, 2008
Why Silverlight....why not Flash
I am a .NET developer and have always wanted to achieve things in Flash that couldn't be done in .NET but did not want to learn Flash. With Silverlight, I can use all the same programming knowledge for the backend code and just learn a new front end.
Intro :
But, is it the work of Developer….??
I will say that in 90% case answer is no, actually this is the work of Multimedia person (i.e. the person who having knowledge of Flash/Flex).
That means every time we have to depend on some person who knows Flash/Flex.
As I have little bit knowledge of both (Definitely not perfect in both …)), So I would like to share my experience.
Let us begin our journey :
Silverlight…. ??? Flash/Flex…. ???
Silver light is a new cross-browser, cross-platform implementation of the .NET framework for building and delivering the next generation of media experiences and Rich Interactive Application(RIA) for the web.
Till date, there have been two ‘major’ Silverlight releases by Microsoft: Silverlight 1.0, and Silverlight 2.0.
Silverlight 1.0 – Silverlight 1.0 applications are a mixture of XAML (Extensible Application Markup Language), HTML, and JavaScript. When a Silverlight 1.0 application is run in the browser, it invokes the Silverlight control, which in turn loads up the XAML file.
Silverlight 2.0 – Silverlight 2.0 is a superset of Silverlight 1.0 . The major difference between the two lies in the fact that Silverlight 2.0 includes a refactored version of the .NET framework with CLR 3.0. This change brings along a flexible programming model and has been designed from ground up to support .NET languages like C# and VB.NET, which in turn lets you utilize your .NET skills. Silverlight 2 also supports Dynamic Language Runtime (DLR) for compilation and execution of dynamic languages like IronPython, Managed JScript and IronRuby.
Silverlight 2 comes with a subset of the WPF programming model and includes support for user interface controls, layout, databinding, documents, media, and animation. Silverlight can also deliver high-quality video to all major browsers running on the Mac OS or Windows.
Silverlight 2 is just a 4.6 MB download but the benefits are huge. The download contains a stripped down version of the .NET framework in your browser. So there is no need to install the .NET framework on client machines.
Getting Silverlight :
Install Silverlight Tools for Visual Studio 2008 SP1 This add-on for Visual Studio 2008 SP1 or Visual Web Developer Express with SP1 will install the necessary Visual Studio updates, Silverlight project templates, developer runtime, and SDK. For additional information read the overview and the Silverlight 2 Readme Notes.
Install Microsoft Expression Blend 2 and then install Microsoft Expression Blend 2 Service Pack 1Expression Blend 2 along with Service Pack 1 allows designers to graphically create UI’s for Silverlight 2 applications.
Install Deep Zoom Composer This tool allows you to prepare your images for use with the Deep Zoom feature in Silverlight 2.
Download Silverlight Toolkit This Toolkit is a Microsoft project containing Silverlight controls, components and utilities that can be downloaded and used in your Silverlight applications. It includes full source code, samples and tests.
Advantages:
Animation
The Flash format itself has no notion of animation other than transformation matrices. You can apply a matrix to an element on a per frame basis to move it around. Want to move something across the screen in 3 seconds? Calculate how many frames 3 seconds will take, then calculate the matrix required for each frame along the way. Oh, and don’t forget that the player won’t actually maintain any frame rate unless you embed blank audio tracks, so that 3 seconds might turn out to be 2 or 6 or 5, it just depends what kind of mood the machine is in.
Silverlight supports the WPF animation model, which is not only time based instead of frame based, but lets you define the start and end conditions and it will figure out how to get there for you. No need to deal with matrixes. No need to calculate positions on various frames. It just works.
Shapes
Flash stores its shapes using binary shape records. In order to write shape definitions, you will need to either license a 3rd party Flash file format SDK, or build your own. It isn’t too difficult, but it does require a bit of a learning curve and the ability to manipulate things at the bit level, since shape records don’t align on byte boundaries. Needless to say, it isn’t the kind of thing most people can write and have all debugged in one afternoon.
Silverlight uses XAML. XAML is text based and can be output using a simple XML object. No need to buy special libraries to write files. No need to write your own libraries. Just stream some text to a file and you’re done--easily the type of thing that can be debugged and finished in an afternoon.
Text
Flash stores its font’s glyphs using the same exact shape definitions that are used for any other shape. The player itself does not understand TTF files, so you’ll end up digging deep into the Win32 APIs and the fairly vague definitions in the Flash file format documentation to come up with something that sort of does the trick. You’ll probably spend ages trying to deal with all the intricacies of fonts, because it turns out that typography is actually fairly complex… and you will have to deal with all those complexities yourself.
WPF/E lets you embed true type font information directly into your projects, and download that information with the downloader object. No need to do anything special. No need to handle anything yourself. It just works.
Video / Audio
Compare that to the Silverlight story. Silverlight implements industry standard VC-1 codec for video, as well as offering support for WMV and WMA. Just about everyone already has Windows Movie Maker, but if they don’t it’s not a big deal. Why? Because Microsoft makes available a free Encoder SDK for producing WMA and WMV. So, not only are you using formats that people are more likely to be able to encode themselves, but Microsoft also provides your product with SDKs if you want to do the encoding yourself. The best part about it is that Microsoft doesn’t rely on WMA/WMV licensing revenue to keep themselves alive, so not only is it easier to integrate, but it’s also cheaper.
Scripting
You can reuse C# classes from your tool inside your exported content. There is no development environment out there for creating real desktop applications which is based on ActionScript. If you go the Flash route, this means that all your classes and objects have to be written twice. You need .NET classes to handle the author time experience and Flash classes to handle the run-time. If you have server components, once again you need to switch back to .NET and throw out all the classes that the run time is using. For example, let’s say you are creating a tool that outputs rich media quizzes. With Silverlight / .NET, the same entity classes you use to deal with results in the player could be reused on the server side. With Flash, you’d have to write all that logic 2x and keep it in sync as your tool changes.
Tools
You can create Silverlight content with the same tools you use on a daily basis. Visual Studio.NET is by far the most powerful and most popular IDE. You can potentially have all the code for the server components, the authoring tool components, and the runtime/player components inside the same project. No extra skills required. No needing to hire some special Flash guru to do the graphics junk. Every developer can contribute to every part of your application.
Conclusion :
* Support for Mac, Windows and Linux in Firefox, Safari and Windows Internet Explorer
So just grab your hands on the new Silverlight.
Saturday, October 11, 2008
Who am I ?
For me its true that nobody travels in the road to success without a puncture or two, life is full of struggle, but I never use to say
" This was my fate, and is decided by destiny"
That's why I always believe on Myself. If I worry a little bit everyday and in a lifetime I will lose a couple of Years.......so, if something is wrong, I will try to fix it, and always train myself not to worry, because worry never fixes anything.
My life taught me Who I am.....
My creativity taught me Yes I can..... and
My interpersonal skills taught me Why not I.....
I enjoy each and every moment of my life with full of creativity and happiness. I am highly motivated, ambitious and enjoy working to deadlines. I can take up any responsibility and complete the given work successfully and able to work in a 24*7 environment. I believe that my commitment and hard work keep me enthusiastic to face any challenge in life will never fail me.
- My strong background of Computers in Master's in Computer Application as well as B.Sc (Computer Application) coupled with strong documentation skills enable me to manage
all clients requirements accurately at the level of business requirements.
- My good listening skill backed up with an effective client interaction and negotiation capabilities help me to analyze customer requirements and suggest solutions.
- My through understanding of the client requirements along with my technical skills help me to manage the Customer Service Executives in maintaining trace ability from business requirements to train executives about the business in the organization.
With the blessing of my parents, I try to express my creativity and feelings in front of the electronic world and want to create something innovative and challenging, hope you are the next person who encourage me in every manner for my bright and prospective future.
My name is Anand Ranjan Pandey and I am your chosen host.

Anand Ranjan Pandey
+91 94391 98772+91 97767 97053