As I am new to .Net Framework & ASP.Net MVC, I was looking in to various articles that would give clear step by step instructions as to how to add localization to ASP.Net MVC Projects. Especially, localization of string resources.
Here is a fantastic article on Localization in ASP.Net MVC projects.
Thanks to the author.
I had a list of tags for a particular user. I wanted to show only unique tags. I initially thought there would be something an inbuilt ‘distinct’ operator in Linq. Unfortunately not. I then discovered the Distinct() function. But it doesn’t support filtering the results by a particular column.
Thanks to this StackOverflow question that set my direction. It says that I must use the ‘group by’ operator, which I did.
Following is the code that I ended up with:
//distinct tags for a particular user
var tags = from t in _db.Tags
where t.UserId == userId
group t by t.Name into g
Since the query returns a group, we must select the first item in the group. Hence FirstOrDefault().
I was happily working with Entity Framework 1 until I read at several places about its lack of important features that are normally expected from an ORM framework. I started thinking seriously about upgrading to Entity Framework 4 (yes, the next version after Entity Framework 1) after I read this No Confidence letter. It lists all the issues that EF1 has and also suggests improvements. Several architects signed it.
So I upgraded to Entity Framework 4. This required me to upgrade my projects to Visual Studio 2010 & .Net Framework 4. Along with this, I also upgrade my MVC 2 project to MVC 3 with the help of this article.
Although POCO & Persistence Ignorance are the two most-liked features, they did not interest me because I had already generated the Entity classes from the database in EF1 and mapped them to my own model. What interested me was Lazy Loading and Foreign key association.
Entity Framework 4 addresses several issues and it has undergone a major rework. Worth upgrading.
When developing a RESTful Web service in ASP.Net MVC I was looking for a HTTP Test client that I can be used to test the RESTful API that I had created. It is easy to test HTTP GET with a browser. What I was looking for in the tool was the ability to HTTP POST/PUT/DELETE to any Url. Thanks to Stackoverflow where chris recommended a fantastic freeware tool called Fiddler
Definition from Fiddler’s website: Fiddler is a Web Debugging Proxy which logs all HTTP(S) traffic between your computer and the Internet. Fiddler allows you to inspect all HTTP(S) traffic, set breakpoints, and “fiddle” with incoming or outgoing data. Fiddler includes a powerful event-based scripting subsystem, and can be extended using any .NET language.
Piers Lawson wrote excellent series of articles to guide you to write RESTful web service using ASP.Net MVC framework.
There are several parts (24 at the time of writing this post). But I think the first 12 parts are good for beginners to start with.
Part 1 – Part 2 – Part 3 – Part 4 – Part 5a – Part 5b – Part 6 – Part 7 – Part 8 – Part 9 – Part 10 – Part 11 – Part 12
In order to create a Web API for one of our products, I am learning about RESTful Web Services.
If you are just starting on REST, then here is the link that explains REST very clearly: How to Create a REST Protocol
To supplement this it is important to know the Common REST mistakes that developers make.
One of my projects wanted me to look for a good software to compare and synchronize Microsoft Sql Server databases. Here is a list of free and commercial tools. I have not installed and tried all of them so I cannot tell which is the best. Thanks to my colleagues who had given me links to some tools.
RedGate – SQL Compare seemed to be the leader. If you are looking for a free tool then you can try Open DBDiff. We wanted a tool that can help use copy diff data between the databases being compared. This is what “Scripting” means in the below table. We couldn’t find any free tool that can compare data and also generate script for migration. Thanks.
I have been using a very interesting cross-browser testing tool called Adobe BrowserLab
Adobe Browserlab is a web hosted service that lets designers view and test web site designs on multiple browsers and operating systems for compatibility before publishing.
It supports following Internet browsers: Firefox, Internet Explorer, Chrome & Safari.
When multiple developers work on a single website project it is obvious to use a source control software such as SVN, CVS etc. But you should do it even if you are the only developer working on the project.
Why? Source controlling helps an SEO expert to analyze the impact of a change on website traffic.
Imagine that you have modified some pages of your website (page title etc). After few days you wonder why the sales have dropped. You have totally forgotten the last changes you made to the website. Your source controlled website will help you to track every change made to it. You can easily recover back your sales.
The Association of Shareware Professionals has renamed itself to the Association of Software Professionals (ASP).
Details of the name change can be found here.
I have been a member of ASP for many years now. If you are running a software company then I strongly suggest that you join the ASP. The members’ discussion group (newsgroup) will give you valuable tips for marketing your software, SEO, software registration, protection, new product development, product ideas, website feedback, product review etc.
Moreover, members of the ASP offer their products at discount price to other co-members. I take this benefit each year and save hundreds of dollars.