应用设计问题 [英] application design problem

查看:63
本文介绍了应用设计问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




这实际上不是C#问题,但由于这是唯一的新闻组,我跟随我决定

在这里发布我的问题(请告诉我下次在哪里发帖如果你这个帖子不应该在这里
)。


我有两个设计问题:

1.如果您计划
$ b $,将数据库查询包含在

代码中的正确(或最佳)方式是什么? b支持多个数据库。假设我有一个应用程序,它将支持SQL Server 2000和Oracle(甚至可能是其他一些数据库)。

我将在哪里存储这些查询(那里)整个应用程序中可能有很多它们?b $ b整个应用程序)?查询可能很简单,复杂,有

参数,INSERT,UPDATE,DELETE语句....你得到的图片:)


2.如何设计具有可扩展用户界面的应用程序?这是一个

可能的场景:

我申请了3个人。过了一会儿,人们真的很满意这个应用程序,并且想要升级并添加一个简单的文本

框(升级也可能需要另一个字段)数据库)但

其他

2个客户不想要那个文本框。相反,这2个客户中的一个在表单上需要2

不同的字段。

如何设计应用程序从一开始就准备好这些
$ b未来$ b种变化?

对于一个简单的应用程序,我可以制作不同的应用程序副本

但即使这个简单的例子我也会

有3个不同的应用程序 - 所以这个解决方案听起来真的很糟糕,并且几个月内可能会变成维持噩梦。

我也可以这样:

if(client ==" client1"){//显示此文本框};

但是再次看起来并不是很好 - 这会导致很多在
代码中的ifs。


有什么想法吗?


谢谢,

saso



this is not actually a C# problem but since this is the only newsgroup I
follow I decided
to post my question here (please tell me where to post this next time if you
think this post shouldn''t be here).

I have two design questions:
1. what is the correct (or best) way to include database queries into the
code if you plan on
supporting multiple databases. Let''s say I have an application that will
support SQL server 2000 and Oracle (and maybe even some other database).
Where would I store these queries (there could be a LOT of them throughout
the entire application)? The queries could be simple, complex, with
parameters, INSERT, UPDATE, DELETE statements.... you get the picture :)

