herilane
12-21-2005, 04:22 PM
The app
vBulletin Reader is an app that "reads" this forum (www.xtremevbtalk.com) and reports back with a summary of new threads and posts. It is something like a much-spiced-up combination of subscriptions and the "Get new" button of the forum; you could also think of it as a very specialized RSS reader.
I wrote it in order to avoid the slow and frustrating forum browsing here at XVBT. I may see a dozen threads with interesting-sounding titles - but I have to click on each one separately, and wait for them to load (images and all), before I can see whether there's really anything interesting there. I may see a title and know that I had looked at it, but not be able to remember exactly what it was about. I may want to see what the gurus have posted recently - and I have to search for each one's posts separately.
With vBulletin Reader, I click a single button, vBR goes to work, and I get back a report that lists all the threads and posts that I want. All downloaded threads are stored locally, so if I change my mind and want to see yesterday's posts again, I can generate a new report without downloading them again.
Settings are stored in user profiles, and you can create any number of profiles. So on a busy day, I can run my "most important forums" profile, and then go back the next day and get the rest - and be sure that I won't miss any threads that I would want to read.
The app has quite flexible filtering and sorting capabilities. I can choose to read only posts about Excel, or only those that mention myself by name, or posts by specific people.
The report is a single html file - all results in one place, so that I can flick instantly between threads in different forums. The HTML format also allows me to choose fonts and colours that I like.
The code
I'm making available the full source code of the application, in the hope that some of you will find it useful as learning material.
Unlike most posts in the Code Library, this is not an example that will teach you "how to do X", because it does very many small things. Instead, it is an example of how to put the many small things together to build a whole. This is an entire mid-sized (7600 LoC) application, relatively well-designed and well-organised, if I say so myself. The code is thoroughly commented and I've included my higher-level design notes as well. It should therefore be a useful example to you, if you have only written small apps and want to move ahead to larger projects, but have no idea how to structure them. (I know I would have loved to see this a year ago!)
On the coding side, the project includes examples of the following, among other things:
a usercontrol that extends the Listview control
custom collection classes
semi-advanced class modules, including creating your own events
logging in to a web site and downloading files
using regular expressions to extract data from those downloaded pages
plus all the usual stuff: file I/O, API functions, reading/writing ini files, masses of string manipulation ...
On the design side:
using class modules to keep related data and code together
using class modules to wrap API functions
structured error handling
reusable forms
lightweight forms that delegate all logic to classes using events
Here is a public thread about this application (http://www.xtremevbtalk.com/showthread.php?t=229901), where questions can be asked and feedback provided.
vBulletin Reader is an app that "reads" this forum (www.xtremevbtalk.com) and reports back with a summary of new threads and posts. It is something like a much-spiced-up combination of subscriptions and the "Get new" button of the forum; you could also think of it as a very specialized RSS reader.
I wrote it in order to avoid the slow and frustrating forum browsing here at XVBT. I may see a dozen threads with interesting-sounding titles - but I have to click on each one separately, and wait for them to load (images and all), before I can see whether there's really anything interesting there. I may see a title and know that I had looked at it, but not be able to remember exactly what it was about. I may want to see what the gurus have posted recently - and I have to search for each one's posts separately.
With vBulletin Reader, I click a single button, vBR goes to work, and I get back a report that lists all the threads and posts that I want. All downloaded threads are stored locally, so if I change my mind and want to see yesterday's posts again, I can generate a new report without downloading them again.
Settings are stored in user profiles, and you can create any number of profiles. So on a busy day, I can run my "most important forums" profile, and then go back the next day and get the rest - and be sure that I won't miss any threads that I would want to read.
The app has quite flexible filtering and sorting capabilities. I can choose to read only posts about Excel, or only those that mention myself by name, or posts by specific people.
The report is a single html file - all results in one place, so that I can flick instantly between threads in different forums. The HTML format also allows me to choose fonts and colours that I like.
The code
I'm making available the full source code of the application, in the hope that some of you will find it useful as learning material.
Unlike most posts in the Code Library, this is not an example that will teach you "how to do X", because it does very many small things. Instead, it is an example of how to put the many small things together to build a whole. This is an entire mid-sized (7600 LoC) application, relatively well-designed and well-organised, if I say so myself. The code is thoroughly commented and I've included my higher-level design notes as well. It should therefore be a useful example to you, if you have only written small apps and want to move ahead to larger projects, but have no idea how to structure them. (I know I would have loved to see this a year ago!)
On the coding side, the project includes examples of the following, among other things:
a usercontrol that extends the Listview control
custom collection classes
semi-advanced class modules, including creating your own events
logging in to a web site and downloading files
using regular expressions to extract data from those downloaded pages
plus all the usual stuff: file I/O, API functions, reading/writing ini files, masses of string manipulation ...
On the design side:
using class modules to keep related data and code together
using class modules to wrap API functions
structured error handling
reusable forms
lightweight forms that delegate all logic to classes using events
Here is a public thread about this application (http://www.xtremevbtalk.com/showthread.php?t=229901), where questions can be asked and feedback provided.