background preloader

OWIN and Katana

Facebook Twitter

OWIN: Customizing the Web Server. Нужны ли нам ASP.NET и IIS? Или обходимся без них и создаём веб-приложение реального времени с использованием Katana, Web API, SignalR и AngularJS. ASP.NET - Getting Started with the Katana Project. When ASP.NET was first released back in 2002, times were different.

ASP.NET - Getting Started with the Katana Project

The Internet was still in a state of relative infancy, with around 569 million users spending an average of 46 minutes a day on about 3 million Web sites. These same measurements taken just 10 years later reveal an Internet of approximately 2.27 billion users spending a daily average of 4 hours on 555 million Web sites (see bit.ly/MY7GzO). Clearly, that growth spurred corresponding changes in the needs of application developers in terms of the underlying frameworks, tools, and runtimes they use to build and run Web applications.

Modern Web apps need to be able to evolve rapidly, taking advantage of many different components and frameworks—and they need a small footprint in order to run efficiently in the large-scale runtime of the cloud. Ensuring ASP.NET can meet these current and future needs is the core motivation behind the Katana project. 50 Extensions and Plugins for Extending Bootstrap. Bootstrap is already chock-full full of useful tools, extensions and components, and is more than enough to kick-start most web design or web application projects, but there will be times when the bundled basic components are not quite enough for what you need.

50 Extensions and Plugins for Extending Bootstrap

That is where this post comes in. We have assembled 50 extensions, plugins, addons and components that will allow you to extend Bootstrap even further. Rather than group the extensions and components into relevant categories, as we normally would, we have instead opted to create an A-Z listing, which should make it much easier for you to find the particular addon you are looking for. Everything you could possibly need is included below, from buttons, breadcrumbs and calendars, to tree menus, video players and WYSIWYG editors. If you feel we have missed anything please do include it in the comments below.

Using Bootstrap Typeahead To Filter A WebGrid. In this post I am going to combine a couple of previous posts to allow us to filter a WebGrid using Bootstraps Typeahead.

Using Bootstrap Typeahead To Filter A WebGrid

The Typeahead will work via an AJAX call to get search results. We are going to allow the user to select a number of different columns to filter on. We’ll also need to re-set the filter and ensure that the filter isn’t lost when sorting or paging. Here’s what our final output will look like You can find out more about the WebGrid here, we’ll be using the pager from this post and there is a post about the Typeahead here, you all need the database from the same post. Getting Everything Together. Cross-domain «ajax» — простое решение. В очередном проекте я столкнулся с необходимостью активно работать с кросс доменными запросами на ajax, тема, как я вижу на хабре особо не поднималась и не освещалась, вот и решил поделиться с читателями свои опытом.

Cross-domain «ajax» — простое решение

Using CORS in ASP.NET WebAPI Without Being a Rocket Scientist. If you have done any extensive work with AJAX calls, then the odds are that you have fun into an unfriendly (only for security purposes) mechanism that will have your request ground to a halt and its name is CORS (Cross Origin Resource Sharing).

Using CORS in ASP.NET WebAPI Without Being a Rocket Scientist

Using CORS. Introduction APIs are the threads that let you stitch together a rich web experience.

Using CORS

But this experience has a hard time translating to the browser, where the options for cross-domain requests are limited to techniques like JSON-P (which has limited use due to security concerns) or setting up a custom proxy (which can be a pain to set up and maintain). Cross-Origin Resource Sharing (CORS) is a W3C spec that allows cross-domain communication from the browser. By building on top of the XMLHttpRequest object, CORS allows developers to work with the same idioms as same-domain requests. Build Simple Web UIs with the Nancy Framework. C# Corner Build Simple Web UIs with the Nancy Framework 03/20/2013 Get Code Download Get["/"] = x => { var model = new ConfigStatusModel { Config = new ConfigInfo() }; return View["index.html", model]; }; With the Config module having a URL prefix of "/config," NancyFx will look for the module's views inside the "config" folder where my views are stored.

