ASP.NET应用程序套件开发 - 陷阱

时间:2022-05-20 06:53:21

This may sound a bit general, but I have a startup that is working on an ASP.NET (greenfield) suite of software applications. We are aiming to spend a substantial amount of time in the architecture phase to develop a strong foundation for our software. I was wondering if anyone has any advice, anything we should focus on or any suggestions for areas we should focus on to build a better suite.

这可能听起来有点普遍,但我有一个正在开发ASP.NET(绿地)软件应用程序套件的初创公司。我们的目标是在架构阶段花费大量时间为我们的软件开发坚实的基础。我想知道是否有人有任何建议,我们应该关注的任何内容,或者我们应该关注的领域的任何建议,以建立一个更好的套件。

Some things we are focusing on right now: 1. Session state requirements - should sessions be sticky or should we take server clustering session migration into account. 2. User login authentication - what are the major concerns in this space - LDAP, AD, custom SQL authentication systems etc. 3. The DAL - ORM vs Stored Proc
4. Integrating multiple ASP.NET applications in a single software suite. How it should look/feel. How it should be architected, etc.

我们现在关注的一些事项:1。会话状态要求 - 会话应该是粘性还是我们应该考虑服务器群集会话迁移。 2.用户登录身份验证 - 此空间的主要问题 - LDAP,AD,自定义SQL身份验证系统等.3。DAL - ORM与存储过程4.在单个软件套件中集成多个ASP.NET应用程序。它的外观/感觉如何。它应该如何架构等

I would appreciate any advice from any architects out there that have built similar systems from the ground up.

我很感激那些从头开始构建类似系统的建筑师的建议。

4 个解决方案

#1


Just some quick notes. I can't get too detailed since we went through this exercise where I worked last year - and I don't work there any more!

只是一些快速说明。自从我们去年参加了这个练习以来,我不能太详细了 - 我不再在那里工作了!

  • Start from the beginning using Enterprise Library, especially the Logging and Exception Handling application blocks. I've also found their Unity dependency injection library to be very useful.
  • 从头开始使用Enterprise Library,尤其是Logging and Exception Handling应用程序块。我还发现他们的Unity依赖注入库非常有用。

  • Consider using Visual Studio Team Foundation Server. It's not just for source control, but can create you a complete continuous integration solution, complete with integrated bug tracking, code quality tracking, etc. If you've got the time and people, it's well worth a man-month to learn how to do an initial deployment.
  • 考虑使用Visual Studio Team Foundation Server。它不仅适用于源代码控制,还可以为您创建一个完整的持续集成解决方案,完成集成的错误跟踪,代码质量跟踪等。如果您有时间和人员,那么学习如何以人为本进行初始部署。

  • You may want to buy one or more licenses of one of the Visual Studio Team System editions. You don't need these versions in order to use TFS, but they work well with it.
  • 您可能希望购买一个Visual Studio Team System版本的一个或多个许可证。您不需要这些版本才能使用TFS,但它们可以很好地使用它。

  • Consider globalization right from the start. Same with customization, if your suite will run on customer premises and be customizable by them.
  • 从一开始就考虑全球化。与自定义相同,如果您的套件将在客户端运行并可由其自定义。

  • You haven't said how large your team is, or is expected to be. If it's large enough, you'll want to spend at least a man-week learning a bit about what's available to you in terms of Visual Studio Extensibility. Your developers (and maybe also your QA folks) will all but live in Visual Studio, so the ability to customize it to meet your needs can be a big win. Whether it's just some macros and maybe some customized project or item templates, or whether you want to do add-ins or more, Visual Studio is very extensible.
  • 你还没有说你的团队有多大,或者预计会有多大。如果它足够大,你将需要花费至少一个星期的时间来学习一些关于Visual Studio可扩展性方面的可用内容。您的开发人员(也许还有您的QA人员)将全部使用Visual Studio,因此能够自定义它以满足您的需求可能是一个巨大的胜利。无论是一些宏还是一些自定义项目或项目模板,或者您是否想要加载项或更多,Visual Studio都是非常可扩展的。

  • Be certain to use WCF for any web services work. The older ASMX web service technology is now considered by Microsoft to be "legacy software".
  • 确保使用WCF进行任何Web服务工作。旧的ASMX Web服务技术现在被Microsoft视为“遗留软件”。

  • Finally, be sure to find out whether you qualify for BizSpark, "A program that provides Software, Support and Visibility for Software Startups." And does so almost for free.
  • 最后,请务必了解您是否有资格使用BizSpark,“为软件初创公司提供软件,支持和可见性的程序”。而这几乎是免费的。

