Keeping Front End Dependencies Under Control

Comments

Let us recommend for the human being in crisis that he stop concentrating so upon the risks concerned plus the difficultie¡ê?and focus rather upon the opptunity---for there is certainly generally prospect in crisis.

Posted By: Windows 7 Keygen On: 01/19/11 2:21 AM

Great presentation about the Front-End Dependencies. I find this very informative and very useful. Thank you for sharing this with us. You did an awesome job.

Posted By: Ginault Watches On: 01/28/11 2:22 AM

It is a very useful and informative article indeed. It really help me to enhance my knowledge about different part of speech and understand these.

Posted By: Nissan India On: 02/22/11 7:59 AM

Great things you've always shared with us. Thanks. Just continue composing this kind of post.The time which was wasted in traveling for tuition now it can be utilized for studies. Thanks for this knowledgeable blog.

Posted By: Hire PHP Developer On: 03/11/11 2:31 AM

Your work is really great and also makes a strong social statement about our society.

Posted By: Jewelry Wholesale On: 03/28/11 1:19 AM

Framing Services ART LOFT in Oakland CA. We are Professional and celebrating 38 years of service with extreme quality and designs framing services.

Posted By: Oakland Framing On: 05/14/11 10:59 PM

BII offer a comprehensive implementation service designed to assist in all aspects of your deployment of security technology, from project management to turnkey deployment. The BII service is designed to deliver best practices garnered from our experience with a cross-section of Blue Chip companies. Our project managers use a structured approach focused on details and results to define the high-level solution and drive to a fully optimised product, accelerating time to deployment.

Posted By: Penetration Testing Services On: 05/14/11 11:03 PM

thant good, i like!

Posted By: coach outlet On: 05/25/11 1:28 PM

Great, thanks for sharing this blog post. Fantastic.

Posted By: flowers delivery in hong kong On: 06/25/11 5:19 AM

thanks

Posted By: بنات On: 08/19/11 7:34 AM

This post has been somewhat of a revelation to me.

Posted By: Special Nike Shoes On: 08/24/11 10:18 PM

I really wish I hadn’t seen this as I really want one now!

Posted By: Moncler Down On: 08/28/11 8:14 PM

Thanks for taking the time to discuss this, I feel fervently about this and I like learning about this topic.

Posted By: pomegranate weight loss On: 08/28/11 10:11 PM

The blog was absolutely fantastic! Lot of great information which can be helpful in some or the other way. Keep updating the blog,looking forward for more contents...Great job, keep it up..

Posted By: Queen Bed Frame On: 08/30/11 3:22 AM

love your presentations

Posted By: Online Shopping India On: 09/01/11 6:27 AM

eglio dei sandali con stringe più sottili e caviglia libera Perfect! and data accurately.they are help to me.I expect to see your new share.

Posted By: Canada Goose Yorkville Parka On: 09/17/11 11:21 AM

wow!Thank this meaningful and helpful post !

Posted By: Japan Lingzhi 2 Day Diet On: 09/19/11 4:47 AM


Not only that, Eason Chan and other singers are also magic users headphones sound recording engineer, in block can be seen in entertainment.

Currently, we have got this magic sound recording engineer headphones.

Posted By: beats by dre for cheap On: 09/20/11 11:49 PM

A person come to the farthest places a write our own path.

Posted By: Authentic NFL Jerseys On: 09/21/11 3:49 AM

The bottom side, JORDAN max Air Jordan XXI will be successful in the end be improved, followed by or in the Zoom Air Sole and general replacement to do, more interesting is the replacement of the IPS unit made some adjustments, followed by the Department has a observation of a transparent material composition window, you can clearly see the use of air, it seems that the built-in cushion design letting people back in front of this design being only part of JORDAN max range of innovative design allows better the wearer feel the Air-Sole and Zoom Air distinction, the former gentle, easy to control; comfortable and explosive which is good. corresponds to a different race can use a different air, which is the design of the charm.

Posted By: jordans cheap On: 09/21/11 4:18 AM

jordan classic high-heeled sheepskin boots, boots main characteristics of comfort and warmth to develop their own .... than fashionable, more focus on practical. Manufacture 100% sheepskin slave, which makes the boots known for its comfortable and durable, high-heeled high-heeled boots oval head is always prudent to maintain a certain level, but the sub unexpected, but the sub-avant-garde, law-abiding, the brand has always been the perfect show elegant retro flavor.

Posted By: cheap jordan heels for women On: 09/23/11 5:32 AM

I thought I knew a thing or two about Front End Dependencies, turns out I was in the dark. Nice presentation, is the most up-to-date presentation you have?

Posted By: Sprinkler Buff On: 09/28/11 1:28 PM

This is a spectacular article that I have really enjoyed. Hopefully I can learn more from your valuable experience. Thanks a lot for sharing this and please keep on posting more.

Posted By: Hus i Thailand On: 10/04/11 3:37 AM

With its stylish atmosphere, design, first-class fabrics, excellent workmanship, and unique British style of your cluster, the product will soon be the concern of the nobles and the ladies love, ugg snow boots began to cluster in the royal family and other high society expensive popular. At the same time, some of the fashion of young people have followed suit, so that more and more popular ugg, nobility in Europe, As the most common winter boots women snow boots single product, not only cozy warmth, but can also dress your overall points. set off a wave of wave of snow boots. Appearance in the design also incorporates a diamond, oranges, Martin, animal patterns, animal fur and other fashion elements, products calm lacking in personality, lack of publicity in and of humility, able to disclose the luxury and extravagance, every detail are reflect the excellent workmanship and distinguished royal status, so that every available pair of boots a stylish beauty who has been sought after, become the focus of major fashion industry, as a variety of fashion magazines, websites, media thermal recommended products , style into a classic style.

Posted By: ugg boots cheap On: 10/09/11 11:38 PM

I'm happy I found this blog! From time to time students want to cognitive the keys of productive literary essays composing. Your first-class knowledge about this good post can become a proper basis for such people. Thanks.

Posted By: Burberry Bags On: 10/13/11 3:41 AM

Certain impression of these shoes and even strangers, because they chic and simple, functional. Availability and high-heeled shoes for women

Posted By: jordan 11 heels On: 10/13/11 5:05 AM

Fabulous! This blog looks just like my disintegrated a certain! It's on a totally unusual contingent on expose but it has pretty much the anyhow layout and design.

Posted By: Business Franchise Opportunities On: 10/15/11 11:00 AM

