我仍然在 ASP Legacy 中编写 Web 应用程序 - 该平台的良好现代替代方案是什么?

发布于 2024-10-06 10:46:08 字数 1539 浏览 0 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

小帐篷 2024-10-13 10:46:08

ASP.NET MVC。我编写经典 ASP 已有 10 多年的时间,包括 ActiveRecord 风格的业务对象和域实体的完整实现。我一开始使用的是 VBScript,但在 2003 年左右转向了 JScript,并且再也没有回头。我参与了从 1.0 之前的测试版开始的 ASP.NET 的每个版本,并且非常讨厌代码隐藏的事件驱动模型 - ViewState、OnClick 处理程序,只是觉得使用像 HTTP 和 a 这样的无状态协议是完全错误的方式。标记语言,如 HTML。

ASP.NET MVC 绝对是一个启示;第一个感觉就像我实际上使用我在编写经典 ASP 时获得的请求、响应、标头和标记知识的框架。我现在正在开发一些 ASP.NET MVC 应用程序,并维护我们遗留的 JScript/ASP 代码库,我真诚地认为这是从遗留 ASP 到现代、可测试、面向对象和优雅的东西的最干净的迁移路径。请求、响应、服务器等对象仍然存在,并且(大致!)执行与经典 ASP 中相同的操作,但是一旦您开始了解 ViewModel 和控制器属性,您将很快开始编写更加干净的代码,更优雅的代码。

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.

御弟哥哥 2024-10-13 10:46:08

如果您使用 ASP 遗留版本(您的意思是经典 ASP?)编写 Web 表单,那么恕我直言,最简单且符合逻辑的过渡是到 ASP.NET。

如果您选择 ASP.NET,请帮自己一个忙,学习 ASP.NET(代码隐藏、数据绑定等),以便了解其基础知识。一些从 ASP 转向 ASP.NET 的 Web 开发人员仍然以“传统方式”编写网站,而错过了许多 .NET 的优势。

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.

〃安静 2024-10-13 10:46:08

在我看来,从经典 ASP 最平滑的过渡是到 php 或 python,而不是 ASP.Net。

经典ASP是一个非编译解释平台,php和python也是如此。 ASP.Net 是经过编译的,通常意味着需要完整的 Visual Studio。

如果您希望能够使用 Sublime、Atom、Visual Studio Code 或 {在此处插入您最喜欢的编辑器} 构建 Web 应用程序,那么 php 或 python 将是您的最佳选择。 Python 比 php 更现代,并且具有更多功能。

如果你想变得真正时髦,你可以完全放弃 IIS,而使用 Node.js 和 nginx。

使用node.js + gulp + Express + Angular + {在此处插入数据库节点模块}。

使用 gulp 构建您的 CSS 和 Javascript,并为您的 css 和 javascript 设置构建任务,我所说的构建只是将 SASS (Scss) 缩小并转换为 .css,然后连接和缩小 Javascript。

使用 Nginx 来提供 gulp 构建的静态编译的 css 和 js 文件。

使用 Express 在 ES6 中的 javascript 中构建基于 Fluent Rest 的 Web 服务。

使用 Angular 构建整个 Web 应用程序,并使其成为客户端重载,其中所有服务器逻辑都是基于 REST 的 Web 服务。

你也可以放弃 Angular 并更多地依赖 Express。 Express 有一个 html 模板引擎,您可以在 Node 中安装并将 Express 用作 MVC 框架。

完全是节点和 nginx...一个性能良好的网站,速度非常快,并且易于扩展。

在我看来,网站几乎不需要在编译平台上。如果您最终需要基于编译器的性能,只需在编译代码中构建该部分即可。

例如,您可以拥有一个 90% 是 python 或其他内容的网站,而 10% 需要在 .Net Web Api 2 或 Spring 上的 Java 中进行编译。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文