#2


I know there are lots of solutions to session, but if you can create your framework to be session-free, you will avoid a lot of potential headaches. (There are lots of session-free options, but an obvious one is a hidden form field, somewhat like ViewState.)

我知道有很多会话解决方案,但如果你可以创建你的框架无会话,你将避免很多潜在的麻烦。 (有很多无会话选项,但显而易见的是隐藏的表单字段,有点像ViewState。)

#3


I saw a demo of Silverlight 3 at the PhillyDotNet User Group last night - WOW. Wow for business applications, not graphic applications. There is a learning curve, but you get a lot for it. For example, the demo showed a grid being bound to a table without needing to write any code.

我昨晚在PhillyDotNet用户组看到了Silverlight 3的演示 - WOW。哇商业应用程序,而不是图形应用程序。有一个学习曲线,但你得到了很多。例如,演示显示网格绑定到表而无需编写任何代码。

Right out of the box you had sorting, editing, paging, etc. But it wasn't the lame stuff you normally get and then have to rework. For example the paging was smart enough to write the sql that would only bring back the 20 rows you needed for the page.

开箱即用,你有排序,编辑,分页等。但它不是你通常得到的蹩脚的东西,然后必须返工。例如,分页足够聪明,可以编写只返回页面所需的20行的sql。

The demo continued with him putting a detail form on the page for editing. Again no code, but it was smart enough to know that it had the same datasource as the grid on the page. So as you were moving row to row on the grid - the detail form was showing the current row (and it was very fast).

演示继续他在页面上放置一个细节表格进行编辑。再一次没有代码,但它足够聪明,知道它与页面上的网格具有相同的数据源。因此,当您在网格上逐行移动时 - 详细信息表单显示当前行(并且速度非常快)。

Both the grid and the detail form were editable and as you changed a field in one the other would reflect the new value. The editing was smart enough to validate the field on its own. So you couldn't put a letter in a field that was an integer type, etc. It also limited the number of characters that could be entered based on the column size found in the database. All the date fields on the detail form automatically had a calendar next to them. You get the idea - no coding for any of this.

网格和详细信息表单都是可编辑的,当您更改一个字段时,另一个字段将反映新值。编辑非常智能,可以自行验证字段。所以你不能在一个整数类型的字段中放一个字母等。它还限制了可以根据数据库中的列大小输入的字符数。详细信息表单上的所有日期字段都会自动在其旁边显示日历。你明白了 - 没有任何编码。

If this weren't enough, it can be used to build occasionally connected applications. So he showed how he updated a few records on a few different pages, had the option to revert back a field later (ctrl-Z), and then at the end submitted all the changed records to be saved.

如果这还不够,它可以用于构建偶尔连接的应用程序。所以他展示了他如何在几个不同的页面上更新了几条记录,可以选择稍后恢复一个字段(ctrl-Z),然后在最后提交要保存的所有已更改的记录。

Also, they said it works with Linq2SQL and the entity fraimwork.

此外,他们说它适用于Linq2SQL和实体fraimwork。

So if I were building a new product now, I would really look into this as a way of differentiating my product. And I suspect that if you don't do it with Silverlight now, you will be rewriting it in a few years anyway.

因此,如果我现在正在构建一个新产品,我真的会将其视为区分我的产品的一种方式。而且我怀疑如果你现在不使用Silverlight,那么无论如何你将在几年后重写它。

Here is a link to a demo (not the one I saw.)

这是演示的链接(不是我看过的那个。)

#4


Some general thoughts. If you'd like me to expound on any of these, let me know.