This discoount nike <a href="http://www.sizetime.com">discount nike</a> shoes store have high quality,and have a great discount. You may see the cheap jordans <a href="http://www.sizetime.com/discount-cheap-jordans_c182">cheap jordans</a>, and very nice dunk shoes in the nike dunk high category <a href="http://www.sizetime.com/discount-nike-dunk-high_c66">nike dunk high</a>.
Attend party, one niec hreve leger dress <a href="http://www.hervelegers-dresses.com/herve-leger-dress-c-1.html">herve leger dress</a>, and one pair of christian louboutin <a href="http://www.hervelegers-dresses.com/christian-louboutin-boots-c-5.html">louboutin boots</a> , they are necessary.
We sales <a href="http://www.monclerbrands.com">cheap moncler</a> for the best price.
So so, there are amazing <a href="http://www.suprabrands.org">cheap supra shoes</a>
The hight quality handbags in this website : <a href="http://www.edwhole.com/Cheap-tods-bags_c155">tods bags</a>, and the louboutn shoes :<a href="http://www.edwhole.com/Cheap-christian-louboutin_c97">christian louboutin shoes</a>.
Shop true religion jeans online . A series of discount <a href="http://www.jeans-true.com">true religion jeans sales</a>. Save 70% off, free shipping.
weltweit frei Einkaufen <a href="http://www.mbtschuhe-2011.com">mbt schuhe</a> ,mbt schuhe 2011,mbt schuhe günstig ,Frauen MBT Schuhe online speichern verkauf
Nous vendons des rabais <a href="http://www.mbtchaussuresshoes.com">mbt chaussures</a>, De haute qualité, d'actualisation élevé mbt chaussures 2011,dernières mbt chaussures,Livraison gratuite, duty-free.
sales cheap uggs, cheap ugg boots, cheap ugg women , and other cheap ugg boots. SAVE 30-70% , next day delivery on <a href="http://www.wholesalesugg.com">cheap uggs</a>.
<a href="http://www.bestmonclerjacket.com">Moncler jackets sales</a>, Sale 2011 the latest Moncler jackets outlet with free shipping. Save 80% off, great discount Moncler jackets for you.
Shop shox running shoes and shox running shoes on sale , outlet cheap nike shox : Air Max Dream, nike shox dream, nike shox NZ, nike shox OZ, nike shox R6 running shoes and <a href="http://www.newsportsstore.com">nike shox running shoes</a> more..

Posted By: nike shox running shoes On: 10/16/11 8:10 PM

sexy and famous,Gucci's "double G" logo, the "symbol of status and wealth

Posted By: cheap gucci sunglasses On: 10/17/11 4:34 AM

same as the fixed mouth need.

Posted By: beats studio On: 10/18/11 4:47 AM

In the "Do it" ad behind, is a very American-style ideology; However, as globalization advances, the original ideology of what the United States into a common desire around the world, eager to There is a level playing field, allowing people not only in sports but in life, all levels of the short length of a fight.

Posted By: cheap air max jordan for sale On: 10/24/11 12:25 AM

Inspiration could ever use, UGG boots snow will bring you a another surprise. Dark green texture to give you the mysterious depths of the forest and gorgeous sense of well-mounted drill a small light, all the way to spreading ballast, upward. The sun, is shining in bits and pieces of the sun such as forests, dotted with you quietly beautiful. Not only is the clever use of diamond in the UGG, you will see exotic tassels, both comfort and visual beauty of wool flange design, post-modernist full rivets, great tension and imagination of the lace elements, and lace, leopard, lace, and a common interpretation of a low-key luxury. Every detail, all bears the elegant design of walking; each walk away are the beautiful turn of the gorgeous dance.

Posted By: ugg boots clearance On: 10/24/11 4:59 AM

(Valacyclovir) without prescription. Valtrex (Valacyclovir). No prescription needed. 100% privacy and security guaranted. We sell generic and brand.

Posted By: buy valtrex On: 10/26/11 12:18 PM

The best Singapore webstore where you can order high quality ED with fast shipping and good price buy viagra online in our shop. Become a fan on Facebook!

Posted By: viagra singapore On: 10/26/11 12:29 PM

I got a lot of information regarding java script.I book mark this post for future reference.

Posted By: Plumber On: 10/27/11 1:40 AM


Modeling honest cute snow boots this winter's trend to become the new darling, to usurp the people's attention. Tired of wearing the ordinary people of UGG, enough of the streets, "hit the shoes" of distress, as a look at how the European and American fashion stars show their snow boots with it! megan fox fashionable fringed UGG warm, Michelle Trachtenberg version of Jimmy Choo luxury UGG rivets rock solid ride ... ... the design of lightweight, super-casual outfit on a model! Immediately create a sense of winter warmth of personality full point look. UGG Australia Women's Knit series, featuring a comfortable wool touch, diamond mesh knit lines,

Posted By: ugg boots cheap On: 10/27/11 2:40 AM

When choose <a href="http://www.northface123.com/">north face jackets on sale</a> Comfort is the primary concern for any one whether a woman, housewife, college girl, or working woman. Women casual wear<a href="http://www.northface123.com/women-2-in-1-jackets-outlet-60.html">womens north face jackets</a> is the one way of getting such comforts. However besides the <a href="http://www.northface123.com/">cheap north face</a> comfort, every woman wishes to look fashionable and keep up with the current fashion <a href="http://www.northface123.com/">cheap north face jackets</a> styles without looking sloppy and out of fashion.The no-nonsense women's casual <a href="http://www.northface123.com/">discount north face jackets</a> brought about a major fashion revolution and is definitely here to stay. With major fashion <a href="http://www.northface123.com/">north face store</a> like Elan International dresses dedicating an entire collection to women's casual apparel, there is no doubt that women are ready to buy <a href="http://www.northface123.com/">cheap northface jackets</a> break away from the restraints of elite fashion and experiment with casual clothing trends.

Posted By: Vivi420 On: 10/29/11 12:09 AM

From the Turkey earthquake and Libya hongxinmaoyi114post.

Posted By: new era hats for sale On: 10/31/11 3:10 AM

in Yemen and Halloween monsters hongxinmaoyi114post.

Posted By: Wholesale new era hats On: 10/31/11 3:10 AM

TIME’s photo departmen hongxinmaoyi114post.

Posted By: Wholesale Baseball Caps On: 10/31/11 3:11 AM

From the Turkey earthquake and Libya hongxinmaoyi114post.

Posted By: new era hats for sale On: 10/31/11 3:11 AM

a group wave of cutting-edge brand to find another eye-catching marketing tactics: the big launch with an exclusive design of the top models, both to meet the consumer chase big psychological, letting big to People First attitude to tap into a number of potential customers.

Posted By: ugg boots sale On: 11/01/11 11:51 PM

This is one of the good picture.All the picture are good..Great mind..I think by seen this picture you can learn something about braveness..Nice post..

Posted By: Android apps developers On: 11/02/11 3:05 AM

it is a love of the unique charm! Sweet at first glance like a big bow like to have. Side of the three-dimensional Pengpeng bow shape, is very sweet

Posted By: ugg boots for sale On: 11/04/11 3:57 AM

warm and lovely - feels good boots can also be do not fold into the real take plain boots - at least once to create a winter feel warm and lovely look ~ point of round one daughter's lovely to wear on the show look easy!

Posted By: uggs clearance On: 11/05/11 2:27 AM

Wool in the footsteps of the design so nice and warm - all winter to play a big bear national wind fall and winter fashion sense

