1 00:00:00,400 --> 00:00:01,110 I'm Nick Pettit. 2 00:00:01,110 --> 00:00:02,170 >> I'm Jason Seifer. 3 00:00:02,170 --> 00:00:04,700 >> And you're watching the Treehouse Show, your weekly dose of 4 00:00:04,700 --> 00:00:08,160 internet where talk about all things web design, web development, and more. 5 00:00:08,160 --> 00:00:09,680 >> In this episode we'll be talking about 6 00:00:09,680 --> 00:00:15,230 web font generators ECMAScript 6 features, accessibility, and more. 7 00:00:15,230 --> 00:00:17,090 Let's check it out. 8 00:00:17,090 --> 00:00:22,936 First up, we have this app for Mac OSX called 9 00:00:22,936 --> 00:00:28,630 font prep, really sorry Windows users. 10 00:00:28,630 --> 00:00:31,830 But, this is pretty cool if you are on OSX. 11 00:00:31,830 --> 00:00:36,070 It's called the Missing Font Generator for Mac OSX. 12 00:00:36,070 --> 00:00:36,630 Oh, look at that. 13 00:00:36,630 --> 00:00:39,480 There's a little asterisks there. 14 00:00:39,480 --> 00:00:39,850 Aw, yeah. 15 00:00:39,850 --> 00:00:42,070 It says requires Mac. 16 00:00:42,070 --> 00:00:44,340 So I was hoping it was gonna say Windows coming soon. 17 00:00:44,340 --> 00:00:47,380 It doesn't it's a free app though. 18 00:00:47,380 --> 00:00:52,440 You can go ahead and download it and then you can drag your fonts 19 00:00:52,440 --> 00:00:57,670 onto the font prep window and it does a couple of things for you. 20 00:00:57,670 --> 00:01:03,100 First, it can convert your TTF or OTF font files to WOOF 21 00:01:05,450 --> 00:01:07,440 EOT, or SVG. 22 00:01:07,440 --> 00:01:09,900 I actually got that first one wrong, WOFF. 23 00:01:09,900 --> 00:01:10,960 >> WOFF. 24 00:01:10,960 --> 00:01:11,800 >> See? 25 00:01:11,800 --> 00:01:12,440 Thank you, Jason. 26 00:01:13,810 --> 00:01:17,340 It can also do CSS for you. 27 00:01:17,340 --> 00:01:21,160 So you drag it on and you can get the CSS font 28 00:01:21,160 --> 00:01:26,850 face declarations that you're going to need to imbed that into your site. 29 00:01:26,850 --> 00:01:29,850 So they have a little video here of what it looks like. 30 00:01:29,850 --> 00:01:33,560 I'll play this really quick, but basically if you have. 31 00:01:33,560 --> 00:01:38,820 Some font files on your desktop you can drag them over to 32 00:01:38,820 --> 00:01:43,020 the app and then after you've done that for all of your fonts 33 00:01:43,020 --> 00:01:46,570 you can look through them and see what each character is going to 34 00:01:46,570 --> 00:01:50,110 look like so if you use a lot of different fonts if you're. 35 00:01:50,110 --> 00:01:53,680 Constantly designing websites trying to look for the perfect font 36 00:01:53,680 --> 00:01:57,580 in your collection of fonts, this is a great handy little 37 00:01:57,580 --> 00:02:00,380 app, because you can look through them, see what each 38 00:02:00,380 --> 00:02:03,960 font looks like, and then grab the code that you need. 39 00:02:03,960 --> 00:02:07,170 I personally like to use, Google fonts, but some 40 00:02:07,170 --> 00:02:11,010 people don't like Google fonts because of the variety. 41 00:02:11,010 --> 00:02:15,240 There's not every font on the planet is on there of course, so. 42 00:02:15,240 --> 00:02:16,280 >> Yeah, thanks, Google. 43 00:02:16,280 --> 00:02:17,210 >> Yeah, seriously. 44 00:02:17,210 --> 00:02:19,740 >> How about putting every font on the planet in there next time. 45 00:02:19,740 --> 00:02:21,980 >> So, if there's some fonts that you wanna use that 46 00:02:21,980 --> 00:02:26,140 you need your own code for and you have them legally licensed. 47 00:02:26,140 --> 00:02:29,180 You can, go ahead and use font prep. 48 00:02:29,180 --> 00:02:31,800 >> You know, it was kinda cool how you had a YouTube video playing 49 00:02:31,800 --> 00:02:33,270 on there, and there's like people were 50 00:02:33,270 --> 00:02:34,800 probably watching the tree house show on YouTube. 51 00:02:34,800 --> 00:02:36,250 >> It's like YouTubeception. 52 00:02:36,250 --> 00:02:36,900 >> Yeah. 53 00:02:36,900 --> 00:02:37,810 >> Wow. 54 00:02:37,810 --> 00:02:41,430 >> Next up, we have a code guide by Mark Otto. 55 00:02:41,430 --> 00:02:44,270 Now you may know Mark Otto who is @mdo 56 00:02:44,270 --> 00:02:48,620 on Twitter is one of the original creators of Bootsrap. 57 00:02:48,620 --> 00:02:51,790 So he put up a code guide on here which is 58 00:02:51,790 --> 00:02:56,980 going to be standard when developing your different web pages and projects. 59 00:02:56,980 --> 00:03:00,360 Now why in the world would you want to have a code guide? 60 00:03:00,360 --> 00:03:03,420 Well, it says it right here in the golden rule. 61 00:03:03,420 --> 00:03:08,150 You need to enforce these different code variables 62 00:03:08,150 --> 00:03:10,270 and things on your project so that every single 63 00:03:10,270 --> 00:03:12,130 line of code should appear to be written by 64 00:03:12,130 --> 00:03:15,480 a single person no matter the number of contributors. 65 00:03:15,480 --> 00:03:19,440 Now this is going to make a lot more sense when you get more people on the project. 66 00:03:19,440 --> 00:03:23,080 And as you're projects starts getting larger and larger, it's very 67 00:03:23,080 --> 00:03:25,950 important to have standards so that new people can just jump on. 68 00:03:25,950 --> 00:03:29,720 And everything looks, like he says, it was written by a single person. 69 00:03:29,720 --> 00:03:31,480 So, there are a bunch of different suggestions 70 00:03:31,480 --> 00:03:33,990 on here, from how to write your HTML. 71 00:03:33,990 --> 00:03:35,600 What doc type to use. 72 00:03:35,600 --> 00:03:37,720 What character encoding to use. 73 00:03:37,720 --> 00:03:40,650 And this even specifies things like attribute 74 00:03:40,650 --> 00:03:43,490 order in, all the different HTML attributes. 75 00:03:43,490 --> 00:03:47,890 So maybe start with class, IDs, names, and the different data attributes. 76 00:03:47,890 --> 00:03:49,490 Now, it's important to note that you don't 77 00:03:49,490 --> 00:03:51,860 need to follow every single one of these things. 78 00:03:51,860 --> 00:03:53,440 What you need to do is. 79 00:03:53,440 --> 00:03:55,270 Follow what makes sense for your particular 80 00:03:55,270 --> 00:03:58,100 team and then create your own code guide. 81 00:03:58,100 --> 00:03:59,860 Now this is just a set of suggestions for 82 00:03:59,860 --> 00:04:02,470 which works for him so definitely check it out. 83 00:04:02,470 --> 00:04:04,340 We'll have a link to that in the show notes. 84 00:04:05,720 --> 00:04:10,480 >> Well next up is Marvel which is a web app that allows you to rapidly 85 00:04:10,480 --> 00:04:17,490 prototype your websites, web applications, and other sorts of digital interfaces. 86 00:04:17,490 --> 00:04:21,430 So if we scroll down the page here, there's a 87 00:04:21,430 --> 00:04:24,500 couple of different areas where you can see how Marvel works. 88 00:04:24,500 --> 00:04:28,650 Basically, you take your PSDs, JPGs JIFs or 89 00:04:28,650 --> 00:04:33,190 PNG images and you can drag them into Marvel 90 00:04:33,190 --> 00:04:35,610 or sync them with Dropbox, that's actually the 91 00:04:35,610 --> 00:04:37,930 big thing here is that there is Dropbox integration. 92 00:04:37,930 --> 00:04:41,330 And then you can make them interactive. 93 00:04:41,330 --> 00:04:48,460 So you can take these static images and add some interactivity to them. 94 00:04:48,460 --> 00:04:49,250 What does that look like? 95 00:04:49,250 --> 00:04:52,954 Well once again, we are gonna look at this little demo video real quick. 96 00:04:52,954 --> 00:04:53,762 First, you. 97 00:04:53,762 --> 00:04:55,366 >> Youtube-ception. 98 00:04:55,366 --> 00:04:58,480 >> Actually, it's vimeo-ception, >> What? 99 00:04:58,480 --> 00:05:00,150 >> On this one, I know. 100 00:05:00,150 --> 00:05:03,580 So you can take your static mock-ups and you highlight. 101 00:05:03,580 --> 00:05:06,380 Different areas of them, that you want to be clickable. 102 00:05:06,380 --> 00:05:10,970 And then you tell marvel where that needs to link to next. 103 00:05:10,970 --> 00:05:13,640 And once you've done that, you can click through your app. 104 00:05:13,640 --> 00:05:14,600 Just like this. 105 00:05:14,600 --> 00:05:15,020 Whoa. 106 00:05:15,020 --> 00:05:15,481 Look at that. 107 00:05:15,481 --> 00:05:16,350 >> What? 108 00:05:16,350 --> 00:05:17,375 >> You click on that button. 109 00:05:17,375 --> 00:05:18,402 >> Are we in an app right now? 110 00:05:18,402 --> 00:05:20,955 >> And, it will look, interactive and you can 111 00:05:20,955 --> 00:05:25,110 actually apply nice little transitions to each screen there. 112 00:05:25,110 --> 00:05:27,780 So, this is really handy if you're doing pixel-perfect 113 00:05:27,780 --> 00:05:31,350 mockups in Photoshop and you want to really nail the 114 00:05:31,350 --> 00:05:34,290 interactivity of the app before maybe you spend a 115 00:05:34,290 --> 00:05:37,930 lot of time say building an iPhone app in Objective-C. 116 00:05:37,930 --> 00:05:41,370 You don't want to like rapidly iterate on it, you 117 00:05:41,370 --> 00:05:43,980 just wanna make sure you get it right first time. 118 00:05:43,980 --> 00:05:45,430 This is a really great way to do that. 119 00:05:45,430 --> 00:05:45,580 >> Yeah. 120 00:05:45,580 --> 00:05:46,690 >> It's very cool stuff. 121 00:05:46,690 --> 00:05:47,800 >> I would call it marvelous. 122 00:05:49,840 --> 00:05:52,000 Next up, we have a link to a 123 00:05:52,000 --> 00:05:57,048 GitHub repository on the upcoming features of ECMAScript 6. 124 00:05:57,048 --> 00:05:59,130 Now, ECMAScript 6 is going to be 125 00:05:59,130 --> 00:06:02,540 the upcoming version of the ECMAScript standard. 126 00:06:02,540 --> 00:06:06,430 Which is more commonly referred to as JavaScript. 127 00:06:06,430 --> 00:06:11,470 Now, we'll slowly see ECMAScript 6 support rolling out in browsers. 128 00:06:11,470 --> 00:06:16,460 And, maybe even something like node, as this language standard gets 129 00:06:16,460 --> 00:06:20,500 to be a little bit closer to the standardization raw sets. 130 00:06:20,500 --> 00:06:24,950 Now, some of the features that you'll see in there is the concept of arrows. 131 00:06:24,950 --> 00:06:29,480 If you've used Coffee Script, you'll be used to the arrow, and the. 132 00:06:29,480 --> 00:06:30,210 Fat arrow. 133 00:06:30,210 --> 00:06:32,070 Now what in the world does this do? 134 00:06:32,070 --> 00:06:34,520 Well, this changes the binding of the different 135 00:06:34,520 --> 00:06:37,230 function that you get that you send in there. 136 00:06:37,230 --> 00:06:45,370 So, the scope inside of a function with a fat arrow is going to apply. 137 00:06:45,370 --> 00:06:49,430 To the scope that it is immediately outside of. 138 00:06:49,430 --> 00:06:51,910 Wow, that's quite a bit to take in but if you've 139 00:06:51,910 --> 00:06:55,730 ever spent a lot of time wrestling with the different property 140 00:06:55,730 --> 00:06:58,380 of this or Scope in JavaScript this is a very welcome 141 00:06:58,380 --> 00:07:02,360 addition because it saves you just a little bit of coding. 142 00:07:02,360 --> 00:07:04,790 Now, there's a ton of different features in here. 143 00:07:04,790 --> 00:07:07,620 ECMAScript 6 has classes which is going to 144 00:07:07,620 --> 00:07:13,140 be syntactic sugar over prototype based object inheritance. 145 00:07:13,140 --> 00:07:15,920 It's got enhanced object literals so you can actually create 146 00:07:15,920 --> 00:07:20,450 prototypes for different objects and just a ton of different stuff. 147 00:07:20,450 --> 00:07:24,110 Now, we don't have time to go into absolutely everything on here. 148 00:07:24,110 --> 00:07:25,790 But for more information, check out the show notes. 149 00:07:25,790 --> 00:07:28,810 Which you can get to at youtube.com/gotreehouse. 150 00:07:28,810 --> 00:07:30,030 Or find us in iTunes. 151 00:07:30,030 --> 00:07:31,320 Search for The Treehouse Show. 152 00:07:32,460 --> 00:07:36,030 >> Next up on the Negativity Sandwiches blog. 153 00:07:36,030 --> 00:07:38,200 That sounds kind of, tasty? 154 00:07:38,200 --> 00:07:38,730 Maybe not? 155 00:07:38,730 --> 00:07:39,050 >> Doesn't. 156 00:07:39,050 --> 00:07:39,990 >> I don't know. 157 00:07:39,990 --> 00:07:41,110 No, I'd send that back. 158 00:07:41,110 --> 00:07:42,360 >> Yeah. 159 00:07:42,360 --> 00:07:47,820 There's this wonderful post about accessibility from Jenn Schiffer. 160 00:07:47,820 --> 00:07:49,640 I think I'm saying her last name wrong. 161 00:07:49,640 --> 00:07:50,510 I hope not. 162 00:07:50,510 --> 00:07:53,070 But, it's a really wonderful post reminding 163 00:07:53,070 --> 00:07:56,730 all of us why accessibility is important. 164 00:07:56,730 --> 00:07:59,930 So it doesn't necessarily go into the details about how to 165 00:07:59,930 --> 00:08:03,110 make a website accessible because as she says in the article. 166 00:08:03,110 --> 00:08:08,080 There are plenty of resources like Treehouse that can help you do that, but 167 00:08:08,080 --> 00:08:13,150 it's a reminder about why accessibility is important. 168 00:08:13,150 --> 00:08:18,920 So in this post, she offers a couple of anecdotes that are pretty fascinating 169 00:08:18,920 --> 00:08:23,550 and really highlight very specific instances about 170 00:08:23,550 --> 00:08:26,170 why you want to make your site accessible. 171 00:08:26,170 --> 00:08:31,090 And she also highlights this, kind of, logical fallacy basically. 172 00:08:31,090 --> 00:08:37,480 Where people that are able-bodied and sighted will create these websites. 173 00:08:37,480 --> 00:08:41,630 And they make them, you know, kinda low contrast. 174 00:08:41,630 --> 00:08:46,980 Or, they include these small, cute icons because they're 175 00:08:46,980 --> 00:08:50,900 you know, aesthetically pleasing to somebody that has perfect vision. 176 00:08:50,900 --> 00:08:55,940 But it really doesn't take into consideration people that maybe don't 177 00:08:55,940 --> 00:09:00,610 have perfect vision or particularly people that don't have vision at all. 178 00:09:00,610 --> 00:09:02,640 So, definitely check this one out. 179 00:09:02,640 --> 00:09:06,170 She offers a couple of resources at the bottom that can help you learn. 180 00:09:06,170 --> 00:09:11,400 About accessibility techniques, but it's something that's very important, 181 00:09:11,400 --> 00:09:16,340 and it's always good to be reminded of why you should make your sites accessible. 182 00:09:16,340 --> 00:09:18,130 It's easy to forget about it, when you're kind 183 00:09:18,130 --> 00:09:20,240 of, you know, in a hurry, trying to get 184 00:09:20,240 --> 00:09:24,510 an app out the door, and you just wanna get it done and get it in front of people. 185 00:09:24,510 --> 00:09:27,370 It's, it's easy to forget about accessibility, 186 00:09:27,370 --> 00:09:29,830 when in fact it's really, really important. 187 00:09:29,830 --> 00:09:30,810 >> Nick, speaking of vision. 188 00:09:31,940 --> 00:09:33,360 >> You're a vision. 189 00:09:33,360 --> 00:09:34,970 Is that what you were gonna say about me? 190 00:09:34,970 --> 00:09:35,470 >> Yeah. 191 00:09:36,630 --> 00:09:38,010 >> Samesies. 192 00:09:38,010 --> 00:09:41,640 >> Next up we have a blog post about Promise anti-patterns. 193 00:09:41,640 --> 00:09:45,135 Now when we say Promises, it's not like I'm telling Nick, hey, I'm just 194 00:09:45,135 --> 00:09:47,810 gonna go to the grocery store for milk, and then I never come back. 195 00:09:47,810 --> 00:09:52,340 We're talking about JavaScript Promises, which is going to be a little different 196 00:09:52,340 --> 00:09:57,730 snippets of code that you can execute after asynchronous code has already run. 197 00:09:57,730 --> 00:10:00,730 Now, Promises aren't part of JavaScript right now, 198 00:10:00,730 --> 00:10:02,315 but they are part of a project called 199 00:10:02,315 --> 00:10:06,340 q.js, so if you can't wait for them to be a standard, you can download that. 200 00:10:06,340 --> 00:10:12,050 Right now, so let's take a look at some of the different problems with Promises. 201 00:10:12,050 --> 00:10:16,640 So let's say you wanna run a different bit of code after one Promise completes. 202 00:10:16,640 --> 00:10:18,330 So you can load something and then 203 00:10:18,330 --> 00:10:21,100 do something else and then load another thing. 204 00:10:21,100 --> 00:10:24,150 Well, hey, that's not exactly what you wanna do. 205 00:10:24,150 --> 00:10:28,210 To fix that you can use the all method of Promises and 206 00:10:28,210 --> 00:10:33,590 then spread that out among the different return values and or functions. 207 00:10:33,590 --> 00:10:36,350 So this breaks it down into a bunch of different anti 208 00:10:36,350 --> 00:10:41,460 patterns that you might see from the broken chain the collection kerfuffle. 209 00:10:42,660 --> 00:10:45,750 The ghost promise, these all sound like dance moves. 210 00:10:45,750 --> 00:10:49,070 I, I can't get past that, but anyway. 211 00:10:49,070 --> 00:10:51,345 >> Let's see a few of them right now. 212 00:10:51,345 --> 00:10:52,410 >> [LAUGH] You know, I, I can't. 213 00:10:52,410 --> 00:10:53,560 There's just not enough room. 214 00:10:53,560 --> 00:10:54,040 I'm miked up. 215 00:10:54,040 --> 00:10:55,850 But, you know, otherwise, yeah. 216 00:10:55,850 --> 00:10:56,940 Totally. 217 00:10:56,940 --> 00:10:57,300 anyway. 218 00:10:57,300 --> 00:10:58,700 This is a great guide to read and 219 00:10:58,700 --> 00:11:01,660 it's definitely going to improve your JavaScript coding. 220 00:11:01,660 --> 00:11:03,100 So check that out. 221 00:11:03,100 --> 00:11:03,990 >> Well, if you're not in the mood 222 00:11:03,990 --> 00:11:07,830 for a negativity sandwich, how about a graphic burger? 223 00:11:07,830 --> 00:11:09,880 >> Oh, I am suddenly very hungry. 224 00:11:09,880 --> 00:11:11,055 >> See how this all ties together? 225 00:11:11,055 --> 00:11:11,555 >> Yeah. 226 00:11:12,690 --> 00:11:17,130 >> Graphic burger is tasty design resources made with care for each pixel. 227 00:11:17,130 --> 00:11:20,370 So, basically it's just a gallery where 228 00:11:20,370 --> 00:11:23,810 you can check out resources for graphic designers. 229 00:11:23,810 --> 00:11:26,050 So if you're designing a website, which maybe 230 00:11:26,050 --> 00:11:28,430 you are if you're watching this show, you can 231 00:11:28,430 --> 00:11:31,430 check out mock-ups, so there's a couple of 232 00:11:31,430 --> 00:11:36,050 different mock-ups here that you can use for inspiration. 233 00:11:36,050 --> 00:11:38,960 There are UI kits so if you're trying to 234 00:11:38,960 --> 00:11:42,420 prototype an app quickly, you just wanna get something together. 235 00:11:42,420 --> 00:11:45,950 You can use UI kits like these to prototype 236 00:11:45,950 --> 00:11:50,070 your app or maybe actually make a pixel perfect, mockup. 237 00:11:50,070 --> 00:11:53,230 There's an icons category so if you love all 238 00:11:53,230 --> 00:11:55,720 of the icons we talk about on the show here. 239 00:11:55,720 --> 00:11:57,710 You can check out a lot of them along 240 00:11:57,710 --> 00:12:02,240 with others right here, and there's a few other categories. 241 00:12:02,240 --> 00:12:05,140 Not a whole lot to say about it but it is very cool. 242 00:12:05,140 --> 00:12:07,180 I haven't really seen something like this put 243 00:12:07,180 --> 00:12:09,810 together where it has nice categories like this. 244 00:12:09,810 --> 00:12:11,810 Or you can check out resources for designers. 245 00:12:11,810 --> 00:12:14,530 So very nice stuff, I like it a lot. 246 00:12:14,530 --> 00:12:15,540 >> Very, very cool. 247 00:12:15,540 --> 00:12:18,430 Next up we have a a project called nanobar.js. 248 00:12:18,430 --> 00:12:21,630 Now this is similar to projects we've talked about on the show before. 249 00:12:21,630 --> 00:12:26,260 What this is is a YouTube-style small progress bar that goes across 250 00:12:26,260 --> 00:12:29,750 the top of the webpage, and then you can call it programatically. 251 00:12:29,750 --> 00:12:30,590 So let's take a look at that. 252 00:12:30,590 --> 00:12:33,590 If you take a look at the top of my screen here, You'll see there 253 00:12:33,590 --> 00:12:39,130 is a bar up there, and I, if I hit nanobar.go60, whoa, look at that. 254 00:12:39,130 --> 00:12:39,860 It moves to the right. 255 00:12:39,860 --> 00:12:42,770 Or if I say nanobar.go100, bam. 256 00:12:42,770 --> 00:12:45,220 We're all the way, all the way across there. 257 00:12:45,220 --> 00:12:46,160 Now that's it. 258 00:12:46,160 --> 00:12:48,520 It does one thing, and it does it very, very well. 259 00:12:48,520 --> 00:12:53,850 In fact, this is only 730 bytes GZIP that's practically non existent. 260 00:12:53,850 --> 00:12:56,250 Now it's got just a couple of different options, it does 261 00:12:56,250 --> 00:12:59,950 not require jQuery at all and then boom you're good to go. 262 00:12:59,950 --> 00:13:05,400 Just include the script and then say new nanobar and you are done. 263 00:13:05,400 --> 00:13:08,360 You can change the background color and give it. 264 00:13:08,360 --> 00:13:11,490 The ID of the div you want it to use, 265 00:13:11,490 --> 00:13:13,600 and then you just call the go method, and that's it. 266 00:13:13,600 --> 00:13:14,580 You are done. 267 00:13:14,580 --> 00:13:14,830 You got nanobarred. 268 00:13:14,830 --> 00:13:19,070 >> Well, that's all the time we have for this episode. 269 00:13:19,070 --> 00:13:20,690 I'm @nickrp on Twitter. 270 00:13:20,690 --> 00:13:21,760 >> And I am @jseifer. 271 00:13:21,760 --> 00:13:24,150 For more information on anything we talked about check out 272 00:13:24,150 --> 00:13:28,810 our show notes at youtube.com/gotreehouse, or check us out on iTunes. 273 00:13:28,810 --> 00:13:31,710 Search for the Treehouse Show and please leave us a rating. 274 00:13:31,710 --> 00:13:35,586 >> And of course if you'd like to see more videos like this one about web 275 00:13:35,586 --> 00:13:38,782 design, web development, mobile business and so much 276 00:13:38,782 --> 00:13:41,960 more, be sure to check us out at teamtreehouse.com. 277 00:13:41,960 --> 00:13:44,879 Thank you so much for watching and we will see you next week. 278 00:13:44,879 --> 00:13:52,067 [MUSIC]