一些一般的想法。如果您希望我对其中的任何内容进行阐述,请告诉我。

  • Inheriting from a custom subclass of Page instead of Page itself is a great way to share functionality across your site.
  • 继承自Page的自定义子类而不是Page本身是在整个站点上共享功能的好方法。

  • Nested MasterPages are good.
  • 嵌套的MasterPages很好。

  • Charting: I've tried DevExpress, Syncfusion, and MSChart control and all have their own issues.
  • 图表:我已经尝试过DevExpress,Syncfusion和MSChart控件,并且都有自己的问题。

  • The built-in forms authentication is pretty good. Building a site that allows both integrated authentication and forms authentication is tricky but can be done.
  • 内置的表单身份验证非常好。构建允许集成身份验证和表单身份验证的站点是棘手的,但可以完成。

  • I've tried using cross page postbacks and I'm still not sure if I like them.
  • 我尝试过使用跨页回发,我仍然不确定我是否喜欢它们。

  • Localization takes a lot of time
  • 本地化需要很多时间

  • Come up with a good structure for your App_Themes and css.
  • 为你的App_Themes和css想出一个好的结构。

  • Use Elmah to track unhandled exceptions
  • 使用Elmah跟踪未处理的异常

#1


Just some quick notes. I can't get too detailed since we went through this exercise where I worked last year - and I don't work there any more!

只是一些快速说明。自从我们去年参加了这个练习以来,我不能太详细了 - 我不再在那里工作了!

  • Start from the beginning using Enterprise Library, especially the Logging and Exception Handling application blocks. I've also found their Unity dependency injection library to be very useful.
  • 从头开始使用Enterprise Library,尤其是Logging and Exception Handling应用程序块。我还发现他们的Unity依赖注入库非常有用。

  • Consider using Visual Studio Team Foundation Server. It's not just for source control, but can create you a complete continuous integration solution, complete with integrated bug tracking, code quality tracking, etc. If you've got the time and people, it's well worth a man-month to learn how to do an initial deployment.
  • 考虑使用Visual Studio Team Foundation Server。它不仅适用于源代码控制,还可以为您创建一个完整的持续集成解决方案,完成集成的错误跟踪,代码质量跟踪等。如果您有时间和人员,那么学习如何以人为本进行初始部署。

  • You may want to buy one or more licenses of one of the Visual Studio Team System editions. You don't need these versions in order to use TFS, but they work well with it.
  • 您可能希望购买一个Visual Studio Team System版本的一个或多个许可证。您不需要这些版本才能使用TFS,但它们可以很好地使用它。

  • Consider globalization right from the start. Same with customization, if your suite will run on customer premises and be customizable by them.
  • 从一开始就考虑全球化。与自定义相同,如果您的套件将在客户端运行并可由其自定义。

  • You haven't said how large your team is, or is expected to be. If it's large enough, you'll want to spend at least a man-week learning a bit about what's available to you in terms of Visual Studio Extensibility. Your developers (and maybe also your QA folks) will all but live in Visual Studio, so the ability to customize it to meet your needs can be a big win. Whether it's just some macros and maybe some customized project or item templates, or whether you want to do add-ins or more, Visual Studio is very extensible.
  • 你还没有说你的团队有多大,或者预计会有多大。如果它足够大,你将需要花费至少一个星期的时间来学习一些关于Visual Studio可扩展性方面的可用内容。您的开发人员(也许还有您的QA人员)将全部使用Visual Studio,因此能够自定义它以满足您的需求可能是一个巨大的胜利。无论是一些宏还是一些自定义项目或项目模板,或者您是否想要加载项或更多,Visual Studio都是非常可扩展的。

  • Be certain to use WCF for any web services work. The older ASMX web service technology is now considered by Microsoft to be "legacy software".
  • 确保使用WCF进行任何Web服务工作。旧的ASMX Web服务技术现在被Microsoft视为“遗留软件”。

  • Finally, be sure to find out whether you qualify for BizSpark, "A program that provides Software, Support and Visibility for Software Startups." And does so almost for free.
  • 最后,请务必了解您是否有资格使用BizSpark,“为软件初创公司提供软件,支持和可见性的程序”。而这几乎是免费的。

#2


I know there are lots of solutions to session, but if you can create your framework to be session-free, you will avoid a lot of potential headaches. (There are lots of session-free options, but an obvious one is a hidden form field, somewhat like ViewState.)

我知道有很多会话解决方案,但如果你可以创建你的框架无会话,你将避免很多潜在的麻烦。 (有很多无会话选项,但显而易见的是隐藏的表单字段,有点像ViewState。)

#3


