将应用程序从 Asp.Net Webforms 更新到 .Net 6

发布于 2025-01-11 12:52:55 字数 284 浏览 0 评论 0原文

大家好,我需要您对以下问题的专家意见。

我们有一个整体的 Asp.net Webforms 应用程序,它与 SQL Server 数据库集成,并且已经运行了 10 年。 现在我们计划将该应用程序转移到 .NET 6 以提高应用程序性能。 80% 的逻辑都写在存储过程中。我们希望同时运行 应用程序与同一数据库并行。

客户希望我们使用相同的数据库并使用现有数据库构建所有新的架构,但也会有新的变化 一种选择是我们将克隆 SP 并对其进行更改 - 50 SP - 克隆 50 SP 我们还能做哪些其他最佳选择?

谢谢

Hi everyone I need your expert opinion on the following.

We have a monolithic Asp.net Webforms application, Which is integrated with the SQL Server database, and its working since last 10 years.
Now we are planning to shift that application to .NET 6 to increase the application performance. There is 80% of the logic is written in store procedures.We want to run both
application parallel with the same database.

client want us to use same database and build all new architecture with the existing database but there will be new changes as well
one option is we will clone the SP and make changes in it - 50 SP - clone 50 SP
what other best option we can do?

Thank You

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

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

发布评论

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