2. How to design an application with an extendable user interface? Here is a
possible scenario:
I make an application for 3 people. After a while, one is really happy with
the application and would like to have an upgrade and add just a simple text
box (the upgrade could also require another field in the database) but the
other
2 clients don''t want that textbox. Instead, one of those 2 clients wants 2
different fields on the form.
How to design the application from the beginning to be prepared for these
kinds of changes in the future?
For a simple application I could make different copies of the application
but even for this simple example I would
have 3 different applications - so this solution sound REALLY bad and would
probably turn into a maintainance nightmare in a few months.
I could also have this:
if ( client == "client1") { // show this textbox };
but again this doesn''t seems very good - it would lead to a lot of ifs in
the code.

Any ideas?

thanks,
saso

推荐答案




第二个问题


我不认为将所有客户端特定逻辑放入UI中是一个好主意/>
如果明天你再次获得新客户端,那么你必须更改你的代码和

很快就会很难保持这种代码。


相反,我建议您为不同的

客户端创建不同的Usercontrol。通过这样做,您的所有客户端特定逻辑将仅在UserControl

中。然后在运行时你检查哪个客户端是活动的,你加载那个特定的

UsreControl。


通过这样做,你的表格将干净整洁。如果你得到新客户,你只需要创建新的Usercontrol即可。只需创建一个新的用户控件。


现在你也可以简单地解决这个问题。因为很快你将在你的程序集中拥有N个

客户端和N * N1个用户控件数量,并且没有给予X客户的需要
,Y cusomer'的用户控件


因此您将所有X客户用户控件放在一个程序集中。 Y cusomer''

UserControl在另一个程序集中并仅传递它们所需的程序集。做

,你不给他们不需要的东西。

如果你听说过Provider Model Pattern那么你可以使用那个模式

来解决这类问题。将使您的UI易于维护,并且

是非常可扩展的。

您也可以在第一个问题中使用类似的逻辑。对不同的数据库使用不同的

程序集。有共同的界面,所以他们所有人

实现相同的方法。


看看提供者模型模式。基本上它是这种模式

的情况

http://msdn.microsoft.com/library/de...sp02182004.asp

如果我不清楚解释它,请告诉我。

Mihir Solanki
http://www.mihirsolanki.com


这实际上不是C#问题但是因为这是唯一的新闻组
我跟着我决定
在这里发布我的问题(请告诉我下次在哪里发帖
如果你认为这篇文章不应该在这里。
我有两个设计问题:
1.如果你将数据库查询包含在
代码中的正确(或最佳)方法是什么计划支持多个数据库。假设我有一个应用程序,它将支持SQL Server 2000和Oracle(甚至可能支持其他一些数据库)。
我将在哪里存储这些查询(那里整个应用程序中可能有很多
?查询可能很简单,复杂,有
参数,INSERT,UPDATE,DELETE语句....你得到的图片
:)
2.如何使用可扩展用户设计应用程序界面?
这是一个可能的场景:
我为3个人申请。过了一会儿,一个人真的很开心
应用程序并想要升级并添加一个简单的文本框(升级也可能需要另一个字段)数据库)但
其他
2个客户不想要那个文本框。相反,这两个客户中的一个需要在表单上有两个不同的字段。
如何设计应用程序从一开始就准备好这些
种类未来的变化?
对于一个简单的应用程序,我可以制作
应用程序的不同副本
但即使是这个简单的例子我也会有3个不同的应用程序 - 所以这个解决方案声音真的很糟糕,
可能会在几个月内变成维护噩梦。
我也可以这样:
if(client ==" client1"){//显示这个文本框};
但是这看起来并不是很好 - 它会在代码中导致很多ifs

任何想法?

谢谢,
saso


this is not actually a C# problem but since this is the only newsgroup
I
follow I decided
to post my question here (please tell me where to post this next time
if you
think this post shouldn''t be here).
I have two design questions:
1. what is the correct (or best) way to include database queries into
the
code if you plan on
supporting multiple databases. Let''s say I have an application that
will
support SQL server 2000 and Oracle (and maybe even some other
database).
Where would I store these queries (there could be a LOT of them
throughout
the entire application)? The queries could be simple, complex, with
parameters, INSERT, UPDATE, DELETE statements.... you get the picture
:)
2. How to design an application with an extendable user interface?
Here is a
possible scenario:
I make an application for 3 people. After a while, one is really happy
with
the application and would like to have an upgrade and add just a
simple text
box (the upgrade could also require another field in the database) but
the
other
2 clients don''t want that textbox. Instead, one of those 2 clients
wants 2
different fields on the form.
How to design the application from the beginning to be prepared for
these
kinds of changes in the future?
For a simple application I could make different copies of the
application
but even for this simple example I would
have 3 different applications - so this solution sound REALLY bad and
would
probably turn into a maintainance nightmare in a few months.
I could also have this:
if ( client == "client1") { // show this textbox };
but again this doesn''t seems very good - it would lead to a lot of ifs
in
the code.
Any ideas?

thanks,
saso



感谢Mihir的回复!


我看过提供者模型。


我还有一个问题。

假设我有一个带有两个按钮的表格:

Whe我点击Button1这个sql会执行:select * from table1

当我点击Button2时:select * from table

(这些是只是简单的例子,在Oracle和SQL服务器上是相同的。更多

复杂的例子

有不同的语法!)


我现在有一个全局的Provider对象:

提供者p =新的SqlProvider();



提供者p =新的OracleProvider();


在button1_Click我会有这个代码:

string sql = p.GetStatement(?????);


这是我的问题。我将如何以及在何处存储sql语句。在每个提供程序中有一个

表中的所有SQL语句

并通过某种形式的id访问它们?

并写道:

string sql = p.GetStatement(" Form.button1_Click"); ??


您怎么看?


谢谢,

saso


ps:我也有关于我的2.问题的问题(关于不同的用户

控制),但是稍后我会问,当我们解决这个问题时:)


" Mihir Solanki" < MI ********** @ hotmail.com>在消息中写道

news:19 ************************* @ msnews.microsoft。 com ...
Thanks for the reply Mihir!

I''ve looked at the provider model.

I do have one more question.
Let''s say I have a Form with two buttons:
When I would click Button1 this sql would execute: "select * from table1"
and when I would click Button2: "select * from table"
(these are just simple examples, equal on Oracle and SQL server. More
complex examples would
have a different syntax!)

I would now have a global Provider object:
Provider p = new SqlProvider();
or
Provider p = new OracleProvider();

in button1_Click I would have this code:
string sql = p.GetStatement(?????);

Here is my question. How and where would I store the sql statements. Have a
table of all SQL statements
in each provider and access them by some form of id?
And write:
string sql = p.GetStatement("Form.button1_Click"); ??

What do you think?

thanks,
saso

ps: I also have questions about my 2. question (regarding different user
controls) but I''ll ask that later, when we solve this "problem" :)


