classes and OO-programming

Development-related discussion, including bundled plugins
abompard
Bear Rating Trainee
Bear Rating Trainee
Posts: 1
Joined: 02 Feb 2010, 10:21

classes and OO-programming

Postby abompard » 02 Feb 2010, 10:31

Hi Andrew and others,

I miss one feature in the mobile view, it's the ability to switch to the next article when viewing an article, without going back to the list. I tried to code this once (on the now-classical view), but it's pretty hard because :
  • the regular view using different panes, there never was a need for a getNextArticle() function in the article-viewing context
  • the next article can be different depending on the view mode (unread, adaptative, etc.)

I can try to do it again with the new UI, but I really think some object-oriented programming would help with this. TT-RSS does its work with functions only, does this mean that you are opposed to using classes ? May I indtroduce some in my patch ? Please tell your position on this.

I happen to understand OO code better, but it may not be your preference, so it's up to you of course.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: classes and OO-programming

Postby fox » 02 Feb 2010, 11:36

I'm not opposed to classes in general (that would be rather stupid), it just so happens that tt-rss is written in a procedural manner. For the sake of, well, uniformity I'd like it to stay this way.

Adding some sort of neutral getNextArticle() function would be rather hard, yes, given that not all the information required is generally available when viewing articles. I'm not sure it even depends on the UI.

It's probably much easier to work with the results of queryFeedHeadlines() and get next/previous IDs there while you are rendering headlines and the information about view mode, direction, and such is available. That poses other problems, though. :(

ukko
Bear Rating Trainee
Bear Rating Trainee
Posts: 9
Joined: 03 Dec 2008, 12:30
Location: Russia
Contact:

Re: classes and OO-programming

Postby ukko » 02 Feb 2010, 14:59

Hello everyone!

I would also like that would TTRSS would be in the style of OOP. But we need to start from small. All of overwrite at once will not work.

Let us construct the UML diagram and based on it can actually start to rewrite the system.

I am ready to tackle the implementation of the work with the database.

User avatar
fox
^ me reading your posts ^
Posts: 6318
Joined: 27 Aug 2005, 22:53
Location: Saint-Petersburg, Russia
Contact:

Re: classes and OO-programming

Postby fox » 02 Feb 2010, 15:45

Let us construct the UML diagram and based on it can actually start to rewrite the system.


I propose an alternative: let's not. :d


Return to “Development”

Who is online

Users browsing this forum: No registered users and 3 guests