1 00:00:06,981 --> 00:00:09,952 - Let's talk about performance quality attribute. 2 00:00:09,952 --> 00:00:13,311 It's one that people are constantly forgetting about. 3 00:00:13,311 --> 00:00:14,812 You know when it's something you can't 4 00:00:14,812 --> 00:00:16,663 just look at your watch and say, 5 00:00:16,663 --> 00:00:19,223 "Does the screen come up in, oh, three seconds?" 6 00:00:19,223 --> 00:00:20,056 Right? 7 00:00:20,056 --> 00:00:22,431 So there's lots of different ways to at performance. 8 00:00:22,431 --> 00:00:24,650 One way that I kinda like to do it 9 00:00:24,650 --> 00:00:27,944 is to research similar applications. 10 00:00:27,944 --> 00:00:29,584 What are people used to? 11 00:00:29,584 --> 00:00:32,001 What are the users expecting? 12 00:00:33,580 --> 00:00:37,542 - Right, and now that a lot of web applications 13 00:00:37,542 --> 00:00:40,069 have more logic in the client itself 14 00:00:40,069 --> 00:00:41,370 that can slow it down, 15 00:00:41,370 --> 00:00:44,235 we have to look at ways to improve perceived performance. 16 00:00:44,235 --> 00:00:45,068 - Ah. 17 00:00:45,068 --> 00:00:47,805 - So, if a user sees the page starting to load, 18 00:00:47,805 --> 00:00:49,035 so the faster loading things 19 00:00:49,035 --> 00:00:51,214 go ahead and render on the screen, 20 00:00:51,214 --> 00:00:52,047 they're happy. 21 00:00:52,047 --> 00:00:52,880 They got something. 22 00:00:52,880 --> 00:00:55,384 And so it's okay that some things might take longer. 23 00:00:55,384 --> 00:00:58,801 So, it's a good idea if performance is an 24 00:01:00,422 --> 00:01:02,620 important criteria for your application. 25 00:01:02,620 --> 00:01:03,930 To plan an architecture spike, 26 00:01:03,930 --> 00:01:06,513 write some throw away code that 27 00:01:07,393 --> 00:01:09,199 embodies the approach that you want to use. 28 00:01:09,199 --> 00:01:11,479 Do some load testing, make sure it works for ya. 29 00:01:11,479 --> 00:01:14,258 And then go back and write your real code. 30 00:01:14,258 --> 00:01:16,487 Discuss architectural options. 31 00:01:16,487 --> 00:01:21,337 For example, using caching logic in your client later. 32 00:01:21,337 --> 00:01:24,100 Optimizing your database queries. 33 00:01:24,100 --> 00:01:26,351 Think about your trade offs with the ease of maintenance 34 00:01:26,351 --> 00:01:30,959 for your code and whether you can add features later on. 35 00:01:30,959 --> 00:01:32,890 - Those are all really good ways 36 00:01:32,890 --> 00:01:36,108 to be thinking about how to improve. 37 00:01:36,108 --> 00:01:37,908 You used a word there, spike. 38 00:01:37,908 --> 00:01:39,575 Architectural spike. 39 00:01:41,178 --> 00:01:44,007 What do you mean by an architectural spike? 40 00:01:44,007 --> 00:01:47,306 - Well, if the developers have come up with 41 00:01:47,306 --> 00:01:49,367 an architecture that they think would scale 42 00:01:49,367 --> 00:01:52,358 to the number of users who will be using the application, 43 00:01:52,358 --> 00:01:54,397 they wanna know if they were right about that. 44 00:01:54,397 --> 00:01:57,438 And so, they can kind of write a skeleton of the code 45 00:01:57,438 --> 00:01:59,329 without doing testing in development, 46 00:01:59,329 --> 00:02:02,601 and just throw some code together that does 47 00:02:02,601 --> 00:02:04,676 what they expect using that approach. 48 00:02:04,676 --> 00:02:07,255 Do some load testing and just to see if it scales. 49 00:02:07,255 --> 00:02:08,996 And give 'em more confidence that now they can 50 00:02:08,996 --> 00:02:10,607 write the real code the real way, 51 00:02:10,607 --> 00:02:11,440 and it'll be okay. 52 00:02:11,440 --> 00:02:12,505 - Like a proof of concept. 53 00:02:12,505 --> 00:02:13,412 - Exactly. - Yeah. 54 00:02:13,412 --> 00:02:16,722 So the one thing I urge you to really think about, 55 00:02:16,722 --> 00:02:20,472 if you hear the word proof of concept, spike, 56 00:02:21,559 --> 00:02:24,361 maybe even prototype. - Prototype. 57 00:02:24,361 --> 00:02:26,701 - Those are all throw aways. 58 00:02:26,701 --> 00:02:29,502 You throw it away and then you start. 59 00:02:29,502 --> 00:02:31,953 Because otherwise you put in technical debt. 60 00:02:31,953 --> 00:02:32,905 Immediately in. 61 00:02:32,905 --> 00:02:35,073 So watch for those sorts of things. 62 00:02:35,073 --> 00:02:36,993 I find too that when I work with the programmers 63 00:02:36,993 --> 00:02:39,892 and we're talking about performance, 64 00:02:39,892 --> 00:02:41,662 quite often they'll say, 65 00:02:41,662 --> 00:02:45,662 "Hey, Janet, we can put hooks into the framework 66 00:02:47,172 --> 00:02:49,172 so we can actually measure." 67 00:02:49,172 --> 00:02:52,489 Then you can start thinking about how do you monitor it. 68 00:02:52,489 --> 00:02:55,795 So it's important to keep that whole team working on, 69 00:02:55,795 --> 00:03:00,290 and thinking about, what it is you want to do. 70 00:03:00,290 --> 00:03:01,598 Our last section in this lesson, 71 00:03:01,598 --> 00:03:04,015 is planning for the end game.