Archive for July, 2009
MooTools Tutorials and Resources Round-Up

 

MooTools is a JavaScript framework that focus on being flexible, modular and compact. While still not on par in number of resources with other JavaScript frameworks such as jQuery, the MooTools community has generated a large number of articles, tutorials and third party plugins that can be considered and mature and sophisticated enough for most needs.

A word about MooTools

One of the core principles of MooTools is to provide a better application programming interface for JavaScript developers, making the language better by extending its native elements and providing more concise object oriented utilities.

As a consequence of that, some people may be inclined to think that MooTools treats browser scripting as a less important feature. Indeed, MooTools is not a DOM scripting toolkit, but the whole purpose of making JavaScript better is that developers have a more solid base over which to create readable, robust, reusable browser scripting libraries.

Articles/Tutorials

Starting points

The official documentation
A really good and complete documentation. It has a very intuitive format that makes it both an excellent reference and tutorial.

Official Documentation

jQuery vs MooTools
A mature discussion on the differences between jQuery and MooTools.

MooTools for the non-programmer
A three part series of tutorials about MooTools targeted at non-programmers:

The MooWalkthrough
A wiki-based walk through MooTools intended to introducing the library.

The MooTorial
A collection of tutorials to guide MooTools’ newcomers.

MooTorial

MooTools classes
A basic view on MooTools’ use of classes and how it compares to other approaches.

Natives and Elements
Explains what are native types in JavaScript and how MooTools extends and provide means for anyone to extend their functionality. It also explains the Element class.

Select and create elements
Tutorial on how to select specific elements as well as how to create and insert new elements on the page.

30 days of MooTools
A series of tutorials about key features in MooTools. (It is still incomplete – it currently has 23 tutorials)

  1. Intro to the Library
  2. Selectors
  3. Intro to Using Arrays
  4. Functions
  5. Event Handling
  6. Manipulating HTML
  7. Set and Get Style Properties
  8. Input Filtering Part I – Numbers
  9. Input Filtering Part II – Strings
  10. Using FX.Tween
  11. Using Fx.Morph, Fx Options and Fx Events
  12. Drag and Drop using Drag.Move
  13. Regular Expressions
  14. Periodical and Intro to Hashes
  15. Sliders
  16. Sortables and Intro to Methods
  17. Accordion
  18. Classes part I
  19. Tooltips
  20. A Few Mootools Tabs
  21. Classes part II
  22. Fx.Elements
  23. Fx.Slide

Intermediate

Facebook modal box
It reproduces Facebook’s modal box in MooTools. A Very simple solution to get a Facebook-style modal box without the need of any external plugin.

Using custom missing image graphics
A very elegant and extremely simple solution to handling missing image graphics with a custom fallback image.

Sending Email notifications for broken images
A logic follow-up to the previous tutorial. It shows how to use AJax and PHP to send email notification on the occurrence of broken images.

Skype-style buttons
How to create a Skype-style button.

skype style

MooTools Flashlight effect
An eccentric, however interesting effect.

Flashlight

Snook-style navigation
A MooTools revisit of a tutorial by Jonathan Snook.

Explode effect on Ajax page loads
How to create an effect that makes the current content ‘explode’ off-screen while another content is fetched and loaded via ajax.

Font-Size scroller with Cookie save
Shows how to create a scroller that sets the font-size and store this information in a cookie.

font-size Scroller

Track Ajax link clicks using Google Analytics
A very insightful solution to tracking ajax-based navigation in Google Analytics.

Periodicar Ajax updates using MooTools
Shows how to implement a very simple function that periodically makes a ajax request on the background.

helps you determine if caps lock is on
A nice and simple technique for easily determining if caps lock in on. Might help improve usability, specially in login scenarios.

Caps Lock on

Simulate Flash horizontal navigation
Tutorial on how to create a horizontal navigation web site.

Product Highlighter
Slick rollover mechanism that works well as a product highlighter.

Product Highlighter

Auto caption images
How to automatically extract alt and title content and add it as captions to images on the page.

toElement method
Explains and shows an interesting use case for the toElement method in MooTools.

outerClick event
An implementation of a custom event for when a user clicks outside of a given element.

Saving a sortalbe nested list
A tutorial with a full implementation of a sortable nested list, from MooTools to MySQL.

CSS sprites with MooTools
A MooTools version of an article published on A List Apart about CSS sprites using jQuery.

Sprites

Swiff
Explains what is the Swiff class and how it can be used to make flash elements communicate with JavaScript.

Fixing sIFR printing with CSS and MooTools
The use of sIRF can help you achieve the typography you want on the screen, but there may be problems when the user tries to print the page. This article shows how to work around that.

Advanced Topics

The Dollar Safe Mode
An article explaining a good practice for plugin developers that want to make their libraries compliant with “MooTools 1.2.3 Dollar Safety”, which means that it respects the global name $ in edge cases where people need to use more than one JavaScript library at the same time.

Custom Events
A nice example on how to define and explore custom events (such as alt+clicking) in MooTools.

Custom Events

Element Storage
An overview on the Element Storage functionality. How it works and how it could be used to make code easier to write and better organised.

Chaining with MooTools
A guide to the MooTools’s Chain class and how it can be used in custom classes.

Chaining

Set style per media
Using JavaScript for dynamic styling may defeat the purpose of having a style for each media, this tutorial shows one way to be media-specific while dynamically changing CSS properties.

Creating a custom “:selected” pseudo-class in MooTools
How to create your own pseudo-class selector in MooTools.

The Mouse Ghost
An interesting experiment on saving the cursor coordinates and then reproducing its movements.

Ghost Mouse

5 Advanced techniques for MooTools development
Things that you don’t get by reading documentation.

Don’t repeat your Moo
A very insightful article on how to achieve reusability in your JavaScript code with MooTools, adhering to the DRY (Don’t Repeat Yourself) principle.

dont repeat your moo

Private methods in MooTools
Shows how to implement private methods in JavaScript with MooTools.

The Singleton class mutator
A tutorial that shows how to write a class mutator that implements the singleton design pattern. A class mutator is a macro-like method/idiom to be used inside a class definition

Binds class mutator
A mutator that binds a method to the instance of a class so that it can be accessed thorough the ‘this’ keyword even in the class definition.