"Mihir Solanki" <mi**********@hotmail.com> wrote in message
news:19*************************@msnews.microsoft. com...


第二个问题
我不认为将所有客户端特定逻辑放在UI中是一个好主意。
如果明天你得到了新的客户端,那么你必须更改你的代码并且很快就会很难保持这种代码。

相反,我会建议你创建不同的Usercontrol对于不同的客户。通过这样做,您的所有客户端特定逻辑将仅在用户控件中。然后在运行时你检查哪个客户端是活动的,并且你加载那个特定的UsreControl。

通过这样做,你的表格将是干净和整洁的。如果您获得新客户,您只需创建新的Usercontrol即可。现在您也可以简单地解决这个问题。因为很快你将在你的组件中拥有N个
客户端和N * N1个用户控件,并且没有需要给予X客户,Y cusomer'的用户控件

因此,您将所有X客户用户控件放在一个程序集中。 Y cusomer''s
UserControl在另一个组件中,只传递他们需要的程序集。
这样做你不给他们他们不需要的东西。

如果你听说过Provider Model然后你可以使用模式来解决这类问题。将使您的UI易于维护
并且将是非常可扩展的。

您也可以在第一个问题中使用类似的逻辑。对不同的数据库使用不同的
程序集。有共同的界面,所以他们所有人都实现相同的方法。
看看提供者模型模式。基本上它是这种情况的一种模式

http://msdn.microsoft.com/library/de...sp02182004.asp

如果我不清楚解释它,请告诉我。

Mihir Solanki
http://www.mihirsolanki.com


