Must-Have Visual Studio Extensions

I’m just setting up a new dev box now and there are always some things, like extensions and tools, I feel they are a must-have for Visual Studio 2010 devs. Some of these extensions like the Web Essentials have already made it to Visual Studio 11 (still in Beta), but I still wanted to share my preferences for my must have VS extensions:
  1. ReSharper
  2. NuGet Package Manager
  3. Productivity Power Tools
  4. Web Essentials
  5. Image Optimizer
  6. Javascript Parser

There is a cool Channel 9 vid where Mads Kristensen does a walkthrough of some of the goodies in his Web Essentials and the Image Optimizer. If you are in the web dev space, you should check it out: http://channel9.msdn.com/Shows/Visual-Studio-Toolbox/Visual-Studio-Toolbox-Web-Essentials-and-CSSCop

Killing all Cassini(s) with a .bat file

When working with Visual Studio and using the Web Development Server (aka CASSINI), there is often the repetitive task of killing the Cassini processes before running again. This happens especially if you are working with in-proc caching on IIS, or simply have many web applications in your solution.

What I do is run a simple bat file that automatically kills all the Cassini Web Development Server instances, that way if I need to make sure I’m using uncached data I just run it and keep on doing what I was doing before, instead of manually scanning my taskbar.

So, crack open notepad, write the following and save it as “CassiniKiller.bat”

[sourcecode language=”cpp”]
taskkill /F /IM "WebDev.WebServer40.exe"
taskkill /F /IM "ProcessInvocation86.exe"
taskkill /F /IM "iexplore.exe"
[/sourcecode]
Now you won’t have to play cat and mouse with the Cassinis no more; now you just KILL’EM ALL :-)

In the Box MVVM Training

Check out the free In-the-Box full MVVM training extension for VS 2010. Great resource to learn MVVM!

MVVM IN THE BOX

Installing and using FxCop

This article is supporting the article “Definition of DONE” with regards of code analysis and best practices.

FxCop is an application that analyzes managed code assemblies (code that targets the .NET Framework CLR) and reports information about whether the assemblies are abiding by good design guidelines and best practices. Things like architectural design, localization, performance, and security improvements are among the many things the tool will check automatically for you and give you a nice detailed report about its findings. Many of the issues are related to violations of the programming and Microsoft guidelines for writing robust and easily maintainable code using the .NET Framework.

On the home page of the tool says that “FxCop is intended for class library developers“. Wait what? Class Library Developers? WTF, whatever…the fact is that the tool is good for any type of managed library, including service libraries, winForms and WPF projects. If it looks like a DLL, smells like a DLL, and it has extension “*.dll” or “*.exe” => FxCop will screen the hell out of it.

I also find FxCop a very useful learning tool for developers who are new to the .NET Framework or who are unfamiliar with the .NET Framework Design Guidelines. There is plenty [Read more…]

Configuring ReSharper Code Analysis

This article is supporting the article “Definition of DONE” with regards of code cleanup.

Having your code CLEAN is not only elegant, but also a good practice and habit to have specially if you work in a team environment. Every developer have their own styles, likes and dislikes when it comes to code formatting, ordering, grouping regions, etc; precisely because of this, is always good to get the team together, crack-open some Red Bulls and come up with your code standards and practices (and while you are at it, put them up on the Wiki). You can then use automation tools for your IDE to speed up the process and make sure everybody is generating and organizing their code files using the same rules. In my case, at work, we are living in the .NET world and ReSharper 4 or later in Visual Studio does the trick perfectly for us.

ReSharper has a feature called “Code Cleanup” that accomplishes exactly that: it automates the suggestions from the “Code Analysis” and applies them to code files. You can remove code redundancies, reorder type members and remove redundant using directives among many other things. This is not the only one of the many useful things ReSharper offers to .NET developers, but is certainly one I use the quite often. Let’s see how it works.

At the time of this article I’m using VS 2010 and ReSharper 5.0, so all images are representative only of such software and version.

Make it perfect in one machine

The first thing is to configure all the settings in ReSharper on one machine and then share your settings. There is plenty to go through and each team may have different requirements. For example, by default ReSharper has the inspection severity on the unit “Redundant ‘this.’ qualifier” to “Show as warning” and in my team WE DO LIKE to use the ‘this.’ qualifier regularly, so we changed the R# setting to make “Show as hint“. Things of this magnitude does not impact performance in code execution, the compiler simply ignores it; and they are more of a “style” type of inspection you can always tailor to your specific needs.

Once you have your Dev Box all configured, simply export your settings so the rest of the team can use them.

You can download the style we are currently using HERE.

That is the official way of sharing things using ReSharper, BUT… there is a small problem: that only shares [Read more…]

Ahhhh…. RIA Services!!!

OK, so I started going down the road of creating a silverlight web application using the Silverlight Business Application template of Visual Studio 2010. After about 4 hours trying to configure things straight with the authentication credentials and styling on the application, I decided to give up and start with my own WCF-from-scratch entity service layer to serve data to my clients. Cheez, sometimes you really need simplicity. RIA Services provides a lot of nice wrappers with the Domain Services WCF wraps, but the template itself is not very easy to adapt to your own model. Maybe later I’ll take a second look at the RIA template with VS 2010, but for now, I’m going rogue old style project by project.

