Unfortunately, I was building the site instead of writing. I don't have time to go back and re-do the completed parts of the contest (which stinks because I'd love to write about knockout.js/SignalR/Azure Websites/Azure SQL). Also, the app doesn't even apply to the last 2 challenges since I'm not a virtual machine and I don't support mobile. Needless to say the contest is a wrap for me!
I just wanted to make an update for anyone interested in the initial idea; I think I've delivered what I promised and more!
There isn't really a killer code snippet sharing site, and definitely not one that has as many language integrated features as what I'm planning to build in a specifically C# snippet sharing site. The initial release will have syntax highlighting, intellisense-like documentation on hovering for built in types and methods, and real time updates with WebSockets.
The goal is to make a code snippet sharing site for C# with enough C# specific features to stand above other snippet sharing sites.
Here's an example of a bit of pasted code with code formatting. All of the data is sent to a SignalR hub, run through Roslyn, and the nicely formatted HTML is sent back.
Snippet sites like github's gist are excellent, but I'd like to expand upon the code snippet uploading model by adding features that work specifically with C#. I'm hoping this will allow users to analyze short pieces of code more easily than sites that are no more than a text dump of the code you pasted in. Being able to hover over a Base Class Library or Framework Class Library type and seeing the documentation is something I've never seen on any site.
There will be enough social features to make it an enjoyable site to spend some time on (and hopefully learn) but not so social it's overbearing on the experience of reading useful code.
I'd also like to be able to allow users to search by language feature / usage. (Example : show me all snippets that use implicitly typed local variables by utilizing 'var')
A snippet sharing site (with Visual Studio-like features) would not be very feasible without the creation of Roslyn. Roslyn is the white-boxing of the C# compiler to allow you to write code that makes sense of C# code. I've used Roslyn in the past to write a Visual Studio plugin that will find opportunities to make your code more concise and refactor out methods.
Why Windows Azure
WebSocket support, no upfront cost, and no server configuration are the major reasons I chose Azure. Having to worry about security only at the application level is a major plus for me as well.
Azure SQL Database
Azure SQL Database will be utilized as the data store. The confidence of security out of the box (IP restricted by default), hot standbys in the same data center, and the fact that Azure SQL database is mostly compatible with SQL Server 2012 sold me on it. Being able to deploy to a non-Azure environment gives peace of mind, even if it will likely never happen.
Libraries/Frameworks to be utilized
- ASP.NET MVC 4
- SignalR (hubs)
- Metro UI CSS
- Entity Framework 5
Okay Final Update screenshot before the next leg of the contest. Can't wait to deploy to Azure!