简体   繁体   English

您如何在Web应用程序中实现客户特定的差异?

[英]How do you implement customer specific differences in your web app?

We have a Seam 2 based web application with the usual user login and a couple of views which have handler classes interacting with a local database and a web service. 我们有一个基于Seam 2的Web应用程序,它具有通常的用户登录和一些视图,这些视图具有与本地数据库和Web服务交互的处理程序类。

Now, we need to implement customer specific differences - so the use cases are basically the same, but for example customer A wants a couple more fields on the form, customer B a different web service call and customer C another role with different access rights. 现在,我们需要实现客户特定的差异 - 因此用例基本相同,但是例如客户A在表单上需要更多字段,客户B需要不同的Web服务调用,而客户C需要具有不同访问权限的另一个角色。

I know my question isn't very specific - but I'm looking for general ideas how to handle such a scenario without having to maintain different separate versions of the application or having lots of ifs in the XHTML or the java code for getting different behaviour. 我知道我的问题不是很具体 - 但我正在寻找一般的想法如何处理这样的场景,而不必维护应用程序的不同单独版本或在XHTML或java代码中有很多ifs来获得不同的行为。

So since this is I guess a common scenario - how do you handle it? 所以,因为这是一个常见的场景 - 你如何处理它?

Fields 字段

If the business case is the same and the fields don't influence it directly you might just opt-in for a user- or companysetting. 如果业务案例相同且字段不直接影响它,您可能只是选择加入用户或公司设置。 So just a checkbox which modifies the layout. 所以只需一个修改布局的复选框。 Hard thing which you should be aware of is validation of required fields. 您应该注意的难点是必填字段的验证。 Since that might differ between your customers. 因为您的客户可能会有所不同。

A step further you could go for flexible fields and all that kind of things but that will get quite complex directly. 更进一步,您可以选择灵活的领域和所有类似的东西,但这将直接变得非常复杂。 If you don't need to don't go there. 如果你不需要不去那里。

ACL ACL

The ACL could be just made flexible enough to support different settings per customer, that shouldn't be a big issue. ACL可以做得足够灵活,以支持每个客户的不同设置,这应该不是一个大问题。

Webservice 网络服务

The other webservice: If it is another webservice but it gives the same info back you could just implement an interface. 另一个webservice:如果它是另一个webservice,但它提供相同的信息,你可以实现一个接口。 That way you could flexibly switch per customer. 这样你就可以灵活地切换每个客户。 The nice thing is that your application get unaware of which webservice it actually is but it understands the interface. 好处是您的应用程序不知道它实际上是哪个Web服务,但它了解接口。 More on this: decoupling is the keyword. 更多相关:去耦是关键字。

This also generates a well testable piece of software which allows you to develop in the future further without much hassle. 这也产生了一个可测试的软件,使您可以在未来进一步开发而不会有太多麻烦。

Know when to stop 知道什么时候停止

If it gets too far with customization understand where to stop. 如果定制化太过分了解何处停止。 Don't get into too many difficulties, when a customer want a customer piece of software it should become one at some point in time. 不要遇到太多困难,当客户想要客户软件时,它应该在某个时间点成为一个软件。 See also: http://gettingreal.37signals.com/ch05_Start_With_No.php which is quite relevant, you can't satisfy everyone with a standard piece of software. 另请参阅: http//gettingreal.37signals.com/ch05_Start_With_No.php这是非常相关的,你不能满足每个人的标准软件。 There will be lots of hidden costs: http://gettingreal.37signals.com/ch05_Hidden_Costs.php 会有很多隐藏的成本: http//gettingreal.37signals.com/ch05_Hidden_​​Costs.php

Think that gives a well overview. 认为这给了一个很好的概述。 If you need more details maybe separate this question because each of the three questions has it's own issues. 如果您需要更多详细信息,可以将此问题分开,因为这三个问题中的每一个都有自己的问题。

This is a very common problem in software development without a clear answer, so the best answers you will find will end up being advice. 这是软件开发中一个非常普遍的问题,没有明确的答案,因此您将找到的最佳答案最终将成为建议。

The dirty little secret that we know is that unless you are selling software in a box on a shelf at Staples, then you are probably just providing the illusion of a product that cloaks truly custom software. 我们知道的一个肮脏的小秘密是,除非你在Staples的架子上的盒子里销售软件,否则你可能只是提供了一个隐藏真正定制软件的产品的幻觉。

Because ultimately when developing business applications, all of your customers want custom built software, but they want to believe they are purchasing a product. 因为最终在开发业务应用程序时,所有客户都想要定制的软件,但他们想要相信他们正在购买产品。 It is simply human psychology, when we buy a product we tend to not only feel like we got a better deal but that we will be more forgiving of slight flaws or annoyances. 这只是人类心理学,当我们购买产品时,我们不仅觉得我们得到了更好的交易,而且我们会更容忍轻微的瑕疵或烦恼。 When buying something custom made we immediately tend to feel like we are overpaying for a luxury, so if everything doesn't turn out exactly as I want it, it will be unacceptable. 当购买定制的东西时,我们立刻会觉得我们为奢侈品付出了过高的代价,所以如果一切都没有完全符合我的要求,那将是不可接受的。

The best way I have found to handle this is to have a person in your company with the strong authority of being a Product Owner. 我发现处理此问题的最佳方法是让公司中的某个人具有成为产品负责人的强大权力。 This person will be the Alpha and the Omega on every feature and change that goes into your software. 这个人将成为您的软件中每个功能和变化的Alpha和Omega。 It is the Product Owner's job to mitigate the disparate and sometimes completely opposing customer requests into a single set of software requirements and features that will make the majority of customers happy the majority of the time. 产品负责人的工作是将不同且有时完全相反的客户请求缓解为一组软件需求和功能,这些功能将使大多数客户在大多数时间内感到满意。

Simply by the way your question is worded you are already approaching the problem incorrectly by wondering how to technically deal with your different customer requests. 简单地说,如果您的问题措辞有问题,那么您已经想知道如何在技术上处理不同的客户请求,从而错误地解决了问题。 The only customer you should care about as a developer is the Product Owner, whose job it is to tell you what custom features, settings, flags, resource bundles and forms should be included and how to flip different features on or off to satisfy the companies customer needs. 作为开发人员,您应该关心的唯一客户是产品负责人,他的工作是告诉您应该包括哪些自定义功能,设置,标志,资源包和表单以及如何打开或关闭不同的功能以满足公司客户的需求。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Blackberry上,您如何计划在特定时间启动应用程序? - On a Blackberry, How do you schedule your app to come on at a specific time? 你如何在你的<web-app> web.xml 中的标签?</web-app> - How do you specify the root context in your <web-app> tags in web.xml? 你如何为自己的等式实现BigInteger类? - How do you implement the BigInteger class for your own equation? 您如何为您的 Java Web 应用程序自动化 Javascript 缩小? - How do you automate Javascript minification for your Java web applications? 如何在客户端升级/更新web java项目? - How do you upgrade / update web java project at your clients? 您如何为Java应用设置“测试模式”? - How do you set up “test mode” for your Java app? 如何声明带有实现特定接口的对象的LinkedList? - How do you declare a LinkedList with objects that implement a specific interface? 你如何在java中为LinkedLists实现你自己的lastIndexOf(E e)? - How do you implement your own lastIndexOf(E e) for LinkedLists in java? 您如何在 Commercetools 中将 ProjectApiRoot 创建为客户 - How do you create ProjectApiRoot as Customer in Commercetools Web App-如何在Web应用程序中实施身份验证 - Web App - How to implement an authentication in a web app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM