Hi everyone !
I've got a few questions about the architecture of a software that I'm working on !
So basically, this software allow the user to access to some popular sites :
- Social networks (Facebook, MySpace, ...),
- Common services (RSS, Mails, Twitter...),
- Social bookmarkings (Digg, Delicious...),
- Chats (MSN, AOL...),
- ...
Currently the architecture looks like this : Use of MVC and Observer/Observable design patterns for interaction between the model (TApp_Core) and the user interface.
TApp_Core
TBookmarkingServices_Core
TDelicious (implement IBookmarkingServices)
TDigg (implement IBookmarkingServices)
etc... (implement IBookmarkingServices)
TChatServices_Core
TMSN (implement IChatServices)
TGoogleChat (implement IChatServices)
TAOLChat (implement IChatServices)
etc...
TRSSServices_Core
...
So the software create an instance of TApp_Core and then depending on the user's choice, it creates some instances of other services (ex : App_Core.BookmarkingServices_Core.AddServices(Digg, User, Password);).
Some questions !
- Do you think that the current software design is right ?
- There is currently only one thread for all the software... Is creating a new thread for each request to a service would be better ? (for example the TDigg receive a message from a button, it creates a thread which will create a TidHTTP, generate the request to the server, wait for the response, parse the response, send a message to each observer (callback) and then free the thread.
- It seems very hard to link all View/Controller with each part of the model, is that normal that it requires so much works ?
Ex : to send a message for example using with Twitter, it would require to :
- Attach a controller (button) to a TApp_Core.TMicrobloggingServices_Core.TTwiter object (model)
- wait the user to click on the button
- Send a message to TTwiter (the model)
- Create a thread to send the request to the server
- Parse the response from the server
- Execute callbacks to notify that the request has been executed and to give the result
- Free the thread
- If I use the previous idea, won't it create too much threads and make the computer slow and less responsible ? Except, if I implement a thread pool (but it's quite complex to use it).
- Does SQLite 3 is good enough to store all data on the client ? (data can be mails, rss feed, etc... so it can be quite a lot of data with times).
Thanks and sorry for my bad English !