Posted By: uggs outlet online On: 11/10/11 8:45 PM

highlights the unparalleled comfort feel. UGG snow boots and a good introduction and warm setting up with long-barreled snow boots, put on the legs were thin and beautiful,

Posted By: uggs for women On: 11/15/11 11:01 PM

Cars and houses are quite expensive and not everybody is able to buy it. But, personal loans was invented to aid different people in such situations.

Posted By: credit loans On: 11/23/11 5:59 AM

Cars and houses are quite expensive and not everybody is able to buy it. But, personal loans was invented to aid different people in such situations.

Posted By: personal loans On: 11/23/11 5:59 AM

Order now the classic <a href=http://www.beenshoes.com/>ugg</a> shoes on the web! The <a href=http://www.beenshoes.com/>uggs</a> On the web Shop Beenshoes supplies excellent service along with a large range of <a href=http://www.beenshoes.com/>ugg boots</a>. exactly where offers the trend-conscious choice of women's, men's and children's boots and fashion for each and every style and taste a suitable wardrobe.

Posted By: ugg On: 11/29/11 11:09 PM

These kind of posts are always inspiring and I prefer to read quality content so I am happy to find out many good point here in the post, writing is simply great, thank you for the post.

Posted By: Website Hosting On: 11/29/11 11:10 PM

Series of clear thick crust wedge with the fashion trend, desert boots and the series will be low-key fashion to the extreme interpretation. Retro wooden heeled high-end series with 4-inch,

Posted By: cheap ugg boots On: 12/07/11 12:38 AM

Cailyn this boots as one of the main series of products, made of light skinned, and the boots in the upper part of the weave pattern of Navajo jewelry as a decoration

Posted By: uggs outlet online On: 12/07/11 1:28 AM

An interesting discussion is worth comment.glad i came across your post, very informative indeed.

Posted By: شات On: 12/09/11 12:02 PM

The whole information that you provide is really useful and great and also the collection and facts are absolutely great to see!

Posted By: flower delivery services On: 12/13/11 2:07 AM

coach factory are leading the international market all the time, because men and women choose to buy these Coach Products to use for leisure,work or travel than any other designer brands.On coach factory stores, we provide coach handbags, coach wallets and other accessories.All coach bags featured with stylish leather bags and signature materials.

Posted By: coach factory On: 12/14/11 4:19 AM

Designs of this season give you the unlimited cool feelings in this cool summer. The new designs of Coach products in the coach outlet enrich our daily life.If you go shopping on the coach factory online, you will be granted not only good products, great services and prompt replies, but also an overall pleasant experience.

Posted By: coach outlet On: 12/14/11 4:24 AM

coach factory outlet has new coach laptop bags in listing. No matter which style do you want, we can provide it for you.You can discover all types of style and design bags on coach factory outlet online, including the hot selling coach purses and coach wallets. The coach wallets are popular among the designer luxury, simply due to their craftsmanship is extremely good as well as the price is reasonable to you.

Posted By: coach factory On: 12/14/11 4:28 AM

Side of the opening of the UGG flash can be turned down, comfortable and warm, while the same stylish and cute appearance, weave a variety of changing forms to UGG, gray knitted snow boots,

Posted By: cheap ugg boots for sale On: 12/15/11 3:38 AM

Grey knitted ugg snow boots, with a little ruffian's fashion sense. Hair design face fashion ugg snow boots will become the focus of fashion.local snow boots ugg Australia brand, by the international fashion designer and star of the blitz.

Posted By: ugg boots sale On: 12/18/11 9:30 PM

Special stains, please use the transparent fluid + soft brush + dry; light-colored boots, care methods such as the upper pay attention to wring too hard deformation caused SHOES, dried to 80% of the time pay attention to shape, otherwise sHOES will wrinkle oh,

Posted By: uggs 2011 On: 12/19/11 8:37 PM

Recevoir engouement ancien style nostalgique pourraient être les problèmeséchauffement pour l'artiste, quelques jours tendance, sacs à main et également des composants tentent de payer la gratitude d'être en mesure de les décennies précédentes. Pas trop longtemps, le peuple particulier de France millésime LANCELmarque introduit bardage nombreuses, qu'il s'agisse de la modestie mentale, vif sacjaune LANCEL points; ou peut-être la passion scandaleuse avec le transporteur LeopardLANCEL étendue, mise en page sophistiquée avec des facteurs de style ancien, de sorte que votre nombreuses livre vraiment participer, en utilisant une des boissons du vin rougeen peau de daim crocodiles points LANCEL forfait, c'est vraiment l'atmosphère louable,au cas où vous êtes tous MILF, à côté de nombreux low-key beauté avec ce sac antiques peuvent être votre choix le plus approprié

Posted By: Lance On: 12/20/11 2:42 AM


Winter, a wide variety of boots shuttle on the streets, choose a suitable snow boots, against the cold winter, a pair of snow boots round circle of the brain can Dachu you want results. Simply is not fancy, warm and comfortable, everyone loves! Classic black and white, knitted jacket and hat Dachu lovely wind, snow boots with tassels khaki, and in winter it boring. Snow boots super cute romantic style with brown pants, a warm winter is definitely the protagonist does not look bloated.

Posted By: cheap uggs On: 12/22/11 1:53 AM

Martin boots straps tendon at the end of a more neutral style, but the heel penetration of a woman's unique modification. New leather snow boots make you look more special, brown is a popular trend this fall season together

Posted By: new uggs 2011 On: 12/23/11 4:01 AM

Every article you wrote brilliant among the blog users! No surprise you got a lot of comments on this post.

Posted By: Literature Review Example On: 12/24/11 12:15 AM

The life is very unpredictable, so we all try to live our lives in a right way and we are also try to get excellent information just like this high quality post. Thanks for sharing.

Posted By: dissertation sample On: 12/27/11 4:44 AM

If you think that Moncler men jackets maybe less style than <a href="http://www.monclerdownjacketsmall.com/" title="moncler down jackets">moncler down jackets</a>, then you will be wrong. Unlike the Moncler women's jackets, Moncler men jackets maybe less choice on colours, but gain more handsome and mystery feeling! Either the Moncler men down jackets or the Moncler men short jackets, each of them has distinctive features! <a href="http://www.monclerdownjacketsmall.com/" title="moncler down jackets sale">moncler down jackets sale</a> is the product that have launched later than Moncler women's jackets and Moncler men jackets.Moncler kids jackets, Moncler kids vest, Moncler kids coats and so on!
Every <a href="http://www.canadagooseparkasjackets.com/" title="canada goose jackets sale">canada goose jackets sale</a> incarnate children's simplicity. Vivo, cute, lively! With the popularity of measures, more and more has become like fashion, and not just children.Many fashion labels are starting to produce fashion products for children zeigen. Charms you want, you get your children's fashion to follow me,<a href="http://www.canadagooseparkasjackets.com/" title="canada goose parkas jackets">canada goose parkas jackets</a> come to the shop Moncler.To cut removable hood with light brown lining and drawstring ribbon. Often used for non-woven, knitted and woven fabrics.

