How to handle plugin settings over TCP [closed]
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 9 years ago.
Improve this questionI have an application which consists of two parts. A server and a client. The two communicate via TCP sockets.
开发者_开发技巧The server supports plugins which in turn can store settings of various complexity (anything from integers and strings to complex objects).
I would like to build support for editing a plugins settings in the client UI, however this has proven to be hard since I don't really know what kind of data the plugin is storing.
Does anyone have any good ideas on how to do something like this?
-- update
To give an example,
The server has a plugin which monitors different RSS feeds, and acts upon updates. The plugin stores its settings as a list complex objects
class RssItem
{
string Url { get; set; }
int PollInterval { get; set; }
}
However, the server does not know about this. It just stores the serialized object.
Now I'm interested in ways to have the client application show a form where a user can edit this list of RssItem
. Any solution I can think of involves heavy reflection on a serialized object.
An application I know does something like this is the Deluge torrent client. It's written in Python and manages server side plugins, but through some Twisted Deferred objects hux flux magic the plugins can have a custom settings page in the client UI.
With smart configuration objects you can create dynamic forms on client side. For example use ExtJS on client and server will send you the JSON with form structure.
This is not a solution but this is what you have to consider.
精彩评论