Plugins

SmoothScroll
Scroll smoothly through anchors within a single page.

Kroppr
A full-fledged image cropping/resizing/rotating plugin.

Kroppr

mooSocialize
A widget bar that manages a wide variety of social bookmarking and social network content sharing systems.

MooTools Event Calendar
A MooTools Calendar class that supports week/day/month view and the addition of events.

Calendar

Pamoorama
It creates a container div that allows users to scroll through a containing image. Its intended use case if to horizontally scroll through a panorama image.

Pamoorama

Slider
A Slider plugin that supports both vertical and horizontal bars that can be freely dragged or snap to predefined steps.

SortableTable
Sort and filter tables.

MooWheel
A data visualisation plugin that explores the possibilities of the canvas element.

MooWheel

Moosture
A Mouse gesture framework that allow you to trigger an event based on a predefined mouse gesture.

Moosture

inlineEdit
An inline editor plugin that makes all elements with a specified class name editable and adds a special onSave hook method to save the changes.

Navigation

Image Menu
A horizontal menu that reveals more of the image as you rollover it.

Image Menu

Sexy sliding JavaScript side bar menu
Generates a sliding sidebar menu.

MooFlow
A full-fledged image slider that resembles cover flow.

MooFlow

Simple 3D Carousel
A 3d carousel.

MooHover
Allows you to include fancy transitions in CSS based hover menus.

Layout and Style

mooRainbow
A color picker utility.

Rounded Corners
Creates round corners on divs on the fly.

Reflection
Generate image reflections on the fly with a wide range of customisation options.

Reflections

MooColumns
A class that allows you to dynamically organise content into multiple columns.

MooScroll
A MooTools class that allows the customisation of how the scrollbar looks on scrollable divs.

MooScroll

Tooltips

Window Growl
Tooltips in the same style as the Mac OS X’s Growl system.

ToolTip

Tips
A tooltip showdown.

MooTooltips
Toolstips that can have html or plain text content loaded with Ajax or inline.

Form Usability

FormCheck
This plugin allows you to define a groups of validation rules to be applied to forms.

Calendar
Features simple to create date pickers.

Date Picker

Validate
A simple form validation plugin.

JavaScript Time Picker
A time picker plugin. It uses the same idea as the date picker pattern, but applied to time picking.

MultipleSelect
Completely customised multiple select elements.

Multiple Select

HTML Form Tips
Inspired by Twitter, it features a “remaining characters” count that’s automatically updates as the user types.

Select Box Factory v1.0
A class that makes select elements support multiple selection and selection drill down according to a variety of options.

Slideshow

Slideshow 2
Slideshow plugin, resembles the slideshow in iPhoto and Photos in Mac OS X and iPhone respectively.

Slideshow 2

SmoothGallery 2.0
A simple and elegant slideshow plugin.

Ajax

Fancy upload
A plugin that integrates Ajax and the Swiff functionality in MooTools to create an upload manager.

MooTabs – Tiny tab class for MooTools
A small plugin that helps in the creation of tabbed navigation through elements that can be retrieved via ajax.

Ajax login form
A very simple ajax-based login form.

Page Loader
Provides classes to work with loading content via ajax and displaying results in the current page. It also provides a history class that manages the history of the loading area.

Page Loader

MooTools Dotter
A simple and effective Ajax-loading indicator that relies solely on JavaScript and CSS instead of using images or animated GIFs.

MooTools Dotter

Content Overlay

Lightbox
A port of the Lightbox plugin that handles a collection of images in a overlay.

MediaBoxAdvanced
Content overlaying that works with several different media types.

MediaBox

ReMooz
Image overlaying plugin. Simple and elegant.

Multibox
An overlaying plugin that supports images, flash, video, mp3s and html.

MultoBox

SlideItMoo
It packs a banner or image slider with an overlay image display effect that resembles Lightbox.

mooSlide 3.2
Shows an overlay window at the bottom or at the top of the page with a variety of options.

mooSlide

Plugin Collections

moo.rd
A collection of plugins that provides special effects, table management and more.

Clientcide Plugins
A large collections of plugins from the Clientcide blog.

Meteora
A collection of widgets written on top of MooTools, from datagrids, to calendars to JsonRPC.

Rich user interfaces

Mocha UI
A rich user interface library, it makes web applications look and behave like desktop applications.

Mocha:UI

JxLib
A library for rich client user interfaces.

JxLib

File Manager
A complete implementation of a file system explorer that let’s you navigate through the files, rename and preview them.

File Manager

Text editor extensions

Plugins for Coda

Plugins for TextMate

About the author

Diogo Terror is a web developer that loves Ruby, Typography and Macs, specially when they come altogether (and they often do). He also likes to post random thoughts on Twitter whenever they occur (and they often do).


© Diogo Terror for Smashing Magazine, 2009. |
Permalink |
15 comments |
Add to del.icio.us | Digg this | Stumble on StumbleUpon! | Tweet it! | Submit to Reddit | Forum Smashing Magazine

Post tags: , , ,

Go to Source

10 ways to make sure your conference calls aren’t a waste of time

The downturn in travel budgets has sparked an increase in the number of conference calls among those collaborating across distributed environments. Unfortunately, a lot of those calls are poorly handled, by both leaders and participants. These pointers will help keep your calls on track.


Given the distributed nature of our offices, and our need to stay in touch with each other, we all hold regular conference calls with our colleagues and peers. I have seen examples of really effective calls, as well as the opposite: dire calls that leave you feeling demotivated and annoyed and generally make you feel like you have wasted your time.

The content of either of these types of calls is not in question here, but rather what we can all do to make our conference calls as effective as possible, both as leaders and as participants.

Note: This article is also available as a PDF download.

If you are leading a call:

1: Make sure you are clearly identified as the leader

Conference calls with too many leaders (or worse, no clear leader) can quickly descend into a mess. One person should be welcoming participants, moving the meeting along, and ensuring that the meeting ends on time. Under normal circumstances, whoever sets up the call is the leader, although that may not always be the case. The leader can also carry out a roll call at the start of the meeting to identify all of the callers.

2: Be prepared

Send out the call details to all participants in plenty of time. In addition, establishing a clear agenda helps your participants prepare for the call accordingly.