Posted By: moncler down jackets On: 12/30/11 12:39 AM

There are many reasons to further your education. Sadly, many people allow the business of their lives to keep them away from ever doing so. If you have had that itch to get back to school to further your education and want to once again start hitting the books, then you might want to consider going after an online degree.                                             

Posted By: Law Essay On: 01/05/12 3:04 AM

With the Planet's Exhibitions around 1867 and also 1889,<a href="http://www.cheapdesignerhandbagsforsale.com/" title="LOUIS VUITTON">LOUIS VUITTON</a> picked up primary the bronze and a new precious metal medallion inside recognition from the brilliance of the carriers <a href="http://www.cheapdesignerhandbagsforsale.com/" title="HERMES HANDBAGS">HERMES HANDBAGS</a>. Nonetheless it hasn't been till 1892 the primary Lv totes to become so demanding. Soon after this Louis Vuitton Business's travel luggage range expanded larger and larger. Since the very beginning, and even these days,<a href="http://www.cheapdesignerhandbagsforsale.com/" title="CHEAP DESIGNER HANDBAG">CHEAP DESIGNER HANDBAG</a> and handbags are actually well known and generally known as synonymous with top quality level of quality along with build.

Posted By: gucci bags On: 01/18/12 10:30 PM

Add Comment

Comments have been closed.

Transcript

no image

Slide Text

Slide Notes


Keeping Front End Dependencies Under Control

no text exists for this slide

Welcome everyone. Today I’m going to talk about keeping front end dependencies under control. I’m going to aim to cover the basics as well as some more advanced techniques, and give you a good overview of the options available for making your front-end development run more smoothly. Now I’ve noticed that a lot of presenters like to kick off their presentations talking about themselves and their experience. I’m going to put a little twist on that, I’m going to talk about my dog.

Slide 2

no text exists for this slide

This is my puppy, Kenshin at about 16 weeks. Yes, this is a blatant attempt to cheat at presenting, since no one can resist puppies!

Slide 3

no text exists for this slide

You can follow him on Twitter.

Slide 4

no text exists for this slide

This talk is about control of things that start out nice but can quickly get unruly, like puppies. That’s him getting playful on the first weekend we had him, that’s his first chew toy which he destroyed in an hour, and that’s him passed out next to his first beer. (just kidding) As you can see, he was a natural born troublemaker.

Slide 5

no text exists for this slide

Before we knew it, he turned into…this monster. He can run faster than any human we’ve met, he can knock anybody over, and he can jump a 4-foot fence with no effort at all. He’s extremely cunning and inventive in finding trouble. He’s also aggressively territorial and over-protective of us. We love him, but he causes us problems. The dependencies of your application start out small and cute and easy to control. If they don’t want to obey, you can pick them up and make them do things they don’t want to do. Then they grow up to be 90lb dogs that are smart and strong enough to do whatever they want - like dogs can quickly become unmanageable if you don’t send them to obedience class: you have to put strategies in place to maintain control of your front end. Little things add up. Dog trainers will tell you that every little interaction with your dog is teaching him behavior. Any time you let him get away with something he shouldn’t, you’re rewarding bad behavior. Any time you let your CSS, JavaScript or image break a rule, you’re letting your front-end application performance get a little bit more out of control. This is a talk about all the little, yet important things you can do to keep your front end dependencies UNDER CONTROL from the start, because it’s much harder to do in a complex application after the fact.

Slide 6

no text exists for this slide

Let’s take a look at how pages are loaded into a browser. This screen shot from Firebug shows all the HTTP content that loads on the example web page. Every row is an element on the page, a dependency of the page. The page needs that information to render. Every element on the page is an HTTP request – a request to the server for something. This includes the entire HTML body of the page, any style sheets it links to, any Javascripts it imports, any image it includes. Every time you add something to the page, you’re adding another little hit on the server. This might not be such a big deal, since these hits may be small…except that they can add up. And even more then that, some parts can’t load until other parts are finished. This is where front end performance can be improved. By reducing the size and number of elements you’re loading, you can speed up the load time and responsiveness of your page. But we don’t want to sacrifice the ability to use scripts or images, right? So that’s why we need some guidelines and best practices for improving performance while getting access to the dependencies we need.

What are the dependencies


JavaScript
JavaScript
CSS
Images

So just to be clear, here’s what we’re talking about when we say dependencies. JavaScript, CSS and Images. Anything else that has to load besides your HTML page to give you behavior and style. HTML depends on Javascript, CSS, Images for a complete front end, so we’ll attack some best practices in each area

5 Simple Rules


Organize and plan
Organize and plan
Location matters
Load smart, load once
Maximize caching opportunities
Optimize, minify and compress

Front end performance matters. In fact, Yahoo has did research that showed that most of the time to display on a typical web page is front end loading and rendering, not back end data access. This means that there is great performance gain to be had by improving the performance on the client side. This research is what led them to develop the front end performance analysis tool Yslow, and to publish their guidelines on front end performance. When you’re using a page of an application, much of the perceived speed of that application is in it’s responsiveness and pliability – how fast does it react when you interact with it? Is there lag between your click and the result? That’s front end performance. We spend a lot of time optimizing our code on the back end, but what do we do about the front end? Bandwidth is the big bottleneck that you can't control, but you can do many things to minimize the bandwidth you need to deliver a UI. Much of this talk will be about implementing Yahoo’s recommendation for high performance websites

JavaScript

no text exists for this slide

When it comes to JavaScript, the culprits of slowness tend to be loading too many scripts, and loading them in the wrong places. It starts innocently with one really useful library. Then you find out that library doesn’t do everything you need it to do, so you add another library or perhaps a plugin. And another. And another. Soon you realize that maybe this library wasn’t the best one for your project, but it’s a LOT of work to go back and refactor and migrate to a new library. How do you keep it from getting out of hand, and how do you deal with it when you have to load more libraries than you might want to in a perfect world?

Organization and Planning

no text exists for this slide

For starters, plan ahead. I think we can all generally agree that it makes sense to start with a preexisting library. Stand on the shoulders of the giants. But how do you choose? How do you find the library that will handle *most* of what you need, and last longer than the current version? Here are some things to evaluate: where does your project fall on the website-to-application continuum? Libraries tend to have their specialties. Effects, DOM querying and manipulation, AJAX/data, UI controls – or some combination of them. What parts and pieces are most important in your project? use a framework that matches and fits your style of development find a library that has all the parts you need, or at least complements what you have When you decide on a library, keep all your scripts in one place, a central script directory /js/ - this makes it easy to figure out what libraries you have available across a team, without installing one-off scripts all over your server. If you’re working with a lot of your own scripts, package them into libraries by feature so there are logical places to put new code, and it’s easy to find old code. For instance, you might create your own libraries for validation, or common display manipulation like showing and hiding elements.

Classic Pairings


