Java and JavaScript – they sound similar, but they're actually very different

java-vs-javascript-lotbd.xyz

What is up my beautiful people out there I am Brandon a full stack developer in Brooklyn New York and today I'm going to be talking about the difference between Java and Java script first off.  Are they similar. No. It's hard to believe but they're actually not similar at all the only similarity that happens the fact that Java is in both of their names why do they both have the word job in their names well that's the first thing we're going to be talking about this video today. Their history their history as well intertwines the most what else am I going to be talking about this for you today well defining features of each language that will be mostly syntax I'm also going to be talking about you can build both languages and the current hiring in Java Java script so without further ado. Let's get into it intro video good which the only reason I'm covering this topic today is because of the simple fact that the letters J. A. B. are the need Java script aside from that there's really no reason to pick these 2 to compare while this video is Java versus Java script I could have just as easily created a python versus job script video for a doughnut verses to read a video both words have the letters DO in them and both are equally delicious but the person doesn't really make any sense you're not even the same snack category though they're both considered snacks the same thing could be said about Java and Java script they're both programming languages but they're not in the same category of programming languages though in recent years the things you can build with them have been converging specially with Java scripts recent breakout framework no J. S. they are definitely vastly different but alas here we are of all the things that we're going to be talking about today that are considered similarities this is the 1 that you're twice the 2 languages the most their history the first let's start with Java Sun Micro-systems released the first public implementation of Java in 1996 Java was actually originally designed for interactive television which is pretty sweet. But it was too advanced for the digital cable television industry at the time. However it eventually found its sweet spot in dominating the world of server side programming in a nutshell server side programming is the part of an application humans don't directly interact with for instance the part of the mode that keeps track of your running ballots and calculate your due balance when you're stingy friend finally pays. Java script was created by Netscape the company responsible for the first popular web browser in 1995 and was written in a total of 9 days it was originally named mocha later renamed alive script and then finally took the name Java script it was to be a simple language that would be directly embedded in the each 12 website just like CSS but we're CSS added some formatting and colored websites Java script added some much needed dynamic interaction HTML CSS and Java script made up the tree sector of the weapon they powered websites each developing structure CSS being the decoration and Java script being the direction for the first few years of its existence let's keep reign supreme in the world of web browsers but with the Seattle children suffer company Microsoft released its version of web browser internet explorer Netscape got a little scared because internet explorer was super popular this March beginning of what's referred to in internet history as the first browser wars. It would be putting it lightly to say that the nets keep people were freaking out so what they did is they approach the Sun Micro-systems people the people who created Java and they hash out a deal where they change the name of the language they'd be developing for the web browser called mocha to Java script under a license agreement in exchange for collaborating with sun to incorporate sons programming language Java to run inside the web browser Netscape. Let's keep did this because it needed to throw everything it could at Microsoft in order to stop the onslaught so Java seemed like the new hot thing on the flip side of the deal sun Microsoft agreed because it's all the internet and web browsers as a potential future platform for Java apps next up let's talk about the defining features of Java and Java script Java is a statically typed language Java script is a dynamically typed language when you boil that tackling go down it means that declaring variables in Java is much more rigid than in Java script let me see what I mean notice how I'm declaring these variables in Java here I have this name variable up top and it is a strict notice how I a little we have to say that the type of value that's going to be stored inside the name variable will be a string. There is a bench press I have to specifically declare that an integer we'll be safe to bench press and for my string array notice how the streaming bracket thing that represents that I'm creating an array and it's going to consist of a bunch of strings in Java you have to specify the types of values you're going to be saving to a specific verbal not only that but what you declare that variable is a particular type of data a string for this example it must remain a string for its entire lifetime for instance if I wanted to set the value of New Jersey legend to an integer 3 I can't do that job. Now compare that to Java script which is a dynamically typed language you do not have to specify the types of data you're saving 2 available now does your how there's nothing about a string being saved in name it's simply a variable name same with bench pressing with my string array not only that but Java script variables can be reassigned to values with different data types so last name could easily be changed to a value for I don't know why you want to do that and again if you want to change that last name variable back to have a value the string you could totally do that the Java script allows this yeah a. No Java script is considered a prototype based object oriented programming language meaning you're not bound to it could pattern like you are with Java meeting you have to jump through a lot less hoops in Java script and you do its job for example let's try printing out a simple phrase in both languages. Here's a bag of cheese girls in Java to do a lot first things first you're forced to use these things called classes to do anything classes serve as reusable templates to produce objects objects are just these types of data structures we use in programming to store information. We use objects and classes and programming to model real life situations in our coding world that we're creating for instance every website has probably E. user class or user bottle that we use to kind of model what it's like to be a human being in the real world but on our website so for instance we would use a user class to produce user object to see it in our database for a website so every user modeled after a real life you know me you being a human being user situation I have a first name and you know I have an appearance have a profile picture what do I look like on your website. I have a birth date and I have a password to log in to use your website so back in javelin were actually forced to create these templates are these classes in order to create one instance of a particular thing so for instance let's say we're creating a dog class so first we must build that dog factory and then from that factor we can build individual instances of dogs which have you know generally speaking the same attributes but different value for those attributes dogs have different names dogs of different breeds dogs have different ages center center Java requires a lot of code to do something as simple as printing out here's a bag of cheese curls you'll notice that this red box represents this outer public class cheese curls rapper thing this is what's known as the class declaration. Remember how I said the job is a class based object oriented programming language class based means that you literally have to wrap everything you ever want to code in in a class like this. Inside that required class decoration we then creating another function that will automatically get called winter coat fronts then inside that function what we want that main function to do we want to print out to our system here's a bag of cheese curls so the red signifies this kind of class required rapper that Java code must be written in the blue box here represents the function that will get automatically called when our code is run and then what do we want our function to do well inside this yellow box for defining print out here's a bag of cheese curls they don't need to understand the actual syntax what I'm showing you I just wanna show you that there's a lot they have to do just print something as simple as yours back Jeez cross you have to jump through all of these different hoops just to do something very simple Dr interested in learning what these words actually mean in the Java language I've included a little dictionary here and we also offer a course on coop can be.com covering the basics of Java and a link to that description below as well compare that to the simplicity of Java script the goddess no need to wrap this thing in a function inside a class rapper we can just write the thing we want to happen in one line right here. Now recently Java script actually updated to include this kind of similar class construction that we see in other languages other class based object oriented languages like Java but in no way is Java script bound to this construction like job is. Again you don't need to understand what's going on here you just need to know the Java script is much less verbose not about to say is the massive generalization and that's why I'm labeling it as such to all my more advanced programmers out there before I get shredded to bits in the comments but in this way I think Java script is much more forgiving than job earlier on in the process of building out an application why do I say early on in the process of building an application because once you've jumped through all of the job induced hoops one could also argue that job is lack of forgiveness means it's less prone to bugs in the long run compared to Java scripts in other words job applications take a lot more time to get off the ground but once you've kind of set that structure up for application the upkeep effort is much less compared to the Java script application whose initial time to just spend a simple application up is relatively easy relatively straightforward that being said the level of upkeep required for Java script application increases as time passes to reiterate what I'm arguing Java it's always a slow start but it has a very stable future compared to Java script which is very easy to get off the ground but once you have it off the ground you have this massive application the upkeep is kind of annoying here's a very popular question what can you build with Java and Java script. The thing with Java is it never really came to dominate the desktop or web applications fear though it can be used for both no it does dominate specific industries and specific technology verticals including the androids fear many massive industries requiring a very stable language use Java like banking trading the automobile industry Java can also be used for scientific computing and it's also used as the language for just general purpose programming of hardware like the internet of things like the raspberry pi or a solos speaker or the refrigerator that's connected to the internet things like this no drop script was originally limited to the web browser it was kind of seen as a toy language the beginning it went hand in hand with HTML and CSS and these were just languages used to create websites originally it was used to add a dynamic aspect otherwise very static and boring websites meeting it was reserved for the front end of a website only the part of the website that a human being Iraq's with you know with their mouths and their or their track-pad and clicking on things and things would happen that being said after years of open source development there are huge robust libraries out there that can extend the capabilities of Java script including no J. S. which allowed developers to finally use Java script outside the environment of the web browser and this is been the new hot thing for start ups these days things like Facebook things like Twitter things like Airborne they all use this double J. S. Java script framework to power their businesses and their technologies in terms of hiring Java is preferred in the computer science and enterprise business community but Java script is the new and fresh that start up businesses like uber Netflix they're all making this massive push for Java script based technologies but large enterprises that have been around for years things like the banking industry the automotive industry Java is kind of your choice for those reasons job it pays better the Java script according to the website challenge rocket now click a link to that article below job requires more time to learn the ins and outs of the language. Java scripts that being said the technology world is definitely paying attention to Java script Java pays definitely more right now but who's to say the Java scrip developers won't be demanding the same amount of pay that Java developers kit in the near future are you folks so that is it for this video today that was a very high level view of the difference between Java and Java script but before I go I do want to kind of do a little recap here so in terms of history of Java and Java script very very intertwined relationship at the beginning Java script needed to ride the waves running Java hopefully squash Microsoft web browsers internet explorer the job of people saw web browsers and Netscape as a potential platform for jobs future. In both languages handle different things Java script was able to add some interactivity to web sites job was to be used for interactive television but to work out they did eventually find their sweet spot in the form of server side computing in terms of defining features Java is a statically typed object oriented language meaning you need to be explicit with the things you declare and you can't change the values of certain variables you're also forced to use class. Java script has object oriented capabilities we're not forced to use this classes like you are Java script what can you build with both of them will Java is better for larger scale projects in enterprise software because they can handle more data more computing it's more stable and it's currently used in the new internet of things movements. Java script was reserved for the front end of websites in the past it went hand in hand with each Devin CSS to kind of adds interactivity to otherwise receiver websites semi recently you can now use Java script through no J. S. to build applications outside the environment what browser so Java script is no longer reserved for the front end aspect of websites you can now use it to build up the back into going to the website in terms of hiring Java still pays more per job script that's the Punjab script it definitely has all the momentum at this time. Okay so that is it I will see you in the next one bye bye.

#JavavsJavaScript #DifferenceBetweenJavaAndJavaScript #JavaScriptvsJava #JavaTraining #JavaProgrammingTraining #Intellipaat

*

Post a Comment (0)
Previous Post Next Post