3: Start the call on time, but…

Be aware that some people may have difficulties connecting to the conference bridge, especially in the case of international callers. Use the first few minutes of the call for small talk and ice breaking, but be clear about when you are starting the call.

4: Control the call

Sometimes, the conversation can go off track or even get out of hand. Try and recognise when this might be happening and request that the topic be taken up offline. This is imperative if you wish to finish the call on time.

If you’re participating in a call:

5: Join on time

Don’t join late and expect the topic you were interested in be covered again. If you come in late, wait for a suitable break in the conversation and announce that you have joined the call –although normally the call leader will ask who has joined.

6: Focus!

Focus on the call. Don’t read emails, surf the internet or carry out other jobs. If you can, move to a separate room or area to take the call, away from your desk. When this isn’t possible (e.g., for those working in front-line help desk situations), inform the call leader. Where possible, swap with a colleague to cover for you.

7: Mute

Whenever you aren’t talking, mute your phone. This will reduce background noise interference (as well as some loud breathing). Just don’t forget to come off mute when you try to talk!

8: Announce yourself

Remember that a conference call is not like a regular meeting; people can’t see who is talking, and voices often sound different over the phone, especially on speaker phones. This is particularly important early in the call, if it is the first time you have spoken or if a large number of people are on the call. A simple, “This is Jack…” will suffice.

9: Don’t sidetrack

Sidetracking a conversation (or “hijacking” it) is strictly forbidden, as well as rude. If you wish to talk at length on a topic, make sure it is on the agenda or schedule other discussions accordingly. If you feel it is pertinent to follow a particular conversation thread that is outside of the boundaries of the call, ask permission from the call leader.

10: Participate

Poor conference calls are often the result of poor participation. The call is often your opportunity to raise topics of interest or concern, so be prepared to speak openly and clearly. When the call leader asks for a response, silence is both confusing and disempowering. Speak up and state your agreement (or otherwise); remember, a nodding head does not work over the phone.

Good calls, bad calls

What tricks have you used to make your conference calls more successful? Have you sat through any calls that went completely off the rails? Join the discussion and share your experiences with other members.


Thom Langford is a senior manager at a leading international global services company. He is a Chartered IT Professional of the British Computer Society with more than 15 years of experience in the IT industry. Thom has worked in a number of roles, including professional services consultancy, IT management, service and support, and IT project management. He is currently focusing on information and operational security and governance.


Go to Source

10 best practices for successful project management

The right mix of planning, monitoring, and controlling can make the difference in completing a project on time, on budget, and with high quality results. These guidelines will help you plan the work and work the plan.


Given the high rate of project failures, you might think that companies would be happy to just have their project finish with some degree of success. That’s not the case. Despite the odds, organizations expect projects to be completed faster, cheaper, and better. The only way that these objectives can be met is through the use of effective project management processes and techniques. This list outlines the major phases of managing a project and discusses key steps for each one.

Note: This article is also available as a PDF download.

PLANNING

1: Plan the work by utilizing a project definition document

There is a tendency for IT infrastructure projects to shortchange the planning process, with an emphasis on jumping right in and beginning the work. This is a mistake. The time spent properly planning the project will result in reduced cost and duration and increased quality over the life of the project. The project definition is the primary deliverable from the planning process and describes all aspects of the project at a high level. Once approved by the customer and relevant stakeholders, it becomes the basis for the work to be performed. For example, in planning an Exchange migration, the project definition should include the following:

  • Project overview: Why is the Exchange migration taking place? What are the business drivers? What are the business benefits?
  • Objectives: What will be accomplished by the migration? What do you hope to achieve?
  • Scope: What features of Exchange will be implemented? Which departments will be converted? What is specifically out of scope?
  • Assumptions and risks: What events are you taking for granted (assumptions), and what events are you concerned about? Will the right hardware and infrastructure be in place? Do you have enough storage and network capacity?
  • Approach: How will the migration project unfold and proceed?
  • Organization: Show the significant roles on the project. Identifying the project manager is easy, but who is the sponsor? It might be the CIO for a project like this. Who is on the project team? Are any of the stakeholders represented?
  • Signature page: Ask the sponsor and key stakeholders to approve this document, signifying that they agree on what is planned.
  • Initial effort, cost, and duration estimates: These should start as best-guess estimates and then be revised, if necessary, when the workplan is completed.

PROJECT WORKPLAN

2: Create a planning horizon

After the project definition has been prepared, the workplan can be created. The workplan provides the step-by-step instructions for constructing project deliverables and managing the project. You should use a prior workplan from a similar project as a model, if one exists. If not, build one the old-fashioned way by utilizing a work-breakdown structure and network diagram.

Create a detailed workplan, including assigning resources and estimating the work as far out as you feel comfortable. This is your planning horizon. Past the planning horizon, lay out the project at a higher level, reflecting the increased level of uncertainty. The planning horizon will move forward as the project progresses. High-level activities that were initially vague need to be defined in more detail as their timeframe gets closer.

PROJECT MANAGEMENT PROCEDURES

3: Define project management procedures up front

The project management procedures outline the resources that will be used to manage the project. This will include sections on how the team will manage issues, scope change, risk, quality, communication, and so on. It is important to be able to manage the project rigorously and proactively and to ensure that the project team and all stakeholders have a common understanding of how the project will be managed. If common procedures have already been established for your organization, utilize them on your project.

4: Manage the workplan and monitor the schedule and budget

Once the project has been planned sufficiently, execution of the work can begin. In theory, since you already have agreement on your project definition and since your workplan and project management procedures are in place, the only challenge is to execute your plans and processes correctly. Of course, no project ever proceeds entirely as it was estimated and planned. The challenge is having the rigor and discipline needed to apply your project management skills correctly and proactively.

  • Review the workplan on a regular basis to determine how you are progressing in terms of schedule and budget. If your project is small, this may need to be weekly. For larger projects, the frequency might be every two weeks.
  • Identify activities that have been completed during the previous time period and update the workplan to show they are finished. Determine whether there are any other activities that should be completed but have not been. After the workplan has been updated, determine whether the project will be completed within the original effort, cost, and duration. If not, determine the critical path and look for ways to accelerate these activities to get you back on track.
  • Monitor the budget. Look at the amount of money your project has actually consumed and determine whether your actual spending is more than originally estimated based on the work that has been completed. If so, be proactive. Either work with the team to determine how the remaining work will be completed to hit your original budget or else raise a risk that you may exceed your allocated budget.