CF + EXT
CF + EXT
CF + Spry
jQuery + jQuery UI
YUI + … YUI
Prototype & script.aculo.us

Sometimes one library isn’t enough, or other technology you’re using is influencing your choices. A couple years ago, it was necessary to use multiple libraries to get all the features you need. Today, many libraries have added features and matured to the point that most provide a pretty wide range of features. Thus, the best pairings tend to be the multiple solutions from the same vendors, or pairs that are made to work together. Are you using cf? try EXT. CF makes it so easy to use EXT – there’s no configuration or installation, and there are CF tags for all the UI controls. EXT also covers a really broad range of features. If you’re using CF8 which came with EXT 1.1, and you haven’t liked it – I understand. But I’d encourage you to take a look at EXT 3 which will be included with CF9. It’s come a really long way and it now provides great UI controls, and DOM query features. Nothing is easier to use with CF. Another good CF pairing is CFAJAX and Spry. CF has a tag to easily convert data sets to spry data - <cfsprydataset>. And Spry’s effects and widgets are simple and easy to work with. Everybody loves jQuery. It’s so easy to understand, so lightweight and well supported. Between jQuery and jQuery UI, most of your library needs will be covered. Some of the more advanced UI libraries are more mature than jQuery UI, but jQUI does have a great themeroller which makes it drop-dead simple to match your UI controls to your application. jQuery plays well with *most* other libraries, but don’t assume that because you need DOM manipulation that jQuery is the only way. Most other libraries now have mature DOM components that do the same thing as jQuery, so that can mean loading one less library – just by being aware of what features your library does have. YUI is end-to-end – they have a comprehensive list of controls and utilities so it’s a very complete solution. Being Yahoo, the creators of Yslow and the first to crusade for front-end best performance, they also support all the best practices in this talk very well. Then there are some of the more old-school (and by old school, I mean a couple years) libraries that are still solid choices that work well together – Prototype as the core library and scriptaculous for effects. I’m not going to attempt to provide a compatibility matrix here, you should find out about any compatibility issues as you consider multiple libraries.

Externalize Scripts at the Bottom

no text exists for this slide

I can’t say it enough. Externalize your scripts!! It forces you to write code that is more modular and reusable, forces you to think longer term about how you construct scripts, and it enables those scripts to be cached. If you’re writing more than a few lines of JavaScript that is page-specific, it’s still worth externalizing it. However, if you get into the habit of writing external scripts, you’ll probably find you write them a lot less and import them a lot more. So let’s talk about some best practices for loading external scripts. Because scripts have the potential to load their own content or manipulate existing content, nothing else can download or render while a script does. IE is also known to simply refuse to load pages with scripts in the body if they attempt to modify the DOM or use a document.write(). Therefore, it’s best to put scripts at the bottom of the body element, right before the closing bottom tag. Simply moving a script from the middle to the bottom can substantially improve loading performance.

Slide 13

no text exists for this slide

Not only should you load scripts in the right place, you should load elements ONCE, and only when you NEED them. This sounds obvious but it can get tricky when you’re working with pages involving many view files – as is often the case with frameworks, or you’re trying to create small, self-contained bits of code – how can you ensure that the script that’s required for that file is available, while not loading it again? Sometimes you only need certain elements or scripts, and not the whole package. So how can you make sure that you only load what you need, when you need it…while only loading it once? One technique is to manage it on the client side. This example by Christian Heilmann does just that. What it essentially does is keep track of what’s loaded with JavaScript, so you always have a variable available to check and determine if a script is loaded or not. Here’s how it works Define an object for the entire app (a good practice) Define objects for each script you might use, then assign properties for the URL of the script, and a flag to tell if it’s loaded or not Define a function that adds any of the defined components, first checking to see if it’s loaded already, and if not, adding it to the script stack To use it, on the page where you need a script, you’d simple call the addComponent() function for the script you need, and the rest is taken care of for you You can either use this example, or roll your own that has any additional features you need

Slide 14

no text exists for this slide

There are also open source and commercial libraries that do the same thing. Yahoo has their loading utility for YUI. It also has a GUI that lets you click to choose what parts and pieces you need, it builds your import code for you and gives you many optimization options – pretty cool stuff. Dojo has their loader component. There’s a framework dedicated just to loading JavaScript called AJILE. The best one for you is what you’re comfortable with. If your library has one, use it. If not, consider one of the general libraries like AJILE or writing your own.

ServerSide Script Bundling

no text exists for this slide

This can also be done on the server side with what I call a “bundling” component. There are a few versions available for CF and other languages, in fact the first one I saw was PHP. These components work by taking a list of files that a page needs…then the component concatenates those files together, shrinks and compresses the complete file, and caches it on the server. You use a simple CF tag to pass in the list of files that a page needs. If the component finds a cached “bundle” of files that matches that list, it uses it…or it creates it on the fly. The two most popular ones for CF are Scriptalizer and Combine.cfc This is an example of Scriptalizer by Aaron Lynch. Basically, if you use this tag and CFC combo, you hardly need to worry about any of the other loading issues. It works with both JS and CSS, you just need separate instances of the tag because of course, you don’t want to combine your JS and your CSS files. It’s not something you’ll want to use in development, but it gives you the freedom to work with as many files as is convenient, without worrying about all the loading overhead. I’d encourage you to do some testing in your own application to see what mileage you get out of it. The overhead to use the component may not exceed the benefit in load time. So you have to weigh that benefit against just combining the files together and minifying them in your build process. However, I will say that in my experiments, my results were about an 80% fewer bytes loaded, and about 20% faster load time.

Minify amp Compress


Minify everything for production
Minify everything for production
Strip out white space, comments, extra characters to minimize file size
Optionally, obfuscate your code
Gzip files over 1 or 2k
Serve compressed files from the server to browsers that support it
Don’t compress files already compressed (PDF, images)