评论(2

李不 2025-01-18 12:52:55

为什么不能重写SP的逻辑呢?通过这种方式,您可以摆脱 SP 并实现新的逻辑。

Why can't you rewrite the logic of SP? In this way, you can get rid of SPs and implement new logic as well.

逆流 2025-01-18 12:52:55

现在我们计划将该应用程序转移到 .NET 6 以提高应用程序性能。

真的吗?谁向你建议的?也许是二手车推销员?

我的意思是,您期望在这里获得什么样的性能提升?为什么?

我从来没有见过任何人提出这样的想法:性能不佳的应用程序可以或将永远通过更新到 .net 的下一个版本来修复(这种想法太愚蠢了)。

良好的性能是良好设计的结果,而不是归咎于工具或框架。 (这是一个非常愚蠢的立场,甚至是建议)。

升级 .net 版本将解决、修复、帮助甚至解决性能的想法是如此可笑,甚至一点都不好笑。

您是否做过任何测试来表明或暗示会出现任何明显的性能提升?

再说一遍:升级 .net 版本根本不会解决任何问题。

事实上,在过去 20 年软件的几乎所有案例中?下一个版本的“操作系统”、下一个版本的office、下一个版本的sql server?

在每种情况下,它们都需要更多的内存、更多的 CPU 和更多的计算机资源。这条规则有非常罕见的例外。

换句话说,一切的新版本往往运行速度更慢并占用更多资源!

那么,新版本的 .net 是什么?您不会看到更多任何东西,也不会看到任何差异。

正如我所指出的,最好的情况下可能是 10%,最差的情况下甚至更少。

但是,正如我所说,对于需要 10 秒加载的页面来说,10% 是少了 1 秒(仍然是 9 秒)。如果 10 秒对于页面加载来说太慢,那么 9 秒也会太慢。

对于需要 1 秒加载的页面,您现在加载 0.9 个部分(1 十分之一秒 – 再次,无用的性能变化)。

我的意思是,您必须确定应用程序的何处以及哪些部分运行缓慢。而且你甚至没有定义慢是什么意思!

例如,对于没有数据的页面,应用程序是否缓慢?

也许数据库操作很慢。也许从 Web 服务器到数据库的连接受到限制?

因此,升级到新框架将意味着不会临时提高数据库的速度。

但话又说回来,如果没有数据操作的页面很快,那么无论如何它都不是框架。

升级 .net 版本并不意味着 sql server“决定”运行得更快,因为您将客户端程序从 ms-access 更改为 .net? (答案:不,数据库服务器将以相同的速度运行,这是无论如何的 - 即使不使用 .net。

整个叙述很愚蠢,而且事实上非常愚蠢。这是业余时间,充其量是一场喜剧表演。

并且您想要什么样的性能提升?

我的意思是,假设您获得了 10% 的神奇提升(纯粹是猜测,但假设您确实做到了)。

,假设一个页面需要 7.5 秒加载。

好吧 与一个 将在 6 秒内完成,用户真的会注意到这一点吗?

速度提高了 20%,换句话说,现在页面加载速度 哎呀,谁能获得这样的计费时间!!!

如上所述,这是一个非常愚蠢的位置

,还是他们托管自己的服务器?

如果这是现场服务器,那么这里使用什么样的硬盘和服务器?

我的意思是,从旧硬盘升级到 SSD 怎么样?尝试将其中 4 个一起作为一个驱动器进行 raid。

如果他们现在使用硬盘,并跳转到 SSD + raid 设置?

天哪,这还不到 1,000 美元,而且现在还不到 2 天的开发成本。

这些“raid”SSD 驱动器可以为您提供 10 倍的速度。

那么,页面需要 7.5 秒,然后重写可能需要 6 秒?

有了新的磁盘驱动器,您现在只需不到 1 秒! – 这一切的代价是什么,开发人员的时间还不到 2 天???连软件都不用改!!!

还有一个选择是我们将克隆 SP 并进行更改

为什么您建议重新编写这些例程?您为什么建议复制所有 50 个内容? (再次强调,这里太愚蠢了)。

您是否确定这些例程中的任何一个都很慢,或者实际上写得很糟糕? (并且可以加快速度???)。

但话又说回来,您甚至没有注意到是否要使用相同的数据库,或者是否要更改架构。如果要更改模式,那么您当然需要制作并处理数据库的副本。 (因此复制数据库,并包括存储过程)。换句话说,如果您计划同时运行新系统和旧系统,您是否要为这两个应用程序使用相同的数据库?还是说新系统是100%的,新输入的数据只存在于新系统中? (再次强调:你根本没有明确的想法)。

如果可以使用现有的存储过程,那么就应该使用它。

如果目标是保持两个系统都运行,那么您不是在谈论数据库架构更改,是吗?

因此,应该使用所有现有的存储过程。如果必须更改现有存储过程之一并且将返回不同的值或不同的列?或者现在接受不同的参数?很简单,这种改变会破坏现有的软件。如果新软件由于某种非常好的原因而无法使用现有的存储过程,那么您必须创建一个新的存储过程。但这与制作 50 个现有存储过程的“副本”无关。

但话又说回来,你没有注明数据库的类型,甚至没有明确新旧系统是否使用相同的数据库?

如果此处使用相同的数据库,那么如上所述,您不会更改现有的表,更不用说存储过程了,因为对数据库的任何重大更改都会破坏现有的软件。

如果现有的存储过程当前返回所需的数据,那么我认为更改此类例程、复制此类例程甚至修改此类例程的理由为零。

如果一个防御存储过程返回不同的列,并接受不同的参数?然后您必须创建一个新的存储过程,因为它现在执行的操作与现有的存储过程不同,因此您需要一个新的例程。

显然,新软件可以而且应该使用所有现有的存储过程,并且您再次提供了不应使用现有存储过程的零理由和证据,并且实际上您提供了需要更改它们的零证据。

我的意思是,要么您使用现有的实时数据库,要么不使用。 (但话又说回来,这似乎在你的脑海中都不清楚,对这里的读者来说也不清楚——同样,这只是表明这整个问题和整个过程是多么愚蠢。我建议你找一个有使用经验的人计算机和使用 .net 的计算机)。

如果您觉得走进当地医院并上到楼层并管理进行高级手术的医生很舒服,那么无论如何,请去管理医院的那些医生。

如果您觉得能够轻松管理复杂的软件应用程序,那么请务必这样做。但是管理这些医生需要多年的经验,或者管理此类软件系统需要多年的经验?它们是相同的,在某些情况下,软件系统将比那些医生花费10年学习的时间和精力花费更多的时间和精力)。

然而,鉴于到目前为止的叙述?我认为那些向您提供您在此处共享的信息的人不应该给任何人贴上创可贴,也不应该让他们与计算机保持密切接触。

如果新软件需要一个新的存储过程,则创建一个新的存储过程。这并不暗示、建议、暗示不应继续使用 50 个现有存储过程,或者实际上现有存储过程存在任何问题。

所以,整个叙述从上到下都是错误的。无论是谁向你提供这些建议,都应该是开卡车的,与软件行业完全无关。

Now we are planning to shift that application to .NET 6 to increase the application performance.

Really? Who suggest that to you? Perhaps a used car salesman?

I mean, what kind of performance increase you expect to get here? And why?

I NEVER seen ANYONE float the idea that a poor performing applcation can or will EVER be fixed by updating to some next version of .net (beyond silly to think that).

Good performance is a result of a good design – not some blame on the tools or frame work. (This is a beyond silly position to take, or even suggest).

The idea that upgrading the version of .net is going to address, fix, help, or even address performance is so beyond laughable, it is not even funny.

Have you done any test to suggest, hint that ANY noticeable performance increase would occur?

Again: upgrading the version of .net not going to fix ANYTHING at all here.

In fact, in near every case of the last 20 years of software? The next version of the “OS” the next version of office, the next version of sql server?

In EVERY case, they require more memory, more CPU and more computer resources. There are VERY rare exceptions to this rule.

In other words, new versions of everything tends to run SLOWER and take MORE resources!!!

So, the newer version of .net? You not going to see much more of anything nor any difference at all.

As I noted, maybe 10% at BEST and at worse, even less.

But, as I stated, 10% for a page that takes 10 seconds to load is 1 second less (still 9 seconds). If 10 seconds is too slow for a page to load, then 9 seconds will also be too slow.

For a page that takes 1 second to load, you now load in 0.9 of a section (1 10th of a second – again, useless performance change).

I mean, you have to determine where and what parts of the applcation run slow. And you NOT EVEN defined what you mean by slow!

For example, is the applcation slow for pages without data?

Perhaps the database operations are slow. Perhaps the connection from the web server to the database is limited?

Thus, upgrading to a new framework will mean no improvises to the speed of the database.

But then again, if pages without data operations are fast, then it never was the framework anyway.

The idea that upgrading the version of .net does not out of the blue mean then that the sql server “decides” to run faster because you change the client program from ms-access to say .net? (Answer: no, the database server will run the same speed, and this is regardless – even when NOT using .net.

This whole narrative is silly, and in fact beyond silly. This is amateur hour and a comedy show at best.

And what kind of performance increase are you looking for?

I mean, let’s assume you get a magic 10% increase. (Pure speculation – but les pretend you do).

Gee, ok, say a page takes 7.5 seconds to load.

Well, ok with a 20% increase that 1.5 seconds faster. In other words, the page is now going to load in 6 seconds. Are users REALLY going to notice that much???

So, spend a huge boatload of money, all for less than 2 seconds saved? Gee, who gets to rack up those kind of billable hours!!!

As noted, this is a beyond silly position here.

And, is this a hosted solution, or do they host their own server? Same goes for the database used.

If this is an on-site server, then what kind of hard drives and serer is being used here?

I mean, how about upgrading from say older hard drives to SSD. Try raid up say 4 of them to together as one drive.

If they are using hard drives now, and jump to SSD + a raid setup?

Gee, that’s not even $1,000, and that now less than 2 days of developer cost.

Those “raid” SSD drive can give you 10x the speed you get now.

So, in place of the page taking 7.5 seconds, and then maybe with a re-write take 6 seconds?

With new disk drives, you now LESS than 1 second!!! – All for the cost of what, less than 2 days of developer time??? Don’t even have to change the software!!!

as well one option is we will clone the SP and make changes

Why are you suggesting to re-write these routines? And why are you suggesting to copy all 50 of them? (Again, beyond silly here).

And have you EVEN determined that any of these routines are slow, or in fact even poorly written? (And can be speed up???).

but then again, you not even noted if you going to use the same database, or the schema is to be changed. If the schema is to be changed, then of course you making and working on a copy of the database. (so copy the database, and including the stored procedures). In other words, if you planning to run the new and old system at the same time, are you to use the SAME one database for both applications? Or is the new system to be 100% and new data entered will only exist in the new system? (again: no clear idea here by you at all).

If an existing stored procedure can be used, then it should be used.

If the goal is to keep both systems running, then you NOT talking about a database schema change, are you?

Thus, all existing store procedures should be used. If one of the existing store procedures has to be changed and WILL return different values, or different columns? Or it is now to accept different parameters? Then dead simple, that change would break existing software. If the new software for SOME VERY GOOD reason can’t use an existing stored procedure, then you have to create a new one. But that has ZERO to do with making a “copy” of the 50 existing stored procedures.

But then again, you not noted the type of database, and you not even made clear if the new and the older system is to the use the SAME database?

If the same database is to be used here, then as noted, you not going to change existing tables let alone stored procedures, since any major changes to the database will break existing software.

If an existing stored procedure currently returns the data required, then I see ZERO reasons to change such routines, copy such routines, or even modify such routines.

If a defend store procedure that is to return different columns, and accept different parameters? Then you have to create a new stored procedure, because it now doing something different than the existing ones, and thus you need a new routine.

Cleary, new software can and should use all existing store procedures, and once again you provide ZERO reasons and evidence that existing stored procedures should not be used, and you in fact provide zero evidence that they need to be changed.

I mean, either you using the existing live database, or you are not. (But then again, that seems to not even be clear in your mind, nor clear to the readers here – again, this just shows how silly this whole question, and whole process is here. I would suggest you find someone with experience in using computers and that of using .net).

If you feel comfortable walking into your local hospital and going up to the floor and managing doctors where they do advanced surgery, then by all means, go manage those doctors at the hospital.

And if you feel comfortable managing a complex software applcation, then by all means do so. But the years of experience required to manage those doctors, or the years of experience required to manage such software systems? They are the same, and in some case the software system will take more time and efforts then what those doctors spent 10 years learning).

However, given the narrative so far here? I don’t think those people giving you the information you shared here should put on a band aid on anyone, nor should they exist in any close proximity to computers.

If the new software needs one new stored procedure, then create one new stored procedure. This does not hint, suggest, imply that the 50 existing stored procedures should not continue to be used, or in fact there is ANY issue or problem with the existing stored procedures.

So, this whole narrative is all wrong from top to bottom. And whoever is feeding you this advice should be driving a truck, and have nothing at all to do with the software industry.

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