Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Developing U++ » UppHub » RSS Parser/Composer Class For U++
RSS Parser/Composer Class For U++ [message #18139] Fri, 12 September 2008 14:48 Go to next message
Oblivion is currently offline  Oblivion
Messages: 1091
Registered: August 2007
Senior Contributor
Hi,

I have created a RSS parser/composer class and decided to make it public. Rss class is fully compliant with (and up to) V2.0 standard. Also, I have included a RssExample source code - which composes and parses (both the raw xml in an editor, and in a tree ctrl) Rss 2.0 feed through single Rss class object.

I am also working on a compact and easy-to-use "RssCtrl". (Coming soon) I will continue to upload the newer versions of the both class here and (if I get positive feedback) to SVN bazaar.

So, for both projects (Rss class and RssCtrl class), I need feedback. As always, any suggestions, constructive criticism and help are welcome.



Regards.
  • Attachment: Rss Class.zip
    (Size: 20.92KB, Downloaded 318 times)


[Updated on: Thu, 18 September 2008 17:54]

Report message to a moderator

Re: RSS Parser/Composer Class For U++ [message #18145 is a reply to message #18139] Fri, 12 September 2008 18:43 Go to previous messageGo to next message
bytefield is currently offline  bytefield
Messages: 210
Registered: December 2007
Experienced Member
As a suggestion, you may use *.zip format, in that way me and others working on Linux will can extract the archive without having to install other programs. I think that zip is more "portable" than rar so if you want in the future to use zip instead of rar i will be pleased. Thanks (hope you take this as a "constructive criticism", even if it isn't related to your code).

cdabbd745f1234c2751ee1f932d1dd75
Re: RSS Parser/Composer Class For U++ [message #18146 is a reply to message #18145] Fri, 12 September 2008 18:57 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1091
Registered: August 2007
Senior Contributor
bytefield wrote on Fri, 12 September 2008 19:43

As a suggestion, you may use *.zip format, in that way me and others working on Linux will can extract the archive without having to install other programs. I think that zip is more "portable" than rar so if you want in the future to use zip instead of rar i will be pleased. Thanks (hope you take this as a "constructive criticism", even if it isn't related to your code).


Sorry. I've changed the format to zip. From now on I'll remember that. Thanks.


Re: RSS Parser/Composer Class For U++ [message #18154 is a reply to message #18139] Sat, 13 September 2008 14:10 Go to previous messageGo to next message
captainc is currently offline  captainc
Messages: 278
Registered: December 2006
Location: New Jersey, USA
Experienced Member
Very cool idea. I will test it out. Can't wait till RssCtrl! That will be an awesome addition to the GUI packages.
Re: RSS Parser/Composer Class For U++ [message #18164 is a reply to message #18139] Sat, 13 September 2008 21:48 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1091
Registered: August 2007
Senior Contributor
I've corrected some small bugs, and cleaned up the example code a bit (I think it's completely readable now). Also I have added a simple "RssView" application. This is only a modification of the "XmlView" example. It acts the same way, but only for parsing Rss files.

Also I have supplied some simple rss feed files (which can be also downloaded at:

http://cyber.law.harvard.edu/rss/rss.html


ps. Updated souce code of the Rss class is on the first post of this topic.

Regards.


[Updated on: Sat, 13 September 2008 22:30]

Report message to a moderator

Re: RSS Parser/Composer Class For U++ [message #18243 is a reply to message #18139] Thu, 18 September 2008 20:13 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1091
Registered: August 2007
Senior Contributor
Hi,
The second iteration of Rss class is complete now. I have almost completely re-written the Rss class. Most of the public interface and the internals are changed vastly. Those ugly "if, else" chains are gone and the "ugly" static RSS structures are replaced with dynamic classes: RssTag, RssNode and RssChannel. In this way, Rss class is much more flexible and extendible for future versions. Helper functions are added to simplify the creation of specific Rss elements. One major addition to the Rss class is "multi-channel" support. Rss class, from now on supports multi-channel feeds. Compose() and Parse() methods are made virtual. Also, I have modified the examples source codes: "RssExample" demonstrates multi-channel feed creation. "RssView" parses rss (xml) files and demonstrates how it adapts gui elements to the charset/encoding of the given Rss feed.

I think the Rss class is relatively mature now (I need feedbacks though). "Probably" no changes will be made to the current class interface in the future -- only additions, internal bug fixes (if there are any) and enhancements will be made. I will add documentation(both reference and a brief RSS tutorial) to the package next week.I'm currently working on the RssCtrl (scheduled for October) and next on my todo list is to write a Rdf and a Wap class, with similar interfaces to Rss class.

Ps: The Rss class and examples cn be found on the Sourforge/upp/svn and (for a while) first post of this topic.



[Updated on: Thu, 18 September 2008 20:18]

Report message to a moderator

Re: RSS Parser/Composer Class For U++ [message #18290 is a reply to message #18139] Sat, 20 September 2008 16:20 Go to previous messageGo to next message
Oblivion is currently offline  Oblivion
Messages: 1091
Registered: August 2007
Senior Contributor
Hi,

I would like to make a proposal about Rss class:

As I mentioned before, I am also working on Rdf, Wap and Atom classes. Since these formats are also in XML format and uses the same basic structure, and the basic elements (RssTag and RssNode) of my Rss class are actually generic classes which can be also used effectively to parse (and create) feeds in this format, wouldn't it be much better to roll them into one package and create a WCSLib (Web Content Syndication Library) for U++? Actually, this won't make any impact on your code (if anyone is already using Rss class), only a header change will make your code work, after this supposed migration (a "WCSLib.h" instead of "Rss.h". In this way, we'll have a standardized/uniform code too (which will make the reading and parsing easy).

All the change I have to do is to rename RssTag and RssNode classes to WCSTag and WCSNode, and then define [Rss/Rdf/Wap/Atom]Tag and [Rss/Rdf/Wap/Atom]Node as types of them, eg.:

typedef WCSTag RssTag;
typedef WCSNode RssNode;


and, files should be:

                         WCSLib.h (#include header)
                        [WCSLib.cpp] 
                           /\
                          /  \
              ------------    ------------
              |          |    |          |
            Rss.h      Rdf.h  Atom.h    Wap.h
            Rss.cpp   Rdf.cpp Atom.cpp  Wap.cpp
  






I would like to know what do you think and your suggestions about WCSLib idea?


Regards.


[Updated on: Sat, 20 September 2008 16:45]

Report message to a moderator

Re: RSS Parser/Composer Class For U++ [message #18291 is a reply to message #18290] Sun, 21 September 2008 03:05 Go to previous messageGo to next message
captainc is currently offline  captainc
Messages: 278
Registered: December 2006
Location: New Jersey, USA
Experienced Member
Quote:

I would like to know what do you think and your suggestions about WCSLib idea?


Your new structure seems to make good sense and is better architecture. I like the idea of supporting all the standards. These big changes won't be bad right now, as the functionality is not yet a part of SVN or in final stages where people are using it in production code.

typedef WCSTag RssTag;
typedef WCSNode RssNode;

I don't think this solution is best, because all those names are valid existing names to begin with.
If you can maintain backwards compatibility with a simple change of header include path, then do that.

Another thought: maybe you can use factory method in WCS class to choose/create the appropriate WCS type (Rss, Rdf, ...) automatically.

[Updated on: Sun, 21 September 2008 03:15]

Report message to a moderator

Re: RSS Parser/Composer Class For U++ [message #18292 is a reply to message #18290] Sun, 21 September 2008 03:38 Go to previous messageGo to next message
captainc is currently offline  captainc
Messages: 278
Registered: December 2006
Location: New Jersey, USA
Experienced Member
By WAP, do you mean Wireless Application Protocol? Should it be WML then?

Also, I came across these wikipedia articles: http://en.wikipedia.org/wiki/Syndication_format_family_tree
http://en.wikipedia.org/wiki/Category:Web_syndication_format s
Re: RSS Parser/Composer Class For U++ [message #18303 is a reply to message #18290] Sun, 21 September 2008 21:19 Go to previous messageGo to next message
amrein is currently offline  amrein
Messages: 278
Registered: August 2008
Location: France
Experienced Member
Oblivion wrote on Sat, 20 September 2008 16:20

I would like to know what do you think and your suggestions about WCSLib idea?



I have the same idea as yours but using W3C instead of WCSLib.

W3C for "The World Wide Web Consortium" (http://www.w3.org), where they develops and release specifications, guidelines, software, and tools for the Web.

[Updated on: Sun, 21 September 2008 21:23]

Report message to a moderator

Re: RSS Parser/Composer Class For U++ [message #18313 is a reply to message #18303] Mon, 22 September 2008 11:55 Go to previous message
Oblivion is currently offline  Oblivion
Messages: 1091
Registered: August 2007
Senior Contributor
captainc wrote on Sun, 21 September 2008 04:05


Another thought: maybe you can use factory method in WCS class to choose/create the appropriate WCS type (Rss, Rdf, ...) automatically.



Factory method? Do we really need that in this case? Imho, it will only bloat the code. The parsers, will be different. I mean, it is not very likely to achive similar interfaces with RSS/RDF/WML(WAP)/ATOM. Of couse I or we can make a one big WCS parser, but in that case IMHO we'll probably lose simplicity and readability. These formats need to be specifically handled. But existing RssTag and RssNode classes are generic because they only deal with the XML and general WCS syntax. Therefore, they can be used in all four specific parsers without undergoing any modifications.So, renaming RssTag and RssNode to WcsTag and WcsNode, then defining specific types from them shouldn't be very costly?

amrein wrote on Sun, 21 September 2008 22:19

Oblivion wrote on Sat, 20 September 2008 16:20

I would like to know what do you think and your suggestions about WCSLib idea?



I have the same idea as yours but using W3C instead of WCSLib.

W3C for "The World Wide Web Consortium" (http://www.w3.org), where they develops and release specifications, guidelines, software, and tools for the Web.


Well, It would be nice to have a W3CLib but, since the content of this package will be consisted only of syndication formats (no css, HTML, Jigsaw, SOAP, etc.) wouldn't it be mislabelled and out of range?


Thank you for your feedbacks. Smile

Regards.


[Updated on: Mon, 22 September 2008 11:57]

Report message to a moderator

Previous Topic: Bazaar - Call of duty
Next Topic: AggCtrl
Goto Forum:
  


Current Time: Thu Mar 28 20:33:57 CET 2024

Total time taken to generate the page: 0.00860 seconds