February 12, 201610 yr I am understanding why we need HTML and CSS, I've mostly been using that for the time, it's quite easy to understand why we need it. But many other things in web development, I wonder what the employer would use it for? What would be the best use of the language? Let's say js for example, I know it can modify data, I know it can do many things and affects the behaviour of the website and that without it websites would not include various functions that they do, they would be just websites with styled pages, nothing interesting. Closures from what I understand are functions inside functions that save the environment of the outer function, but when is that ever needed? And why would you use an IIFE, from my understanding they allow you to call the function without assigning it to a variable, when is that used? I also understand why GIT is useful, when you are working on large projects you need to be able to have version control and not step over team members toes ruining their work. But things like the js frameworks, what exactly is that useful? And why do companies use it? They say node.js is becoming popular but why? I would like to know why they would make the decision of that language over anything else, what does it allow you to do? So far all I can think of when node comes to mind is a framework that increases the website speed by allowing non-blocking code, so that when one service runs, the other doesn't stop it. Are there good examples of where this is used? Also with angular.js, i've never really understood why that was popular. You have many directives that allow you to do different things, like ng-click would register a click and you could use ng-hide or ng-show to hide or show it, it also allows you loop through Js Objects with ng-repeat which is useful if you want to add a load of data to a page etc. But what is that actually used for in web development jobs? A lot of the tutorials explain how to do this, but they do not explain where it is popular to use it, for a beginner looking at SQL, it's quite simple you need a language to manage databases, store information about passwords, names, etc. Some languages and frameworks are not so quite explanatory, other than js affects the behaviour of the website, it's easily misunderstood why it's popular, when it's used, why is it the main language of the web? Edited February 12, 201610 yr by NullDrone
February 12, 201610 yr Closures are useful because it allows you to create modules where variables are scoped to that module only but then certain variables you can expose to the outer world this is why it's useful. Putting everything in the global scope is a recipe for disaster. Google 'JavaScript module pattern' They are also necessary for callbacks / promises which allow for asynchronous programming which is necessary if you are doing things using Ajax or backend stuff with Node - else you want things to run at a snails pace. Frameworks are useful because they abstract away things allowing you to build applications much faster. Things like React have much higher performance as it uses it's own virtual DOM which it then diffs against the real DOM for minimal changes to the real DOM. It also has many other benefits such as promoting component based coding and so forth. I am not a fan of Angular, but it does speed up development of a JavaScript heavy app. These frameworks are used more on web-apps as opposed to basic information style websites. Node is popular on the server because of our friend closure. Asynchronous requests typically allow things to run much faster as it is non-blocking unlike PHP, Java etc. It also means there is no context shifting between front and backend which are becoming blurred when it comes to JavaScript - so it's nice to have all the business logic in a single language. This also allows for modules that can execute on both the server and the client side, say form validation. So you only have to write and maintain one single script. Edited February 12, 201610 yr by rbrtsmith
February 12, 201610 yr Previous response summed everything up pretty well. Angular is one of those things which some people feel they MUST learn because they hear a lot of buzz around it, that's when you end up with simple business websites being built using Angular - which makes no sense at all. JS frameworks are often more useful when you're dealing with web applications (SPA / "single page applications") rather than traditional websites (MPA / "multiple page applications"). Interaction with a SPA is closer to how you would interact with traditional computer programs and we have plenty of SPA's being developed these days for everything from SaaS to internal tools. AngularJS is one of those things which makes more sense once you actually need it and at that point, you'll realise just how much time it can save you and how useful it can be.
February 12, 201610 yr ...Angular is one of those things which some people feel they MUST learn because they hear a lot of buzz around it, that's when you end up with simple business websites being built using Angular - which makes no sense at all... Indeed! It can be an overkill. -- Robert summed it all, really, I only want to add that sometimes companies don't understand that if you know the language behind the framework, you'll be able to grasp it in no time. It's a common misconception - of course, it's great to have experience with the relevant framework / platform / technology needed, but a good understanding and experience with the language behind is very important.
February 12, 201610 yr The problem I have with Angular it is a big monolithic framework, you spend a lot of time just learning angular directives and all that - investing a lot of time into something that right now is already starting to loose favor to the React(ive) way of doing things. React on the other hand is just the UI, meaning it can be paired with other libraries to handle the state of the application which is clearly way more flexibile. JSX is also a real godsend and you also no longer need to worry about event handler lifecycles is a great thing. React also forces you to think in terms of components, which is a far better way to build an application that the monolithic approach.
Create an account or sign in to comment