I saw a demo of Silverlight 3 at the PhillyDotNet User Group last night - WOW. Wow for business applications, not graphic applications. There is a learning curve, but you get a lot for it. For example, the demo showed a grid being bound to a table without needing to write any code.

我昨晚在PhillyDotNet用户组看到了Silverlight 3的演示 - WOW。哇商业应用程序,而不是图形应用程序。有一个学习曲线,但你得到了很多。例如,演示显示网格绑定到表而无需编写任何代码。

Right out of the box you had sorting, editing, paging, etc. But it wasn't the lame stuff you normally get and then have to rework. For example the paging was smart enough to write the sql that would only bring back the 20 rows you needed for the page.

开箱即用,你有排序,编辑,分页等。但它不是你通常得到的蹩脚的东西,然后必须返工。例如,分页足够聪明,可以编写只返回页面所需的20行的sql。

The demo continued with him putting a detail form on the page for editing. Again no code, but it was smart enough to know that it had the same datasource as the grid on the page. So as you were moving row to row on the grid - the detail form was showing the current row (and it was very fast).

演示继续他在页面上放置一个细节表格进行编辑。再一次没有代码,但它足够聪明,知道它与页面上的网格具有相同的数据源。因此,当您在网格上逐行移动时 - 详细信息表单显示当前行(并且速度非常快)。

Both the grid and the detail form were editable and as you changed a field in one the other would reflect the new value. The editing was smart enough to validate the field on its own. So you couldn't put a letter in a field that was an integer type, etc. It also limited the number of characters that could be entered based on the column size found in the database. All the date fields on the detail form automatically had a calendar next to them. You get the idea - no coding for any of this.

网格和详细信息表单都是可编辑的,当您更改一个字段时,另一个字段将反映新值。编辑非常智能,可以自行验证字段。所以你不能在一个整数类型的字段中放一个字母等。它还限制了可以根据数据库中的列大小输入的字符数。详细信息表单上的所有日期字段都会自动在其旁边显示日历。你明白了 - 没有任何编码。

If this weren't enough, it can be used to build occasionally connected applications. So he showed how he updated a few records on a few different pages, had the option to revert back a field later (ctrl-Z), and then at the end submitted all the changed records to be saved.

如果这还不够,它可以用于构建偶尔连接的应用程序。所以他展示了他如何在几个不同的页面上更新了几条记录,可以选择稍后恢复一个字段(ctrl-Z),然后在最后提交要保存的所有已更改的记录。

Also, they said it works with Linq2SQL and the entity fraimwork.

此外,他们说它适用于Linq2SQL和实体fraimwork。

So if I were building a new product now, I would really look into this as a way of differentiating my product. And I suspect that if you don't do it with Silverlight now, you will be rewriting it in a few years anyway.

因此,如果我现在正在构建一个新产品,我真的会将其视为区分我的产品的一种方式。而且我怀疑如果你现在不使用Silverlight,那么无论如何你将在几年后重写它。

Here is a link to a demo (not the one I saw.)

这是演示的链接(不是我看过的那个。)

#4


Some general thoughts. If you'd like me to expound on any of these, let me know.

一些一般的想法。如果您希望我对其中的任何内容进行阐述,请告诉我。

  • Inheriting from a custom subclass of Page instead of Page itself is a great way to share functionality across your site.
  • 继承自Page的自定义子类而不是Page本身是在整个站点上共享功能的好方法。

  • Nested MasterPages are good.
  • 嵌套的MasterPages很好。

  • Charting: I've tried DevExpress, Syncfusion, and MSChart control and all have their own issues.
  • 图表:我已经尝试过DevExpress,Syncfusion和MSChart控件,并且都有自己的问题。

  • The built-in forms authentication is pretty good. Building a site that allows both integrated authentication and forms authentication is tricky but can be done.
  • 内置的表单身份验证非常好。构建允许集成身份验证和表单身份验证的站点是棘手的,但可以完成。

  • I've tried using cross page postbacks and I'm still not sure if I like them.
  • 我尝试过使用跨页回发,我仍然不确定我是否喜欢它们。

  • Localization takes a lot of time
  • 本地化需要很多时间

  • Come up with a good structure for your App_Themes and css.
  • 为你的App_Themes和css想出一个好的结构。

  • Use Elmah to track unhandled exceptions
  • 使用Elmah跟踪未处理的异常