bonnes pratiques

TwitterFacebook
Get flash to fully experience Pearltrees

Erreur de chargement de la page - Vimperator

http://codefastdieyoung.com/2011/03/css-js-organization-best-practice/ So what is the best way to organize these into a framework? I’ll cover how I go about organizing my JS and CSS, both for the purpose of being able to find things, but also making sure JS code and styles don’t accidentally conflict. While my example is for Rails, thes ideas will translate directly into other MVC frameworks. Controllers in my app
This is another one I've wanted to write forever. Man, I've tried a bunch of times. No ruck. Not Rucky.

Programming's Dirtiest Little Secret

http://steve-yegge.blogspot.com/2008/09/programmings-dirtiest-little-secret.html

Home | The Anti-IF Campaign

http://www.antiifcampaign.com/ What Is the Anti-IF Campaign? The goal of the Anti-IF Campaign is to raise awareness of effective use of the Object-Oriented Paradigm, first of all removing bad, dangerous IFs. In order to provide all of these amazing things and keep them free of charge , the Anti-IF Campaign relies on funding provided by the Anti-IF School , which invests part of the income it receives from its professional services business directly to the Campaign.
Unless you're designing for a CSS3-supported browser, be sure gradients backgrounds have appropriate start and end points to be used as background images. There's obviously more to talk about with color settings, but since most are particular to the situation, proper etiquette calls for being as consistent with your colors as possible. http://photoshopetiquette.com/

The Photoshop Etiquette Manifesto for Web Designers

http://remysharp.com/2010/06/03/signs-of-a-poorly-written-jquery-plugin/

Signs of a poorly written jQuery plugin

How do you know if the plugin is good to use? It's always dependant on the problem they're trying to solve, but in lieu of a better jQuery plugin ranking system, here's a couple of tips that should raise a red flag. Although the code may be perfect once some event has run, most times you don't have time to read through all the code carefully and you need to make a decision so you can move on to the actual problem you're trying to solve. In the code above, there's a number of red flags that have gone up for me, and I tend to look in this area of code first. If these patterns have been used, it tells me the author hasn't quite grasped how jQuery works and hasn't considered making simple tuning changes.
http://www.learningjquery.com/2007/10/a-plugin-development-pattern I've been developing jQuery plugins for quite a while now, and I've become rather comfortable with a particular style of plugin development for my scripts. This article is meant to share the pattern that I've found especially useful for plugin authoring. It assumes you already have an understanding of plugin development for jQuery; if you're a novice plugin author, please review the jQuery Authoring Guidelines first. This implies a single -plugin script. If your script contains multiple plugins, or complementary plugins (like $.fn.doSomething() and $.fn.undoSomething()) then you'll claim multiple names are required.

A Plugin Development Pattern » Learning jQuery - Tips, Techniques, Tutorials

At the beginning of this book I will be focusing on a discussion about the importance and history of design patterns in any programming language. If you're already sold on or are familiar with this history, feel free to skip to the chapter ' What is a Pattern? ' to continue reading. One of the most important aspects of writing maintainable code is being able to notice the recurring themes in that code and optimize them. http://www.addyosmani.com/resources/essentialjsdesignpatterns/book/

Essential JavaScript Design Patterns For Beginners

The Essentials of Writing High Quality JavaScript | Nettuts+

http://net.tutsplus.com/tutorials/javascript-ajax/the-essentials-of-writing-high-quality-javascript/ This excerpt also includes some habits not necessarily related to the code itself, but more about the overall code creation process, including writing API documentation, conducting peer reviews, and running JSLint. These habits and best practices can help you write better, more understandable, and maintainable code—code to be proud of (and be able to figure out) when revisiting it months and years down the road. Writing Maintainable Code Software bugs are costly to fix.
This chapter is about writing style sheets with style. By showing you case studies and how they are constructed, we hope to give you a sense of how CSS can be used to encode the visual presentation you want to achieve. Also, more importantly, if you follow the guidelines in this chapter your documents will behave well on a wide range of web devices. For example, they will scale gracefully from one screen size to another. Use ems to make scalable style sheets http://www.w3.org/WAI/GL/css2em.htm

Chapter 4 The amazing em unit and other best practices

JavaScript Garden

The above function gets hoisted before the execution of the program starts; thus, it is available everywhere in the scope it was defined in, even if called before the actual definition in the source. Due to the fact that var is a declaration that hoists the variable name foo before the actual execution of the code starts, foo is already defined when the script gets executed. bar (); // ReferenceError http://bonsaiden.github.com/JavaScript-Garden/
Code should be written in a way that does not disadvantage other implementations of Python (PyPy, Jython, IronPython, Cython, Psyco, and such). For example, do not rely on CPython's efficient implementation of in-place string concatenation for statements in the form a += b or a = a + b . Those statements run more slowly in Jython.

PEP 8 -- Style Guide for Python Code

Duck typing - Wikipedia, the free encyclopedia

In computer programming with object-oriented programming languages , duck typing is a style of dynamic typing in which an object's current set of methods and properties determines the valid semantics, rather than its inheritance from a particular class or implementation of a specific interface. The name of the concept refers to the duck test , attributed to James Whitcomb Riley (see history below), which may be phrased as follows: When I see a bird that walks like a duck and swims like a duck and quacks like a duck, I call that bird a duck. [ 1 ] In duck typing, one is concerned with just those aspects of an object that are used, rather than with the type of the object itself.