mdesjardins / buzzbird

Buzzbird is (was?) a XUL-based desktop twitter client
http://getbuzzbird.com
MIT License
63 stars 9 forks source link

Why browser element/HTML? Also you may wanna look at js modules #25

Closed FunkMonkey closed 14 years ago

FunkMonkey commented 14 years ago

I just took a look at your source and I am a little confused that you're using a browser element for rendering the tweets as HTML instead of simply using XUL for everything. There doesn't seem to be a real benefit of doing so. Is there?

Also, you should take a look at JS Modules (https://developer.mozilla.org/En/Using_JavaScript_code_modules). JS modules may ease communication between your main window code and the rest of the application (like the stuff you load in your browser element). Also you can use those to structure your project in a more object-oriented way.

I really see a lot of potential in your application. Although it looks pretty ugly on Windows, dunno why ;)

Great work!

Cheers

p.s. sorry for posting this as an issue. Github doesn't seem to have a kind of discussion board.

mdesjardins commented 14 years ago

Wow - I don't know how I never heard of JS code modules before, this looks like just what I needed. The hardest thing for me to figure out initially was how to deal with the different scopes of execution between the browser and the main XUL dialogs. This would be a much better way to deal with that, thanks!

I don't know why I chose to render the tweets in a browser - initially I had hoped to make buzzbird have different tabs for each account, and I thought I'd use a tabbed browser for that. It turns out XULRunner doesn't have the tabbed browser (it's only in FF proper), so I abandoned that idea. I suppose there's no real reason I couldn't just do everything in XUL at this point, though. I had never really considered it.

FunkMonkey commented 14 years ago

jepp. they removed the tabbrowser in one of the latest versions of xulrunner. that was something i also ran into once.

but if you want to have tabs, then you could obviously just take the tabbox. ;)

I'd rather go for plane XUL code as it allows easier layouting in my opinion. Also, you may one day create your own xbl elements, like a tweet element or whatever. Imagine creating a tweet-node and then just calling tweetNode.setTweetData(tweetData) and the node will fill itself. this will give you quite a good separation of data and representation.

Anyway. i'm glad i was able to help you with the js modules. they're something pretty pretty useful.

Cheers.