Nandri(Thanks)
Sreenivasa Ragavan.
Bytes Matters
http://msdn.microsoft.com/en-us/devlabs/ee794896
Pull Vs Push [ Interactive vs Reactive]
IEnumerable and IEnumerator Pull-Based Collection
IObservable<T> and IObserver<T>. Push Based Collections
Duality
Next Blog Post we will see some sample programs using RX Framework.
Nandri(Thanks)
SreenivasaRagavan.
Suppose let say we have a UDT(User Defined Type) object called person which has the following property's Name,Phone and SSN. Here SSN is read-only properties. When you serializing this person object you get the following error.because XmlSerializer wont serialize the Private members.
To serialize the person object we can implement the IXmlSerializable Interface as shown below..
Now if you try serialize it will be serialized as XML with out error.
Here is the result
Nandri(Thanks)
Sreenivasaragavan
Silverlight 5 introduces more than 40 new features, including support for running Silverlight applications with desktop features in the browser, dramatic video quality and performance improvements, and features that improve developer productivity.
Nandri(Thanks)
Sreenivasaragavan.
ASP.NET Routing are generally used because they give you more control over your URI’s . Now let see how we can use this Routing to host WCF RESTful Service.
1) Create a WCF Service Application
2) Delete the .svc file
3) Now add the following <serviceHostingEnvironment aspNetCompatibilityEnabled="true" />to web.config file.
Next you need to decorate the your class as shown below.
Now add Global.asax file to your Service Project and define the One Private method called RegisterRoutes.
Now call this method in Application_Start.
Now you can browse the service as http://localhost:5018/SreeniRestSvc
Nandri(Thanks)
Sreenivasaragavan.
One of the best way to improve Application performance is to Cache Data which is frequently Accessed or Retrieved from Database so that we can reduce the trip to Database and we can minimize or avoid the DB operations. MS Velocity offers in-memory caching. In this blog I am going to show how to cache the some of the frequently access the data .
In this Exercise I am going to use MS Free Database Chinook (Album ) as my data model. This Database has bunch of tables but I wanted to cache Customer and Album Tables. Here I am going to create WCF Service which expose to operations which returns list of All Albums and All Customers. Before creating WCF service I wanted to give brief introduction on the Caching API’s we are going to use. Here I am going to use the following two Caching Services APIs
To Add Reference to our WCF project we need select it from GAC ( Global Assembly Cache ). we can not add reference like other Assembly . GAC is nothing but a windows file Folder which is created when you install .NET Framework and its located @ C:\Windows\Assembly to add reference
Here is the Caching API’s Classes and Methods which we will be using in our code.
Here I am going to define the WCF Service which exposes two operations GetAllAlbums and GetAllCustomers
Here is the Caching Library implementation
using PowerShell Cmdlet we can verify our cache services first let is check our Cache Host using “Get-CacheHost”
Get-Cache will displays the Cache Names
Get-CacheStatistics will give you the details about Cached item and Request Count etc..
Next Blog post we will see how to set Caching services in Web.config
Nandri( Thanks)
SreenivasaRagavan.
Windows AppFabric is set of technologies which offer to Hosting Services and Caching Services. In this blog post I am going show how to Install and Use Caching Services. Windows AppFabric offers in memory caching with Distributed and Multi cluster supports . Windows AppFabric aka “Velocity”.
There is two way you can install Windows AppFabric
1) Using Microsoft Web installer[http://www.microsoft.com/web/gallery/install.aspx?appsxml=http://www.microsoft.com/web/webpi/2.0/EnterpriseProductList.xml&appid=AppFabric]
2) You can download the bits from the following URL and Install http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=467e5aa5-c25b-4c80-a6d2-9f8fb0f337d2
Once you download and Run the Installer when you get to this screen where you will be configuring Caching Service.
After installing you will the following Features added to IIS Manager
First we need to set Caching Service Configuration provider here you have two options one is XML provider another options is SQL Server . This is just to store Caching Services Details like how many machines (Servers) in the cluster and their port numbers as shown below. I like to mention here one thing Windows AppFabric services wont store any Cache data in Database.
Here I choose XML is my Service Configuration provider so the configuration file stored in Network file share . Once you successfully installed. we can verify the Installation of Caching Services. First Launch the Power Shell Admin tool for Cache Services.
Now Type “Get-Cachehost” this command will tells the service Status .
Here I have created two CacheName Ragavan & Sreeni
To got Help for all Cmdlet you can type Get-Help *
Next Blog post we are going to use Caching API to store and retrieve data from Cache .
Thanks (Nandri)
Sreenivasa Ragavan
I Like to read MSDN Monthly Magazine and having a digital copy in locally makes me great. If you feel the same way I do please point your browser to the following URL and Download New and Old Magazines
http://msdn.microsoft.com/en-us/magazine/ee412244.aspx
Nandri(Thanks)
SreenivasaRagavan
In this blog Post I am going to build small Windows Phone Twitter Search Application . When we finish building then app this is how it looks
Here is the steps we are going to follow .
1) Create VS.NET 2010 Windows Phone Application .
2) Build XAML UI.
3) We are going to parse that result using LINQ TO XML.
4) Write Button click Event handler which will execute the Twitter Search API and get the ATOM format Result.
5) Store the result in our Model (Class which holds the following properties Date published, Title, Image Uri).
6) Bind to the View.
First lets create a windows phone 7 Application project and name it TWAPP.
The following XAML code builds Textbox and Search button where user enter search string and click Search button.
Next we are going construct the XAML which shows the user Search result .
Here is our MODEL
In Silverlight all calls to out side world is ASYNC. Now we finished building the app and ready to compile and run .
Now enter the some search string an click search button.
Nandri(Thanks)
Sreenivasaragavan.
Today MS Released Windows Phone Developer Tool . To develop Windows Phone 7 Apps.
please point your Browser to the following URL and Download the tool. http://developer.windowsphone.com/windows-phone-7/
Windows Phone 7 Application different Project Templates.
My First Windows Phone 7 App.
Nandri(Thanks)
SreenivasaRagavan
Here is the URL to Download http://windows.microsoft.com/en-US/internet-explorer/products/ie-9/home?os=win7&arch=b&browser=ie
My Blog browsed using IE 9.0
Nandri(Thanks)
SreenivasaRagavan.
In this blog post I am going to show how to setup VS.NET Environment to step into .NET Framework source code. To do this exercise let us create small VS.NET Application and add some code which uses any of the .NET Framework Library Functions here I am using LINQ.
This below source code just returns the even numbers from integer array and prints into Console .
Right click on the project and make sure you uncheck the Enable the Visual Studio hosting process option as shown below.
Now go to Tools option from main menu and select Options as shown below.
Now set the options as shown below.
Now press F11 and debug the app. ( First time you can see the Dialog windows which shows downloading the .NET Framework Symbol )
When I hover over evennumbers variable I could able to see the source code life for that as shown above. Now we are able to debug the .NET Framework source code same we do with our Custom code.
Nandri(Thanks)
SreenivasaRagavan.