5: Look for warning signs

Look for signs that the project may be in trouble. These could include the following:

  • A small variance in schedule or budget starts to get bigger, especially early in the project. There is a tendency to think you can make it up, but this is a warning. If the tendencies are not corrected quickly, the impact will be unrecoverable.
  • You discover that activities you think have already been completed are still being worked on. For example, users whom you think have been migrated to a new platform are still not.
  • You need to rely on unscheduled overtime to hit the deadlines, especially early in the project.
  • Team morale starts to decline.
  • Deliverable quality or service quality starts to deteriorate. For instance, users start to complain that their converted e-mail folders are not working correctly.
  • Quality-control steps, testing activities, and project management time starts to be cut back from the original schedule. A big project, such as an Exchange migration, can affect everyone in your organization. Don’t cut back on the activities that ensure the work is done correctly.

If these situations occur, raise visibility through risk management, and put together a plan to proactively ensure that the project stays on track. If you cannot successfully manage through the problems, raise an issue.

MANAGING SCOPE

6: Ensure that the sponsor approves scope-change requests

After the basics of managing the schedule, managing scope is the most important activity required to control a project. Many project failures are not caused by problems with estimating or team skill sets but by the project team working on major and minor deliverables that were not part of the original project definition or business requirements. Even if you have good scope-management procedures in place, there are still two major areas of scope-change management that must be understood to be successful: understanding who the customer is and scope creep.

In general, the project sponsor is the person funding the project. For infrastructure projects like an Exchange migration, the sponsor might be the CIO or CFO. Although there is usually just one sponsor, a big project can have many stakeholders, or people who are impacted by the project. Requests for scope changes will most often come from stakeholders — many of whom may be managers in their own right. One manager might want chat services for his or her area. Another might want an exception to the size limits you have placed on mailboxes. It doesn’t matter how important a change is to a stakeholder, they can’t make scope-change decisions, and they can’t give your team the approval to make the change. In proper scope-change management, the sponsor (or a designate) must give the approval, since they are the only ones who can add funding to cover the changes and know if the project impact is acceptable.

7: Guard against scope creep

Most project managers know to invoke scope-change management procedures if they are asked to add a major new function or a major new deliverable to their project. However, sometimes the project manager doesn’t recognize the small scope changes that get added over time. Scope creep is a term used to define a series of small scope changes that are made to the project without scope-change management procedures being used. With scope creep, a series of small changes — none of which appear to affect the project individually — can accumulate and have a significant overall impact on the project. Many projects fail because of scope creep, and the project manager needs to be diligent in guarding against it.

MANAGING RISK

8: Identify risks up front

When the planning work is occurring, the project team should identify all known risks. For each risk, they should also determine the probability that the risk event will occur and the potential impact on the project. Those events identified as high-risk should have specific plans put into place to mitigate them so they do not, in fact, occur. Medium risks should be evaluated to see whether they need to be proactively managed. (Low-level risks may be identified as assumptions. That is, there is potential risk involved, but you are “assuming” that the positive outcome is much more probable.) Some risks are inherent in a complex project that affects every person in the company. Other risks may include not having the right level of expertise, unfamiliarity with the technology, and problems integrating smoothly with existing products or equipment.

9: Continue to assess potential risks throughout the project

Once the project begins, periodically perform an updated risk assessment to determine whether other risks have surfaced that need to be managed.

10: Resolve issues as quickly as possible

Issues are big problems. For instance, in an Exchange migration, the Exchange servers you ordered aren’t ready and configured on time. Or perhaps the Windows forest isn’t set up correctly and needs to be redesigned. The project manager should manage open issues diligently to ensure that they are being resolved. If there is no urgency to resolve the issue or if the issue has been active for some time, it may not really be an issue. It may be a potential problem (risk), or it may be an action item that needs to be resolved at some later point. Real issues, by their nature, must be resolved with a sense of urgency.


Sign up for 10 Things… the newsletter!

Get the key facts on a wide range of technologies, techniques, strategies, and skills with the help of the concise need-to-know lists featured in TechRepublic’s 10 Things newsletter, delivered every Friday. Automatically sign up today.


Go to Source

45+ Excellent Code Snippet Resources and Repositories

 

The beauty of code snippets is their ability to save you time when developing a site. Whether you keep a file with your own often-reused snippets or turn to one of the many online repositories, snippets can really speed up your site development.

There are plenty of places online to find code snippets and get answers to your coding questions. And many of these places let you upload your own snippets, either for personal use or to share with the community. They can also be a great place to find inspiration if you’re trying to figure out the best approach for any aspect of your site’s development.

Be sure to check out some of our previous articles:

1. General Snippet Repositories and Resources

The repositories and resources featured below cover multiple languages and platforms. Some have thousands of code snippets while others might only have a couple hundred. Most of them let you search by language, tag, author, or keyword. And most of them let you upload your own snippets or questions.

Stack Overflow
Stack Overlow is a great site to check out if you have a programming question. Post your question and wait for answers. You and other users can then vote on the answers posted. You can also search questions based on keywords or tags, view unanswered questions, and sort by newest, oldest, featured, and other criteria.

Screenshot

Snipplr
Snipplr is a code snippet search engine. It’s a way for you to keep your code snippets organized and easily accessible from any computer. It includes snippets in JavaScript, HTML, PHP, CSS, Ruby and Objective C.

Screenshot

Smipple
Smipple is a repository of “social code snippets”. You can browse by popular or recent snippets, save favorites, and submit your own snippets. You can also search based on keywords or tags.

Screenshot

Tipster
Tipster, from Carsonified (the producers of the Future of Web Design conference), is a place to share and find tips from other web designers. In addition to searching tips, you can also view hot tips and vote tips up the charts.

Screenshot

Snipt
Snipt is a code repository that allows you to save public or private snippets. There are snippets available in just about every programming language and web technology you could ask for. Some of the snippets are incredibly useful, such as prebuilt HTML test pages for creating your CSS.

Screenshot

