Education/Courseware/MozillaForProfessors
Contents
- 1 Introduction
- 2 Mozilla Community
- 3 Mozilla Technology
- 3.1 Introduction to Mozilla Projects, Technologies, and Development Philosophies
- 3.2 Student Project Case Studies
- 3.2.1 Example 1: Adding animation support to the PNG format
- 3.2.2 Example 2: Making Buildbot work with Mozilla
- 3.2.3 Example 3: Plug-in Watcher
- 3.2.4 Example 4: Adding GPS Support to Fennec on Windows CE
- 3.2.5 Example 5: nsIProcess Improvements
- 3.2.6 Example 6: Mercurial Web Improvements
- 3.2.7 Example 7: Add Bittorrent support to Songbird as an Extension
- 3.3 Essential Mozilla Development Skills and Techniques
- 4 Resources
Introduction
These notes and resources, used as part of a two-day introduction to Mozilla for professors, are made available to others who want to get a quick introduction to the Mozilla project. The focus is on getting connected into Mozilla's community, learning how to navigate Mozilla technologies and tools, and understanding how to connect educational and Mozilla project goals.
Mozilla Community
Any significant and sincere attempt to work with Mozilla must begin with an understanding of the Mozilla community. Where some technologies are the product and property of a business created by employees and overseen by managers, Mozilla is developed and used in the open as a collaborative public good. Decisions are discussed and finalized in the open, with the opportunity for public engagement. Contributions to the project come from around the world, from volunteers, from employees of large companies, from employees of small companies, and also from the Mozilla Corporation itself.
This open, public, collaborative structure makes it possible for students to become engaged in the process of fixing, improving, and advancing Mozilla. To do so effectively, they must learn how to participate in the community and have their voice and work noticed. One doesn't need permission to do any of this, but simply the knowledge of how to do it.
Communication
Because the community is so large (one of the largest open source communities in the world), and so globally distributed, different communication channels and media are used. Depending on the type of work you and your students are doing, one or more of these will be most effective.
IRC
IRC is a real-time chat protocol used extensively by Mozilla's most active developers to co-ordinate activities. You can learn more about how IRC works, and get instructions on using it in the Mozilla context here.
Almost all open source projects have IRC channels, but Mozilla is large enough that it has its own server, with hundreds of channels. Learning IRC is one thing, and then figuring out which channel(s) are the most appropriate for certain types of work/questions is another. The best starting place is the #education channel. This channel is filled with students and professors from many schools, and also some knowledgable (and sympathetic) Mozilla community members. Not every channel is going to be friendly to beginners, but the #education channel will be. You can ask anything about Mozilla, IRC, getting students connected to people within Mozilla, etc.
Here are some other points about IRC for professors:
- IRC can seem somewhat childish, with its use of short forms, nicknames, etc. However, don't dismiss it because of this. Being able to combine you, your students, and Mozilla developers in a real-time chat environment is invaluable
- Students may need some hand-holding to use irc effectively. For example, it is wise to have them start using one channel you create (e.g., /join channel name will create a new channel) and/or the #education channel. This allows them to learn the tool and how to communicate effectively online before jumping into the main developer channels.
- Getting developers to stop what they are doing and help you (and your students) on irc is a two-way thing: if all you ever do is ask questions, you're not likely to have your questions answered over the long term. The best long term strategy is to look for ways to contribute to the channels. For example, a developer may need help testing a patch, or need some info about an OS they don't have. Watching for ways to contribute helps build your credibility and place within the community.
- Similar to the previous point, IRC is not email. Joining irc, asking a question, then leaving right away is not how you should use it. Many people leave it running all the time so they can read what has happened while they were away. Maybe you'll know the answer to a question asked a few hours ago--it's fine to answer it now
- Don't overlook the value of having your students (and you!) sit idle in the main developer channels. What an amazing learning opportunity to have the chance to be able to go and "sit" in the "office" of a world-class developer project and listen to how they work.
Mailing Lists/Newsgroups
While IRC plays a central role in connecting developers around the world, it is not sufficient on its own. This is especially true when you need to talk with someone in a timezone opposite to your own. For more asynchronous communication, using Mozilla's mailing lists (which are also cached as newsgroups by Google)
Like IRC, subscribing to a number of mailing lists can greatly increase your exposure to, and awareness of, the community and what is being worked on at any given moment. It's also a good way for you to ask certain questions.
Here are a few lists that might be of interest to you and your students to get started:
- dev-apps-firefox
- dev-apps-thunderbird
- dev-builds
- dev-extensions
- dev-platform
- dev-platforms-mobile
- dev-tech-xul
See the complete list here for others. There are also various Labs Google Groups, many of which will make for good student projects.
Weekly Calls
In addition to online communication, a number of weekly status and planning calls are held. These are open to anyone wishing to join. Just as idling on IRC can be a great way to learn about the technologies and tools used my Mozilla developers, the weekly calls provide good insight into the workings of the project.
- Education/StatusMeetings
- Project wide weekly update
- Firefox status meeting
- Platform meeting
- Thunderbird status meeting
- Labs - Weave Weekly Meeting
- Labs - Bespin Weekly Meeting
Blogging
A good portion of the Mozilla community blogs. People use these blogs to demo experiments they have tried, share something they have learned, discuss their reaction to something, bring attention to things that are happening in the community, etc. Following these blogs is greatly simplified by the use of various aggregate blog planets:
- Planet Mozilla - the main blog planet for the Mozilla project.
- Mozilla Education Planet - students, professors, and Mozilla community bloggers who are connected to the education work.
- Mozilla Messaging Planet - blogs about Thunderbird, SeaMonkey, Calendar, etc.
You should start a blog and write about your work to start teaching and working on Mozilla. You should make your students do the same. You should both get these blogs added to the Mozilla Education Planet (email David Humphrey. It is hard to overstate the value of doing your work in the open, and on the web. When people can see the work that is going on, it is easier to comment, provide help, and connect with you.
Collaboration
Mozilla is focused on web technologies, and as a result, the way the project works is also heavily influenced by web based tools. Deciding to use these same tools vs. standard educational tools (e.g., Blackboard) will mean the difference between having Mozilla work with you, and being isolated in an academic silo. One nice side effect of choosing to use Mozilla's own tools is that you don't have to get anyone's permission at your institution to set up what you need: Mozilla already hosts it all, and allows anyone to create accounts.
Wikis
Mozilla uses a number of wikis, each with a different purpose. Over the past few years, a lot of work has been put into consolidating various sites and other resources into a smaller number. Here we look at the two most important.
Mozilla Developer Center (MDC)
The Mozilla Developer Center (sometimes called 'MDC' or 'devmo') is Mozilla's main documentation site. It is aimed both at developers using Mozilla technologies (extensions, XUL, JavaScript, web) and also at people developing Mozilla itself.
MDC is meant to be a polished set of documentation vs. a scratch pad for random information. You can (and should) create your own account so that you can edit mistakes, or contribute new information. If you are unsure about a change you think needs to be made, you can ask in the #devmo irc channel.
Mozilla Wiki (wiki.mozilla.org, wikimo)
Where MDC is public facing documentation, the Mozilla Wiki (sometimes called wikimo) is a common collaboration point for organizing groups of developers, developing documentation which will eventually be moved elsewhere, etc. You can (and should) create your own account on the Mozilla Wiki so that you can participate in community documentation efforts, and also have a common (i.e., to you, your students, and Mozilla) collaboration point for Mozilla-related education and project work.
Bugzilla
Mozilla is the creator of one of the most popular issue tracking systems in the world--bugzilla. Many open source projects use bugzilla to keep track of bugs, enhancement requests, and otherwise keep a historical record of a project's development. Mozilla is no different, using its own instance of bugzilla.
Anyone can create a Mozilla bugzilla account and file new bugs. You can (and should) create a Mozilla bugzilla account so that you can participate in bugs, and follow development activity. Modifying some aspects of a bug requires increased rights.
One of the goals of Mozilla Education is to provide an up-to-date list of potential projects for students, in the form of bugs in bugzilla. You can see a list of such bugs here:
Here is the list of bugs with the "student-project" keyword:
- Available student projects, sorted by bug number - atom feed
- Assigned student projects - atom feed
- Resolved student projects
Here are some things to note about using Mozilla's bugzilla in an educational context:
- IRC, mailing lists, blogs, etc. are all useful for keeping people informed about your work; but the best way to get access to the right people is through bugzilla. Every developer working on Mozilla uses it, and a properly filed bug (e.g., in the correct product, component, etc.) will insure it gets seen.
- Having said that, not all student work belongs in bugzilla. Extensions, experiments with existing technologies, the creation of new tools, etc. are probably not appropriate for bugzilla. Knowing the line between what does and doesn't belong takes time, and you can always ask in the #education channel.
- Learning to use bugzilla properly can take time (many aspects of the classification system, or use of flags are cryptic even to the experienced). Not being 100% sure how to proceed shouldn't stop you from trying, remembering that you can always ask for help in the #education channel. Here is some information about the process of getting work reviewed and "landed in the tree" (i.e., committed to the hg repository).
Finally, be prepared for no-nonsense, highly technical, sometimes critical environment in bugzilla. Remember that this is where technical decisions about what gets accepted/rejected in terms of code are made.
Also note that just as you can observe without saying anything in irc and the weekly calls, so to in bugzilla can you "watch" a user or "CC yourself" to a bug. After you have created your bugzilla account, you can visit any bug, and click "Commit" to have it automatically add you to the bug's CC list. Doing so will mean that whenever someone adds a comment, attaches a patch, or otherwise updates the bug, you'll be notified by email. Adding a "Watch" for a bugzilla user is similar, but will mean that you get sent copies of all bugmail for the specified user. Be careful who you choose, as some users get a lot of bugmail! To set a watch, do the following:
- On the main Mozilla bugzilla page, click Preferences (you'll need to be logged in)
- Select the Email Preferences tab
- Scroll to the bottom under User Watching and add the bugmail address for the user you wish to watch
'The Tree': Tinderbox, HG, Try Server, Talos
Since so much of the work going on within Mozilla is focused on the development of various software products, and since development takes place in parallel by developers around the world, a lot of work goes into making sure the source code builds, hasn't regressed in terms of functionality or performance, etc.
For the most part, these details are not interesting in the educational context (at least not at first), but some awareness of them will help you to understand some of what is going on within the project.
First, the 'tree' is the code in revision control. Mozilla uses Mercurial (HG), a distributed revision control system. You can get (i.e., clone, see below) a local copy of the hg repositories to work against. You can also see the latest changes and versions of files by visiting Mozilla's [http;//hg.mozilla.org HG Web] interface. There are many repositories, but here are a few to focus on initially:
- mozilla-central: Firefox
- comm-central: Thunderbird, SeaMonkey
- mobile-browser: Fennec Mobile Browser
You can see the health of the tree at any given time by looking at Tinderbox. For example, to see the current status of Firefox, you look here. You only need to pay attention to the top row and the colours of each. When you get the source yourself, you'll want to make sure that it is green and will build.
At the time of writing, the tree was CLOSED (meaning developers are not allowed to commit new work), the OS X 10.5.2 mozilla-central unit test machine was orange (meaning a unit test failed after building), WINNT 5.2 mozilla-central unit test % was "burning" (meaning the build had failed), and all other trees were green (build and/or tests succeeded).
Developers can see graphs of various performance and other data for each build/test run using systems like Talos. Developers with commit rights (i.e., who have been granted the right to check-in code), can also test their work against the Try Server. This allows them to see the effect of building and running tests on all 3 main platforms before actually checking in any code.
Most of this can be ignored as you get started. But knowing what certain terms mean, and where to look for information as you get more comfortable, is important.
Mozilla Technology
Throughout this document the term Mozilla has been used, instead of "Firefox." Mozilla, as a community and project, creates and maintains many pieces of software. Getting students involved in Mozilla can mean participation in many of these sub-projects. One of the strengths of a community and project as large as Mozilla, is that it has something to offer everyone.
Introduction to Mozilla Projects, Technologies, and Development Philosophies
This list is not exhaustive, but provides a good starting point for understanding the different types of work happening with Mozilla.
- Firefox
- Thunderbird
- Fennec
- Gecko
- XULRunner, Prism
- SpiderMonkey
- NSPR
- Bugzilla
- Mozilla Labs (Bespin, Weave, Ubiquity, etc.)
- Static Analysis (dehydra, treehydra, pork, etc.)
- SeaMonkey
- Songbird
- Extensions (for various products)
Many of these projects feed one another and share technologies. The following is a list of the main technologies used in Mozilla:
- C/C++
- JavaScript
- XPCOM, XPIDL
- Platform-specific code (e.g., Objective-C on Mac, system libraries)
- XML (XUL, XBL, SVG, etc.)
- HTML, DOM, CSS
- Python, Perl
- Cairo
- SQLite
- Canvas
These projects and technology choices also share some common focus, including:
- Build and Release Automation
- Build Systems
- Quality Assurance
- Documentation (automatically and manually created)
- Automated and other types of testing
- Profiling
- Use of lightweight web technologies where possible (e.g., JSON)
- Accessibility (a11y)
- Localization (l10n), and Internationalization (118n)
- Parsers, VMs, Garbage Collection, and other language/run-time development issues
- Security
- User Experience (UX), HCI, design
- Open Standards
Student Project Case Studies
Given the variety of products and technologies in use within Mozilla, many different types of student projects or involvement are possible. Here are some examples of student projects that have been done in the past few years:
Example 1: Adding animation support to the PNG format
For Firefox 3.0, animation support was added to PNG, and then Mozilla's image library. See the project page and bug 257197.
Example 2: Making Buildbot work with Mozilla
Mozilla was interested in using BuildBot to drive their build automation. This project put much of the infrastructure in place to make that happen. See the project page.
Example 3: Plug-in Watcher
Give the browser (and extension developers) a way to monitor the CPU load for a plugin (e.g., Flash playing a movie). This feature shipped in Firefox 3.0. See the project page and bug 412770.
Example 4: Adding GPS Support to Fennec on Windows CE
Mozilla was interested in getting GPS support added to the Windows CE platform for Fennec. This project added it, and it will ship as part of the first Fennec release. See the project page, blog, bug 477557, and bug 482613.
Example 5: nsIProcess Improvements
Mozilla and Mozilla-based applications and extensions use the nsIProcess interface in order to control external processes. There were a number of deficiencies (e.g., lack of support for Kill() method, no Unicode support) which were corrected, and will be shipped as part of Firefox 3.5. The project has continued as part of Google Summer of Code 2009. See the project page, student blog, and bugs 484246, 442393, 68702, 459572.
Example 6: Mercurial Web Improvements
Mozilla's HG Web interface is written in Python, JavaScript, and jQuery. A number of enhancements where requested for Mozilla's needs. This project added this, fixing nine issues in all. See the project page, student blog, and bugs 459727, 445560, 448707, 468089, 459823, 471321, 453162, 486939.
Example 7: Add Bittorrent support to Songbird as an Extension
This project added support for Bittorrent downloading of media. The project used an existing libtorrent library written in C++, and provided a wrapper around it, as well as custom UI to make it work seamlessly in the application. See the project page, and student blog.
Essential Mozilla Development Skills and Techniques
- Get the Source Code: Firefox, Thunderbird
- Basics of using Mercurial
- Setup a Build and Development Environment
- Building: Firefox, Thunderbird, incremental builds
- Navigating Mozilla Source: MXR
- Understanding and Using XPCOM
- Debugging Mozilla (C++, JavaScript, Chrome, Content)
- Fixing a Bug
- Automated Testing Strategies
- Making a Patch
- Having a Patch Reviewed
- Changes to the Tree vs. Extensions
Resources
- Bugzilla: Mozilla's project-wide issue tracker.
- MXR: The Mozilla Cross-Reference, for searching and consulting Mozilla source code
- Mozilla HG Repositories: Source code repositories for Firefox (mozilla-central), Thunderbird (comm-central), etc.
- Mozilla Module Owners: List of Mozilla modules, module owners, and peers.
- Mozilla Mailing Lists: List of all the Mozilla Mailing Lists.
- Mozilla Developer Center: main developer documentation site.
- Mozilla Wiki: general wiki for project planning and other non-production documentation.