支持多版本规范的设计模式? [英] Design pattern that enables support for Multiple versions of specifications?

查看:173
本文介绍了支持多版本规范的设计模式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,


 


 我必须开始处理与SIF相关的有趣项目(学校与互操作性  ;框架)。我们目前拥有支持规范1.5版的代码。我必须开发代码来支持2.5。用户还应该能够
选择他们想要使用的版本(1.5或2.5或以后的其他版本)。


 在我看来,这是非常类似于在.NET上开发时选择目标框架(你可以选择2.0 / 3.5 / 4.0)。


我想知道是否有任何现有的设计模式来解决这个问题,因为我想避免代码重复(1.5和2.5规范的差异可能不大)。也许是战略?我不确定。


 


提前致谢!!


 


 

解决方案

你好,


例如,如果规范1.5包含三个功能和规范2.5包含4个功能。然后我认为用户将从图形用户界面中选择要使用哪个框架
。如果用户选择一个规格1.5,那么将向 用户(某些顶级视图),如果用户选择规范2.5,将向用户显示四个功能。然后在
规范  2.5中,即四个函数可以是两个现有函数和两个函数。


每个规格是否为1.5或2.5有不同的虚构要求。 
请确认这一点。


如果是这种情况:基于用户选择规范,即条件检查加载每个规范所需的UI屏幕功能规范。


请记住"请问正确的问题"以正确的方式,如果您想要根据功能要求获得正确的问题,请以正确的方式获得答案。


问候,


Phijo Mathew Philip。


 


 


Hi,

 

 I have to start work on an interesting project related to SIF (Schools Interoperability Framework). We currently have code that supports version 1.5 of the specification. I have to develop code to support 2.5. The users should also be able to select which version they want to work with (1.5 or 2.5 or something else in future).

 It seems to me that this is very similar to selecting the target framework while developing on .NET (you can select 2.0/3.5/4.0).

I was wondering if there is any existing design pattern to solve this problem, because i want to avoid code duplication (the difference in the 1.5 and 2.5 specifications might not be huge). Maybe be Strategy? I'm not sure.

 

Thanks in Advance!!

 

 

解决方案

Hello there,

For example, if the specification 1.5 contains a three functions and the specification 2.5 contains 4 functions. Then it is the user I think which will be selecting which framework to use from the graphical user interface. If the user selects one specifications 1.5, then three functions will be shown to the  user(some top level over view) and if user selects specification 2.5 four functions will be shown to the user. Then in the specification   2.5 ie the four functions can be two exiting functions and 2 functions.

Each specification whether 1.5 or 2.5 have different fictional requirement .  Please do verify this point.

If that is the case : based on the user selection of the specification , that is a conditional check load the functional specs that is UI screens required for each specification.

Please remember "PLEASE DO ASK RIGHT QUESTION IN THE RIGHT MANNER, IF YOU WANT TO GET RIGHT ANSWER FOR YOUR RIGHT QUESTION IN TERMS OF FUNCITONAL REQUIRMENT.

Regards,

Phijo Mathew Philip .

 

 


这篇关于支持多版本规范的设计模式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