这实际上不是C#问题,但因为这是只有新闻组
我跟着我决定
在这里发布我的问题(请告诉我下次在哪里发帖
如果你认为这篇文章不应该在这里)。
我有两个设计问题:
1.如果你计划的话,将数据库查询包含在
代码中的正确(或最佳)方法是什么? />支持多个数据库。假设我有一个应用程序,它将支持SQL Server 2000和Oracle(甚至可能支持其他一些数据库)。
我将在哪里存储这些查询(那里整个应用程序中可能有很多
?查询可能很简单,复杂,有
参数,INSERT,UPDATE,DELETE语句....你得到的图片
:)
2.如何使用可扩展用户设计应用程序界面?
这是一个可能的场景:
我为3个人申请。过了一会儿,一个人真的很开心
应用程序并想要升级并添加一个简单的文本框(升级也可能需要另一个字段)数据库)但
其他
2个客户不想要那个文本框。相反,这两个客户中的一个需要在表单上有两个不同的字段。
如何设计应用程序从一开始就准备好这些
种类未来的变化?
对于一个简单的应用程序,我可以制作
应用程序的不同副本
但即使是这个简单的例子我也会有3个不同的应用程序 - 所以这个解决方案声音真的很糟糕,
可能会在几个月内变成维护噩梦。
我也可以这样:
if(client ==" client1"){//显示这个文本框};
但是这看起来并不是很好 - 它会在代码中导致很多ifs

任何想法?

谢谢,
saso


this is not actually a C# problem but since this is the only newsgroup
I
follow I decided
to post my question here (please tell me where to post this next time
if you
think this post shouldn''t be here).
I have two design questions:
1. what is the correct (or best) way to include database queries into
the
code if you plan on
supporting multiple databases. Let''s say I have an application that
will
support SQL server 2000 and Oracle (and maybe even some other
database).
Where would I store these queries (there could be a LOT of them
throughout
the entire application)? The queries could be simple, complex, with
parameters, INSERT, UPDATE, DELETE statements.... you get the picture
:)
2. How to design an application with an extendable user interface?
Here is a
possible scenario:
I make an application for 3 people. After a while, one is really happy
with
the application and would like to have an upgrade and add just a
simple text
box (the upgrade could also require another field in the database) but
the
other
2 clients don''t want that textbox. Instead, one of those 2 clients
wants 2
different fields on the form.
How to design the application from the beginning to be prepared for
these
kinds of changes in the future?
For a simple application I could make different copies of the
application
but even for this simple example I would
have 3 different applications - so this solution sound REALLY bad and
would
probably turn into a maintainance nightmare in a few months.
I could also have this:
if ( client == "client1") { // show this textbox };
but again this doesn''t seems very good - it would lead to a lot of ifs
in
the code.
Any ideas?

thanks,
saso




是的,好问题。有几种方式


1.你创建一个资源文件.resx(即sqlserver.queries.resx和oracle.queries.resx)

和商店其中的所有存储过程

为您使用的每个存储过程处理类似


for SQL Server

GetEmployee ="选择*来自员工" ;;

GetCustomer =" Select * from Customers" ;;

GetEmployeesById =" Select * from Employees WHERE EmployeeId = @ EmployeeID"


对于Oracle(需要为oracle工作所需的任何更改)

GetEmployee =" Select * from Employees" ;;

GetCustomer ="选择*来自Customers" ;;

GetEmployeesById =" Select * from Employees WHERE EmployeeId = @ EmployeeID"


然后在按钮中点击你的简单电话


提供者p = new(无论提供者);

p.GetEmployees(ResourceManager.GetResourceString(" GetEmployees&qu) ot;)(确切地说

资源管理器的语法)


有些东西谎言

所以对于每个数据提供者你有资源文件,询问特定于

该提供者


2.还有另一种方式(我们正在使用的是我公司)

创建一个提供静态方法的包装类


它会有这样的东西


class DataManager {

提供者提供者= null;


public DataManager(){

//在构造函数中为提供者变量分配默认数据提供者

} $ / $
公共静态DataTable GetEmployees(){

//你调用提供者的方法

return provider.GetEmployees();


}


}


您的提供者抽象类将是这样的

类抽象DataProvider {

公共抽象DataTable GetEmployees();

公共抽象DataTable GetEmp loyeeById(int id);


}


和你的SQL服务器提供商会是这样的


class SqlManager {

public SqlManager(){


}

public static DataTable GetEmployees(){

//你调用provider的方法

DataSet ds = new DataSet();

//编写代码来填充这个数据集

//你可以在这里使用硬编码的查询

//或使用资源文件来获取查询

//或使用存储过程

//然后返回数据表

返回ds.Table [0];

}

public static DataTable GetEmployeeById(int id){

//获取数据的某些代码

}

}


你的oracle提供者会是这样的这个


类oracleManager {


public OralceManager(){


}

public static DataTable GetEmployees(){

//你调用提供者的方法

DataSet ds = new DataSet();

//编写代码来填充此数据集

//你可以在这里使用硬编码查询

//或使用资源文件获取查询

//或使用存储过程

//然后返回数据表

返回ds.Table [ 0];

}

公共静态DataTable GetEmployeeById(int id){

//获取数据的某些代码

}


}

在这里你可以看到按钮点击你只是简单地调用DataManager.GetEmployees()

方法不是不需要知道关于查询的任何事情。您的数据管理器

只是一个包装器,同样,该类不需要知道如何调用数据库

。然后你得到了你的特定提供者,知道如何调用特定数据库并知道它将如何存储过程。

OracleManager和SqlManager不需要具有相同的东西。 sqlManager可以

有存储过程,oracle可以有硬编码查询。 ..我的意思是他们

可以有seprare实现。


基本上这样做你的UI doens需要知道你的数据库的任何事情

和数据库层需要了解渲染UI。易于维护

并延长。


希望你得到我的观点


如果我不清楚的话。 ..让我知道


Mihir Solanki
http ://www.mihirsolanki.com
yes,good question. There are couple of way

1. You create a Resource file .resx (i.e sqlserver.queries.resx and oracle.queries.resx)
and store all the stored procedures in it
for each stored procedure you use Handle something like

for SQL Server
GetEmployee = "Select * from Employees";
GetCustomer = "Select * from Customers";
GetEmployeesById = "Select * from Employees WHERE EmployeeId = @EmployeeID"

For Oracle (with any changes required to work for oracle)
GetEmployee = "Select * from Employees";
GetCustomer = "Select * from Customers";
GetEmployeesById = "Select * from Employees WHERE EmployeeId = @EmployeeID"

and then in button click you simple call

Provider p = new (Whatever provider);
p.GetEmployees(ResourceManager.GetResourceString(" GetEmployees") (check exact
syntax of Resource Manager)

something liek that
so for each data provider you have resource file with queries specific to
that provider

2. There is another way (which we are using is in my company)
Create a Wrapper Class which provides static methods

it will have something like this

class DataManager{
Provider provider = null;

public DataManager(){
// in constructor you assign provider variable a default data provider
}
public static DataTable GetEmployees(){
// you call provider''s method
return provider.GetEmployees();

}

}

your provider abstract class will be something like this
class abstract DataProvider{
public abstract DataTable GetEmployees();
public abstract DataTable GetEmployeeById(int id);

}

and your sql server provider will be something like this

class SqlManager{
public SqlManager(){

}
public static DataTable GetEmployees(){
// you call provider''s method
DataSet ds = new DataSet();
// write code to fill this dataset
// you can use hardcoded Queries here
// or use resource file to get queries
// or use stored procedures
// and then return datatable
return ds.Table[0];
}
public static DataTable GetEmployeeById(int id){
// somecode to get data
}
}

your oracle provider will be something like this

class oracleManager{

public OralceManager(){

}
public static DataTable GetEmployees(){
// you call provider''s method
DataSet ds = new DataSet();
// write code to fill this dataset
// you can use hardcoded Queries here
// or use resource file to get queries
// or use stored procedures
// and then return datatable
return ds.Table[0];
}
public static DataTable GetEmployeeById(int id){
// somecode to get data
}

}
here you can see in button click you just simpllyt calling DataManager.GetEmployees()
method which doesnt not need to know anythig about query. Your datamanager
is just a wrapper, again that class doesnt need to know anythigtn about how
to call database. then you got your speecific provider which know how to
call that particular database and know how it is going to get stored procedured.
OracleManager and SqlManager doesnt need to have same thing. sqlManager can
have stored procedure and oracle can have hardcoded queries. ..I mean they
can have seprare implementation.

basically by doing so your UI doens need to know anything about your database
and database layer doent need to know about rendering UI. Easy to maintain
and extend.

hope u got my point

again if I am not clear. .. let me know

Mihir Solanki
http://www.mihirsolanki.com
感谢Mihir的回复!

我看过提供者模型。 />
我还有一个问题。
让我们说我有一个带有两个按钮的表单:
当我点击Button1时,这个sql会执行:select * from
table1"
当我点击Button2时:" select * from table"
(这些只是简单的例子,在Oracle和SQL服务器上相同。更多
复杂的例子会
有不同的语法!)
我现在有一个全局的Provider对象:
Provider p = new SqlProvider();

Provider p = new OracleProvider() ;
在button1_Click我会有这个代码:
string sql = p.GetStatement(?????);
这是我的问题。我将如何以及在何处存储sql语句。
在每个提供程序中都有一个包含所有SQL语句的表,并通过某种形式的id访问它们?
并写:
string sql = p.GetStatement(" Form.button1_Click"); ??你怎么看?

谢谢,
saso
ps:我也对我的2.问题有疑问(关于不同的
用户控件)但是我会问,稍后,当我们解决这个问题时,我想要Mihir Solanki和Mihir Solanki。 < MI ********** @ hotmail.com>在消息中写道
新闻:19 ************************* @ msnews.microsoft。 com ...
Thanks for the reply Mihir!

I''ve looked at the provider model.

I do have one more question.
Let''s say I have a Form with two buttons:
When I would click Button1 this sql would execute: "select * from
table1"
and when I would click Button2: "select * from table"
(these are just simple examples, equal on Oracle and SQL server. More
complex examples would
have a different syntax!)
I would now have a global Provider object:
Provider p = new SqlProvider();
or
Provider p = new OracleProvider();
in button1_Click I would have this code:
string sql = p.GetStatement(?????);
Here is my question. How and where would I store the sql statements.
Have a
table of all SQL statements
in each provider and access them by some form of id?
And write:
string sql = p.GetStatement("Form.button1_Click"); ??
What do you think?

thanks,
saso
ps: I also have questions about my 2. question (regarding different
user controls) but I''ll ask that later, when we solve this "problem"
:)

"Mihir Solanki" <mi**********@hotmail.com> wrote in message
news:19*************************@msnews.microsoft. com...


第二个问题
我不认为将所有客户端特定逻辑放入<用户界面。
如果明天你再次获得新客户端,那么你必须更改你的代码和
很快就会很难保持这种代码。
相反我建议你为不同的客户创建不同的Usercontrol。通过这样做,您的所有客户端特定逻辑将仅在UserControl中。然后在运行时你检查哪个客户端是活动的,你加载那个特定的UsreControl。

通过这样做你的表格将干净整洁。如果你得到新客户
你只需创建新的Usercontrol即可。现在你也可以简单地解决这个问题。因为很快你将在你的装配中拥有N
号码客户端和N * N1个用户控件,而且没有必要给X客户,Y cusomer'的用户控件

因此,您将所有X客户用户控件放在一个程序集中。 Y
cusomer'的UserControl在另一个组件中并传递它们只需要
组件。这样做你不会给他们不需要的东西。

如果你听说过Provider Model Pattern,那么你可以使用那个
模式来解决这类问题。将使您的UI易于维护并且非常易于扩展。

您也可以在第一个问题中使用类似的逻辑。对不同的数据库使用不同的
程序集。有共同的界面,所以他们所有的
实现相同的方法。
看看提供者模型模式。基本上它是这种情况的一种模式
http://msdn.microsoft.com/library/de...ary/en-us/dnas
pnet / html / asp02182004 .asp

如果我不清楚解释它,请告诉我。

Mihir Solanki
http://www.mihirsolanki.com


这实际上不是C#问题但由于这是唯一的新闻组
我跟着我决定
在这里发布我的问题(请告诉我在哪里发布下一个
时间
如果你认为这篇文章不应该在这里。
我有两个设计问题:
1.包含数据库查询的正确(或最佳)方式是什么?
如果您计划支持多个数据库,请使用
代码。假设我有一个应用程序,它将支持SQL Server 2000和Oracle(甚至可能支持其他一些数据库)。
我将在哪里存储这些查询(那里整个应用程序中可能有很多
?查询可能很简单,复杂,有
参数,INSERT,UPDATE,DELETE语句....你得到了
图片
:)
2.如何设计一个应用程序具有可扩展的用户界面?
这是一个可能的场景:
我为3人申请。过了一会儿,一个人真的很开心和
应用程序,想要升级并只添加一个简单的文本框(升级也可以需要数据库中的另一个字段)


其他
2个客户不想要那个文本框。相反,这两个客户中的一个需要在表单上有两个不同的字段。
如何设计应用程序从一开始就准备好这些
种类未来的变化?
对于一个简单的应用程序,我可以制作
应用程序的不同副本
但即使是这个简单的例子我也会有3个不同的应用程序 - 所以这个解决方案声音真的很糟糕
并且
可能会在几个月内变成维护噩梦。
我也可以这样:
if(client ==" client1" ){//显示这个文本框};
但是这看起来并不是很好 - 它会在代码中导致很多
if /
。 />任何想法?
谢谢,
saso


this is not actually a C# problem but since this is the only
newsgroup
I
follow I decided
to post my question here (please tell me where to post this next
time
if you
think this post shouldn''t be here).
I have two design questions:
1. what is the correct (or best) way to include database queries
into
the
code if you plan on
supporting multiple databases. Let''s say I have an application that
will
support SQL server 2000 and Oracle (and maybe even some other
database).
Where would I store these queries (there could be a LOT of them
throughout
the entire application)? The queries could be simple, complex, with
parameters, INSERT, UPDATE, DELETE statements.... you get the
picture
:)
2. How to design an application with an extendable user interface?
Here is a
possible scenario:
I make an application for 3 people. After a while, one is really
happy
with
the application and would like to have an upgrade and add just a
simple text
box (the upgrade could also require another field in the database)
but
the
other
2 clients don''t want that textbox. Instead, one of those 2 clients
wants 2
different fields on the form.
How to design the application from the beginning to be prepared for
these
kinds of changes in the future?
For a simple application I could make different copies of the
application
but even for this simple example I would
have 3 different applications - so this solution sound REALLY bad
and
would
probably turn into a maintainance nightmare in a few months.
I could also have this:
if ( client == "client1") { // show this textbox };
but again this doesn''t seems very good - it would lead to a lot of
ifs
in
the code.
Any ideas?
thanks,
saso



这篇关于应用设计问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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