Javascript Frameworks

Need help with an engine or coding not on the list? Need help with a game or the website and forums here? Direct all questions here.
Post Reply
User avatar
vitinho444
Posts: 2825
Joined: Mon Mar 21, 2011 4:54 pm

Javascript Frameworks

Post by vitinho444 »

While looking for jobs on the web industry, i found one application that said:
. Javascript Framework Addicted
What is there to know from javascript frameworks? I know some jQuery, if it counts... But other than that I don't know nothing about JS Frameworks.
My Company Website: http://www.oryzhon.com

Skype: vpegas1234
User avatar
Verahta
Posts: 441
Joined: Wed Aug 24, 2011 1:50 am

Re: Javascript Frameworks

Post by Verahta »

Jquery is a js library, not a framework. I'm new too, so I suggest searching this forum via search function and also googling about it until you have a more specific question in mind.
"In order to understand recursion, one must first understand recursion".
User avatar
vitinho444
Posts: 2825
Joined: Mon Mar 21, 2011 4:54 pm

Re: Javascript Frameworks

Post by vitinho444 »

I read IR more than once per day, I believe there isn't much talk around JS frameworks. Thanks for the correction that jQuery is a Lib, but it's in fact both, according to wikipedia that says jQuery is a framework.

I created this thread so that IR community could give me their recommendation on where to start with JS frameworks.
My Company Website: http://www.oryzhon.com

Skype: vpegas1234
User avatar
kaos78414
Posts: 507
Joined: Thu Jul 22, 2010 5:36 am

Re: Javascript Frameworks

Post by kaos78414 »

I'm big on JS frameworks. In fact, I got my current job on the basis that I would convert their existing systems to one-page apps ala Angular (although we've since chosen to go with Ember). I would do some reading around on stackoverflow and github - or just dive in and start using one. It helps to know the "whys" of frameworks, I think we talked about this in another thread where you mentioned wanting to pick up a PHP framework. Using a PHP framework like Laravel for a while you will start to pick up on dependency injection and writing tests - these are important reasons why I enjoy Angular. It basically takes your javascript and makes it clean, testable, and a joy to work with.

Most jQuery based projects I run across are a horrible mess of different document ready blocks spread out through the project hastily. Angular is nice because it enforces a bit more structure in the application. It's also fun to be able to sort of "extend" html through directives.

What do you wanna know about em?
w00t
User avatar
vitinho444
Posts: 2825
Joined: Mon Mar 21, 2011 4:54 pm

Re: Javascript Frameworks

Post by vitinho444 »

