It is currently Sat Nov 26, 2011 8:18 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Ted Architecture
PostPosted: Tue Oct 13, 2009 6:06 pm 
Offline
Developer

Joined: Thu Oct 08, 2009 9:31 pm
Posts: 44
So after thinking about it for a while, and debating whether I'd create a post about it, I figured I'd start a discussion on a proposed architecture change for ted. Might just be a wacky thought, but in the spirit of separating the CORE from the UI and the daemon tasks, it might spark some thought.

What if Ted's core was written to be a standalone local service in which clients could communicate with via JMI, SOAP, or something else of sorts, via a standard API.

Any client could then be written to communicate with this service. The Swing UI, a web UI (choose any flavor if SOAP was used). Any tool could be written in almost any language if SOAP was used - all using the same service.

Then ted could be distributed as:
1) ted-core.jar
2) ted-swing.jar
3) ted-web-ui.war
4) plugin-foo.zip (plugin???)

Users could set up any combination they wanted.

Just some food for thought.

_________________
MS


Top
 Profile  
 
 Post subject:
PostPosted: Tue Oct 13, 2009 8:43 pm 
Offline
Lead Developer
User avatar

Joined: Mon Jan 16, 2006 5:46 pm
Posts: 904
Location: Netherlands
Well, separating the core from the UI seems like a good idea of course :)

Quote:
What if Ted's core was written to be a standalone local service in which clients could communicate with via JMI, SOAP, or something else of sorts, via a standard API.

I've no experience with any of these protocols (or how you would name them). How would this work in practice? Is there an interface in the core where the UI's communicate with using SOAP? Or is SOAP the interface here?

Please forgive my ignorance :)It seems that you know a lot more of these things than I do.

Quote:
Then ted could be distributed as:
1) ted-core.jar
2) ted-swing.jar
3) ted-web-ui.war
4) plugin-foo.zip (plugin???)

Can you also distribute the single jars? I would think these always have to be in sync some sort of. If the core has version 10 and the swing version 5 than you would run into problems or not?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 14, 2009 6:06 pm 
Offline
Developer

Joined: Mon Apr 28, 2008 11:33 pm
Posts: 36
In the last week or so i've been attempting to seperate the core functionality of TED from the GUI. It has not been easy!

Alot of TEDs functionality is very tightly intergrated into code relating to the gui and also some of the gui code is mixed in with non-gui code. (an example of this is within TedIO.java where a simple check for a new shows.xml actually produces and displays a GUI window! or in TedSerie.java where the code to generate the rss feeds uses the GUI element FeedPopupItem).

I have got the point where there are only a couple of methods that rely on being passed an instance of TedMainDialog, but i am struggling to find a way around this reliance on the GUI.

