Versioning question
- From: "Rick" <rdalgren@xxxxxxxxx>
- Date: 23 May 2006 13:42:07 -0700
Let me preface my question by stating that I'm a remoting newbie...
I've inherited a project that the first version was designed and coded
by an outside consulting company. I've been asked to make some changes
I've got a client and a server that implement a common interface:
using System;
namespace Company
{
public interface IData
{
// Methods
bool SaveActivity(Activity a, string username, string password);
bool SaveActivity(string username, string password, int
ActivityTypeID, DateTime FollowUpDate, int TimeSpent, bool isOpen,
string notes, int client_id, DateTime ActivityDate, string Subject,
bool ShowOnCreatorHome, string FileName, bool TeamAccessOnly, string
FilePath, int fileSize);
}
}
In the same assembly as the interface, I've got an Activity object:
using System;
namespace Company {
[Serializable]
public class Activity {
private int _ActivityTypeID;
private DateTime _FollowUpDate;
private int _TimeSpent;
private bool _IsOpen;
private string _Notes;
private int _client_id;
private DateTime _ActivityDate;
private string _Subject;
private bool _ShowOnCreatorHome;
private string _FileName;
private bool _TeamAccessOnly;
private string _FilePath;
private int _fileSize;
public Activity() {
}
public Activity(int _ActivityTypeId, DateTime _FollowUpDate, int
_TimeSpent, bool _IsOpen, string _Notes, int _client_id, DateTime
_ActivityDate, string _Subject, bool _ShowOnCreatorHome, string
_FileName, bool _TeamAccessOnly, string _FilePath, int filesize) {
this._ActivityTypeID = _ActivityTypeId;
this._FollowUpDate = _FollowUpDate;
this._TimeSpent = _TimeSpent;
this._IsOpen = _IsOpen;
this._Notes = _Notes;
this._client_id = _client_id;
this._ActivityDate = _ActivityDate;
this._Subject = _Subject;
this._ShowOnCreatorHome = _ShowOnCreatorHome;
this._FileName = _FileName;
this._TeamAccessOnly = _TeamAccessOnly;
this._FilePath = _FilePath;
this._fileSize = filesize;
}
public int FileSize {
get { return _fileSize; }
set { _fileSize = value; }
}
public int ActivityTypeId {
get { return _ActivityTypeID; }
set { _ActivityTypeID = value; }
}
public DateTime ActivityDate {
get { return _ActivityDate; }
set { _ActivityDate = value; }
}
public DateTime FollowUpDate {
get { return _FollowUpDate; }
set { _FollowUpDate = value; }
}
public int TimeSpent {
get { return _TimeSpent; }
set { _TimeSpent = value; }
}
public bool IsOpen {
get { return _IsOpen; }
set { _IsOpen = value; }
}
public string Notes {
get { return _Notes; }
set { _Notes = value; }
}
public int Client_Id {
get { return _client_id; }
set { _client_id = value; }
}
public string Subject {
get { return _Subject; }
set { _Subject = value; }
}
public bool ShowOnCreatorHome {
get { return _ShowOnCreatorHome; }
set { _ShowOnCreatorHome = value; }
}
public string FileName {
get { return _FileName; }
set { _FileName = value; }
}
public bool TeamAccessOnly {
get { return _TeamAccessOnly; }
set { _TeamAccessOnly = value; }
}
public string FilePath {
get { return _FilePath; }
set { _FilePath = value; }
}
}
}
The requested change will require an additional field in the Activity
object (int FileType). Is the best solution to create a new assembly
with a new interface and a new Activity object, inheriting from the
old? The odd thing (to me) about this is, if I inherit the old
interface in the new one, I still have to implement the old methods in
the new client. I understand the server would need the old
implmentation for backwards compatibility.
Hope this makes sense....
ANY suggestions would be greatly appreciated!!
.
- Prev by Date: Remoting - Strange Behaviour
- Next by Date: Re: How to restrict remote client by IP address
- Previous by thread: Remoting - Strange Behaviour
- Next by thread: Re: How to restrict remote client by IP address
- Index(es):
Relevant Pages
|
Loading