I suggest you ...

C# to JavaScript with AJAX, Client/Server Pure C# coding support

Prerequisite for this idea is first have C# to JavaScript conversion (I think this is already out like bridge.net). The goal is keep all code base in C# and be able to put both client and server side functionality in single class (viewmodel).

In ViewModel Class definition, use compiler directive to denote if the whole class or part of it is available in client side as well. e.g. [Available: Client|Server, Compatiblity: JavaScript]

Now, this class will work on server side just like it works now in MVC project to handle any server side activity and bindings to Razor/CSHTML code.

Plus, the part that is denoted as "client" converts to JavaScript and is available at client side in javascript form and all bindings in CSHTML still BINDS (!!!!! like javascript frameworks like angular). client side javascript will have AJAX functions to make all things work in client side.

With this approach,
- everything is in C#
- strong client side bindings. no need to use javascript frameworks
- reduce complexity
- Rapid application development

3 votes
Vote
Sign in
(thinking…)
Password icon
Signed in as (Sign out)
You have left! (?) (thinking…)
MANDEEP SINGH shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

0 comments

Sign in
(thinking…)
Password icon
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base