-1

Obviously i failed at clearly communicating my problem so i'm re-writing to try again.

I come from a front end HTML/CSS/JS designer envirnoment. As such i'm very used to writing my (sometimes highly stylized and interactive) projects without any server side functionality to "build/configure/assemble pages" (Web based interactive CBT's which are delivered by a SCORM LMS). As such i'm having trouble converting my workflow to one that enables me to utilize asp.net server side capabilities.

I use a lot of JavaScript to respond to user interaction, process input and when needed manipulate page content.

What i don't know is how i can take my pretty much 100% client side content and add support for occasional calls to the server without having to rebuild the entire site.

WinForms seems want to use form runat="server" and tags for everything causing page refreshes and less that maintainable HTML output.

WebApp MVC (razor) seems to require me to rebuild everything with more server side declarations all over the place and obfuscating (for me at least) the rather simple architectures (UI | Controller | Logic) I've been using for several years now.

The closest methods i can seem to find that hint at solving my need is AJAX with JSON calling to codebehind webmethods that use run-time compilation. I've used this in the past once from dreamweaver/notepad++ (No visual studio access at the time) but it seemed like every server method used needs to be public static function even when being referenced indirectly from within the original [webmethod] server method.

I've run an experiment before with SignalR and Owin, but it seems like overkill for my occasional needs, although it behaved in my experiment as a usable messenger service between client and server.

My problem is that i just don't know which technology stack to use based on my previous experience.

The post and replies here sums up what appears to be a sticking point for those like me are transitioning from front end to front and back end development.

I acknowledge that stack overflow is most likely not the best place for this as I most likely will require more of a mentoring in how to transition than how to use a particular tech.

Reahreic
  • 596
  • 2
  • 7
  • 26

1 Answers1

0

If you are using WebForms, then yes, you can decorate public static methods with [WebMethod]. WebApi is a better approach and is exactly why it was built. However, it may be a bit of a learning curve for you if you work mostly on WebForms.

Alex Terry
  • 1,992
  • 1
  • 11
  • 17
  • I've only used webforms once or twice long ago and usually work on client side logic and front ends. I'll continue my googling focusing this time on WebApi instead of winforms/MVC (razor), but if there are any useful insights you can offer i'd greatly appreciate them. – Reahreic Jan 06 '17 at 23:50
  • Winforms is in now way related to mvc. They are completely different classes. – Alex Terry Jan 07 '17 at 02:22
  • ATerry I re-wrote my question to be more clear. Can you please take a look at it again. Some insight would be much appreciated. – Reahreic Jan 08 '17 at 05:56
  • When you say winforms you really mean webforms. Winforms is a Windows desktop framework. If your question is, should you use webforms, mvc, or webapi, I would say if you need a page render from the server then mvc, if not then webapi. – Alex Terry Jan 08 '17 at 15:07