title
JavaScript Class OOP Tutorial Intro to Object Oriented Programming

description
Code: https://www.adamkhoury.com/JavaScript/video/Class-OOP-Tutorial-Intro-to-Object-Oriented-Programming Introduction to creating class based code in JavaScript, also known as OOP(Object Oriented Programming). Because it is a class-less prototype-based language special syntax is applied to your JavaScript in order to achieve OOP features that we see in languages such as C++, C#, PHP, Java, Perl, Python and more. JavaScript has no class statement for establishing your classes like other popular languages do, but this does not mean that we cannot create class based code in JavaScript.

detail
{'title': 'JavaScript Class OOP Tutorial Intro to Object Oriented Programming', 'heatmap': [{'end': 737.653, 'start': 706.254, 'weight': 0.867}, {'end': 838.545, 'start': 740.894, 'weight': 0.703}], 'summary': 'This tutorial introduces creating class-based code in javascript, highlighting the syntax for oop features, the benefits of oop in javascript, class basics, external class files, and the necessity of oop in javascript applications.', 'chapters': [{'end': 37.143, 'segs': [{'end': 37.143, 'src': 'embed', 'start': 0.353, 'weight': 0, 'content': [{'end': 10.703, 'text': 'Hey! This is an introduction to creating class-based code in JavaScript, also known as OOP in JavaScript, Object Oriented Programming.', 'start': 0.353, 'duration': 10.35}, {'end': 15.087, 'text': 'Now, because it is a classless prototype-based language,', 'start': 11.364, 'duration': 3.723}, {'end': 25.035, 'text': 'special syntax is applied to our JavaScript in order to achieve OOP features that we see in languages such as C++, C, Sharp, PHP, Java, Perl,', 'start': 15.087, 'duration': 9.948}, {'end': 26.155, 'text': 'Python and more.', 'start': 25.035, 'duration': 1.12}, {'end': 31.62, 'text': 'JavaScript has no class statement for establishing your classes, like other popular languages do,', 'start': 26.576, 'duration': 5.044}, {'end': 35.262, 'text': 'but this does not mean that we cannot create class-based code in JavaScript.', 'start': 32.1, 'duration': 3.162}, {'end': 37.143, 'text': 'We just go about it a little differently.', 'start': 35.702, 'duration': 1.441}], 'summary': 'Introduction to creating oop in javascript without class statement.', 'duration': 36.79, 'max_score': 0.353, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/coIsvOMYEi0/pics/coIsvOMYEi0353.jpg'}], 'start': 0.353, 'title': 'Javascript class-based code', 'summary': 'Introduces creating class-based code in javascript, emphasizing the special syntax for oop features in a prototype-based language and its distinctions from other languages.', 'chapters': [{'end': 37.143, 'start': 0.353, 'title': 'Creating class-based code in javascript', 'summary': 'Introduces creating class-based code in javascript, highlighting the special syntax used to achieve oop features in a classless prototype-based language and how it differs from other popular languages.', 'duration': 36.79, 'highlights': ['JavaScript is a classless prototype-based language with special syntax for achieving OOP features seen in other languages like C++, C, Sharp, PHP, Java, Perl, and Python.', 'JavaScript lacks a class statement like other languages, but it is still possible to create class-based code in a different manner.']}], 'duration': 36.79, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/coIsvOMYEi0/pics/coIsvOMYEi0353.jpg', 'highlights': ['JavaScript is a classless prototype-based language with special syntax for achieving OOP features seen in other languages like C++, C, Sharp, PHP, Java, Perl, and Python.', 'JavaScript lacks a class statement like other languages, but it is still possible to create class-based code in a different manner.']}, {'end': 187.105, 'segs': [{'end': 60.915, 'src': 'embed', 'start': 37.503, 'weight': 1, 'content': [{'end': 50.85, 'text': 'Now, a major focus of this video is to stress the benefits of OOP in a general sense and to stress how OOP is simply a style of programming and not always a requirement of your application to make it work correctly.', 'start': 37.503, 'duration': 13.347}, {'end': 60.915, 'text': "So we're going to discuss the occasions when a programmer is required to OOP or when it would benefit a part of your application if your code was that way,", 'start': 51.45, 'duration': 9.465}], 'summary': 'Emphasizes benefits of oop as a programming style, not always a requirement for application.', 'duration': 23.412, 'max_score': 37.503, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/coIsvOMYEi0/pics/coIsvOMYEi037503.jpg'}, {'end': 120.969, 'src': 'embed', 'start': 79.201, 'weight': 0, 'content': [{'end': 84.265, 'text': 'just keep in mind that the same general logic would apply to any language that has object-oriented features.', 'start': 79.201, 'duration': 5.064}, {'end': 92.612, 'text': 'And there are more advanced topics to OOP in JavaScript that we will not cover in this video that we might address in future videos,', 'start': 85.025, 'duration': 7.587}, {'end': 95.674, 'text': 'depending on how this video is rated and commented on by you guys.', 'start': 92.612, 'duration': 3.062}, {'end': 104.061, 'text': "You might find it extremely boring or not very useful and in that case we won't cover it anymore and go into the more advanced topics of it.", 'start': 95.714, 'duration': 8.347}, {'end': 110.922, 'text': "Okay, first we'll talk about the basic syntax for creating classes in JavaScript.", 'start': 105.919, 'duration': 5.003}, {'end': 113.264, 'text': "Then we'll talk about its benefits and usefulness.", 'start': 111.062, 'duration': 2.202}, {'end': 116.246, 'text': 'So create a test.html file.', 'start': 113.924, 'duration': 2.322}, {'end': 118.187, 'text': "And let's open up a script tag.", 'start': 116.806, 'duration': 1.381}, {'end': 120.969, 'text': 'Go down a couple of lines and close it.', 'start': 119.468, 'duration': 1.501}], 'summary': 'The video covers basic syntax for creating classes in javascript and may address more advanced oop topics based on audience feedback.', 'duration': 41.768, 'max_score': 79.201, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/coIsvOMYEi0/pics/coIsvOMYEi079201.jpg'}], 'start': 37.503, 'title': 'Benefits of oop in javascript', 'summary': 'Discusses the benefits of oop in javascript, emphasizing its general applicability to any language with object-oriented features, and it introduces the basic syntax for creating classes in javascript.', 'chapters': [{'end': 187.105, 'start': 37.503, 'title': 'Benefits of oop in javascript', 'summary': 'Discusses the benefits of oop in javascript, emphasizing its general applicability to any language with object-oriented features, and it introduces the basic syntax for creating classes in javascript.', 'duration': 149.602, 'highlights': ['The chapter discusses the benefits of OOP in JavaScript', 'Introduces the basic syntax for creating classes in JavaScript', 'Emphasizes that OOP is simply a style of programming and not always a requirement of your application', 'Mentions the possibility of covering more advanced topics of OOP in future videos']}], 'duration': 149.602, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/coIsvOMYEi0/pics/coIsvOMYEi037503.jpg', 'highlights': ['Introduces the basic syntax for creating classes in JavaScript', 'The chapter discusses the benefits of OOP in JavaScript', 'Mentions the possibility of covering more advanced topics of OOP in future videos', 'Emphasizes that OOP is simply a style of programming and not always a requirement of your application']}, {'end': 505.813, 'segs': [{'end': 215.572, 'src': 'embed', 'start': 187.466, 'weight': 0, 'content': [{'end': 190.648, 'text': 'And these properties are only accessible within the class.', 'start': 187.466, 'duration': 3.182}, {'end': 194.609, 'text': 'And your methods are also accessible only within the class.', 'start': 191.428, 'duration': 3.181}, {'end': 202.112, 'text': "So now you know how to set up your properties, and in a moment we'll show you how to access all of this stuff in the front end of your applications.", 'start': 195.129, 'duration': 6.983}, {'end': 208.355, 'text': 'Now methods are like dynamic functions, but these dynamic functions are owned by the class.', 'start': 202.752, 'duration': 5.603}, {'end': 211.556, 'text': 'So creating a method is similar to creating a function.', 'start': 208.975, 'duration': 2.581}, {'end': 214.097, 'text': 'We say this, and you give the method a name.', 'start': 211.596, 'duration': 2.501}, {'end': 215.572, 'text': "we'll just name it.", 'start': 214.892, 'duration': 0.68}], 'summary': 'Properties and methods are accessible only within the class, and methods are dynamic functions owned by the class.', 'duration': 28.106, 'max_score': 187.466, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/coIsvOMYEi0/pics/coIsvOMYEi0187466.jpg'}, {'end': 273.339, 'src': 'embed', 'start': 228.817, 'weight': 3, 'content': [{'end': 232.619, 'text': 'here is where you can supply dynamic arguments coming in.', 'start': 228.817, 'duration': 3.802}, {'end': 234.7, 'text': "so we'll name this argument1.", 'start': 232.619, 'duration': 2.081}, {'end': 241.234, 'text': 'if you wanted multiple arguments coming in, you could put arg2, arg3, and you can really name them whatever you want.', 'start': 234.7, 'duration': 6.534}, {'end': 247.557, 'text': "but that's how you supply arguments into that function dynamically when you're coding instances of this class.", 'start': 241.234, 'duration': 6.323}, {'end': 255.76, 'text': "So within method1, we're simply going to return some data, which is going to be a concatenation of argument1 and this.property2.", 'start': 248.117, 'duration': 7.643}, {'end': 264.611, 'text': "So when we call method1 to run, it's simply just going to return some data to the calling code.", 'start': 259.346, 'duration': 5.265}, {'end': 273.339, 'text': "Now what you're looking at here is the most basic syntax of a class in JavaScript for object-oriented programming.", 'start': 265.011, 'duration': 8.328}], 'summary': 'Javascript class allows dynamic argument input and data concatenation.', 'duration': 44.522, 'max_score': 228.817, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/coIsvOMYEi0/pics/coIsvOMYEi0228817.jpg'}, {'end': 318.37, 'src': 'embed', 'start': 290.737, 'weight': 5, 'content': [{'end': 295.198, 'text': "Now we'll demonstrate how to tap into that class that way you can code against it when you need to.", 'start': 290.737, 'duration': 4.461}, {'end': 298.659, 'text': "So we'll create a variable and we'll name it instance1.", 'start': 295.678, 'duration': 2.981}, {'end': 302.64, 'text': 'And you can be naming these properties, methods, and variables anything you want.', 'start': 299.239, 'duration': 3.401}, {'end': 306.861, 'text': "I'm just naming them a certain way so you know exactly what they are for the lesson's sake.", 'start': 302.7, 'duration': 4.161}, {'end': 314.266, 'text': 'So var instance1 is equal to new Example class, open, close parenthesis, semicolon.', 'start': 307.181, 'duration': 7.085}, {'end': 318.37, 'text': "So now you've created a new instance of example class.", 'start': 314.566, 'duration': 3.804}], 'summary': 'Demonstrating how to create a new instance of example class.', 'duration': 27.633, 'max_score': 290.737, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/coIsvOMYEi0/pics/coIsvOMYEi0290737.jpg'}, {'end': 362.54, 'src': 'embed', 'start': 334.646, 'weight': 6, 'content': [{'end': 337.708, 'text': "Now let's call method1 of example class to run.", 'start': 334.646, 'duration': 3.062}, {'end': 339.209, 'text': "So let's just use alert.", 'start': 337.988, 'duration': 1.221}, {'end': 343.071, 'text': 'We will just alert ourselves some data just to see what is returned.', 'start': 339.229, 'duration': 3.842}, {'end': 344.793, 'text': 'So what we do is we say instance1.', 'start': 343.352, 'duration': 1.441}, {'end': 354.918, 'text': "and we apply method1 and you can see method1 takes in one argument so in between parentheses We're going to put the string, hello.", 'start': 345.093, 'duration': 9.825}, {'end': 357.639, 'text': "And that's going to be argument one.", 'start': 355.499, 'duration': 2.14}, {'end': 362.54, 'text': "When it's passed through method one, it becomes argument one up here in your class.", 'start': 357.999, 'duration': 4.541}], 'summary': "Using method1 of example class to pass 'hello' as an argument.", 'duration': 27.894, 'max_score': 334.646, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/coIsvOMYEi0/pics/coIsvOMYEi0334646.jpg'}], 'start': 187.466, 'title': 'Javascript class basics', 'summary': 'Explains the accessibility of properties and methods within a class, providing insights into setting up properties and creating methods, including the dynamic nature of methods and the ability to supply dynamic arguments. it also introduces the most basic syntax of a class in javascript for object-oriented programming, including creating instances, accessing properties and methods, and running methods with arguments, demonstrating the concept with specific code examples and alerts.', 'chapters': [{'end': 247.557, 'start': 187.466, 'title': 'Accessing and creating methods in a class', 'summary': 'Explains the accessibility of properties and methods within a class, providing insights into setting up properties and creating methods, including the dynamic nature of methods and the ability to supply dynamic arguments.', 'duration': 60.091, 'highlights': ['Understanding the accessibility of properties and methods within a class, exclusively accessible within the class (100%)', 'Providing insights into setting up properties and creating methods in a class (90%)', 'Explaining the dynamic nature of methods as dynamic functions owned by the class (80%)', 'Highlighting the ability to supply dynamic arguments within the methods of a class, enabling the coding of instances with multiple arguments (70%)']}, {'end': 505.813, 'start': 248.117, 'title': 'Javascript class basics', 'summary': 'Introduces the most basic syntax of a class in javascript for object-oriented programming, including creating instances, accessing properties and methods, and running methods with arguments, demonstrating the concept with specific code examples and alerts.', 'duration': 257.696, 'highlights': ['The chapter introduces the most basic syntax of a class in JavaScript for object-oriented programming', 'Creating instances, accessing properties and methods, and running methods with arguments', 'Specific code examples and alerts']}], 'duration': 318.347, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/coIsvOMYEi0/pics/coIsvOMYEi0187466.jpg', 'highlights': ['Understanding the accessibility of properties and methods within a class, exclusively accessible within the class (100%)', 'Providing insights into setting up properties and creating methods in a class (90%)', 'Explaining the dynamic nature of methods as dynamic functions owned by the class (80%)', 'Highlighting the ability to supply dynamic arguments within the methods of a class, enabling the coding of instances with multiple arguments (70%)', 'The chapter introduces the most basic syntax of a class in JavaScript for object-oriented programming', 'Creating instances, accessing properties and methods, and running methods with arguments', 'Specific code examples and alerts']}, {'end': 690.577, 'segs': [{'end': 629.321, 'src': 'embed', 'start': 585.267, 'weight': 0, 'content': [{'end': 592.169, 'text': 'So if somebody is new to JavaScript and they find it all very difficult to learn, they can pick up a framework that some other,', 'start': 585.267, 'duration': 6.902}, {'end': 601.192, 'text': 'more advanced coder created and put everything into objects and classes and methods and properties that people can tap into without knowing very much.', 'start': 592.169, 'duration': 9.023}, {'end': 606.053, 'text': 'So you as an advanced developer, you can be creating frameworks for dummies.', 'start': 601.832, 'duration': 4.221}, {'end': 608.474, 'text': 'Now when they learn it.', 'start': 607.574, 'duration': 0.9}, {'end': 615.056, 'text': "a lot of people don't really see the usefulness of object-oriented programming after they learn the basic syntax,", 'start': 608.474, 'duration': 6.582}, {'end': 618.858, 'text': 'because what happens is instructors like me and teachers in schools.', 'start': 615.056, 'duration': 3.802}, {'end': 624.519, 'text': 'we will teach you the basic syntax of object-oriented programming in JavaScript, like we just did.', 'start': 618.858, 'duration': 5.661}, {'end': 629.321, 'text': "But what did I show you? This example class doesn't do anything interesting in the real world.", 'start': 624.779, 'duration': 4.542}], 'summary': 'Advanced developers can create frameworks for beginners to tap into, making object-oriented programming more accessible.', 'duration': 44.054, 'max_score': 585.267, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/coIsvOMYEi0/pics/coIsvOMYEi0585267.jpg'}, {'end': 690.577, 'src': 'embed', 'start': 650.265, 'weight': 3, 'content': [{'end': 658.677, 'text': "What I'm going to try and do is go one step further now to show you an application that will not work right unless I make it a class file.", 'start': 650.265, 'duration': 8.412}, {'end': 664.205, 'text': 'Basically, my application will work the way I intend it to work if I put all my code into a class.', 'start': 658.977, 'duration': 5.228}, {'end': 669.091, 'text': "If I don't put all my code into a class, My application is not going to work as intended,", 'start': 664.265, 'duration': 4.826}, {'end': 679.743, 'text': 'and this should show you the usefulness of object oriented programming and one such occasion where it would be a requirement of your application and not just a code style.', 'start': 669.091, 'duration': 10.652}, {'end': 680.584, 'text': "that's a preference.", 'start': 679.743, 'duration': 0.841}, {'end': 690.577, 'text': 'Because, even though object oriented programming is many times just a code style and a preference to the application author and not such a necessity to the application,', 'start': 681.025, 'duration': 9.552}], 'summary': 'Object-oriented programming is essential for proper functioning of applications, not just a preference.', 'duration': 40.312, 'max_score': 650.265, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/coIsvOMYEi0/pics/coIsvOMYEi0650265.jpg'}], 'start': 507.054, 'title': 'Javascript class files and frameworks', 'summary': 'Covers creating external class files in javascript, including linking code to the main script and testing the connection. it also discusses the benefits of javascript frameworks in simplifying learning and highlights the necessity of object-oriented programming for certain applications.', 'chapters': [{'end': 585.207, 'start': 507.054, 'title': 'Creating external class files in javascript', 'summary': "Demonstrates how to create an external class file in javascript by moving the code into a separate file, linking it to the main script using the 'source' attribute, and running a test to confirm the connection, which is a common practice for creating modular and reusable code.", 'duration': 78.153, 'highlights': ['Creating a new JavaScript file and pasting the example class code into it, saving the file as exampleclass.js.', "Linking the example class file to the test.html page using the 'source' attribute within a script tag, allowing all code from exampleclass.js to be included in the test.html page.", 'Confirming the successful connection by running the test and observing the expected results, demonstrating the functionality of external class files in JavaScript.']}, {'end': 649.805, 'start': 585.267, 'title': 'Javascript frameworks and object-oriented programming', 'summary': 'Discusses the usefulness of javascript frameworks in simplifying the learning process for beginners and highlights the common shortcoming in teaching the usefulness of object-oriented programming in javascript.', 'duration': 64.538, 'highlights': ['JavaScript frameworks can simplify the learning process for beginners by encapsulating complex code into objects and classes, making it accessible without deep understanding. - (Relevance: 5)', 'Instructors often fail to demonstrate the practical usefulness of object-oriented programming in JavaScript after teaching the basic syntax, leading to a lack of understanding among students. - (Relevance: 4)', 'Many people fail to recognize the practical benefits of object-oriented programming in JavaScript as it can be replicated using dynamic external functions, leading to a lack of appreciation for its usefulness. - (Relevance: 3)']}, {'end': 690.577, 'start': 650.265, 'title': 'Object oriented programming importance', 'summary': 'Highlights the importance of using object-oriented programming by demonstrating a situation where an application will not work unless coded as a class file, emphasizing that object-oriented programming is not merely a code style preference but a necessity for certain applications.', 'duration': 40.312, 'highlights': ['The application will not work unless coded as a class file, demonstrating the necessity of using object-oriented programming for certain applications.', 'Emphasizes that object-oriented programming is not merely a code style preference but a necessity for certain applications.']}], 'duration': 183.523, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/coIsvOMYEi0/pics/coIsvOMYEi0507054.jpg', 'highlights': ['JavaScript frameworks simplify learning by encapsulating complex code (Relevance: 5)', 'Instructors often fail to demonstrate practical usefulness of OOP in JavaScript (Relevance: 4)', 'Many fail to recognize practical benefits of OOP in JavaScript (Relevance: 3)', 'Application will not work unless coded as a class file (Relevance: 2)', 'Emphasizes OOP as a necessity for certain applications (Relevance: 1)']}, {'end': 831.999, 'segs': [{'end': 737.653, 'src': 'heatmap', 'start': 690.937, 'weight': 0, 'content': [{'end': 698.988, 'text': 'But there are some times when object-oriented programming and class files are a requirement of the application in order for it to work right.', 'start': 690.937, 'duration': 8.051}, {'end': 700.93, 'text': 'So let me show you that example now.', 'start': 699.008, 'duration': 1.922}, {'end': 705.714, 'text': "Okay now in test.html I'm going to replace it for all of this code.", 'start': 701.471, 'duration': 4.243}, {'end': 714.04, 'text': 'And what I have here in the top of my HTML page is a script that I wrote for rotating a bunch of cogs images.', 'start': 706.254, 'duration': 7.786}, {'end': 715.061, 'text': "They're cogs.", 'start': 714.34, 'duration': 0.721}, {'end': 716.362, 'text': "And I'll show you what it does.", 'start': 715.501, 'duration': 0.861}, {'end': 718.003, 'text': 'Let me render this in a browser real quick.', 'start': 716.402, 'duration': 1.601}, {'end': 722.145, 'text': 'See what it does? It spins those cogs.', 'start': 720.404, 'duration': 1.741}, {'end': 727.928, 'text': "But what's happening is I'm having a collision in one of my properties, or one of my values, rather.", 'start': 722.325, 'duration': 5.603}, {'end': 737.653, 'text': 'So one of my variables, this d variable, has a collision because this function animate does not create new instances of any objects.', 'start': 728.248, 'duration': 9.405}], 'summary': 'Object-oriented programming and class files are essential for application functionality. example demonstrates rotating cogs with a collision issue in the code.', 'duration': 46.716, 'max_score': 690.937, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/coIsvOMYEi0/pics/coIsvOMYEi0690937.jpg'}, {'end': 831.999, 'src': 'embed', 'start': 807.599, 'weight': 1, 'content': [{'end': 815.064, 'text': "So now that I'm calling the animate function through these new instances of the RotateAnimation class, you'll see what I get.", 'start': 807.599, 'duration': 7.465}, {'end': 816.184, 'text': 'Press F12.', 'start': 815.444, 'duration': 0.74}, {'end': 818.406, 'text': "I'll run this in my favorite browser.", 'start': 816.965, 'duration': 1.441}, {'end': 823.229, 'text': 'Now you can see that I have proper cog movement.', 'start': 819.946, 'duration': 3.283}, {'end': 831.999, 'text': 'The cog in the middle is going counterclockwise like it should be and there are no collisions in the degrees variable.', 'start': 823.91, 'duration': 8.089}], 'summary': 'Using the rotateanimation class for cog movement, with no collisions in the degrees variable.', 'duration': 24.4, 'max_score': 807.599, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/coIsvOMYEi0/pics/coIsvOMYEi0807599.jpg'}], 'start': 690.937, 'title': 'Object-oriented programming in javascript', 'summary': 'Explains the necessity of object-oriented programming and class files in a javascript application, demonstrating the need to resolve collisions in variables and the successful implementation of a class to achieve the desired cog movement.', 'chapters': [{'end': 831.999, 'start': 690.937, 'title': 'Object-oriented programming in javascript', 'summary': 'Explains the necessity of object-oriented programming and class files in a javascript application, demonstrating the need to resolve collisions in variables and the successful implementation of a class to achieve the desired cog movement.', 'duration': 141.062, 'highlights': ['The necessity of object-oriented programming and class files in a JavaScript application.', 'Demonstration of resolving collisions in variables through object-oriented programming.', 'Successful implementation of a class to achieve the desired cog movement.']}], 'duration': 141.062, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/coIsvOMYEi0/pics/coIsvOMYEi0690937.jpg', 'highlights': ['Demonstration of resolving collisions in variables through object-oriented programming.', 'Successful implementation of a class to achieve the desired cog movement.', 'The necessity of object-oriented programming and class files in a JavaScript application.']}, {'end': 1262.411, 'segs': [{'end': 952.418, 'src': 'embed', 'start': 880.694, 'weight': 2, 'content': [{'end': 890.118, 'text': 'So, basically, this whole script, this whole function, rotateAnimation, which is a class, can be put into an external file called rotateAnimation.js,', 'start': 880.694, 'duration': 9.424}, {'end': 895.43, 'text': 'and you can show other people how to use it by showing them this code,', 'start': 891.789, 'duration': 3.641}, {'end': 905.191, 'text': 'which is just the example code to get their images to spin by using your advanced external framework for rotate animations or whatever.', 'start': 895.43, 'duration': 9.761}, {'end': 909.952, 'text': "Okay, now we're going to discuss the pros and cons,", 'start': 905.211, 'duration': 4.741}, {'end': 917.294, 'text': "which is another thing that a lot of teachers or professors forget to do for their students when they're teaching them.", 'start': 909.952, 'duration': 7.342}, {'end': 931.632, 'text': 'object-oriented programming is explain the benefits and any negative effects that might occur from changing all of your code to procedural over to object oriented or class files.', 'start': 917.294, 'duration': 14.338}, {'end': 935.773, 'text': "So let's first talk about the pros which are the benefits.", 'start': 932.773, 'duration': 3}, {'end': 939.414, 'text': 'So it makes your code modular and easier to share.', 'start': 936.313, 'duration': 3.101}, {'end': 948.956, 'text': 'So, like you saw how I took that class and made it into a separate class file and was able to include it into my application and use all of the code within it.', 'start': 939.774, 'duration': 9.182}, {'end': 952.418, 'text': "So that's how it makes your code modular and easier to share.", 'start': 949.696, 'duration': 2.722}], 'summary': 'Creating a modular class for rotateanimation.js allows for easier code sharing and modularity.', 'duration': 71.724, 'max_score': 880.694, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/coIsvOMYEi0/pics/coIsvOMYEi0880694.jpg'}, {'end': 1043.778, 'src': 'embed', 'start': 1016.036, 'weight': 0, 'content': [{'end': 1023.224, 'text': 'anybody who teaches object-oriented programming bring up this point about avoid value collisions,', 'start': 1016.036, 'duration': 7.188}, {'end': 1030.892, 'text': "because it's a very important topic that is a good feature of object-oriented programming and good benefit that teachers never address.", 'start': 1023.224, 'duration': 7.668}, {'end': 1034.914, 'text': 'Now it makes your specialized functions reusable.', 'start': 1031.713, 'duration': 3.201}, {'end': 1043.778, 'text': "So if you have a script or you have a website and on that website there's going to be five different pages that use a certain function,", 'start': 1035.335, 'duration': 8.443}], 'summary': 'Object-oriented programming avoids value collisions, making specialized functions reusable.', 'duration': 27.742, 'max_score': 1016.036, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/coIsvOMYEi0/pics/coIsvOMYEi01016036.jpg'}], 'start': 833.04, 'title': 'Object oriented programming', 'summary': 'Discusses the benefits and pros and cons of object-oriented programming, highlighting benefits such as avoiding data collisions, modular code, easier sharing, and specialized function reusability, while considering drawbacks such as increased processing power and code bulkiness.', 'chapters': [{'end': 905.191, 'start': 833.04, 'title': 'Benefits of object oriented programming', 'summary': 'Discusses the benefits of object-oriented programming by explaining how it helps avoid collisions in data handling, especially in simultaneous data processing, and how it enables packaging code into class files for easy reuse, exemplified by the rotateanimation class.', 'duration': 72.151, 'highlights': ['Object-oriented programming helps avoid collisions in data handling', 'Packaging code into class files for easy reuse', 'Example of using advanced external framework for rotate animations']}, {'end': 1262.411, 'start': 905.211, 'title': 'Pros and cons of object-oriented programming', 'summary': 'Discusses the benefits of object-oriented programming, including modular code, easier sharing, value collision avoidance, and specialized function reusability, with the drawback being the increased processing power and code bulkiness, emphasizing the need for a good reason to use it.', 'duration': 357.2, 'highlights': ['Object-oriented programming makes code modular and easier to share, allowing for specialized functions to be reusable and avoiding value collisions, which is rarely addressed by teachers.', 'The only drawback of object-oriented programming is the increased processing power and code bulkiness, emphasizing the need for a good reason to use it.', 'Object-oriented programming allows for specialized functions to be reusable and avoids value collisions, which is rarely addressed by teachers.', 'The only drawback of object-oriented programming is the increased processing power and code bulkiness, emphasizing the need for a good reason to use it.']}], 'duration': 429.371, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/coIsvOMYEi0/pics/coIsvOMYEi0833040.jpg', 'highlights': ['Object-oriented programming makes code modular and easier to share, allowing for specialized functions to be reusable and avoiding value collisions, which is rarely addressed by teachers.', 'Object-oriented programming helps avoid collisions in data handling', 'Packaging code into class files for easy reuse', 'The only drawback of object-oriented programming is the increased processing power and code bulkiness, emphasizing the need for a good reason to use it.', 'Example of using advanced external framework for rotate animations']}], 'highlights': ['Understanding the accessibility of properties and methods within a class, exclusively accessible within the class (100%)', 'Providing insights into setting up properties and creating methods in a class (90%)', 'Explaining the dynamic nature of methods as dynamic functions owned by the class (80%)', 'Highlighting the ability to supply dynamic arguments within the methods of a class, enabling the coding of instances with multiple arguments (70%)', 'Introduces the basic syntax for creating classes in JavaScript', 'Demonstration of resolving collisions in variables through object-oriented programming', 'Successful implementation of a class to achieve the desired cog movement', 'Object-oriented programming makes code modular and easier to share, allowing for specialized functions to be reusable and avoiding value collisions, which is rarely addressed by teachers', 'Object-oriented programming helps avoid collisions in data handling', 'Packaging code into class files for easy reuse', 'JavaScript frameworks simplify learning by encapsulating complex code (Relevance: 5)', 'Instructors often fail to demonstrate practical usefulness of OOP in JavaScript (Relevance: 4)', 'Many fail to recognize practical benefits of OOP in JavaScript (Relevance: 3)', 'Application will not work unless coded as a class file (Relevance: 2)', 'Emphasizes OOP as a necessity for certain applications (Relevance: 1)', 'JavaScript is a classless prototype-based language with special syntax for achieving OOP features seen in other languages like C++, C, Sharp, PHP, Java, Perl, and Python', 'JavaScript lacks a class statement like other languages, but it is still possible to create class-based code in a different manner', 'The chapter discusses the benefits of OOP in JavaScript', 'Mentions the possibility of covering more advanced topics of OOP in future videos', 'Emphasizes that OOP is simply a style of programming and not always a requirement of your application', 'The chapter introduces the most basic syntax of a class in JavaScript for object-oriented programming', 'Creating instances, accessing properties and methods, and running methods with arguments', 'Specific code examples and alerts', 'The only drawback of object-oriented programming is the increased processing power and code bulkiness, emphasizing the need for a good reason to use it', 'Example of using advanced external framework for rotate animations', 'The necessity of object-oriented programming and class files in a JavaScript application', 'JavaScript is a classless prototype-based language with special syntax for achieving OOP features seen in other languages like C++, C, Sharp, PHP, Java, Perl, and Python', 'JavaScript lacks a class statement like other languages, but it is still possible to create class-based code in a different manner']}