Wrapping Asp.net MVC with Nodejs for Development
With
Asp.net 5 around the corner I get all the nodejs support I could
need, but convincing a team to get on board with early technology is
difficult. So what I'm playing around with nodejs projects and what
I'm doing with them is wrapping them around Asp.net MVC 5 projects.
Having all my front-end taken care of outside the Asp.net MVC project
and then severing the dependencies up in a single file. I think this
is the best approach and will meet future solutions without breaking
things. I'm still using Asp.net MVC's bundle feature but for personal
JavaScript files I create. Nuget doesn't have that feature out of the
box for Asp.net MVC applications so for now this helps adapt to the
solution with taking advantage with npm packages.
Side Note
I'm
also looking at is using Typescript + Typelite. I'm not
completely sold on typescript but I would highly recommend
using typelite if
you do. Synchronizing fronted model with back-end model is extremely
important to me. Combined both approach I think it might help
my work load a lot, doesn't simpler but allow me to focus on using
packages and treating my own javascript files a lot like third party
packages. The best place to look out for all these idea is my
catalog-demo on github.
I
think it would be interesting to use node as a stand alone site and
have a separate Asp.net site (something like a WebAPI service).
Taking a complete project in that direction would be great if you had
you're team seperated from front-end to middle tier.
Resources
Installing and Running node.js applications within IIS on Windows -An interesting idea but not doing