DZone Snippets
DZone Snippets is a public code repository that lets you tag your code and share them with others. They have tons of different categories, covering everything from JavaScript to Python to HTML to XML and just about everything in between.

Screenshot

Koders
Koders is a code repository with nearly 2.5 billion lines of open source code. The search engine they use is very powerful and allows you search based on a variety of different criteria, including by class, method, interface, and more.

Screenshot

Joyent CodeSnippets
Here’s another public source code repository that lets you share your code or keep it private. Currently, there are more than 4,000 users sharing snippets. One of the nicer features of this particular repository is the ability to subscribe to an RSS feed of all snippets or just those tagged with particular keywords.

Screenshot

byteMyCode
ByteMyCode splits up their snippets based on programming language. There are tags for CSS, HTML, MySQL, Java, PHP, and just about anything else you could think of. You can browse by tag, new snippets or top snippets, or search by keyword.

Screenshot

Refactor My Code
This is a great resource if you want to get others to check your code for errors or inefficiencies. Just post some code, let other members know what you need help with, and wait for responses. You can also browse through “refactorings” and codes based on language.

Screenshot

Krugle
Krugle is a powerful code search engine that lets you search either code, projects, or comments. Filters are available to refine searches based on language or where the term appears.

Screenshot

Naslu
Naslu lets you search code in any language and from authors all over the world. One big advantage they offer is the ability to link code snippets into external web pages.

Screenshot

CodeCodex
CodeCodex is a wiki-based code repository that lets members not only share code, but also improve code shared by others. It also lets users reorganize the library to make it more efficient and easier to find specific bits of code.

Screenshot

Snippets
This snippet repository is hosted by Jonas John. It contains over 160 code snippets, primarily in PHP, though there are some in C#, Visual Basic, JavaScript and plain HTML.

Screenshot

Github
Github offers a number of forked repositories in a huge variety of languages. You can browse repositories based on what’s popular, or search based on keyword, size, the number of forks, and more. Popular repositories include Rails, Scriptaculous, and MaNGOS.

Screenshot

Codase
Codase is a syntax-aware code search engine that understands code and, therefore, performs more accurate searches. There are currently more than 250 million lines of code in its repository.

Screenshot

Google Code Search
This code search engine from Google lets you search public source code from across the web. The advanced search lets you search within languages, licenses, packages, files, and more.

Screenshot

Snipiti
Snipiti is a code repository and community. It focuses on cut & paste snippets in a variety of different languages, including PHP, HTML and Python.

Screenshot

Code:Keep
Code:Keep is a repository of nearly 15,000 snippets in just about every language out there. You can browse or search, or even look up code based on an author’s email address (great for finding your own contributed code).

Screenshot

Snippetsmania
Snippetsmania is a small code repository that includes snippets written in C, Cobol, JavaScript, PHP, Perl and others. It provides a list of the most popular snippets and organizes other snippets based on language and date. There’s also a search option.

Screenshot

DevSnippets
DevSnippets is an online snippet gallery that provides snippets as well as useful development articles for a variety of platforms and languages. Snippets are located off-site, generally on the blogs of their respective creators.

Screenshot

Server Fault
Server Fault is a question and answer site aimed at IT pros and system administrators. It’s completely free and there’s no registration required. Just post a question and wait for answers. You can see how many times your question has been viewed, how many answers have been offered, and how many votes the question has received.

Screenshot

Refactory.org
Refactory is a community-maintained collection of snippets available for public use. There’s no registration required to contribute. You can view snippets based on language or other tags (like “image” or “forms” or “anchor”).

Screenshot

Code Sucks Code Snippets
Code Sucks offers a collection of CSS, JavaScript and PHP code snippets. There aren’t a huge number of snippets included, but those listed are useful and easy to understand.

Screenshot

2. Language- and Platform-Specific Repositories

The code repositories below are all dedicated to a single language or platform. These are excellent resources if you’re stuck on a certain function and the general repositories have failed you. They’re also a great place to keep your code snippets or share them with others who are more like-minded than general repository users. While most of the repositories here are small, with only a few dozen to a couple hundred snippets, there are some that offer more.

Django Snippets
This repository contains snippets of code specific to the Django web framework. You can view snippets based on rating, tag, author, language, or how many times they’ve been bookmarked. You can also subscribe to a feed of the latest snippets.

Screenshot

Snyppets
Snyppets is a repository of Python code, mini-guides, recipes, links, tutorials, examples and ideas. They include basic code right up through advanced topics. The entire site is built on a single HTML page to make saving for offline reference easy.

Screenshot

PHP Snippets
PHP Snippets is a repository of PHP code that you can browse by letter or based on function or class. You can also browse new and highly rated snippets.

Screenshot

Konstruktors
This is a CSS repository that focuses on snippets for building grid and columb-based layouts. It doesn’t contain a huge number of snippets, but those it does include are very useful, and it’s easier to find what you’re looking for.

Screenshot

