Simon Willison’s Weblog

Subscribe

Items tagged webdevelopment, javascript

Filters: webdevelopment × javascript × Sorted by date


Are traditional web frameworks and languages like RubyOnRail, Spring Boot and PHP dying now when new fast reactive pure JavaScript frameworks and services like Meteor, Node, Angular 2.0 and Firebase are breaking ground?

No.

[... 40 words]

How does one decide which Javascript framework (e.g. Node, Backbone, Angular) to use on any given project?

If you are just learning JavaScript, I suggest trying to work without any frameworks or libraries at all. Starting with something like Angular will make it much harder for you to learn the core language and browser APIs.

[... 137 words]

In simple terms, what is node.js?

It’s server-side programming, like PHP. The language you write the server-side code in is JavaScript (specifically the JavaScript version supported by Google’s V8 JavaScript engine, which was originally written for the Chrome web browser).

[... 46 words]

What is the most succinct definition of a JavaScript callback, being more elaborative than simply “A function that calls another function.”?

A way of saying “once you’ve finished doing this, do that”.

[... 38 words]

Should a beginner to web development start out with Node.Js?

Maybe. One of the things I like about Node.js is that the raw abstraction it provides over HTTP is much closer to how the actual protocol works than the abstractions provided many of the more widely used frameworks such as PHP, Django or Rails. That might actually make it an effective learning tool—I’d be interested in hearing from some web developers who learnt Node.js as their first server-side technology.

[... 87 words]

How can you run image processing in cloud code (Parse) ? If parse is not the best

There are dozens of web-based image resizing APIs that could help with this. Check out http://www.imgix.com/ for example.

[... 42 words]

How do I get started with node.js?

You don’t run Node.js in a script tag on your website. Node is a technology for writing servers in JavaScript—you can think of it as a replacement/alternative for PHP, Python, Ruby, ASP.NET etc.

[... 58 words]

What are the strategies for a front end developer to keep up to date with the emerging technologies?

Step one: find developers who you respect and subscribe to their blogs, follow them on Twitter/Google+/etc and try to understand what they are talking about and what they think is exciting.

[... 139 words]

If I study HTML5, can I avoid having to learn javascript?

Many of the most exciting new features that fall under the term HTML5 only make sense in the context of JavaScript—things like Canvas, Web Workers, AppCache and so on. So no, you can’t learn HTML5 properly without getting familiar with JacaScript.

[... 60 words]

Can you mark items on a website as ’unread’ without cookies?

It’s not very exciting, but CSS will let you set different styles for visited vs unvisited links and the technique has worked reliably since the mid 1990s.

[... 44 words]

How difficult is to to learn a language framework, like node.js?

The answer varies enormously depending on the language and the framework. Some frameworks are very easy to pick up, others are harder.

[... 162 words]

How do you change page content and URL without reloading the whole page?

This can only be done using JavaScript. You use XMLHttpRequest to pull in new information from the server (also known as Ajax—most people use a JavaScript library such as jQuery to handle this) and then use the HTML5 history API, in particular the pushState method, to update the URL.

[... 133 words]

How long until Ruby developers are as cheap as PHP developers? is it already happening? should I still learn it or it only has a couple years left and I’m better off with SSJS?

If you want to be a highly paid engineer, you should worry less about your expertise in a specific language and more about developing broad and deep skills across a wider range of development topics.

[... 197 words]

How is JSON different then a JavaScript (programming language) object?

JSON is a carefully selected subset of JavaScript. A JSON object can only consist of dictionaries, strings, numbers (in JavaScript floating point and integers are treated as the same thing), lists, booleans and null. The spec on JSON.org is a good guide: http://json.org/

[... 119 words]

Is there a method to programmatically clear browser cache in JavaScript?

No.

[... 18 words]

Are there any performance drawbacks when rendering DOM views at runtime with JavaScript, rather than rendering server-sent HTML?

Yes, there is quite a significant impact on first-load performance. The browser has to pull down all of the linked scripts before it can display any content—if you’re using a library like jquery that’s a sizeable chuck of code that has to be loaded and executed just on its own.

[... 152 words]

Why do browsers allow cross-domain JavaScript to execute but not XMLHttpRequests?

It’s called the Same Origin Policy, and it’s principally about intranets. Imagine you have a URL http://intranet.corp/top-secret-...—and you then visit http://evil.example.com/ . If cross domain XHR was allowed the evil site could suck that secret document off your intranet without you realising.

[... 105 words]

Why do some websites implement their logout link as a form post via JavaScript versus a plain old GET request?

Probably because if you implement logout as a GET action, I can force you to log out of a site by tricking you in to visiting a page with an <img src="http://yoursite.com/logout/" width="1" height="1"> element on it.

[... 64 words]

What companies are using Node.js in production in Texas?

There’s a list on this page: https://github.com/joyent/node/w...

[... 23 words]

What is the largest production deployment of Server Side JavaScript?

I believe Flickr used to use Rhino for scripting the image processing (resizing, thumbnailing, sharpening) that was applied to every single uploaded photo. No idea if that’s still the case though.

[... 47 words]