So we’ve briefly touched on this already, but let’s get into it a little more. In addition to only loading files you need, you want to make sure the files you load are as small and efficient as possible. You can try to minimize white space and line breaks, use short variable names, avoid comments and use shorthand syntax… but all of that makes for unreadable, unmaintainable code! Don’t worry, you can continue to write code how you like without worrying about those issues, because we have Minification and GZIP. Minifying is the process of eliminating any unnecessary characters in a file, things like white space, comments, extra semicolons and line breaks, and it generally provides about 20% reduction in file size. My favorite minification tool is yui compressor [http://developer.yahoo.com/yui/compressor/]- you can install it as a command line java app, or use a hosted version on the web, and upload or paste in your file [http://www.refresh-sf.com/yui/]- there are a couple sites that have built web wrappers for the component. A few other popular ones include JSMin and Packer, and Dojo has a compressor. Just be sure to keep a copy of your original version for development! In addition to minification, some tools provide obfuscation. Obfuscation shortens variable names into tiny 2-3 character combinations, making code indecipherable to human eyes and shortening the file. This is a protection of sorts to help your code be less human readable, but it’s main purpose is to reduce file size even further. Gzip is a type of compression delivered by the web server and understood by the browser. It’s set in the HTTP header, and once configured on the server, it just takes care of itself. Gzipping usually provides about 60% improvement in loading speed. There are a couple things to note: You can gZip HTML, Scripts, and CSS but Don't compress files already compressed (images and pdfs) – anything over 1 or 2 k should be beneficial The slower the connection, the greater the benefit Consult your web server documentation to learn how to GZIP your files, or ensure that Gzipping is being done.

Cache


Use external scripts
Use external scripts
Use Google-hosted libraries for caching benefit
Set expires headers on common scripts
Configure entity tags (e-tags) on clusters

Another great boon to fast performing, responsive front end code is the browser cache. By serving a smaller number of the same files over and over, you maximize the amount of information in your users’ browser cache, and minimize what has to be loaded fresh with every request. But in order to take advantage of caching, you need to externalize your scripts. The only code that should be embedded in the page is the code to load and call external scripts. This also promotes better code reuse and consistency, because you won’t be tempted to copy and paste repetitive code “just on this one page”. Now that you’re using 100% external scripts, what else can you do? Set expires headers on those scripts. An Expires HTTP header tells the browser to use the cached version of that script until the date specified in the header. By setting this date to 1 year or so, you can ensure that the script will be loaded from cache wherever possible. Setting an expires header is quite easy, and if you don’t have access to do it from your server, you can do it with the <cfheader> tag. Now there are a lot of common libraries out there that you use on your site, and I use on my site…if someone has already visited a site with jQuery and now has it cached in their browser, do they need to reload it when they come to my site? Well if I’m serving it from my own URL, they do – because the browser won’t know it’s the same script. But if you use a centrally hosted script, the chances of being able to use that cache are much more likely. Google hosts popular AJAX libraries on their site, so use the Google hosted versions. Not only do you gain the caching benefit, but your script will be hosted on an optimized CDN that is highly available. What could be easier? One of the lesser known and more confusing web server performance features are entity tags, or e-tags. E-tags provide additional information about caching for components (images, scripts, styles and documents) to the server. They help determine if the component being evaluated is the same one that is cached. Often in multi-server environments, they are not configured to validate components across servers. So if I have cached an image on server a, but then my request moves to server b, it won’t recognize that I have cached that image and will reload it. By configuring e-tags optimally for your setup, or disabling them altogether, you can ensure that e-tags won’t be slowing down your site. There are specific instructions for configuring them on the Apache and MS/IIS websites, so check out the article that applies to the web server you use.

Directory gt HTTP Response Headers gt Set Common Headers

no text exists for this slide

Here’s the screen to set an expires header in IIS

In htaccess

no text exists for this slide

Here’s the tag to set an expires header in Apache

In ColdFusion with ltcfheadergt

no text exists for this slide

If you don’t have direct access to your web server configuration, for example in a shared hosting environment, you can use the CFHEADER tag like this – the header name is expires, and the value is a date 1 year from now. Use the getHTTPTimeString() function to ensure your date is formatted according to the http standard.

Slide 21

no text exists for this slide

Everything we’ve looked at until now has to do with loading, processing and serving files. But I felt I would be remiss if I didn’t provide this quick tip on how to write better JS from the start. So my last recommendation for JS is to use JSLint – a tool that inspects your javaScript and makes recommendations for how to improve and optimize your code. Though it is not directly correlated to performance, it will help you write better code which can in turn improve performance and make the management of your code less problematic.

CSS Style Sheets

no text exists for this slide

You don’t see many coding standards or best practices recommended for CSS in the development community. If you follow the design community, you might see some occasional tips, but from looking at most of the CSS I see developers write, they aren’t reading them! You’ve probably figured out by now that CSS files can get large and unwieldy without a plan. Have you ever seen a CSS file littered with !important statements? It’s a common symptom of a poorly planned style sheet. Are there styles that you just can’t get to work and can’t figure out why not? Are there duplicate style declarations all over the place because someone just wrote a new style instead of figuring out which existing one to use? These are very common CSS problems to have, you are not alone. I’m going to attempt to share some things that have worked for me, and some techniques that people much smarter than me have recommended.

Externalize CSS at the Top

no text exists for this slide

For the same reasons we use external JavaScript, we should also use external style sheets. In order to recognize the benefit of caching, you must externalize your CSS files. Caching only works if the exact file you’re referencing has been loaded before, and if you’re embedding CSS throughout your files, not only are you probably writing a lot more CSS than you need to, but you’re wasting the opportunity to cache. Embedded styles are generally a bad practice anyway, because they make it harder to debug problems and more likely that some type of conflict of style will occur in your style declarations. You won’t know where to go to hunt for styles. I always have my core style sheet open while I’m working. Then I’m less tempted to sneak in an embedded style. That said, there are a couple places where an embedded style sheet may be justifiable: on commonly loaded pages that have a lot of unique styles that won’t be used anywhere else – such as your home page – and your site has many entry points outside the home page. on pages with frequently updated styles and caching actually becomes a problem Although Google won’t host your site’s style sheet like it hosts common JS libraries, if you use YUI, you can link directly to their common style sheets like reset, fonts and grids. And when you link to external style sheets, you should put that link in the <head> tag. This ensures that the styles load at the same time as the rest of the page. Just remember that the best place to load CSS is the opposite of JS – CSS at the top, JS at the bottom. The @import directive doesn’t execute until the CSS is parsed, which means it will be slower to load. This causes a phenomenon we know as the “FOUC” or “Flash of unstyled content”. The @import directive gained popularity in the early web standards days because it was a seamless workaround to hide advanced CSS from older browsers. However, unless you need to support Netscape 4, it’s doesn’t offer any benefit today. So the accepted method is to use the <link> tag. In most browsers, the <link> tag will also download at the same time as other elements, while the @import method will not.

Slide 24

no text exists for this slide

Here’s what can happen if you use @import instead of link. It causes a phenomenon known as the Flash of Unstyled Content, or FOUC. This simulation shows how a page will flash for a moment without style sheets, then suddenly load styles and look normal again. It may seem minor, but it looks unprofessional and it’s easy to prevent by using the <link> tag. Here’s why that happens. The <link> tag is processed as part of the HTML page markup. The @import directive is processed as part of the style sheet evaluation. Well, the HTML is going to be loaded and processed first, then the style sheet will be parsed. So we want to load the style sheets as early as possible, with the HTML. Not only that, but linked style sheets can parallel-load with other elements, but imported style sheets can’t. So externalize your CSS, and link it in the head.

Minify

no text exists for this slide

Here are some quick tips for writing smaller CSS files. Use shorthand Use small hex values Don’t use units for 0 This can help make your CSS less verbose. But you ask – why does it matter if I can just minify my CSS file? Just like JavaScript, CSS can be minified. But because of the cascading nature, it can’t be minified as much as JavaScript. The minifier can’t always tell if rewriting your CSS will change the appearance of your site once it’s interpreted. So it’s best to write your CSS as concisely as possible, and use minification to reduce white space and remove comments. The YUI compressor supports CSS.

cssInclude Custom Tag

no text exists for this slide

Just like with javaScript, you only want to load CSS once, and you need to make sure that all the styles you need are included in the page. You can use javascript to load CSS like the example we looked at earlier, except instead of dynamically adding script elements, we add style elements. However, that means you have to write JS every time you want to include CSS, and that sounds like a lot of unnecessary runaround to me. So my preferred method with CSS is to manage it on the server side. Here’s one strategy – a simple custom tag I wrote to offer a convenient and consistent way to load CSS files. If all your CSS links run through a central file, it’s easy to make global changes, and provide your entire team with an easy way to use best practices. The way it works is that you either wrap it around some CSS for embedded styles, or point it to a style sheet, and it takes care of the include code for you. This is a basic solution, but if you need more features and performance, or you have a large app with lots of style sheets, you can also use one of the bundling components that we looked at for JS – Scriptalizer or Combine.cfc.

Please


Comment your CSS!!!
Comment your CSS!!!
Especially hacks, workarounds and redunancies
Groups of related styles (search hooks)

CSS needs comments – as with any language, use many as you need but no more. Just because the syntax is simple doesn't mean interpreting styles is. Explain hacks, workarounds and redundancies. Denote section and page specific areas. Denote areas of style sheet such as layout, header, nav, sidebar footer, typography. Add comment hooks for searches that make sense. Some like to indent related and cascaded styles together - I personally find this hard to read but it may work for you

Slide 28

no text exists for this slide

within the file, declare your rules from the least specific to most specific global helper page structure page/section specific This helps you to manage the Cascade effectively, because the cascade looks at order and specificity. If you have highly specific rules at the top of your file, when you go to write a rule that overrides it, you have to mess up your order…if you even realize that you have that problem! This method takes the confusion out of the cascade.

Slide 29

no text exists for this slide

When you write styles, rather than trying to declare every property of a style, make the definition as minimal as possible. Only write declarations that are essential for that particular rule, and utilize the cascade for the rest. You should also put your rules as high up the cascade as possible – that is, apply them to the body element rather than the p,ul, and table elements – this way you’ll be declaring the same rules a lot less often. This will give you more flexibility in combining and cascading styles, without having to overwrite others.

Reset CSS


Comprehensive:
Eric Meyer
http://meyerweb.com/eric/tools/css/reset/reset.css
Comprehensive:
Eric Meyer
http://meyerweb.com/eric/tools/css/reset/reset.css
Basic:
YUI
http://yuilibrary.com/

One of the most essential tools for CSS is a good reset style sheet. Stop worrying about inconsistencies in how browsers treat font sizes, padding, margins, bullets and default styles. A reset removes or standardizes the styles on all elements that differ across browsers. Firefox may add a default padding of 1em to list elements, and IE adds 1.2ems – your reset style sheet sets them both to 1em. It will help your sites look more consistent across browsers, and will prevent you from having to write one-off rules to standardize. There are two popular, good ones out there that most others are based off of – Eric Meyer (Patron Saint of CSS) and YUI. They both take slightly different approaches. Eric Meyer’s removes everything to its most basic appearance; YUI just standardizes the key elements and leaves in a little more “style”. Try them both to see what you like better.

Slide 31

no text exists for this slide

This is an onion-skin overlay example of the same site, markup and css with no reset styles. This shows IE overlaid on Firefox, and you’ll notice that there are differences in the spacing that create a lot of differences between the rendering in the two browsers. The more content you have, the more dramatic the difference.

Slide 32

no text exists for this slide

This is the same page, with both browsers using a Reset style sheet. The style sheet has standardized the display across the browsers, and also eliminated some default formatting like bullets and heading font size. Now we have a better baseline to start from.

Slide 33

no text exists for this slide

The reset options do vary – this shows the YUI reset overlaid on the Eric Meyer reset. They each handle the standardization and stripping of formatting slightly differently. Neither is better, it’s just a matter of what you prefer.

Toward Modular CSS


Build a grid system
http://24ways.org/2008/making-modular-layout-systems
Build a grid system
http://24ways.org/2008/making-modular-layout-systems
BlueprintCSS
960 Grid System (960gs)
YUI Grids

You should be using a modular layout system. Don’t write custom positioning for every element on the page, you’ll end up with a lot of repetition and it makes it really difficult to keep your layout consistent. Instead, design reusable classes that assign common positioning rules, and then add them wherever you need them. Not sure where to start? Use one of the popular CSS frameworks. They take care of standardizing positioning across browsers, and give you a series of layout modules to make positioning painless. They help minimize duplication and they also help abstract your CSS layout from the skin of your application. If you’re more comfortable with the concept, perhaps you can create your own grid system for your specific project, or your own framework that you can use across all of your applications. This article by JSM helps you get started.

Slide 35

no text exists for this slide

You can create modular layouts…and you can create modular styles. By taking advantage of the Cascade, you can create classes that only define their most unique features. Then, you can apply multiple classes to elements to build the styles upon eachother. Here’s an example of a set of styles for alerts and notifications. You know those little messages that appear at the top of the screen to let your users know if something worked…or some other bit of info they need to know? Here’s how to create a simple and easily memorized set of styles that provides you with consistent message formats. First we have our base notification class – it defines the default colors, fonts, positioning and sizing. It’s our green message, and we’ll use it for most confirmations. Then we’ll add a class for warnings, it looks the same but it’s yellow instead. The only thing we need to define is a new border and background color. We’ll do the same for errors.

Slide 36

no text exists for this slide

Here’s what the HTML looks like. We mark up each notification the same, they all get the notification class. Then they get another class based on the type of notification.

Slide 37

no text exists for this slide

The rendered version looks like this. This is a useful technique in many areas – for buttons, form elements, just about anywhere. Don’t try to override and avoid the Cascade, embrace it and use it to your advantage.

Working with Multiple Files


Good – organize by purpose
Good – organize by purpose
Framework (grids, reset, typography reset/base)
Core/Skin (application-specific)
Hacks/browser-specific (thanks IE)
[Application sections (forms, edit, admin, etc)]
Problematic – organize by rule type*
Colors / images (colors/background images only)
Typography (font definitions only)
Positioning (positioning definitions only)

Working with multiple CSS files can be good and bad. if you use multiple files: split them up according to area of concern – keeping in mind that we’ll bundle them together when we serve them up – this is only for development framework (grids, typography, reset)  that can be used across many applications, then app-specific core (application specific) - the skin and styling sometimes useful to have a separate sheet for certain parts, such as view vs edit, or admin vs public hacks and browser-specific (conditional comments for IE, cf cgi.http_user_agent for safari or others) file organization schemes that don't work: separating colors and skins from other parts – not talking about client customization, just your own stuff separating typography from layout (just creates more work and headache) The main exception to breaking out typography and colors are if you’re creating a user-skinnable app or in some situation where you want only certain styles to be swappable. But in this case, you should use a style sheet that overrides the defaults, so it’s in addition to – not instead of – the basic structure. You’ll occasionally see some frameworks split up css into separate files for each widget, and then import them all into one style sheet that gets linked in the html. This is nice for development, but adds a lot of loading overhead. If you want to take a similar approach, just bundle the files together at build-time or runtime. Bottom line – splitting files should be done according to how it works best in your development, then those files should be combined for delivery to the user, either as a part of your build process or dynamically on the server.

Images

no text exists for this slide

Back to basics. Images are one of the first optimization techniques we use when we learn web design, and they tend to get more attention because of their file size. However, I felt I would be remiss if I didn’t cover some of the more important and modern techniques to optimize images, because it’s such an important foundation.

Slide 40


Keep images in a central place
Keep images in a central place
Separate structure from content
Keep logos in one central place
Use a naming convention for commonly repeated files

file organization and planning keep images in a central place, and create a virtual directory if you need to - or use a CDN – don’t let images get scattered throughout the site separate structure and skin (corners, background textures); ui elements (buttons and tabs); icons and sprites; from content – illustrations, photos and other images that support content Have one logo folder (or am I the only one who's seen sites with 20 copies of their logo all over the place?!) – have a specific and obvious place where logos go and where your team knows they can be found. If you have many versions of the same image – perhaps your logo, or a diagram or icon you use a lot – come up with a naming convention that makes it clear which version it is. Perhaps you have a transparent or knockout version, or a small or large version. Name the file with its dimensions and other unique attributes. This also makes it easy if you change your logo – you have a complete list of what files need to be updated to universally replace the logo across your site. Look at the specific needs of your application, you may also need a central place for uploaded files, for user-uploaded content, documents, etc. and these should not be mixed in with your site’s media. If you have partner or client content, give them a dedicated directory The philosopy is to separate images by concern, without fragmenting them into so many pieces that you can’t find what you need.

Minimize File Size


PNG files are your friend
PNG files are your friend
JPEGs for photos and continuous tone images
GIFs for simple illustrations, logos, solid color
Use the comparison view of your image editor
Fireworks generally better than Photoshop for file size and quality
SmushIt removes extra non visual data

optimization PNG files tend to provide the best optimization results: smallest file with best appearance, you don't have to use alpha transparency, you can use index transparency or none at all JPEGS for photos and multiple color or continuous tone images, and smooth gradients GIFS for simple illustrations, logos and blocks of solid color (especially horizontal stripes, because that's how the files are written) BUT there are few reasons to use a GIF when you can use a PNG (for the very smallest dimensions, a GIF is often smaller than a PNG).

Slide 42

no text exists for this slide

use the 4-up option in your graphics editor Fireworks does a better job at compression that Photoshop, most of the time SmushIt removes non visual data to further reduce image sizes: http://developer.yahoo.com/yslow/smushit/strip color profiles

Loading Smart


Set expires headers on common elements like logos and navigation
Set expires headers on common elements like logos and navigation

There aren’t too many loading strategies with images, except to say that you can also set expires headers on frequently used images like logos and navigation….otherwise the main strategy is to….

Minimize Your Image Needs


Use CSS Sprites for nav tabs, buttons, icons
Use CSS Sprites for nav tabs, buttons, icons
Do you really need an image? Use CSS3 (corner radius, RGBa) for non-functional enhancements
Trim images to minimal dimensions
Use small tiled images, but not too small

One popular technique for doing this is with CSS sprites Several images of the same size? Navigation tabs. buttons. icons. Tile them all in one image (single http request, cached once) and use background positioning with CSS REALLY easy for theming sites, conveniently portable do you really need an image? rounded corners, alpha transparency/RGBa in modern browsers eliminate many extra image needs target the "polish" for modern browsers, all websites do not have to look the same! they just need to work! if the effect doesn't make a functional difference, target newer browsers (icedorhot.com example) Trim images to minimal dimensions Use a small tiled background behind transparent foreground images (keep tiles to at least 10-20 pixels, too much tiling can slow down the browser)

Slide 45

no text exists for this slide

So let’s talk about sprites. These are my two images I’m starting with. That’s right – two. I’ve tiled several icons in a single image file for each state – on and off. I’ll use these as background images for my toolbar style

Slide 46

no text exists for this slide

You can see here I’ve styled some link elements to each use these background images. The default, link and visited state shows the “off” image. The hover and active states show my “on” image. I’m using the same base styles for all my icons.

Slide 47

no text exists for this slide

I’ve also created a separate class for each icon. Then I’ve assigned background positioning for that class that aligns the visible area of the link with the location of the correct icon in the image. When I view the finished HTML, it looks like 6 different images but I’ve accomplished it by only loading 2 images. The other bonus is that if I need to add another icon in the same style, I only need to add another tile to my image and everything stays neatly together. If this all went over your head just now, just do some googling for “CSS Sprites” to find many tutorials on the web that cover this technique.

General Advice and Tools

no text exists for this slide

Now we’ll just recap some general advice and tools that can help you make the right decisions.

Choosing Libraries


Don’t worry as much about what’s popular as what works for your project and your philosophy
Don’t worry as much about what’s popular as what works for your project and your philosophy
Build on existing skills
Know how to read your stats to decide what to support

find something that fits your philosophy and works for you don't worry about the standardistas, if it allows you to be productive, it's good - use web standards to the extent that they future-proof your site and help you write good code, but don't bang your head against a wall. You don’t work for standards, standards work for you! Work with what you know and what you’re comfortable with. There’s nothing wrong with learning something new on a project, but don’t bite off too much at once, try to find something with some familiar elements and then build on that. That’s one of the reasons I believe jQuery is so successful – it takes all your knowledge of CSS and puts it to use with Dom manipulation. analyze your stats to determine what you need to support. Forget about industry-wide statistics and benchmarks, it's your specific audience that matters

Essential Tools


Firebug
Firebug
YSlow
Firefox Web developer toolbar
Safari Web Developer Tools
IE Web Developer Tools Extension

It used to be that Firefox was the only browser that cared about developers, but now, thankfully, all the major browsers have developer tools. These are the popular ones, download them!

May Work for You


CF
CF
Scriptalizer
http://www.aaronjlynch.com/blog/2008/07/09/Problem-WAY-too-many-javascript-files-Solution-cfscriptalizer or
http://scriptalizer.com/
Combine.cfc
http://combine.riaforge.org/

no notes exist for this slide

Summary


Organize and plan
Organize and plan
Location matters
Load smart, load once
Maximize caching opportunities
Optimize, minify and compress

no notes exist for this slide

Q amp A

no text exists for this slide

RIAUnleashed – early bird is only $30 and they are almost out of spots, then it goes up to 50 and then 60 is the standard rate. Fantastic deal for a 3-track conference.

Rachel Lehman


@raelehman
@raelehman
raelehman@gmail.com
http://rmaxim.blogspot.com

no notes exist for this slide