34
u/sunburned_goose > 0; Jul 28 '15
I went all in with Silverlight for several years, before HTML5 was a reality. It was a bridge that served its purpose well until we moved to AngularJS two years ago.
39
u/evertrooftop Jul 28 '15
By the time silverlight came around, it was already easy to create very rich javascript-based web applications.
If were talking about flash and 5 years earlier, you had a point... but I don't think there was ever a reason to do silverlight, unless you wanted to use their video components or heavy animation.
8
u/sunburned_goose > 0; Jul 28 '15
In Chrome, sure, maybe even Firefox but not in IE. SL filled that gap until we had enough features in all browsers, or polyfills to make IE8+ a feasible solution.
7
u/evertrooftop Jul 28 '15
fwiw we made pretty rich js-heavy applications, supporting IE6 (later making IE7 the minimum).
What kind of polyfills and features did you have to wait for?
4
u/sunburned_goose > 0; Jul 28 '15
I don't recall. I remember bi-directional communication being an important feature and websockets were not available. We could hack it in WCF with SL4 I think... It was also helpful for us to be able to write once and have it look great on Mac and Windows, regardless of browsers. A lot of developers were able to transfer their C# and NET skill sets into the SL platform. We were able to interop with products through COM interop when running out of browser (was hoping that would make it to MAC's scripting environment).
These are just some of the reasons why we went this path. I have no doubt you could make JS rich applications with IE6 & 7, but there was also a lot of effort being put into making those platforms work well with Chrome & FF. There was a lot of appeal in getting the same experience regardless of browser. We get that now (looking at you safari) with pretty good implementations across modern browsers.
1
u/evertrooftop Jul 29 '15
Long polling was an option for a long time, but I can totally see that being able to use existing skills can make for a good reason to pick silverlight at that time.
-2
u/dhdfdh Jul 28 '15
IE always needed gap filling. Still does.
1
u/karneisada Jul 29 '15
The current IE is actually pretty good.
1
u/dhdfdh Jul 29 '15
No it's not and far behind every other browser.
1
u/karneisada Jul 30 '15
I'm talking about Edge which is ahead of Safari and catching up at an astonishing rate. Hell Edge has as much ES6 implemented as Chrome last I checked. I'm an outright Microsoft hating Unix fanboy but IE has come a long way.
2
u/dhdfdh Jul 30 '15
You said IE, not Edge. Edge is virtually even with the current version of Safari. When you consider Edge can only manage to pull even with Safari, and still be miles behind Chrome and Firefox, that's not much of an accomplishment. And the next version of Safari is about to be released soon, too. Where will that leave Edge? The same place IE always was, bringing up our rear ends.
but IE has come a long way.
I've been listening to that crap from every disappointed IE supporter since IE7.
0
u/Paupir Jul 29 '15
The payoff here is that IE is quite fast and smooth and tends not to wolf down your ram like Chrome and Firefox. The dev tools are a lot better than they used to be too.
I'd like them to support Service Workers and Web (Install) Manifests, maybe even with some (proprietary?) API to make use of Live Tiles. That would be so cool.
Anyway, it's worth watching that space (as I've done with Firefox since I left it for Chrome), just to see.
(PS. Interested to see where Mozilla takes future Firefox with the announcement of potentially moving away from XUL and into open web technologies.)
0
u/dhdfdh Jul 29 '15
The payoff here is that IE is quite fast and smooth and tends not to wolf down your ram like Chrome and Firefox.
And it can't do anything those others can either.
The dev tools are a lot better than they used to be too.
Being better than shitty is nothing to brag about.
I'd like them to support Service Workers and Web (Install) Manifests, maybe ...
You're proving my point about how crappy IE is.
0
u/Paupir Jul 29 '15
And it can't do anything those others can either.
That vast hyperbole. It can do a lot of what the others can do (particularly concerning Edge which is as good as out now). If you're developing for current IE, chances are you're including polyfills for certain things anyway, because it will have only been recently that the other browsers received them.
Stop hating it because you think it's cool to hate.
Being better than shitty is nothing to brag about.
Yes it's nothing spectacular if that's what you're trying to say. It's software. It works. Has much of what you'd expect to find in dev tools even when you're used to Chrome. It's even pretty.
You're proving my point about how crappy IE is.
Haha. Service Workers are still brand new and the cache API that compliments it still needs polyfills in Chrome, actually. That part was just me hinting at Edge working like the WebViews you get on mobile, but where the internet is your marketplace.
I'm sorry if you think you're too hip to think IE/Edge can ever be a good browser. In the meantime, I'll happily concede that they've made great amounts of improvements and am looking forward to more.
0
u/dhdfdh Jul 30 '15
chances are you're including polyfills for certain things anyway
If you're using polyfills, chances are it's to get things to work in IE. Quit blowing smoke. Almost every hack and polyfill is created to fix IE. Been that way for a decade.
Stop hating it because you think it's cool to hate.
I started questioning the capabilities of IE when I was first introduced to Firefox version 0.8. Obviously you didn't look at or understand my earlier link. IE can't hold up to any other browser. Known. Proven. Verifiable.
Yes it's nothing spectacular if that's what you're trying to say. It's software. It works. Has much of what you'd expect to find in dev tools even when you're used to Chrome. It's even pretty.
That's the first time, EVER, that I've ever heard anyone say that about IE dev tools. Which tells me everything I need to know about who I'm communicating with.
Service Workers are still brand new
Yes, and yet, ServiceWorkers works in Chrome and Opera but will NOT work in IE or Edge where Microsoft is only "considering" it. And that's the horse you're trying to ride?
I'm sorry if you think you're too hip to think IE/Edge can ever be a good browser.
I've been hearing that crap about "the next version will blow [insert browser here] out of the water!!" ever since the announcement for how great IE7 was going to be. And then I've had to listen to people like you who can't read facts to find out how wrong they've been up to and including Edge.
→ More replies (0)
20
u/I-fuck-horses Jul 28 '15 edited Jul 29 '15
This is silly. Even a "few" years ago any sane person was able to deduce that proprietary technology had no chance - given that neither Adobe nor Microsoft managed to get any big partners, so they stood all alone. On the other hand, even a decade ago the mounting Javascript avalanche was pretty much clearly visible.
I for example had the exact same decision to make - and for me it wasn't just between the "web languages". I have a strong background in backends, large databases, clusters etc. - and I gave that money pit up going for the web platform. Deliberately - and I looked at nothing but Javascript and it was clear to me that on the server too that language would come to much more power, long before node.js was even out. It was obvious where the future lies. And it wasn't a monetary decision - I just find the web as platform much more interesting. And since Javascript on the browser was unbeatable, period, it was equally clear it would come to the server - the big guns in the business would not have a platform where you need a wild range of very different languages in the same system.
Note that "but web programming sucked" (I refuse to even talk to people who still have no idea how incredible a functional prototypical language is and claim "it still does"; the entire platform though had and has enough issues) is not an excuse. The contenders were not better.
It is NOT all random. Especially not in this case.
5
0
Jul 29 '15
[deleted]
9
u/Klathmon Jul 29 '15
Map(), Set()
Also if your application is limited by the performance of the data structures then don't write it in JS. (Unless you are just assuming it won't be fast enough, in which case actually test it first!)
Use the tool that's best.
0
Jul 29 '15
[deleted]
2
u/spinlock Jul 29 '15
It's too bad you can't extend js in c or something. When I want a really tight loop in ruby, I'll write write the function in c and compile it into ruby. That way you can optimize the code that needs it and still have the rest of the app written at a higher level.
1
u/Klathmon Jul 29 '15
You can on the server side, browser side is getting there.
With ES6 features like set, map, and typed arrays (basically near-raw memory blocks) you can get pretty insane speed from the browser too.
1
u/spinlock Jul 29 '15
I'm just upgrading my ember app to ES6 but its transpiled down to ES5. Won't that kill any performance?
Also, I've never had an easy time maintaining custom functions when I control the server. I can't imagine how had it would be on someone else's browser. But, hey, who doesn't like a challenge :)
2
u/Klathmon Jul 29 '15 edited Jul 29 '15
Yes and no.
Most JS engines will already use the same "backend" for stuff like Map and Set of you ONLY stick to some of those features, so by letting the features enforce it, the transpiler can generate code that helps "hint" the VM about what you are doing so it can choose the best underlying tech and get the best performance.
On the other hand many new ES6 features are very slow right now because they are "not optimized". Scroll down to the list of unsupported syntax here to get an idea of what will cause slower JS code, then review your transpiler output every now and then to see if any of those are creeping into your code.
2
1
u/Klathmon Jul 29 '15 edited Jul 29 '15
Well its much better today.
Also add in typed arrays and buffers in the browser as well. They are stupid fast when used correctly.
Also don't just assume that the data structures in JS can't keep up. It might take a bit more knowledge of how the underlying VMs work, but with some tuning its possible to get pretty damn fast speeds from normal JSON objects or arrays.
The VMs will do their best to use underlying performant structures when possible.
2
u/inspired2apathy Jul 29 '15
Wow, good to see things have gotten so much better. I still don't particularly care for the various JS inconguities/gotchas, but it's much more feature-complete than it used to be.
1
u/Ehdelveiss Jul 29 '15
I thought this was the purpose of JSON? Or am I misunderstanding?
5
u/jkoudys Jul 29 '15
You are, a little. There's two basic datastructures that nearly every js app is going to use: the Array, and the Object. An array is a little closer to its classic definition than, say, PHP's array is, but it's far from what an "array" is in C, and meant in general to represent any mutable dataset ordered by index. An object, conversely, has no predefined order, and it's just a hashmap (this is what JSON -- technically a separately defined format -- loads as). Even if you have an object
{a: 'foo', b: 'bar', c: 'baz'}, it technically has no order, and without logic around it to enforce the behaviour, you can't rely on property "a" coming before property "b".If you're in a language like C or Java, much of the syntax and libs are dedicated to defining data structures based on their low-level behaviour. The syntax in JavaScript is focused more on high-level behaviour: the logic that your datastructure should follow as observed by those calling it. So as a JavaScript developer, you can look at a fairly complex dataset defined in JSON, but it's not necessarily optimized to run very quickly for what you're doing.
I am noticing that this is changing quite a bit. In addition to the upcoming harmony datastructures /u/Klathmon mentions (Map and Set), there have also been
TypedArrays out for a while. These look more like traditional arrays, which simply define an extent (over an arraybuffer), and then the Unit8Array or Float64Array, etc. you define simply defines how to iterate it and compute offsets within the buffer. I'd recently started using it to do some low-level work in rewriting a gameboy emulator as modern es6 JavaScript with ReactJS, and these TypedArrays were perfect for modelling a memory space with 8-bit registers: https://github.com/jkoudys/ReactGB/blob/master/js/utils/emulator/z80.js#L43All that said, the v8 engine and its JIT can be downright magical, in both the best and worst possible ways. Sometimes it figures out exactly what you mean when you setup a more complex datastructure, and other times a tiny change takes efficient processing down to garbage. Probably the worst thing for it to figure out is in pruning trees and removing nodes -- downright trivial on a good C implementation, with simple pointers, but taking a large array (or even object) and deleting nodes can confuse the hell out of v8.
1
0
4
3
Jul 29 '15
I had doubts on silver light the day it was released. It had great video streaming but thats it.
3
u/smokinJoeCalculus Jul 29 '15
Today I learned that SilverLight wasn't just some sort of proprietary video playing library.
1
Jul 29 '15
Yea it was supposed to be a flash substitute, but it came so late to the game no one wanted to re-learn everything. It had an amazing video streaming system though, with auto quality degradation which made it very handy.
1
u/invalid_dictorian Jul 29 '15
I enjoyed watching NBC's 2008 Olympic web casts. I believe it was Silverlight based. That was pretty amazing for 7 years ago.
10
u/Spifferiferfied Jul 28 '15
Said no one ever.
0
Jul 28 '15
[deleted]
4
3
u/ryosen Jul 29 '15
Netflix used Silverlight because it had tighter DRM controls, which was a requirement placed on them by the movie companies. It also streamed video better and at higher quality than Flash. It wasn't their first choice, especially as it limited the platforms that they could reach.
0
-5
Jul 29 '15
Netflix is running Node now :D
10
u/Disgruntled__Goat Jul 29 '15
Huh? Those are two completely different things. Node doesn't do video and Silverlight doesn't do server-side programming.
4
u/Nategeier Jul 29 '15
@solarparade was just a commenting about how they are now using JavaScript on the back, not comparing Node to Silverlight.
1
u/Disgruntled__Goat Jul 29 '15
Their comment, in the context of replying to the comments above and in this thread, was saying Netflix have replaced Silverlight with Node.
2
0
Jul 29 '15
[deleted]
1
u/lachlanhunt Jul 29 '15
A lot of video streaming services use silverlight for the DRM. I currently work for a company that does. It sucks, but they still haven't prioritised switching to HTML5 video despite being forced to drop support for Chrome on Windows a few months ago, and Chrome on Mac last year.
2
u/Nategeier Jul 29 '15
Almost lost it relating to this. I was a Flash dev in its boom days. Bought the first iPad and knew it would never work out the first few weeks of having it. I then threw all in transitioning full flash and PHP enterprise learning management system apps to Node 0.6. Now that was a gamble.
2
u/WatchDogx Jul 29 '15
I never even installed the plugin in all this time, let alone decided to write something with it.
Seemed like a pretty obvious bad idea at the time.
1
u/morphotomy Jul 29 '15
Yea I remember there was like one video site back in the day that required silverlight. Never used it, and never installed the plugin.
1
u/sunburned_goose > 0; Jul 29 '15
This makes me wish I kept all that JavaScript I wrote in 2002 for Netscape Enterprise Servers and their SSJP's. There was some fine 'class-like' work done then for a content management product.
-2
u/Paupir Jul 28 '15
I don't understand why this comparison is made. It's not JavaScript specifically that won, it's the web platform. It just so happens that the standard language for the web is JavaScript.
Flash, Silverlight, Open Web. These 3 are comparable.
ActionScript, A .NET language, JavaScript. These 3 are comparable.
7
u/alamandrax Jul 28 '15
I think this is more of a mean-spirited joke (read circle jerk) rather than an accurate representation of the language/tool.
It helps me pat myself on the back for pushing my company into going all in on JavaScript as opposed to the other company that I got an offer from that wanted to go all in on Flex.
1
u/Paupir Jul 28 '15
Yet you hear people making this comparison as fact- particularly when HTML5 was a bigger buzz word. Then the more simple minded consumers start repeating it and people get confused, thinking JavaScript === application framework. All "Dude, JavaScript is so slow! It lags my browser so much!" because they're thrashing the DOM or something.
Someone has to point out the difference, especially when many inexperienced/young developers come to this subreddit. It's like when an employer is interviewing a potential employee, they ask what languages they know and the reply is "I know jQuery!".
1
u/alamandrax Jul 29 '15
It's a frustrating experience for sure; but I think of it as being similar to telling my parents what I do and why I get paid as much as I do. They are impressed by the numbers involved but clueless as to how there is any complexity in what I do.
1
-1
0
Jul 28 '15
[deleted]
5
u/sgoody Jul 28 '15 edited Jul 28 '15
How did that work out for you? Was it Symphony?
I'm quite a fan of XSLT, even though that's an unfashionable opinion now.
EDIT: Symphony rather than Symfony.
4
u/lechatsportif Jul 28 '15
Agreed. It's power was never really appreciated.
2
u/NoddysShardblade Jul 28 '15
It was powerful, just undebuggable.
Yet I still see XSLT on job ads and resumes these days...
2
u/lechatsportif Jul 29 '15
This is fair. "You have to be able to debug at the level of abstraction". This was something a lot of xml technologies never got quite right.
1
3
u/jkoudys Jul 29 '15
Academically speaking, XSLT is absolutely fantastic. The entire concept suffered purely because of poor implementation, and a lack of casual users. I'd tried a couple years ago to rewrite big parts of my CMS's templating into XSLT. It sounded like a simple idea in theory: it was an MVC CMS, and it already had controller logic that was setting a bunch of variables in the controller, and rendering them all in simple views. I'd just build a DOMDocument instead of setting those variables, then apply XSLT to it.
I still think it should have been that easy, and nothing about the basic concept of XML/XSLT should have prevented that, but in practice it was ridiculous. Every damn element, namespace, and parser had some absurdly strict requirement against it, and if you didn't have the exact-right character encoding on the exact-right element, with a perfectly-defined, 300 character root element, use a bunch of undocumented arguments on your parser, and covert back and forth in the same block from a DOM to a string just to concatenate some XML string elements into it (because your lib doesn't support html5 -- wtf?), you'd be met with an incomprehensible pile of very alarming, completely not-helpful errors.
I spent 3 weeks working 14 hour days, and at the end had nothing to show for it, but I still don't think it was a waste of time. The basic concepts are excellent and I really learned a lot about templating, even if it was completely a theoretical exercise as the actual implementations were all terrible. It really helped me see why good templates ought to be compositional -- the big push in XSLT land is away from filling templates with branching control-logic, and instead define templates as composed of templates composed of other templates.
This is the same approach taken in my favourite templating lib, ReactJS, except that instead of having an XML tree which renders via a bunch of XSLT templates, you have a state (usually a JS object) that rendersvia a bunch of ReactJS components. If you use JSX, then React is even XML-ish, too. They basically took out everything that made XML/XSLT suck, and built an awesome system that is everything XML/XSLT aspired to be.
3
Jul 29 '15
Yep, it was Symphony. The big-picture architecture of Symphony is great, but using XML and XSLT is just not really necessary in this day and age. There are (or could easily be) simpler declarative templating layers. But the concept of clearly defining the semantic data layer from a declarative presentation layer is brilliant, and I wish there were similar systems using simpler DSLs.
It worked out well until I decided to leave the company, at which point they promptly switched to Wordpress, since they had no chance of finding a decent XSLT developer.
3
u/aequasi08 Jul 28 '15 edited Jul 28 '15
Symfony isnt a CMS
edit: downvoted for correcting someone? Stay classy.
7
2
51
u/lostPixels Jul 28 '15
In my experience, Flash and Silverlight developers tend to make much better Javascript developers than people who have only done Javascript since the early 2000's.