PageRenderTime 52ms CodeModel.GetById 21ms RepoModel.GetById 1ms app.codeStats 0ms

/node_modules/nope/node_modules/joose/lib/Joose/Manual/FAQ.js

https://github.com/aikar/nodeib
JavaScript | 87 lines | 0 code | 0 blank | 87 comment | 0 complexity | 5662d6a8271b78f2df949db7caeca5ad MD5 | raw file
  1. /**
  2. NAME
  3. ====
  4. Joose.Manual.FAQ - Frequently asked questions about Joose
  5. FREQUENTLY ASKED QUESTIONS
  6. ==========================
  7. Module Stability
  8. ----------------
  9. - Is Joose "production ready"?
  10. Yes! Many sites with household names are using Joose to build high-traffic services. Countless others are using Joose in production.
  11. - Is Joose's API stable?
  12. Yes. The sugary API, the one 95% of users will interact with, is very stable. Any changes will be 100% backwards compatible.
  13. The meta API is less set in stone. We reserve the right to tweak parts of it to improve efficiency or consistency. This will not be done lightly. We do perform deprecation cycles.
  14. We really do not like making ourselves look bad by breaking your code. Submitting test cases is the best way to ensure that your code is not inadvertently broken by refactoring.
  15. Constructors
  16. ------------
  17. - How do I write custom constructors with Joose?
  18. Ideally, you should never write your own constructor, and should use Joose's other features to handle your specific object construction needs.
  19. Accessors
  20. ---------
  21. Method Modifiers
  22. ----------------
  23. - Can I use `before` to stop execution of a method?
  24. No, `before` modifier execute original method unconditionally. Use `override` or `around` modifiers instead.
  25. Roles
  26. -----
  27. - What are Traits, and how are they different from Roles?
  28. In Joose, a trait is almost exactly the same thing as a role, which is usually composed into an instance of a class at runtime to add or modify the behavior of just that instance.
  29. Outside the context of Joose, traits and roles generally mean exactly the same thing. The original [paper](http://scg.unibe.ch/archive/papers/Scha02bTraits.pdf) called them Traits, however Perl 6 will call them Roles.
  30. Compatibility
  31. -------------
  32. - Can I use Joose with Prototype or MooTools which defins their own global 'Class' symbol?
  33. Yes, you can use aliases Joose.Class, Joose.Role and Joose.Module to declare your classes.
  34. AUTHOR
  35. ======
  36. Nickolay Platonov [nickolay8@gmail.com](mailto:nickolay8@gmail.com)
  37. Heavily based on the original content of Moose::Manual, by Dave Rolsky [autarch@urth.org](mailto:autarch@urth.org)
  38. COPYRIGHT AND LICENSE
  39. =====================
  40. Copyright (c) 2008-2011, Malte Ubl, Nickolay Platonov
  41. All rights reserved.
  42. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
  43. * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  44. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  45. * Neither the name of Malte Ubl nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
  46. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  47. */