Well I can see now that AngularJS is a pretty solid choice.
One of the main questions (like in the other thread) is Is it worth it for small projects?
Thinking out loud I start to think that most of my JS scripts is jquery effects (show, hides etc), and one small part is AJAX, the rest I don't touch JS as I don't use it (Or maybe I'm missing something :D). Like PHP Frameworks I wanna learn them to make my skills-tree bigger and thus being easier to find a job in the future.
My Company Website: http://www.oryzhon.com

Skype: vpegas1234
User avatar
Jackolantern
Posts: 10893
Joined: Wed Jul 01, 2009 11:00 pm

Re: Javascript Frameworks

Post by Jackolantern »

jQuery is definitely a library, and not a framework. The difference is that with a library, your code calls the library. With a framework, the framework's code calls your code.

JS libraries:
jQuery
MooTools
Prototype
Underscore
Lo-dash

JS frameworks:
AngularJS
KnockoutJS
Backbone
EmberJS
Knockback
Batman
The indelible lord of tl;dr
User avatar
vitinho444
Posts: 2825
Joined: Mon Mar 21, 2011 4:54 pm

Re: Javascript Frameworks

Post by vitinho444 »

I got it now, Wikipedia... you failed.

I'll check Angular since I've heard the name sometimes.
My Company Website: http://www.oryzhon.com

Skype: vpegas1234
User avatar
Jackolantern
Posts: 10893
Joined: Wed Jul 01, 2009 11:00 pm

Re: Javascript Frameworks

Post by Jackolantern »

For a while Backbone was where it was at, from about 2010 to 2012. Backbone is initially the framework that really started the JS framework frenzy, and it is still used a bit in the enterprise, but that is fading fast. Then Angular blew up and for a while it looked like it was going to be a dog race between AngularJS and Ember.js, but Ember fizzled out pretty fast. The industry standard now is pretty much Angular.

The only framework that is/was really putting up a fight is KnockoutJS. That is because a Microsoft employee created Knockout, and while it has never been an official Mictosoft product, it has enjoyed a lot of support. MS has sponsored training workshops and built tooling into Visual Studio for it, so you still see a lot of .NET jobs requiring Knockout experience.

However, that may be shifting now as even Microsoft has sought to bring Angular more into the fold of VS due to its massive market dominance.
The indelible lord of tl;dr
User avatar
kaos78414
Posts: 507
Joined: Thu Jul 22, 2010 5:36 am

Re: Javascript Frameworks

Post by kaos78414 »

The thing that Angular enables and really excels at is creating "apps." I say apps because most websites function in the classic style - almost everything is processed server side, including creating the view (think <?php echo $var; ?> in your views). Stacks involving Angular usually flip that around, and most of the heavy lifting is done via the client, and the server really only handles data and validation. This allows you to build a quick RESTful API for data, then hook up Angular and begin creating the real meat of your app. The result is a one page app that is very fast and fluid.

Having the client handle the views frees up the backend to be extremely fast - because the only thing it needs to do is send JSON data to the client, usually only processing the index view and (unless you use a CDN) serve up static assets.

The two major problems with choosing to build an angular app vary greatly depending on the application:

1. SEO is a bit harder to do right. Google's crawlers now execute javascript, but I have no idea whether Bing or others do. If SEO is something your app needs, you'll need to have a solution ready before moving forward I'd think. Discourse accomplished this by having a crawler friendly version of the site contained in noscript tags.

2. No legacy browser support. Namely it only supports IE9+ officially, although it isn't too hard to squeeze IE8 in there as well. This usually isn't a concern these days. My current company gets loads of traffic, and of the massive number of hits we get, 0.05% are using IE6. and <1% use IE7. So really, IE8+ is all you need, even for enterprise applications.

Other problems only start to arise with poor architectural decisions. These apps really need to be designed with Angular in mind. Take it from somebody who has done it - it's much more difficult to refactor a legacy application for use with Angular then to build one from scratch.
w00t
User avatar
vitinho444
Posts: 2825
Joined: Mon Mar 21, 2011 4:54 pm

Re: Javascript Frameworks

Post by vitinho444 »

The biggest question here might be if I really need to use this anywhere, or is it overkill.
I see that Angular is definitely the way to go there.
Jackolantern wrote:For a while Backbone was where it was at, from about 2010 to 2012. Backbone is initially the framework that really started the JS framework frenzy, and it is still used a bit in the enterprise, but that is fading fast. Then Angular blew up and for a while it looked like it was going to be a dog race between AngularJS and Ember.js, but Ember fizzled out pretty fast. The industry standard now is pretty much Angular.

The only framework that is/was really putting up a fight is KnockoutJS. That is because a Microsoft employee created Knockout, and while it has never been an official Mictosoft product, it has enjoyed a lot of support. MS has sponsored training workshops and built tooling into Visual Studio for it, so you still see a lot of .NET jobs requiring Knockout experience.

However, that may be shifting now as even Microsoft has sought to bring Angular more into the fold of VS due to its massive market dominance.
Good to know Angular is trend, so I can easily get a job by knowing it :D
kaos78414 wrote:The thing that Angular enables and really excels at is creating "apps." I say apps because most websites function in the classic style - almost everything is processed server side, including creating the view (think <?php echo $var; ?> in your views). Stacks involving Angular usually flip that around, and most of the heavy lifting is done via the client, and the server really only handles data and validation. This allows you to build a quick RESTful API for data, then hook up Angular and begin creating the real meat of your app. The result is a one page app that is very fast and fluid.

Having the client handle the views frees up the backend to be extremely fast - because the only thing it needs to do is send JSON data to the client, usually only processing the index view and (unless you use a CDN) serve up static assets.

The two major problems with choosing to build an angular app vary greatly depending on the application:

1. SEO is a bit harder to do right. Google's crawlers now execute javascript, but I have no idea whether Bing or others do. If SEO is something your app needs, you'll need to have a solution ready before moving forward I'd think. Discourse accomplished this by having a crawler friendly version of the site contained in noscript tags.

2. No legacy browser support. Namely it only supports IE9+ officially, although it isn't too hard to squeeze IE8 in there as well. This usually isn't a concern these days. My current company gets loads of traffic, and of the massive number of hits we get, 0.05% are using IE6. and <1% use IE7. So really, IE8+ is all you need, even for enterprise applications.

Other problems only start to arise with poor architectural decisions. These apps really need to be designed with Angular in mind. Take it from somebody who has done it - it's much more difficult to refactor a legacy application for use with Angular then to build one from scratch.
So you recommend using Angular as the bridge between PHP and HTML? Like PHP giving Angular some JSON and then Angular pass it easily to HTML?

Good to know that IE8+ is the minimum I should really care about, I think that even IE9 should be minimum, because one bank here in portugal has a website that doesn't work (you can't check your account) with IE8,9 and they say "Install Firefox", just like that :D.
My Company Website: http://www.oryzhon.com

Skype: vpegas1234
Post Reply

Return to “Advanced Help and Support”