Build Simple Web UIs with the Nancy Framework

Jhovgaard.net. Nancy from an MVC Developer Point of View, Revision 2. By Endy Tjahjono.

Nancy from an MVC Developer Point of View, Revision 2

Last update 27 Jun 2013. Build Simple Web UIs with the Nancy Framework. C# Corner Build Simple Web UIs with the Nancy Framework Use the open source Nancy Web framework to expose a Web-based configuration UI for a Windows service.

Build Simple Web UIs with the Nancy Framework

Get Code Download. Dotnetcurry/SPA-Angularjs-ASPNET-WebAPI. Razor Rockstars. ServiceStack's new HTML powers - the website framework Razor Rockstars is a ServiceStack demo website showcasing ServiceStack's new MVC Razor Engine support and its enriched HTML story with multiple view engine support and No Controller / No Ceremony development options.

Razor Rockstars

In many cases we've gone beyond what MVC provides with many new and natural features optimized for developer happiness, fast iteration times and run-time performance, putting the fun back into .NET / Mono web development! Install via NuGet. Hosting your ASP.NET Web API Services without IIS. ASP.NET Web API was introduced as a framework for creating services over HTTP. However to serve up these services, you need an HTTP Server. Single Page CRUD Application (SPA) using ASP.NET Web API, MVC and Angular.js.

A Single Page Application (SPA) is a web application that fits on a single web page. In this type of application, the server provides static HTML views, CSS and JavaScript and the application then loads data by making Ajax calls to the server. All subsequent views and navigation occurs without a postback to the server. Interface Builder for Bootstrap. Philliphaydon.com. Posted on 08 Nov 2012 | NancyFX This has to be one of the most awesome features of Nancy, Content Negotiation. Recently added in 0.12, it gives you the ability to implement a single route that responds with different versions of the same document, without having to mess up your code with duplicate methods or conditional statements.

When doing this in ASP.NET MVC I would have to check the content type and decide how I want to respond to the request. This ended up making duplicate methods, one which would be used by a normal GET request, while the 2nd would be for an AJAX request. Or if it was similar, use conditional logic in the single method to decide how the action should respond... Nancy on the other hand supports Content Negotiation out of the box. Note: Sample taken from Nancy GitHub Repo.

Responsible Coder. I was keeping my eye on OWIN for some time now (since Mark Rendle’s interview in DNR in 2011, when he complained about HttpRequest and HttpResponse being sealed in ASP.Net and spoke about OWIN as alternative). I like simplicity of this interface, and I also like that Microsoft listened to community and provided Katana, their implementation of it (so now you can also run OWIN apps on IIS).

OWIN got to stage where it can be used for serious applications, there is already support for multiple frameworks, some of them being Nancy, Singalr and WebAPI, so you can now build pretty much anything on top of it, and being independent from IIS and all of its http modules, handlers etc has a lot of potential to perform better (given that you don’t need all of these features that asp.net provides, which is the case for most of applications).

Use OWIN to Self-Host ASP.NET Web API 2. This tutorial shows how to host ASP.NET Web API in a console application, using OWIN to self-host the Web API framework. Open Web Interface for .NET (OWIN) defines an abstraction between .NET web servers and web applications. OWIN decouples the web application from the server, which makes OWIN ideal for self-hosting a web application in your own process, outside of IIS. Software versions used in the tutorial Visual Studio 2013 (also works with Visual Studio 2012) Web API 2 You can find the complete source code for this tutorial at aspnet.codeplex.com. Create a Console Application On the File menu, click New, then click Project. Add the Web API and OWIN Packages From the Tools menu, click Library Package Manager, then click Package Manager Console. Davidwhitney/Nancy.ViewEngines.Razor.HtmlHelpers.

Donnyv/Nancy.BundleIt. Nancy from an MVC Developer Point of View, Revision 2. Katana Samples. Owin And Razor-enabled MVC Application Framework. Dmicic/Dmicic.Owin.RazorServer.