Mobile/AddonsTrainingWeek/SpeakerNotesA: Difference between revisions

 
Line 22: Line 22:


==Porting an Add-on from Desktop to Mobile==
==Porting an Add-on from Desktop to Mobile==
* UI is very different.
* UI is very different. Read about the [https://wiki.mozilla.org/Mobile/Fennec/Extensions/UserInterface mobile UI guidelines].
** You will not be able to assume the desktop XUL overlays will "just work".
** You will not be able to assume the desktop XUL overlays will "just work".
** Dialogs and Preferences are handled very differently.
** Dialogs and Preferences are handled very differently.
** Screen size becomes very important and a limiting factor.
** Screen size becomes very important and a limiting factor. Work on your [https://wiki.mozilla.org/Mobile/Fennec/Extensions/Layout layout].
** Maintaining "touch-friendly" widgets is critical.
** Maintaining "touch-friendly" widgets is critical.
** Simplify everything.
** Simplify everything.
Line 31: Line 31:
** XPCOM and features of the Mozilla platform are the same.
** XPCOM and features of the Mozilla platform are the same.
** JS API's found in the UI code are different.
** JS API's found in the UI code are different.
** Out-of-process web content makes common tasks and patterns very different.
** Out-of-process web content makes common tasks and patterns very different. Learn about ways to work with [https://wiki.mozilla.org/Mobile/Fennec/Extensions/Electrolysis multiple processes].
* Guidelines
* Guidelines
** Larger add-ons should not be ported "all at once". Break the add-on into smaller pieces and port each piece individually.
** Larger add-ons should not be ported "all at once". Break the add-on into smaller pieces and port each piece individually.
** Porting non-UI code should be straight forward, but scan XPCOM components and JSM's for potential UI problems.
** Porting non-UI code should be straight forward, but scan XPCOM components and JSM's for potential UI problems.
** Out-of-process web content has a bit of a learning curve, but once you become comfortable with processing messages, you start moving faster and become more productive.
** Out-of-process web content has a bit of a learning curve, but once you become comfortable with processing messages, you start moving faster and become more productive.
** Read the [https://wiki.mozilla.org/Mobile/Fennec/Extensions/BestPractices best practices] document for more pointers.
canmove, Confirmed users, Bureaucrats and Sysops emeriti
2,798

edits