"JavaScript has strong object-oriented programming capabilities" What would be an example of a language with weaker OOP capabilities? PS: "The bad parts" section did not fit the page?
Java would be an example of a language with weaker OOP capabilities. Javascript can emulate classic OO inheritance and it also supports prototypical inheritance. Crockford covers this in his Good Parts book, and you can find stuff around the web.
JavaScript: The Right Way
121–130 of 136 posts
Re: JavaScript: The Right Way
#122Is there a "too clever" mentality in frontend web dev culture of late? An overly fragmented workflow toolset? Not sure the cause, perhaps the influx of engineering "computer science disciplined" brains into the frontend world. Or a panicked competitive race to achieve a nirvana dev environment. Or a tendency to think that workflows for large websites with countless modules is the best workflow for a one-page web app.…
I think that's a naive way of thinking about the problem. Do people write rich server-side web apps in Plain Ol' Python? Of course not. Why reinvent the wheel? For a tiny app, sure, maybe it's not so bad to just use jQuery. But if you're working on something with a very rich front-end architecture, a framework gives you a very necessary...er...framework to use to eliminate boilerplate and organize your work. Not only…
This debate feels loose. We are lucky to have so many options. It all depends what project you're working on.
I prefer rich possibilities in design and functionality rather than rich possibilities in minimising how much I have to think/solve/innovate. I don't want a crutch, I want a turbo boost of creativity in web development... and that comes from hard work, not automating your life.
These tools are often about slapping the same old stuff down day in day out. Where's the fun in that?
Am I re-inventing the wheel? Spreading boilerplate code around in a mess? No I am not. My boilerplate code is nicely organised and easily deployed thanks very much! And the wheels.. well, the wheels I make are lightweight, and I know and trust them inside out. They're my wheels. I made them, and they stand out from the crowd.
Re: JavaScript: The Right Way
#123Is there a "too clever" mentality in frontend web dev culture of late? An overly fragmented workflow toolset? Not sure the cause, perhaps the influx of engineering "computer science disciplined" brains into the frontend world. Or a panicked competitive race to achieve a nirvana dev environment. Or a tendency to think that workflows for large websites with countless modules is the best workflow for a one-page web app.…
> Just using plain JS with Jquery, and perhaps some additional smaller specific plugins/libraires, is enough to do a lot of cool stuff if we're talking "javascript" projects. Then just get a good editor and off you go. These new tools and frameworks are becoming numerous and popular precisely because for large, complicated front-end applications you can't just get away with using "plain JS with Jquery" without it bec…
Nonsense. Maintainability is all about good documentation, neat code, sensible peer-reviewed code, a good dose of manual testing and a healthy injection of personal responsibility in seeing the project be the best it can be for your users.
I test my work manually on a bunch of test devices and computers I own. It doesn't take long and I get to see any browser specific display glitches that automation tools wouldn't pick up. It's a no-brainer, and you LEARN about the nature of browsers by testing manually.
I hate bootstrap, don't use it. I've made big website templates with lots of traffic, and smaller components and other things. I don't want bootstrap in the mix thanks. Whenever I have to maintain a project which someone else started with bootstrap, I sigh and dive into the ridiculous use of simulated rows and columns, and the crappy CSS overrides meant to give us flexibility, but actually giving us not much at all.
So how do other developers like my work when they have to maintain it? Well, I leave them something SIMPLE and well documented to decipher, so they can get straight to work doing the maintenance and getting on with business. No learning curves of countless toolsets and pre-processing junk. Just the basics. I've had no complaints.
Frontend is very much concerned with visual elements and interaction. I don't know much about server side except for what I find behind the projects I work on and fetch with AJAX or other means... such and such data feeds, this or that outputs etc. I'm more interested in user interfaces and how a web app or webpage "feels". I know exactly what to do when something doesn't feel snappy, or a graphic flashes or renders poorly on load. I know what to do because I haven't sold my soul to a framework that promised me the world, but delivered mediocrity.
Each to their own.
Re: JavaScript: The Right Way
#124Earlier quoted context omitted.
Plenty of debate these days over whether to use an AMD-based loaders like require.js [1], or to bundle all your js into a single file with Browserify [2]. Worth someone new being aware of, but that debate can get rather complicated. [1]: http://requirejs.org/ [2]: http://browserify.org/
All of you are giving good advice but I just have to chuckle at how quickly you all proved OPs point.
Re: JavaScript: The Right Way
#125Having recently started getting into Javascript, I have to say it is the most confusing ecosystem ever. Learning the basics of the language is easy enough, but as soon as you start trying to create a non-trivial application, bam, you're hit with information overload - X framework, Y library. It's different from Python, Ruby et all because at least with them, there are good consistent popular choices that you can rely…
Re: JavaScript: The Right Way
#126Earlier quoted context omitted.
The most popular one right now is probably Angular. http://www.google.com/trends/explore#q=angularjs%2Cbackbonej...
As anther poster mentioned, search may not be an indication of popularity. Personally, I've used Backbone, Angular and now Ractive, and I spent at least 10x the time Googling when using Angular.
Re: JavaScript: The Right Way
#127Re: JavaScript: The Right Way
#128Having recently started getting into Javascript, I have to say it is the most confusing ecosystem ever. Learning the basics of the language is easy enough, but as soon as you start trying to create a non-trivial application, bam, you're hit with information overload - X framework, Y library. It's different from Python, Ruby et all because at least with them, there are good consistent popular choices that you can rely…
I suggest trying CoffeeScript if you want to a cleaner version of JavaScript. Not that that answers your framework question.
Re: JavaScript: The Right Way
#129Re: JavaScript: The Right Way
#130Earlier quoted context omitted.
Well let's define some terms here then. In the sense that I was speaking about, I was using "framework" as a synonym for "library". Not an entirely unprecedented usage. Underscore gives you array extras in every browser, even ones that don't have array extras. Mustache because let's face it, javascript doesn't have any nice way of doing templating or string formatting or anything. not without resorting to doing thing…
> Not an entirely unprecedented usage. Well, not a valid usage either given the context. From the examples you give, the only fitting one is Backbone, and even that it's stretching it a little (nobody uses the ES6 monitoring/reacting facilities directly atm, so it's not like Backbone gives them compatibility for them, it's like it provides them in the first place).
… a framework.