23.06.2006

comp 491: report | ek$iAPI

ek$iAPI

The Problem: Retrieving information from Ekşi Sözlük and organizing it programmatically.

Design: In the very beginning, the plans were basically getting started with ek$iDump and incorporating data acquisition functions into some method inside the main class. That would have been very easy to start with, however, if I wanted to use the portions of code that access Ekşi Sözlük in another application, all had to be re-written. To avoid such circumstances, a different style of programming had to be adopted. After some contemplation, I decided to program this part of the project as a class library. Class libraries are collections of classes and methods inside classes, and when compiled in Visual Studio.NET, are built into Windows DLLs. Thus, I would be able to reuse the code in any application.
Although it carries no formal significance, ek$iAPI did spring from the drawing board:


Fig. 3: Primordial sketches


In the initial sketch, there number of classes envisaged was six; entry class for storing entry data, a message class to exploit the messaging facility of Ekşi Sözlük, a today class for storing the titles written to in a specific day, a random50 class for returning 50 titles chosen at random by using the search facility, a suser class to store any particular information obtainable about an Ekşi Sözlük user, and a title class for storing entries posted under a title. In the final release, however, some of these envisaged classes were dropped. Message class was discarded as it would provide no functionality for the time being; classes today and random50 were discarded as they were collections of title objects and thus were redundant. As a result, the only classes implemented which were also on the “primordial sketch” are Entry, Title and Suser classes.

This class library is utilized by ek$iDump, Ekşi Sözlük entry acquisition tool, which is described in the next section.

Hiç yorum yok: