sergeyt / Owin.Routing

Simple routing for OWIN applications inspired by express.js
MIT License
12 stars 4 forks source link

Decouple from IIS #11

Closed tidyui closed 9 years ago

tidyui commented 9 years ago

To remove the dependecy on System.Web, wouldn't it make more sense to implement the router as a middleware that checks incoming requests for the registered routes? This way you should be able to make a simple implementation completely without dependencies on IIS.

sergeyt commented 9 years ago

@tidyui this is not possible now since router is based on System.Web.Routing, but it is feasible with own routing engine implemented inside package or embedding/adapting asp.net 5 router.

unknownguy commented 9 years ago

Isn't possible to use Microsoft.Owin.Host.SystemWeb for route handler? Just started to dig this so what I say might be out of this world ...

sergeyt commented 9 years ago

@unknownguy Microsoft.Owin.Host.SystemWeb assembly is used for hosting OWIN apps in IIS and it depends on System.Web, i.e. this does remove System.Web dependency. In fact it is easy to implement custom URL matching using regular expressions. Let me know if you guys really need this package without System.Web dependency.

unknownguy commented 9 years ago

No having to be depending on System.Web would make this lighter. In my case I need this to be fast and light. My understanding is that there are a lot going on in System.Web.

tidyui commented 9 years ago

For me personally, the only reason for using OWIN in the first place is to be decoupled for IIS and System.Web, thus making the application future proof towards the upcoming ASP.NET vNext and making it possible to host the application in for example Katana.

That's the background for me creating the issue!

sergeyt commented 9 years ago

Sounds reasonable, I'll try to implement simple URL matcher this week (maybe this evening), hope that this package will be used in more than one real app.

sergeyt commented 9 years ago

@tidyui, @unknownguy 60a1f25 removes dep on System.Web modules, but URL templates syntax is limited now, but this simple syntax is usually enough for most of REST APIs with simple design.