
Enlightenment: A Cross Platform Window Manager and Toolkit Dealing with Enlightenment portability issues in FreeBSD and elsewhere Daniel Kolesa Samsung Open Source Group [email protected] @octaforge FOSDEM 2015 State of the ecosystem Where are we now? I During the last few years - drastic change of ecosystem I Graphics stack in Linux kernel I Systemd I High level components depending on low level stuff (libudev) Overview I Graphics stack in Linux kernel I Systemd I High level components depending on low level stuff (libudev) Overview I During the last few years - drastic change of ecosystem I Systemd I High level components depending on low level stuff (libudev) Overview I During the last few years - drastic change of ecosystem I Graphics stack in Linux kernel I High level components depending on low level stuff (libudev) Overview I During the last few years - drastic change of ecosystem I Graphics stack in Linux kernel I Systemd Overview I During the last few years - drastic change of ecosystem I Graphics stack in Linux kernel I Systemd I High level components depending on low level stuff (libudev) I Lagging behind I Losing compatibility with Linux stuff I Custom solutions needed I (or wrapper shims) I (trying to avoid that) BSDs in the ecosystem I Losing compatibility with Linux stuff I Custom solutions needed I (or wrapper shims) I (trying to avoid that) BSDs in the ecosystem I Lagging behind I Custom solutions needed I (or wrapper shims) I (trying to avoid that) BSDs in the ecosystem I Lagging behind I Losing compatibility with Linux stuff I (or wrapper shims) I (trying to avoid that) BSDs in the ecosystem I Lagging behind I Losing compatibility with Linux stuff I Custom solutions needed I (trying to avoid that) BSDs in the ecosystem I Lagging behind I Losing compatibility with Linux stuff I Custom solutions needed I (or wrapper shims) BSDs in the ecosystem I Lagging behind I Losing compatibility with Linux stuff I Custom solutions needed I (or wrapper shims) I (trying to avoid that) General portability tips I We have a very diverse ecosystem I This includes a wide range of operating systems I Not all operating system have the same features I Writing portable software is painful, but very much worth it I And the end result comes out cleaner Overview I This includes a wide range of operating systems I Not all operating system have the same features I Writing portable software is painful, but very much worth it I And the end result comes out cleaner Overview I We have a very diverse ecosystem I Not all operating system have the same features I Writing portable software is painful, but very much worth it I And the end result comes out cleaner Overview I We have a very diverse ecosystem I This includes a wide range of operating systems I Writing portable software is painful, but very much worth it I And the end result comes out cleaner Overview I We have a very diverse ecosystem I This includes a wide range of operating systems I Not all operating system have the same features I And the end result comes out cleaner Overview I We have a very diverse ecosystem I This includes a wide range of operating systems I Not all operating system have the same features I Writing portable software is painful, but very much worth it Overview I We have a very diverse ecosystem I This includes a wide range of operating systems I Not all operating system have the same features I Writing portable software is painful, but very much worth it I And the end result comes out cleaner I A big mistake we've done in the EFL I We wrote code against Linux I Every other platform is expected to implement the same APIs I Wrappers then implement API shims Don't write against a platform I We wrote code against Linux I Every other platform is expected to implement the same APIs I Wrappers then implement API shims Don't write against a platform I A big mistake we've done in the EFL I Every other platform is expected to implement the same APIs I Wrappers then implement API shims Don't write against a platform I A big mistake we've done in the EFL I We wrote code against Linux I Wrappers then implement API shims Don't write against a platform I A big mistake we've done in the EFL I We wrote code against Linux I Every other platform is expected to implement the same APIs Don't write against a platform I A big mistake we've done in the EFL I We wrote code against Linux I Every other platform is expected to implement the same APIs I Wrappers then implement API shims I System specific APIs are often unnecessarily low level I Low level ! difficult to write I Low level ! difficult to maintain I And a pain to port I Also, every time you do it, a kitten dies I Too late to save them now Why is this wrong? I Low level ! difficult to write I Low level ! difficult to maintain I And a pain to port I Also, every time you do it, a kitten dies I Too late to save them now Why is this wrong? I System specific APIs are often unnecessarily low level I Low level ! difficult to maintain I And a pain to port I Also, every time you do it, a kitten dies I Too late to save them now Why is this wrong? I System specific APIs are often unnecessarily low level I Low level ! difficult to write I And a pain to port I Also, every time you do it, a kitten dies I Too late to save them now Why is this wrong? I System specific APIs are often unnecessarily low level I Low level ! difficult to write I Low level ! difficult to maintain I Also, every time you do it, a kitten dies I Too late to save them now Why is this wrong? I System specific APIs are often unnecessarily low level I Low level ! difficult to write I Low level ! difficult to maintain I And a pain to port I Too late to save them now Why is this wrong? I System specific APIs are often unnecessarily low level I Low level ! difficult to write I Low level ! difficult to maintain I And a pain to port I Also, every time you do it, a kitten dies Why is this wrong? I System specific APIs are often unnecessarily low level I Low level ! difficult to write I Low level ! difficult to maintain I And a pain to port I Also, every time you do it, a kitten dies I Too late to save them now I Write general code I If you need any specific functionality, design a high level API for it I Use this API from your code I Write OS specific backends implementing this API I Abstracted, high level, easy to write, easy to maintain The right approach I If you need any specific functionality, design a high level API for it I Use this API from your code I Write OS specific backends implementing this API I Abstracted, high level, easy to write, easy to maintain The right approach I Write general code I Use this API from your code I Write OS specific backends implementing this API I Abstracted, high level, easy to write, easy to maintain The right approach I Write general code I If you need any specific functionality, design a high level API for it I Write OS specific backends implementing this API I Abstracted, high level, easy to write, easy to maintain The right approach I Write general code I If you need any specific functionality, design a high level API for it I Use this API from your code I Abstracted, high level, easy to write, easy to maintain The right approach I Write general code I If you need any specific functionality, design a high level API for it I Use this API from your code I Write OS specific backends implementing this API The right approach I Write general code I If you need any specific functionality, design a high level API for it I Use this API from your code I Write OS specific backends implementing this API I Abstracted, high level, easy to write, easy to maintain I Plays an important role I Keep your API simple and as general purpose as possible I Don't implement very specific features I Instead always ask yourself a question: I Can I generalize this? Can this be reused? KISS principle I Keep your API simple and as general purpose as possible I Don't implement very specific features I Instead always ask yourself a question: I Can I generalize this? Can this be reused? KISS principle I Plays an important role I Don't implement very specific features I Instead always ask yourself a question: I Can I generalize this? Can this be reused? KISS principle I Plays an important role I Keep your API simple and as general purpose as possible I Instead always ask yourself a question: I Can I generalize this? Can this be reused? KISS principle I Plays an important role I Keep your API simple and as general purpose as possible I Don't implement very specific features I Can I generalize this? Can this be reused? KISS principle I Plays an important role I Keep your API simple and as general purpose as possible I Don't implement very specific features I Instead always ask yourself a question: KISS principle I Plays an important role I Keep your API simple and as general purpose as possible I Don't implement very specific features I Instead always ask yourself a question: I Can I generalize this? Can this be reused? I Write reusable code I And actually reuse it I The worst thing you can do is copy paste a snippet in 10 places I Any update will force you to update it in all 10 places Don't repeat yourself! I And actually reuse it I The worst thing you can do is copy paste a snippet in 10 places I Any update will force you to update it in all 10 places Don't repeat yourself! I Write reusable code I The worst thing you can do is copy paste a snippet in 10 places I Any update will force you to update it in all 10 places Don't repeat yourself! I Write reusable code I And actually reuse it I Any update will force you to update
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages201 Page
-
File Size-