如何在.net框架中规划一个软件..?

发布于 2024-11-04 16:27:22 字数 483 浏览 2 评论 0原文

我是一名软件开发新手,只开发了一些基于 Java 的应用程序。我想使用.NET框架制作一个适用于Windows的ERP软件。我决定使用 C# 来实现 GUI 和逻辑。

我很快就掌握了 C#,因为我很熟悉 Java。我现在也对 Windows 窗体有了一个概述。

我有一个与 MS SQL Server 交互并运行的小型应用程序。但我无法谷歌出几个问题——

  1. 我应该遵循什么架构。 MVC 对于基于 Web 的应用程序非常出色,但它对于桌面应用程序是否同样有效......?另外,文件夹结构和类层次结构应该如何......?
  2. 使用哪个数据库服务器..? SQLite 在网络上有一些缺点,但如果我计划在单个桌面上运行我的应用程序,它会有任何问题吗??
  3. 如何将我的数据库服务器与应用程序一起打包......?
  4. 如果我打算以 CD 形式出售该软件,我该如何防止多次 用户使用情况..??

阅读资源的链接会非常有帮助。

I am a novice software developer and have only developed a few Java based applications. I want to make an ERP software for Windows using the .NET framework. I had decided upon using C# for GUI and logic.

I went through C# quickly as I am well versed with Java. I now also have an overview of Windows form.

I have a small application interacting with MS SQL server up and running. But I couldn't Google out of a few problems -

  1. What architecture should I follow. MVC was excellent for web-based apps, but is it equally effective for desktop apps..?? Also, how should the folder structure and classes hierarchy be..??
  2. Which database server to use..?? SQLite has some shortcomings over a network but if I plan to run my app over a single desktop, would it have any problems..??
  3. How do I package my database server along with the application..??
  4. If I plan to sell the software on CDs, how do i prevent multiple
    user usage..??

Links to reading resources would be very helpful..

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

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

发布评论

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

评论(2

雨后彩虹 2024-11-11 16:27:22

我建议先生读一些书。我发现这本书为我在 .NET 架构方面奠定了良好的基础:

http://www.amazon.com/Microsoft%C2%AE-NET-Architecting-Applications-Pro-Developer/dp/073562609X

进入开发时要考虑到测试、n 层架构、继承等等。

I recommend doing some reading sir. One book I found that has given me a GREAT foundation on .NET architecture has been this book:

http://www.amazon.com/Microsoft%C2%AE-NET-Architecting-Applications-Pro-Developer/dp/073562609X

Goes into developing with testing in mind, n-tiered architecture, inheritance, everything.

迷雾森÷林ヴ 2024-11-11 16:27:22

一个问题中有很多问题;-)

首先,幸运的是,C# 和 Java 根本没有什么不同。您将能够将您的大部分知识从 Java 应用到 C# - 甚至许多库也从 Java 移植到 C#。

  1. 对于 Windows 窗体,MVP(模型-视图-演示者)通常是一个不错的选择。它与 MVC 有点不同(我什至可以说它是从 MVC 发展而来的,并且在某些方面更好)。如果使用 WPF,我会选择 MVVM。另请参阅 Windows 窗体的 UI 设计模式(例如 MVVM WPF)
  2. 当使用 ADO.NET(或实体框架)时,您可以轻松更改底层数据库技术。尝试编写尽可能通用的数据库代码,以便能够从一个系统切换到另一个系统。
  3. 您可以为此创建一个安装项目(就像您在 Java 中可能会做的那样)
  4. 有一些商业解决方案 - 比保护更重要的是混淆以防止反汇编代码(尽管与 Java 中的问题相同)。我想,您会在这里找到很多关于许可的线索。

Quite many questions in one question ;-)

First, C# and Java are luckily not to different at all. You will be able to apply much of your knowledge from Java to C# - even many libraries were ported from Java to C#.

  1. For Windows Forms, MVP (Model-View-Presenter) is usually a good choice. It's a little bit different from MVC (I would even say it evolved from MVC and it's better in certain aspects). Using WPF, I would go with MVVM. Also see UI Design Pattern for Windows Forms (like MVVM for WPF)
  2. When using ADO.NET (or the Entity framework), you are able to easily change the underlying data base technology. Try to write your database code as generic as possible to enable switching from one system to another.
  3. You can create a Setup project for that (like you would probably do in Java)
  4. There are some commercial solutions out there - even more important than protection is obfuscation to prevent disassembling your code (same problem as in Java, though). I think, you will find many threads here on SO on licensing.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文