freehoo-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Freehoo-devel] Re: Doubt


From: Anand Babu
Subject: [Freehoo-devel] Re: Doubt
Date: Fri, 20 Aug 2004 04:57:44 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

,----[ "K. Viswanathan" <address@hidden> ]
| Hi AB
| 
| I have a doubt. I am right now working on code clean-up.
| 
| Existing check-in had too many changes in sample_client.c. But now I
| have reached the same stage with minimal changes in
| sample_client.c. This is what
| I did:
| 
| 1. Moved global declarations (struct), MACROS to a header file.
| 2. Splited main function to messenger_main and main_loop.
| 3. Merged the main_loop with our existing main_loop in messenger.c,
| so that readline works using interpreter.
| 
| Now, the doubt is, how to name this file? This has 3 different
| functionalities which respectively should go to messenger.c,
| yahoo2-callbacks.c and yahoo-wrapper.c
| 
| 1. Move all the callbacks to yahoo2-callbacks.c, move
| messenger_main, main_loop to messenger.c and merge the rest with
| yahoo-wrapper.c. Existing check-in is exactly this.
| Plus: No confusion.
| Minus: Not a good idea since sample_client.c is facing
| too many modifications.
| 
| 2. Keep sample_client.c (after renaming) as it is with minimal
| modifications.  Plus: Easy future migration and yahoo2-callbacks.c
| can be dropped.
| Minus: 3 functionalities in 1 file and how to name
| this?
| 
| Note: Existing yahoo-wrapper.c cannot be dropped as many functions
| are still needed.
`----
Hi Visu,
Excellent question. Looks like you got a good understanding of the
core now.

Here is what I will do:
 - Move yahoo-wrapper.c as yahoo-adapter.c
 - Keep all contents from sample-client.c inside yahoo-backend.c
 - messenger.c will dissolve into yahoo-backend.c

There is a shift in strategy now. Originally Freehoo was designed to
control the flow. Protocol handling was easier and simpler. Over time
things have changed. Now we find making modifications to Freehoo core
easier than libyahoo2 code. To have a design which requires easy
integration of libyahoo2, we need to move the control of flow to
yahoo-backend.c.

More precisely yahoo-backend.c will view Freehoo core as a set of
utility procedures (like a library).

Write functions which requires guile or readline integration inside
yahoo-adapter.c and call them from yahoo-backend.c

Do you get the picture?

Happy Hacking
-- 
Anand Babu
Free as in Freedom <www.gnu.org>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]