Skip to main content

Razor Websites, lightweight C# web coding

I was exploring around github, and I stumbled upon an interesting project called Miniblog which was a lightweight blog engine written in c#. The thing that immediately stood out to me was the lack of a .csproj file.

As I dug around the code I realized this was not a Web App, which most of us were familiar with, but a websites project. I then suddenly realized that the whole thing only used razor!

I am a huge fan of Nancyfx because its much more lightweight than the MVC framework created at Microsoft. To say the least I am a massive fan of small tools, and micro frameworks. So when I realized this whole thing was powered by razor only I was immediately impressed.

I decided to dig around on the internet to see if anyone else was talking about this. I found out quickly that it has been possible for some time, but I didn't find many references about it.

The one thing that bummed me out about the Miniblog example was that it was not a web app. You can use nuget packages will websites, but you cannot make references to other projects in the solution. This was a problem for me, and unlike websites, web app's are precompiled which reduces application startup time.

Continue Reading

Moving from beta 7 to beta 8 in ASP.NET 5 (MVC 6)

So Beta 8 was recently announced, and I thought I'd update DotNetMashups to beta 8.

In case you havn't been paying attention, recently it was announced that helios was no longer a thing. Helios was the loader for ASP.NET 5 in IIS. Instead they are using the http Platform Handler to proxy the connections to kestrel.

So I thought that this was going to be a difficult update. I loaded the announcements repo in my browser and got to work. You can view the Pull request here.

Continue Reading

How the ASP.NET team made the web framework I have always wanted

So I know I do a lot of blogging about C#, or JavaScript, but I actually do a lot of nodejs apps as well as other languages. For a very long time I have not found the stack of my dreams. .NET has always been very close but there were multiple things about the app model that I was not a fan of. I think NancyFX has been the closest framework to my dreams in .NET land.

Continue Reading

Bringin' turbolinks to .net

For a while now I have been playing with rails, and rack webapps. If you are not familiar with these, they are webservers created in ruby. One of the features I ran into during my journey into ruby land is Turbolinks. Incase you are not familiar, Turbolinks is basically a simplified pjax, with a lot of flexibility. When you click on a link in a page with turbolinks, the link action is hijacked and the target page is loaded via ajax. The result of the ajax call (which is presumed to be html) will replace the document of the body tag. At the end of the day its a technology to load your server side pages via ajax.

Continue Reading

StatsN a modern statsd client for dotnet core, and dotnet 4.5

tl;dr click here

When we talk about capturing metrics in applications. One server/service that constantly is in all conversations monitoring, is statsd. Incase you have never heard of it, statsd is a udp/tcp server that you send your in-code metrics to. These metrics get aggregated by statsd, and are forwarded to various backends. Some backends are services like librato or sumologic. Other times you are sending metrics to time series databases such as graphite or god forbid influxdb.

This boils down to in code you can say "log whenever this block of code is hit" or say "measure how long this function takes to execute". These stories come together to form pretty graphs, and rich alerts. All of this enabled by statsd.

Continue Reading

See all tags.