Presentation is loading. Please wait.

Presentation is loading. Please wait.

GHM 2009-11-11 GNU Hackers Meeting 2009 Modularity and Extensibility Bruno Haible.

Similar presentations


Presentation on theme: "GHM 2009-11-11 GNU Hackers Meeting 2009 Modularity and Extensibility Bruno Haible."— Presentation transcript:

1 GHM 2009-11-11 GNU Hackers Meeting 2009 Modularity and Extensibility Bruno Haible

2 GHM 2009-11-11 Definitions ● Modularity = organizing code in separate units ● Extensibility = offering others to plug in similar functionality than the built-in one

3 GHM 2009-11-11 Modularity – Examples ● Linux distros ● XFree86 drivers ● multimedia codecs ● gnulib ● GCC (front-ends, passes, targets) ● binutils backends

4 GHM 2009-11-11 Extensibility – Examples (1) ● Linux distros with external package repositories ● Linux – kernel modules, FUSE ● X.org drivers ● Browsers – plug-ins ● Mailers, browsers – MIME type handlers ● Eclipse – plug-ins ● git – merge driver, diff hook, commit hook ● CUPS – printer driver

5 GHM 2009-11-11 Extensibility – Examples (2) ● Unix shell – commands ● TeX – macro packages ● groff – macro packages ● autoconf – macros ● vim, kate, … – syntax colouring modes ● JVM – scripting languages (JSR 223) ● konqueror – embedded text, PDF viewers ● konqueror – thumbnail preview

6 GHM 2009-11-11 Modularity – Benefits ● Developers: – Less code to review when making changes – Reduced barrier to entry for new developers ● End users: – More robust applications ● due to less complexity ● units are separately testable

7 GHM 2009-11-11 Extensibility – Benefits ● End users: – Ecosystem around an application ● adaptations = possible contributions – Speed of development ● accelerated by contributors let an ecosystem grow = relinquish control

8 GHM 2009-11-11 Why GNU needs Extensibility ● Free Software is, by design, adaptable – user freedom – niche markets

9 GHM 2009-11-11 Why GNU needs Extensibility ● Free Software is, by design, adaptable – user freedom – niche markets Cathedral vs. bazaar: Cathedral style precludes extensibility

10 GHM 2009-11-11 Unix philosophy ● many small tools, each for one purpose – fine at shell level – most applications are large, composed of shared libraries → Other ways of providing extensibility?

11 GHM 2009-11-11 Terminology ● Extension point = API that is offered to be implemented by extensions ● Extension = Implementation of the extension point “Dimension” of extensibility

12 GHM 2009-11-11 Extensibility – Examples (1) ● Linux distros with external package repositories ● Linux – kernel modules, FUSE ● X.org drivers ● Browsers – plug-ins ● Mailers, browsers – MIME type handlers ● Eclipse – plug-ins ● git – merge driver, diff hook, commit hook ● CUPS – printer driver

13 GHM 2009-11-11 Extensibility – Examples (2) ● Unix shell – commands ● TeX – macro packages ● groff – macro packages ● autoconf – macros ● vim, kate, … – syntax colouring modes ● JVM – scripting languages (JSR 223) ● konqueror – embedded text, PDF viewers ● konqueror – thumbnail preview

14 GHM 2009-11-11 Designing for extensibility ● Q: Which functionality is provided in some form, but users may want different forms? ● Multiple extensions for the same extension point! ● Multiple extensions for different extension points!

15 GHM 2009-11-11 Inheritance vs. Extensibility ● In an object oriented language: Class A. Class B extends A. – B uses A. – The application shape is given by A. ● Application A. Application B extends A through an extension point. – A uses B. – The application shape is given by B.

16 GHM 2009-11-11 Techniques for Modularity ● Management of – dependencies – ownership

17 GHM 2009-11-11 Techniques for Extensibility ● Formalization of an interface (API) – possibly XML or a scripting/extension language ● Mechanism – shared library / subprocess / XEmbed /... ● Management of – ownership – license (GPL scope) ● Security – which extensions are trustworthy?

18 GHM 2009-11-11 Constraints ● C/C++ language, linking – danger of instability (buggy extensions) → choose different address space → choose different language

19 GHM 2009-11-11 GNU programs – existing ● many – i18n ● Emacs – Emacs Lisp functions ● groff – macros ● autoconf – macros

20 GHM 2009-11-11 GNU programs – wish list ● Automake – extensible set of file types ● GCC – extensible set of front ends ● libc – extensible set of iconv modules ● xgettext – extensible set of programming languages, format strings ● msgmerge – extensible set of translation memory formats


Download ppt "GHM 2009-11-11 GNU Hackers Meeting 2009 Modularity and Extensibility Bruno Haible."

Similar presentations


Ads by Google