-
-
Notifications
You must be signed in to change notification settings - Fork 78.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve JS Philosophy with design pattern #3493
Comments
Hello. Have you tried resources such as this one, http://docs.jquery.com/Plugins/Authoring, directly from jQuery? |
Yes, in fact there is a huge gap between
The best JavaScript coding convention should be : https://github.com/rwldrn/idiomatic.js/ |
You might like to check out one of @fat's blog posts I don't write "JavaScript" as it describes a bit about his coding style. In his blog, he also refers to another blog entitled An Open Letter to JavaScript Leaders Regarding Semicolons, which is also a good read. These describe the code format and conventions that @fat has used in Bootstrap. After reading those articles, I've come to like the comma first, no semicolon style and have reformatted all of my code accordingly. I find that it make the code much more readable and easier to follow. It also allows you to write better code when you understand how JS handles truthy/falsy values and how you can use that to write shorter and more concise code. @fat: Your JS Philosophy (and your blog perhaps) could be extended to include more detail for people who wish to write their own BS plugin. |
have you read this? https://github.com/twitter/bootstrap/blob/master/js/README.md |
I have indeed. I even referred to it in #3346. |
@fat yes, I use Bootstrap as a base Framework to replace an old one on Prototype/Scriptaculous/Livepipe in a big CMS.
|
Oh i see. Nope, no books talk about my odd way of writing javascript as far as I know. The closest thing to this is probably @isaacs blog http://blog.izs.me/ |
Could you also provide:
=> A basic plugin architecture
=> A basic element's wrapper (like tooltip, ...) with extensibility (like popover, ...)
=> A basic manager or utility class
Might be idiomatic.js ? (https://github.com/rwldrn/idiomatic.js/)
The text was updated successfully, but these errors were encountered: