Thunderbird:Backend Hacking Guide For Newbies: Difference between revisions
(→Build Prerequisites: Add link to Palm CDK now I've eventually found it) |
(→NSPR) |
||
| Line 68: | Line 68: | ||
==== PL ==== | ==== PL ==== | ||
What is PL? How it is different than platform's C runtime, Secure C functions, etc... | What is PL? How it is different than platform's C runtime, Secure C functions, etc... | ||
==== NSPR ==== | ==== NSPR ==== | ||
NSPR is a cross-platform framework to provide Mozilla application with OS-agnostic facilities such as threading, I/O operations, networking, logging and more. It is crucial for a Mozilla C/C++ hacker to be familiar with this framework in order to work with Thunderbird backend. | |||
Although NSPR documentation is not up-to-date, still it is a very good starting point before you go and check the source code. You can find NSPR documentation at the following links. | |||
[http://www.mozilla.org/projects/nspr/ The Netscape | |||
* [http://www.mozilla.org/projects/nspr/ The Netscape Portable Runtime Page] | |||
* [http://www.mozilla.org/projects/nspr/reference The Netscape Portable Runtime Reference] | |||
==== XPCOM ==== | ==== XPCOM ==== | ||
Revision as of 17:46, 17 April 2008
Back to ...
Back-end Programming for Thunderbird
So, you love C/C++ and want to contribute to Thunderbird, but you are new to Mozilla development in general, and don't know what frameworks, technologies, tools involved in it. You are at the right place, this page is prepared for you.
First, a little bit background. Thunderbird is a cross-platform mail application developed on top of Mozilla framework. It's an open-source application used by millions, and evolving around its contributors. Mozilla framework is the central toolkit, and C/C++ is the core language for back-end programming. Tier 1 platforms for Thunderbird are Windows, Linux and Mac OS X (both PPC and Intel). So, when you develop code for Thunderbird, you have the obligation to make sure that your code works on all of these platforms, unless it's a platform specific patch.
Mozilla development process is large scale and highly distributed. Tools play an essential role to coordinate this collective effort. Every hacker MUST get familiar with these tools to involve.
Tool Arsenal for Mozilla Development
Build Prerequisites
If you wish to build the palm sync extension, you will need to install the Palm CDK (requires free registration).
Debuggers
- MSVC (Windows)
- gdb (Linux, Mac OS X)
- ??
Bug Tracking (and More)
Source Control Management
- CVS <link>
- Bonsai <link>
Patching
- Patch
Collaboration
- Pastebin <link>
Build Automation
- Thunderbird Tinderbox
- Tinderstatus for watching Tinderbox status from SeaMonkey or Firefox.
- Performance:Tinderbox_Tests
- MailNews:Performance_Testing
- How to set up a tinderbox (e.g. for standalone/test use)
Community
- IRC
- Newsgroups
- ....
Development Process
Review, Super review <link>
Getting the Source
- <link>
Setting up the Development Environment
- Windows
Note for Windows programmers: If you develop code mostly on Windows and looking for the same Visual Studio comfort ....
- Mac
- Linux
Building the Code
<link>
Important Components of Mozilla Framework
PL
What is PL? How it is different than platform's C runtime, Secure C functions, etc...
NSPR
NSPR is a cross-platform framework to provide Mozilla application with OS-agnostic facilities such as threading, I/O operations, networking, logging and more. It is crucial for a Mozilla C/C++ hacker to be familiar with this framework in order to work with Thunderbird backend.
Although NSPR documentation is not up-to-date, still it is a very good starting point before you go and check the source code. You can find NSPR documentation at the following links.
XPCOM
What is XPCOM, IDL firebot: uuid, <link>
XUL
What is XUL
Best Practices
Memory allocation
<link>
nsCOMPtr<>
<link>
Assertions
....
Understand how to log, trace etc.
- Performance:Leak_Tools
- Debugging Memory Leaks
- QA:Home_Page:Firefox_3.0_TestPlan:Leaks:LeakTesting-How-To
- Mail Logging/Troubleshotting
- LDAP Protocol Logging
...
Understanding threading, Proxy etc.. !!!
... + <link>
Unit Testing (TUnit, cppUnit etc..)
....
Development tools
o Locklint o Firebug o
Common Idioms, and Patterns
.... Event sinks, bounded buffers, monitors etc.. .... PR_SUCESS, PR_FAIL ....
Advanced Topics
... Instrumentation, optimization, performance etc...
Sample Projects
- Sample project to learn how to patch and how to submit a patch
- Using NSPR in your applications
MSVC project XCODE project SlickeEdit project?? Eclipse??
- XPCOM: Developing an XP component and running it in a standalone application
MSVC project XCODE project SlickeEdit project?? Eclipse??
- ...
Components of Thunderbird
- MIME
- IMAP
- Address Book
- ...