New product coming…

I’m starting a new project/product now. Let’s see how it goes, I have very high expectations with this new product and I’ll let things slip thru as it takes shape. I still have to make a new company for it, so I can get some tax benefits too. I keep postponing the company creation thing for tomorrow and then for tomorrow. One more time, I’ll do it tomorrow (and this time I’ll really do it).

I’ll kick things up with .NET 4.0 and some Entity Framework. This is my first time working with the ADO.NET entity framework and I like very much what I’ve seen so far. Initially I thought to use something different from .NET, like RoR (Ruby) or Django, the Python Web framework; but I ended up going back to the land I know the best: .NET world. The reason was simply the speed at which I can work and produce code is important at this time, since I’m the only one writing code on this thing.

I’ll try to keep posting about my progress here and the new challenges I face as I move forward.

 

SharePoint? What is that?

The first questions people ask themselves when they hear the SharePoint Buzz for the first time is What the heck is SharePoint? I will explain in a friendly and simplistic way what SharePoint is, and how it has fold out to be one of the most powerful and fast growing software solutions in the history.

Coming up:

  • What is SharePoint?
  • How exactly is SharePoint different from any regular web site?
  • How can SharePoint help you in your bottom line?
  • Conclusions

What is SharePoint?

From the technical-friendly point of view SharePoint is a software ecosystem formed by many different Microsoft software products. Microsoft indifferently refers to it as Microsoft SharePoint Products and Technologies. SharePoint (aka SP) targets the space of web collaboration functions, content and document management, search and social networking in one centralized solution that offers a plethora of very powerful business applications that are deeply tight to the already popular Microsoft Office applications.

From the end users perspective SharePoint is a web site (web application) that allows users to collaborate and share information, documents, photos and other media rich content directly from the web browser without needed to have any technical skill. Simply by using tools they already know like Microsoft Word, Excel, Power Point, InfoPath and such, users can create very rich documents and have them broadcast to a large audience with the click of a button.

Another important notation to make is that SharePoint is a cross platform product. That means SharePoint, being a browser based tool, can be experienced from many different operating systems like Windows, Mac OS-X and Linux systems. Although SP is a cross platform tool, as of today’s official product (MOSS 2007) there are a few rendering abnormalities with some specific content in browsers different from Internet Explorer. Users accessing SharePoint sites with the popular Firefox browser, Safari, Opera and Chrome to name a few may experience that some controls and parts of certain pages will be rendered incorrectly in the page. This issue is not very common and will not affect the functionality and power SharePoint brings to its users. SharePoint 2010 is in beta stage as of the writing if this article and the SP Team announced most of the browser compatibility problems from previous versions will disappear in the upcoming release.

Browsers in SharePoint

If you are interested in diving a bit more into the browser war, SharePoint official [Read more…]

SQL Server Reporting Services (pt 1)

Capture

SQl Server Reporting Services (SSRS) is an ASP.NET report generation software system from Microsoft. It’s the strongest competitor of the well-known Crystal Reports solution. This article will present an introduction to SSRS and provide the basic concepts, architecture and definitions that will hopefully get you started with SSRS.

One of the main advantages of SSRS is its ability to offer a server-based reporting solution. What this means is that the report definitions of your reports will be stored remotely in a SQL Server database promoting a more centralized storage, sharing and administration of your reports. This is a tremendous advantage that reduces the deployment footprint, improves maintainability of your application and reduces its size considerably (report definitions can be huge in some cases). All this is possible because you do not have to deploy the report definitions in alongside your application.

SSRS also offers client-side reporting on top of its server-side reporting power. You can use SSRS reports the old-fashion Crystal Reports way, for scenarios where your application is going to be running in standalone mode and won’t be connected or accessing a DB.

DEFINITIONS and IMPORTANT SSRS TOOLS

Report Definition

We’ve been talking about report definitions, but what exactly is a report definition? A report definition in SSRS is a file in the File System with an .rdl extension. RDL stands for “Report Definition Language”. This file contains the data and data source(s) used by the reports as well as how this data is actually presented to the user. This file is a XML file that can be created or edited on any simple text editor (although I wouldn’t recommend that).

SSRS supports a wide variety of data sources for its report definitions. You can connect your report definition to SQL Server, Oracle, Access, DB2, OLE-DB, customer .Net classes that represent data sets and even Web Services (more on that later).

The other part of the report definition is the actual layout and display information of the data. SSRS reports can be organized in a variety of ways and support a plethora of reporting objects like Charts, Graphs, Drill Through and Drill Down among others. All this information about how the data is going to be displayed is also part of a report definition.

Report Server

Once you’ve completed your report definition, you must deploy it to the Report Server. The Reports Server manages the reports and is primarily responsible for maintaining the metadata of your reports such as persistence of the reports’ connection strings and underlying data sources, cache versions and other things of that matter. The Report Server maintains this information in various SQL Server databases that are defined when configuring the report server.

Report Manager

The Report Manager is a web-based user interface for viewing and organizing reports via a web browser. This application requests reports information from the Report Server and displays information to the user.

Report Manager [Read more…]