Creating a basic skeleton with the RAW stack

When I start with a new stack one of the first things I always do is create a really simple app to do something sort of meaningful. So lets do that with the RAW stack.   Just as a reminder the RAW stack is a combination of RavenDB, AngularJS and WebAPI. These three technologies combined make a pretty awesome combination for a developer wanting to make smart client side web applications and is using .NET on the server.   As the demo application I will be building is all about movie reviews and rentals lets start my a very minimalistic, … Continue reading Creating a basic skeleton with the RAW stack

Introducing the RAW stack

With this post I am introducing the RAW stack. Why the RAW stack? Well it is kind of the equivalent of the MEAN stack. Not that there is anything wrong with the MEAN stack, quite the opposite, but being a .NET developer I really like to keep using .NET where it’s strengths lie and where it is suitable. Now there are plenty of places where it isn’t but C# on the server is still quite awesome.   So what is the RAW stack? Basically the RAW stack consists of three parts. RavenDB AngularJS WebAPI   Why these three? RavenDB Well … Continue reading Introducing the RAW stack

Paging through data in RavenDB

RavenDB has a very nice feature in it being safe by default and returns just 128 documents. Now you can override these safe defaults but it is very unwise to do so. And even if you decide to do so are you really going to show a million customers to your user at the same time? I would guess not as the user would not be really happy with the response or the speed of it. In most cases using paging is a much better solution.   Paging through a RavenDB result set It turns out that paging through a … Continue reading Paging through data in RavenDB

Practical HTML5

The slides from my presentation on Practical use of HTML5 for the DotNed user group.   Practical html5 from Maurice Beijer     The source code can be found here.   There is an online demo version hosted on Azure websites here.   Enjoy!

Enabling Tincr on Windows 8

Some time ago I posted a blog post on Tincr and live reloading of CSS/JavaScript in Google Chrome. This works really well with one exception, on Windows 8 it will not install. When you try Chrome shows the following error message: This application is not supported on this computer. Installation has been disabled. The Chromium team has acknowledged this as a bug but it still needs to be fixed.   The interim solution Fortunately Lauricio Su came up with a nice workaround and posted it in the Tincr discussion group. Basically his solution is to run Chrome in Windows 7 … Continue reading Enabling Tincr on Windows 8

Querying RavenDB databases

As we have seen in previous blog posts getting data from a RavenDB database is easy. Either use the IDocumentSession.Query<T>() function to load a series of documents or the IDocumentSession..Load<T>() function to load a document using its identity. However sometimes we want more control over what we want to load. It turns out this is rather easy as the IDocumentSession.Query<T>() function returns an IQueryable<T>, actually it returns a IRavenQueryable<T> to be exact but more about that another time. Querying the database As IDocumentSession.Query<T>() return an IQueryable<T> we can just start composing queries just as we can with EntityFramework or another … Continue reading Querying RavenDB databases

Using RavenDB with Azure websites

In a previous post I explored various options of hosting RavenDB. While using RavenDB as a Windows Service or hosted in IIS is probably the best way to go in most cases there are a number of cases where the embedded option is great. And one of the places where I really like the embedded option of hosting RavenDB is when doing simple standalone websites. And with the new Azure website option that is a great way to host them.   The code is real straightforward and just like before. I am using a DataDirectory option when creating the EmbeddableDocumentStore … Continue reading Using RavenDB with Azure websites

Different options for hosting RavenDB

In the previous blog posts about RavenDB I used the Raven.Server.exe to create a database server. Just running raven.Server.exe and connecting to it is fine for development but certainly not our only option.   Running RavenDB as a Windows Service Once you have the RavenDB.Server NuGet package you can install it as a Windows Service. This means it is always available and running whenever you need it. Certainly a nice and simple way of using RavenDB if you do so more often.   Installing is easy, just run Raven.Server.exe /install and it installs.   Running as an IIS application Another … Continue reading Different options for hosting RavenDB

Using RavenDB with ASP.NET MVC 4

Some people might have wondered why I used ASP.NET MVC 3 in my previous blog post. The reason is that the RavenDB.Client package uses Newtonsoft.Json and ASP.NET MVC 4 also has a dependency on Newtonsoft.Json. In itself this isn’t a problem except that RavenDB requires Newtonsoft.Json version 4.0.8 and ASP.NET MVC 4 ships with a much newer version of Newtonsoft.Json, to be exact version 4.5.6. The result is that trying to Install-Package RavenDB.Client produces the following error: Install-Package : Updating ‘Newtonsoft.Json 4.5.6′ to ‘Newtonsoft.Json 4.0.8′ failed. Unable to find a version of ‘Microsoft.AspNet. WebApi.Client’ that is compatible with ‘Newtonsoft.Json 4.0.8′. … Continue reading Using RavenDB with ASP.NET MVC 4

Getting started with RavenDB in an ASP.NET MVC application

RavenDB is one of the newer document type databases that is conceptually comparable to MongoDB or CouchDB. One of the nice thing about RavenDB, at least for a .NET developer, is that is has been developed with .NET in mind from the start. And this makes it really easy to get started with. In fact it is so easy to get started with that it surprises me that not everyone is using it.   One of the things that attract me to document databases like RavenDB is the fact that they are really fast and schema free. This means that … Continue reading Getting started with RavenDB in an ASP.NET MVC application