I’m working on a Webforms project and I was looking at implementing node.js and issnode.
We are using:
- Web Forms
- IIS
- C#
- Entity Framework
- SQL Server
We have a page that takes a while to load and were looking at ways to improve its speed. There are a few counts that are being displayed on the page that are useful but are causing the page to load slowly. (We are displaying the total # of tasks, # of people in a group, and number of groups).
I was thinking that I’d be able to directly call my c# code from the node.js file. From the examples I’ve seen and what I’ve read it doesn’t seem that is the solution I should be looking for. Since we are using EF and I’m not writing SQL queries it looks like I should be interacting with services.
So my question is, can I use Node.js to call my C# methods?
Your question is a bit obscure so I’m going to pull out what I believe is the gist:
I honestly don’t know if this possible, I doubt it, but I’m not curious to figure it out because it’s a bad idea.
Absolutely, except EF nor SQL have absolutely nothing to do with why you shouldn’t do this. I know that this can be a mental shift, especially in the .Net realm, but Node does exceptionally well at encouraging and empowering the use of micro applications that handle very specific tasks (think geocoding, analytics, timecode lookup, indexing, searching, notifications, etc etc) that can then be incorporated together via service calls or other mechanisms.
I haven’t used .Net or EF in pretty long time but if I were to guess, I’d suggest you start by profiling this. I’d almost be willing to bet that you have an N+1 (or worse) problem that could easily be remedied.