Unfortunatley i have been unable to test any of the work i have done, as i will need to rewrite the whole GUI to work with the core that i have seperated (i had thought about looking at using SWT https://ted.nu/bugs/index.php?do=details&task_id=264).

i have also had a thought about a redesign of the TedSerie class and its handling within Ted. Maybe use an Interface that defines all of the methods needed for updating the schedule, checking for new torrents, etc and then having TED work to the interface rather than instances of TedSerie or TedSerieDaily. However this would require quite a large rewrite, but would allow for the easier addition of other types of Series (e.g. the requested anime serie which doesn't have season and episode numbers) each implementation of the Serie Interface would then be able to let the core know wether it needed to be updated or checked. There would be no need to make calls to the specific classes, only the interface methods which would provide all the information about the series that TED would need to know.

Obviously if any one wanted to have a look at what i have done so far, i would be happy to show them!!

gb


Top
 Profile  
 
 Post subject:
PostPosted: Wed Oct 14, 2009 10:06 pm 
Offline
Lead Developer
User avatar

Joined: Mon Jan 16, 2006 5:46 pm
Posts: 904
Location: Netherlands
itsmegb wrote:
In the last week or so i've been attempting to seperate the core functionality of TED from the GUI. It has not been easy!

Wow, more developers are helping every day :)Is the stuff you have done so far compatible with the suggested architecture improvements? (I think so looking at your post but I just want to make sure).

Quote:
I have got the point where there are only a couple of methods that rely on being passed an instance of TedMainDialog, but i am struggling to find a way around this reliance on the GUI.

What kind of stuff is this? I can't be taken out of the TedMainDialog?

Quote:
Unfortunatley i have been unable to test any of the work i have done, as i will need to rewrite the whole GUI to work with the core that i have seperated (i had thought about looking at using SWT https://ted.nu/bugs/index.php?do=details&task_id=264).

It would be cool if we could use something like SWT (although I didn't look into it that thoroughly yet). But I'm wondering why exactly you've to rewrite the whole UI?

Quote:
i have also had a thought about a redesign of the TedSerie class and its handling within Ted...

Yeah, the TedSerie is one of the things that most badly needs a redesign. I like your ideas about it but I would suggest to finish one thing at a time. It would be better to have one finished item than two things which are left unfinished.

Quote:
Obviously if any one wanted to have a look at what i have done so far, i would be happy to show them!!

You can always send us an e-mail with a patch. I'm always interested to have a look at it. Although it might take a few days to respond as I think that a lot of code has changed/moved :)


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 15, 2009 3:33 am 
Offline
Developer

Joined: Thu Oct 08, 2009 9:31 pm
Posts: 44
I'm thinking that some of the dependency issues might be solvable if the UI took on more of an MVC (model/view/controller) pattern. ie. COntroller handles actions on the form along with asking the model to update. The model utilizes TedIO to update/fetch data and notifies the view of changes.

"In theory", this would make a big stride in reducing the coupling currently present in Ted.

_________________
MS


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 15, 2009 8:32 am 
Offline
Developer

Joined: Mon Apr 28, 2008 11:33 pm
Posts: 36
Quote:
You can always send us an e-mail with a patch. I'm always interested to have a look at it.

i actually started a new eclipse project for my rewrite, so producing a patch wouldn't be very simple! also the change was quite drastic! i have refactored into more packages, rather than keeping everything under a folder called Ted.

Quote:
I'm thinking that some of the dependency issues might be solvable if the UI took on more of an MVC (model/view/controller) pattern.

This is the view i took aswell, a MVC would completely decouple the way ted is displayed form how it actually works (My goal was to help work on the TedDaemon, as i would have used it on my server!). But with the decoupling it will make it easier for to implement a web UI, as mstead has been discussing here: https://ted.nu/forum/viewtopic.php?t=2003

Quote:
But I'm wondering why exactly you've to rewrite the whole UI?

I may have over stated when i said i needed to rewrite the whole UI, but it will be a lot of work to seperate it! (Not that i don't mind doing it, its just hard to find the time at the moment!)

As i am at work at the moment, i will try to find the time to put the project in my private svn repo and if you wish i can pm you the url so you can checkout a copy of what i have done so far.


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 15, 2009 12:56 pm 
Offline
Developer

Joined: Thu Oct 08, 2009 9:31 pm
Posts: 44
I'd love to check out what you have done. The separation is required once I get to the server side implementation of the WebUI (getting close now).

_________________
MS


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 15, 2009 1:52 pm 
Offline
Lead Developer
User avatar

Joined: Mon Jan 16, 2006 4:11 pm
Posts: 645
Location: Netherlands
Also send me and Joost the SVN url so we can check your stuff out!

_________________
Roel

i watch: simpsons, south park, lost, top gear, true blood & fringe
download - documentation - bugs/feature requests - sourceforge -


Top
 Profile  
 
 Post subject: Re: Ted Architecture
PostPosted: Thu Oct 15, 2009 3:45 pm 
Offline
Developer

Joined: Thu Oct 08, 2009 1:18 am
Posts: 62
mstead wrote:
What if Ted's core was written to be a standalone local service in which clients could communicate with via JMI, SOAP, or something else of sorts, via a standard API.


Hmm... it sounds to me like the 'remote' part of the remote UI is actually just the browser, so in reality you really have two local clients.

If so then there may not be a need for something like SOAP. Just start them in the same JVM and call directly.

This is also why I was considering that it might not be necessary to separate out the jar files. The separate files could be helpful from a code separation perspective, but so could a proper packages and a jdepends unit test.

What'd'ya think?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 15, 2009 9:29 pm 
Offline
Lead Developer
User avatar

Joined: Mon Jan 16, 2006 4:11 pm
Posts: 645
Location: Netherlands
itsmegb wrote:
Quote:
I'm thinking that some of the dependency issues might be solvable if the UI took on more of an MVC (model/view/controller) pattern.

This is the view i took aswell, a MVC would completely decouple the way ted is displayed form how it actually works. But with the decoupling it will make it easier for to implement a web UI, as mstead has been discussing here: https://ted.nu/forum/viewtopic.php?t=2003


Could you draw and post some kind of UML diagram of the design approach you're taking? I'm interested how you converted ted into the MVC pattern.

_________________
Roel

i watch: simpsons, south park, lost, top gear, true blood & fringe
download - documentation - bugs/feature requests - sourceforge -


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 16, 2009 8:02 am 
Offline
Developer

Joined: Mon Apr 28, 2008 11:33 pm
Posts: 36
i will try and get one drawn up today, im quite busy at the moment with my job, but i will definitley try. i should also be able to send a link to my svn repo today.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 16, 2009 9:20 pm 
Offline
Lead Developer
User avatar

Joined: Mon Jan 16, 2006 5:46 pm
Posts: 904
Location: Netherlands
mstead wrote:
I'd love to check out what you have done. The separation is required once I get to the server side implementation of the WebUI (getting close now).

Did you also get the PM from itsmegb?

If not; gb is it okay if I send the url also to the other developers.

I had a very brief look at what you did. Am I correct if there are a lot of files missing?

Apart from that the new structure looks like what was discussed before.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 17, 2009 2:31 am 
Offline
Developer

Joined: Mon Apr 28, 2008 11:33 pm
Posts: 36
yea i did send it to mstead aswell.

Quote:
I had a very brief look at what you did. Am I correct if there are a lot of files missing?

you are correct, none of the gui stuff is in there at the moment, however i have since been adding all the UI stuff today. i will add to the repo tomorrow, i have been trying to get it error free so that it atleast compiles, however it all still needs to be changed to work with the core.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Oct 18, 2009 7:32 pm 
Offline
Developer

Joined: Thu Oct 08, 2009 9:31 pm
Posts: 44
Sorry I haven't had a chance to check the site in a while. I pulled down the code today... I won't likely get a chance to look at it for a little while, but I'll comment as soon as I do.

_________________
MS


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 31, 2009 8:11 pm 
Offline
Developer

Joined: Mon Apr 28, 2008 11:33 pm
Posts: 36
unfortunatley there has been a death in my close family, so i will have no time to do any development on TED at the moment. (i have also started using newzbin, so may attempt adding that to ted)

Sorry every one, i look forward to the upcoming changes in TED!!

gb


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group