当前位置: 动力学知识库 > 问答 > 编程问答 >

asp classic - I still write web apps in ASP Legacy -- What is a good modern alternative to this platform?

问题描述:

Hi and thanks for reading,

I still write web applications in classic ASP, and I would like to move to a more modern web application platform. What languages and frameworks offer a reasonable migration path from classic ASP in the year 2011?

Thanks for your help,

Will

网友答案:

ASP.NET MVC. I wrote classic ASP for 10+ years, including full implementations of ActiveRecord-style business objects and domain entities. I started out in VBScript but switched to JScript around 2003 and never looked back. I worked on every release of ASP.NET from the pre-1.0 beta, and absolutely hated the code-behind event-driven model - ViewState, OnClick handlers, just felt like completely the wrong way to work with a stateless protocol like HTTP and a markup language like HTML.

ASP.NET MVC was an absolute revelation; the first framework that felt like I was actually using the knowledge of requests, responses, headers and markup that I'd gained writing classic ASP. I'm now developing a handful of ASP.NET MVC apps as well as maintaining our legacy JScript/ASP codebase, and I genuinely think it's the cleanest migration path from legacy ASP to something modern, testable, object-oriented and elegant. The request, response, server, etc. objects are still there, and do (roughly!) the same things they did in classic ASP, but once you start to learn about ViewModels and controller attributes you'll quickly start writing much, much cleaner, more elegant code.

网友答案:

If you write web forms in ASP legacy (you mean Classic ASP?), then IMHO the simplest and logical transition is to ASP.NET.

If you choose ASP.NET, do yourself a favor and learn yourself ASP.NET (code-behind, data binding, etc.) so that you understand its basics. Some web developers who took the step from ASP to ASP.NET still write their websites "the legacy way" and miss many .NET advantages.

网友答案:

Imo, the smoothest transition from classic asp, is to php or python, not ASP.Net.

Classic ASP is a non compiled interpreted platform, so is php and python. ASP.Net is compiled, and generally means needing full blown Visual Studio.

If you want to be able to build web apps in sublime, atom, visual studio code, or {Insert your favorite editor here} then php or python would be the way to go. Python more so than php, it's much more modern, and has way more features.

And if you want to get really snazzy, you can ditch IIS entirely, and go with node.js and nginx.

Use node.js + gulp + express + angular + {insert database node module here}.

Use gulp to structure your Css and Javascript and set build tasks for your css and javascript, and by build I mean just minifying and trasnforming SASS (Scss) into .css, and concatenanting and minifying Javascript.

Use Nginx to serve the static compiled css and js files built by gulp.

Use Express to build fluent rest based web services in javascript in ES6.

Build your whole web app with angular and make it client heavy where all your server logic is rest based web services.

You can also ditch angular and lean more heavily on express. There is an html template engine for express you can install in node and use express as an MVC framework.

Being entirely node and nginx... One well performing website, very fast, and easy to scale.

There is little need for a website to be on a compiled platform imo. If you do end up with the need for compiler based performance, just build that part in compiled code.

E.g. you can have a website that's 90% python, or whatever, and the 10% that needs to be compiled do it in .Net Web Api 2, or Java on Spring.

分享给朋友:
您可能感兴趣的文章:
随机阅读: