开发者

How to handle plugin settings over TCP [closed]

开发者 https://www.devze.com 2023-04-09 02:38 出处:网络
Closed. This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post.
Closed. This question needs details or clarity. It is not currently accepting answers.

Want to improve this question? Add details and clarify the problem by editing this post.

Closed 9 years ago.

Improve this question

I 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号