GotCodeSnippets.NET
This site offers a huge repository of Visual Basic code snippets. You search by language (C#, Visual Basic, XML, or J#). It’s not a huge repository, with a little over 100 snippets, but it’s still a valuable resource for Visual Basic programmers, and it does let you add your own snippets to the site.

Screenshot

GreaseSpot Code Snippets
This is a wiki-based site that serves as a repository for GreaseMonkey scripts. It includes a ton of useful scripts for everything from getting elements based on CSS selector to adding commas to numbers to forcing links to open in new windows and a lot more.

Screenshot

Code Beach
Code Beach is a repository for Mac developers. You can find code available under a variety of open source licenses (though everything on the site has to be available for commercial use). They also have an open submission policy, so anyone can contribute snippets and classes without having to register.

Screenshot

Snippi
Snippi is a repository for Magento code. Currently there are more than 60 snippets included, from a number of different contributors.

Screenshot

10 Code Snippets for PHP Developers
This is a blog post covering ten useful code snippets. It includes an email address check, random password generator, get IP address, XSL transformation, force downloading of a file, string encoding to prevent harmful code, sending mail, uploading of files, list files in directory, and querying RDBMS with MDB2.

Screenshot

PHP Classes
This is a PHP code repository that lets you search PHP Class Scripts, tutorials, and more. There are a huge number of scripts and snippets covering almost any aspect of PHP coding included. The site is mirrored all over the world and does require that you select a mirror before browsing.

Screenshot

The Code Project
The Code Project has nearly 24,000 development and design articles, code snippets, and other resources available. It focuses on Microsoft-based and related languages like ASP.NET and C#.

Screenshot

SWT Snippets
This is a huge repository of snippets for SWT (The Standard Widget Toolkit). Code includes snippets related to accessibility, browser functions, cursors, display, grid layouts, and more.

Screenshot

Ruby Snippets
This is a small collection of Ruby and Ruby on Rails snippets from Arto Bendiken. There are snippets included for generating random passwords, simple RSS parsing, and determining image size, among others.

Screenshot

RubyForge Snippets
Another collection of 176 Ruby and Ruby on Rails snippets and packages. Also take a look at the post 8 More Useful Ruby Code Snippets and A Selection of Ruby Code Snippets.

Screenshot

DotNetSlackers
DotNetSlackers is community and forum dedicated to ASP.NET. They also have a code repository that includes a wide variety of snippets in MS-based coding languages.

Screenshot

3. Other Code Snippet Resources

Here are a few other resources for finding code if the repositories above have failed you, for sharing your code outside of a repository, or even creating your own snippet or Q & A site.

CodeFetch{
Codefetch lets you search code snippets within programming books and makes it easy for you to then order the books that fit your needs. It covers a variety of different languages, including PHP, Java, Python, and Perl.

Screenshot

Snipt
Snipt lets you store and then share your code snippets on Twitter and elsewhere. You can also search the Snipt repository or download the Snipt desktop app.

Screenshot

cnprog
Cnprog is based on StackOverflow.com. It was developed on Django and Python and allows developers to set up their own snippet repositories and coding Q&A sites.

Screenshot

About the author

Cameron Chapman is a professional Web and graphic designer with over 6 years of experience. She also writes for a number of blogs, including her own, Cameron Chapman On Writing. She’s also the author of the forthcoming book, Internet Famous.


© Cameron Chapman for Smashing Magazine, 2009. |
Permalink |
13 comments |
Add to del.icio.us | Digg this | Stumble on StumbleUpon! | Tweet it! | Submit to Reddit | Forum Smashing Magazine

Post tags: ,

Go to Source

50 New CSS Techniques For Your Next Web Design

 

CSS is almost certainly one of the best developments in web design since the first graphical web browsers were adopted on a wide scale. Where tables created clunky, slow-loading pages, CSS created much more streamlined and usable web pages. Plus, CSS has allowed designers to achieve a number of different styles that used to only be possible with images.

One of the best parts of CSS is that it’s so simple once you know the basics. Where tables used to make incredibly complex and sometimes impossible-to-decipher code, CSS keeps things clean and simple. Add a few comments to keep everything organized and it becomes an absolute dream to work with.

Below are 50 fresh CSS tricks, techniques and tutorials that will help you to improve the quality of your next web design. Be sure to check out our previous article: 53 CSS-Techniques You Couldn’t Live Without.

1. Security and Performance

While CSS is often thought of as merely a styling language, there are ways you can use it to add security to your site. There are also ways you can optimize your CSS to improve page load times. Both are discussed below.

Make your pages load faster by combining and compressing javascript and css files

This tutorial shows you how to create a PHP script to compress and combine multiple CSS and/or JavaScript files with gzip when they’re called for by a browser. It speeds up the page load times while making it possible to still edit the individual CSS or JavaScript files without having to combine and re-compress everything each times.

Informal testing showed that a group of JavaScript files were reduced from 168Kb (and 1905 ms to transfer) to 37Kb (and 400 ms). There wasn’t any data available for the effect it had on CSS files, but I’d guess it’s probably pretty similar.

Screenshot

The Definitive Post on Gzipping Your CSS

This post covers the best and most recent methods for using GZIP to compress your CSS. It currently covers two different methods, both equally effective. One involves adding a bit of PHP to your CSS file (and renaming the file with a PHP extension instead of CSS) while the other method involves using the same PHP code with some additions but in a separate file.

Screenshot

Clickjane.css: A CSS User Style Sheet to Help Detect and Avoid Clickjacking Attacks

This post covers how to use clickjane.css to prevent clickjacking, a class of security vulnerabilities kind of like phishing scams and more formally referred to as user interface redressing. It’s cross-browser compatible but, admittedly, probably only covers a small range of potential clickjacking vulnerabilities. It’s still a good place to start, though.

Screenshot

5 Step Style Sheet Weight Loss Program

This post shows five different ways to trim the size of your style sheets. Techniques range from learning how to group selectors to using CSS shorthand. Each technique is thoroughly explained and includes related resources.

Screenshot

2. Page Layout

This is what CSS was built for. The options are almost endless, especially as CSS3 becomes the new standard.

Aligning Inline Images with the Vertical-Align Property

The default vertical alignment for inline images in text sometimes looks not-so-great. This tutorial shows you how to better align inline images with your site’s type. It goes over the different types of vertical alignment and what they mean in relation to type.

Screenshot

CSS Centering

This post includes instructions for centering liquid layouts with CSS. It’s very simple and straight-forward and works in virtually all browsers. Basically, it just uses left and right margins combined with some additional code to make it cross-browser compatible.

Screenshot

Making Your Footer Stay Put with CSS

Keeping footers at the bottom of your pages can be a real hassle with CSS, depending on how the rest of your page is set up. This tutorial shows exactly how to keep your footer where it should be—below the rest of your content! It’s a very thorough post, with complete, step-by-step instructions.

Screenshot

Vertical Centering with CSS

This post covers five excellent ways to center your content vertically. It includes the good and bad for each method along with complete instructions for implementing them. The methods range from using divs that act like tables to using absolute positions.

Screenshot

Handy Tips for Creating a Print CSS Stylesheet

This post is filled with great tips for creating better print stylesheets. It includes instructions for everything from including link destinations after the link text to splitting comments onto a new page. Pick and choose from the techniques offered or copy the whole stylesheet.

Screenshot

Fluid Images

Fluid layouts are great. They generally look and function just fine until you start introducing fixed-width elements within them—like images. This post shows how to make your images fluid, too. And it works for most embedded video. And while the basic technique includes just one CSS property, there is a workaround necessary to make it work on Windows machines.

Screenshot

Flexible Equal Height Columns

This tutorial shows how to create completely versatile equal height columns using valid and semantic markup. It’s cross-browser compatible and works with both fixed, fluid, and even elastic designs. It’s a very complete tutorial but not at all complicated.

Screenshot

CSS Columns with Borders

This is a technique for creating equal-height columns with CSS that have borders. It uses a series of nested divs to achieve the effect instead of images. The end result is fantastic.

Screenshot

Creating a Polaroid Photo Viewer with CSS3 and jQuery

The photo gallery created with this technique is absolutely awesome. The HTML and CSS aren’t super-complicated, and everything is explained really well. While CSS3 isn’t supported by every browser, this does appear to degrade gracefully, making it perfectly fine to use as long as you don’t mind some visitors not getting the full effect.

Screenshot

A Killer Collection of Global CSS Reset Styles

An incredibly complete collection of global resets, this post covers pretty much every reset you could possibly need. Some are short and sweet, consisting of only a couple of properties, while others are very complete and reset everything you might consider resetting.

Screenshot

Making Module Layout Systems

This tutorial gives complete instructions for creating modular layout systems using CSS. This makes it practical to use different grid-based divs as needed for individual content elements. The end result provides tons of flexibility for dealing with everything from images to text while keeping everything uniform and balanced.

Screenshot

Multiple Backgrounds (CSS3)

This tutorial shows how to implement multiple backgrounds using CSS3. It’s currently only supported by Safari, but the tutorial includes tricks to make it work in non-supported browsers. Currently, it doesn’t validate, but once the CSS3 standard is completed it’s likely it will.

Screenshot

CSS3 Multiple Columns

Here’s a tutorial for creating multi-column layouts with CSS3. The CSS is pretty simple and straight-forward, much easier than most current solutions to multi-column layouts. Unfortunately, this only works with Firefox, Safari and Chrome at the moment.

Screenshot

Smart Columns with CSS and jQuery

This tutorial shows how to create smart columns inside liquid layouts using a combination of CSS and jQuery. Basically, it fits as many columns into the base column size as possible and then distributes any leftover white space among the columns there. A very elegant solution if you want to allow for a variable number of columns without ending up with a bunch of leftover white space in your design.

Screenshot

CSS Hack for Chrome, Safari and Internet Explorer

This tutorial shows how to apply different style sheets based on the browser your visitors are using (at least in IE5-8, Google Chrome, and Safari 1-4). A very valuable technique if you want to use styles only supported in certain browsers without making your site look bad in unsupported browsers.

3. Menu and Navigation Customizations

Menu and navigation styles can really set your site apart if done well. Just remember, menus need to remain usable and functional no matter how they look.

Overlap That Menu!

Have you ever wanted to create menu items that overlap? This relatively-simple tutorial shows you how to do just that using unique classes for your menu items. It also tells how to reorder the navigation items using the z-index. It’s a nice effect that isn’t difficult to achieve.

Screenshot

Super Awesome Buttons with CSS3 and RGBA

With a little CSS3 magic, you can created a scalable set of sexy buttons with nearly half the CSS it would have taken with hex colors. Give it a go in your next project and see how it can help add that extra polish you want without huge impact on your code.

 Super Awesome Buttons with CSS3 and RGBA

Custom Buttons 3.0

This page shows a variety of rounded-corner (1px radius) buttons that don’t use images (other than for the optional background gradient). Just look at the source code for the page to see how it’s done.

Screenshot

Centered Tabs with CSS

This tutorial provides an alternative to the sliding doors method of creating tabs in CSS that allows tabs to be centered instead of only right- or left-aligned. It’s a multi-step tutorial but isn’t complicated.

Screenshot

Styling the Button Element with CSS Sliding Doors

An updated tutorial on sliding doors buttons that now includes creating them with CSS image sprites. It’s also been simplified to work with a single block of CSS in all the major browsers (including IE 6-8). The markup is simple and straight-forward and the end result is perfect.

Screenshot

Styling Buttons to Look Like Links

Sometimes you have to use a button (like with forms), but realize your design would look so much better with just a simple text link. This tutorial gives a complete overview of how to make your buttons look like text links using CSS.

Screenshot

Simple, Scalable CSS Based Breadcrumbs

Breadcrumbs can be a great addition to your site’s navigation and can really improve your site’s usability. This tutorial shows you how to create breadcrumbs with CSS. The code used is simple (the HTML portion is just an unordered list) and there are only six CSS styles defined.

Screenshot

Recreating the Button

This article covers how to make a button that look very similar to regular HTML input buttons but can handle multiple types of interaction (like dropdowns or toggle functions). These buttons were originally developed at Google and are skinnable with just a few lines of CSS. The buttons created are entirely CSS-based, including the gradient background.

Screenshot

List of 10+ Usability-Conscious Link Styles

This page offers a good overview of different effects you can use for links, including color and underline, backgrounds, and animations. It’s a good starting place if you’re trying to figure out exactly how your links should look and act to make them more user-friendly.

Screenshot

Create Vimeo-Like Top Navigation

Here’s a tutorial to create a drop-down top navigation bar similar to the one Vimeo.com uses. It’s all done with images, CSS and HTML and isn’t particularly difficult, though it is a bit complex. It’s explained really well, with images illustrating the structure and very well-written CSS.

Screenshot

Beautifully Horizontal Centered Menus/Tabs/List

This tutorial explains how to create cross-browser compatible, centered menus or other items in CSS with no hacks and no JavaScript It’s compatible with liquid layouts, too. Not only does it give the code to achieve the effect, but it also fully explains exactly how and why it works.

4. Typography

Here are a few tutorials and tricks for creating advanced typographic styles using CSS. There’s everything from line-wrap functions to faux anti-aliasing to adding gradients and shadows.

Wrapping Text Inside Pre Tags

This tutorial shows how to wrap text within pre html tags. It’s useful for displaying code on your site, especially when lines of code are quite long and end up breaking your site’s layout (especially in IE). It’s a relatively simple and there are a few different options presented.

Screenshot

Make Cool and Clever Text Effects with CSS Text-Shadow

Creating text effects without the use of images is a big advantage in terms of both file size and the time required for maintenance. This tutorial shows how to take advantage of the text-shadow property in CSS to style your text. While this effect doesn’t work in IE, it does in most other browsers. And it looks incredibly cool if done well (I’m a big fan of the “milky text” example).

Screenshot

Safari’s Text-Shadowing Anti-Aliasing CSS Hack

This tutorial shows how to use the text-shadow CSS property to create an anti-aliasing effect on your text. It only works in browsers that support text-shadow (so not IE), but the look is pretty awesome. It can definitely make text more readable, just don’t overdo it or you end up with text that’s blurry.

Screenshot

Safari’s Text-Shadowing Anti-Aliasing CSS Hack Revision

This is a revised version of the technique above to create a slightly different anti-aliasing effect, especially useful for light text on dark backgrounds. It uses an extremely transparent black background to force Safari to render the text more legibly.

Screenshot

Snazzy Pullquotes for Your Blog

If you have a blog or other site that’s text-heavy, using pull quotes to highlight important bits can look really awesome while also making your content more scannable. This tutorial shows how to format those pull quotes with CSS. It shows how to create both left and right aligned pull quotes while also preserving your regular blockquote style.

Screenshot

Codename Rainbows

Here’s a technique for creating two-color gradients for text using a combination of JavaScript and CSS. It also works to apply shadows and highlights to text. The possibilities for the use of this technique are pretty endless. Of course, this is also one of those things where a little bit goes a long way (ie, limit gradients to your headers, titles, and other text you want to stand out—not your site’s body copy).

Screenshot

Build Better CSS Font Stacks

This article gives some great guidelines for creating better CSS font stacks. It includes information on the most common font stacks currently used and then goes on to cover Tuck’s Definitive Font Stacks and Ford’s Better Font Stacks. It’s a great resource when you’re determining a site’s typography, with the information presented in a very scannable, well-organized format.

Screenshot

CSS3 Embedding a Font Face

Here’s a great tutorial on how to embed fonts using CSS3. While it’s still not widely supported, this technique makes it much easier to embed special fonts into a site without having to resort to images.

Screenshot

CSS Gradient Text Effect

This little trick makes it easy to create gradient text by applying a 1 pixel gradient PNG to it. It’s a quick and easy way to create gradient text pretty much anywhere on your site. There’s even a fix to make it work in IE6 included.

Screenshot

5. Other Cool Techniques, Tips, and Tricks

Below are a ton of other techniques and tricks you can use to really make your CSS stand out.

3D Cube Using CSS Transformations

This is probably one of the coolest CSS techniques I’ve seen. This tutorial shows how to build a 3D cube with text or other content on each side of the cube. It does it entirely with CSS; there’s no canvas, SVG, imagery, or JavaScript. There’s even instructions for creating multiple shaded cubes on a single page. The only real drawback is that it’s only supported in recent WebKit and Gecko browsers.

Screenshot

Nine Ways to Obfuscate E-mail addresses compared

This article gives two different methods for obfuscating email addresses with CSS. One involves using the display:none attribute while the other involves reversing the code. Both supposedly cut the amount of spam received to zero.

Screenshot

Forms Markup and CSS – Revisited

Here is a CSS template for form styling. The markup of the form is based on the Accessible Forms Markup from Derek Featherstone. The template is semantically correct, flexible and accessible.

Screenshot

iPhone CSS

A very short and simple tutorial on how to make certain elements of you CSS render differently on the iPhone. It’s surprisingly simple and easy to implement.

Screenshot

Improving Your Process: Faster Front End Development

While this post offers plenty of information on things other than CSS, it also offers some great advice for improving your efficiency with CSS: mainly, write your CSS in blocks. This technique is usually done progressively as you get used to coding in this manner. The steps are simple, though, and it’s sure to make you a much faster designer.

Screenshot

Image-Free CSS Tooltip Pointers – A Use for Polygonal CSS?

This tutorial explains how to create triangles (to be used for pointers) using CSS, without the need for any images. The end result is great, though it only works for single-color images. The CSS used is incredibly simple while still being really versatile. You can create a triangle of almost any size using just a single div.

Screenshot

How I Implemented My Cookie-Based Switcher

While not strictly a CSS trick, this post shows how to create a cookie-based CSS theme switcher for WordPress. It allows users to choose to use a different theme when they visit the blog while allowing new users to see a nice, simple, easy-to-read theme that puts the primary focus on the content.

Screenshot

CSS Swap Hover Effect

This great technique will replace any image with another image when you hover over it. The tutorial shows it applied to a portfolio site, but the possibilities are endless. It’s very slick and cross-browser compatible (though IE6 does require a bit of a workaround, as usual).

Screenshot

CSS Stacked Bar Graphs

Here’s a tutorial for creating stacked bar graphs using CSS and some images. It’s a pretty in-depth process, but the result looks fantastic.

Screenshot

Changing HTML Images on Hover / A Quick CSS Trick

Here’s a quick and easy CSS technique for swapping out images on hover. It’s pure CSS, no JavaScript required. The biggest issue this technique solves is that when the page is printed, the base image is the only one that shows up.

Screenshot

10 Properties that Were Impossible to Implement in IE6

This collection of CSS tricks shows how to implement a number of styles that were supposedly impossible in Internet Explorer 6. It includes tricks for opacity, fixed positions, and text shadow, among others.

Screenshot

10 Challenging But Awesome CSS Techniques

Sometimes the coolest things just take a bit more effort. This collection of tutorials covers ten different CSS techniques that aren’t exactly easy to achieve, but the end results are well worth the extra effort. Techniques include pull quotes, dynamic variables, and style changes based on the time of day or even the weather, among other awesome examples.

Screenshot

Further Resources

About the author

Cameron Chapman is a professional Web and graphic designer with over 6 years of experience. She also writes for a number of blogs, including her own, Cameron Chapman On Writing. She’s also the author of the forthcoming book, Internet Famous.


© Cameron Chapman for Smashing Magazine, 2009. |
Permalink |
50 comments |
Add to del.icio.us | Digg this | Stumble on StumbleUpon! | Tweet it! | Submit to Reddit | Forum Smashing Magazine

Post tags: , ,

Go to Source