Reasons for moving from raw JavaScript to a JavaScript library

Being aware of the direct benefits of libraries having things wrapped in a package, making daily work easier, my question is leaning more towards the fact that many features not implemented in HTML/DOM/CSS, has become available using these libraries.

There is everything, from visual effects (13 a dozen) to more functional oriented, to choose from.

As I see it today, 2014, with HTML5 and CSS3, more and more of these libraries seems to have played there role, as a kind of a bridge covering the gap between older browsers non capabilites and the new ones ability to handle it built in.

Whats more, is that these libraries also seems to drop older browser support little by little.

This gives me as a developer a hard decision, if to upgrade to next version with more functionality and lose old browser support, or stay on an older version with less functionality but with old browser support and the need of custom development to achieve new functionality.

So my question is, is there anything else I might have missed, which could affect whether to implement a library as a base or use raw JavaScript and add a library when it is really needed?

4

from http://youmightnotneedjquery.com –

“At the very least, make sure you know what jQuery is doing for you,
and what it’s not. Some developers believe that jQuery is protecting
us from a great demon of browser incompatibility when, in truth,
post-IE8, browsers are pretty easy to deal with on their own.”

From a certain standpoint, any given .js file could be counted as a rudimentary library — not officially a library of course, but one can write a handful of JavaScript functions wrapped up in an object that handle grunt work on the app/site you’re working with. That may as well be your ‘library’ for the purposes of that project, and if you can build against pure JS without, like, missing deadlines or pulling your hair out, it’s probably The Right Decision.

The website goes on to showcase JavaScript that will work for all browser up to and including IE8 if need be – but really, it’s a good question to ask yourself regardless of the project you’re tackling. Are you just toggling classes? Don’t have a ton of transformations? No need to rely on someone else’s code, even if it is jQuery.

Honestly some things look and read far better in pure JavaScript than jQuery anyway. Look at the aforementioned website’s example of comparison via jQuery:

$(el).is($(otherEl));

In JavaScript, this is reduced down to something far more intuitive (that’s an opinion, but really == and === show up in enough other languages that a journeyman would recognize this from convention and previous experience, arguably moreso than a function call):

el === otherEl

Now that may be a loaded example, if for no other reason than a common practice with jQuery is to ‘pre-grab’ and name your jQuery objects like so:

function(el, otherEl){
    var $el = $(el);
    var $otherEl = $(otherEl);
    return $el.is($otherEl);
}

But the point still stands, I think. Building a library on top of another library just to call convenience methods like removeClass() or hide() is taking the long way home.

1

There are libraries like jQuery that truly become less relevant today due to browsers finally catching up.

On the other hand, there are utility belt libraries like Underscore that you’ll end up reimplementing yourself on any moderately complex project. These are simple, focused utility functions that I like to use even on vanilla JS projects.

Then there are frameworks like AngularJS or Montage. These are wildly different beasts than jQuery. Whereas jQuery bridges browser gap, frameworks like AngularJS force you to adopt a completely different paradigm separating your UI in loosely-tied components that have declarative bindings to models. You won’t need these for simple websites, but for highly interactive single-page apps you can’t go far fiddling with DOM—even jQuery won’t save you from managing view lifecycle, updating data in many places on the screen when it changes, client-side routing, etc. Think apps like Facebook, Twitter.

Then there’s a neat niche for libraries that don’t force you to rewrite all your code like AngularJS, but still allow to build rich JS apps. My current favorite is ReactJS by Facebook, its killer feature is one-way data flow and what you may call declarative DOM programming: you specify how DOM tree looks in different program states, and ReactJS calculates and applies minimum set of DOM operations needed to go from one state to another.

As you can see, the space for JS frameworks is vast, and you shouldn’t dismiss all of them just because browsers are finally catching up with jQuery. There are more problems, and more solutions to client-side JS development, and the field is exploding right now.

0

It really depends on how much DOM manipulation you want to do. The nice thing about jQuery is that it gives you a fluent API for manipulating the document object model. If you don’t want something with as much weight, try Zepto, which is a jQuery compatible API that delegates to native browser methods, making it smaller in file size.

If you don’t need to do much DOM manipulation, then a JavaScript library might not be of much use anymore.

0

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

Reasons for moving from raw JavaScript to a JavaScript library

Being aware of the direct benefits of libraries having things wrapped in a package, making daily work easier, my question is leaning more towards the fact that many features not implemented in HTML/DOM/CSS, has become available using these libraries.

There is everything, from visual effects (13 a dozen) to more functional oriented, to choose from.

As I see it today, 2014, with HTML5 and CSS3, more and more of these libraries seems to have played there role, as a kind of a bridge covering the gap between older browsers non capabilites and the new ones ability to handle it built in.

Whats more, is that these libraries also seems to drop older browser support little by little.

This gives me as a developer a hard decision, if to upgrade to next version with more functionality and lose old browser support, or stay on an older version with less functionality but with old browser support and the need of custom development to achieve new functionality.

So my question is, is there anything else I might have missed, which could affect whether to implement a library as a base or use raw JavaScript and add a library when it is really needed?

4

from http://youmightnotneedjquery.com –

“At the very least, make sure you know what jQuery is doing for you,
and what it’s not. Some developers believe that jQuery is protecting
us from a great demon of browser incompatibility when, in truth,
post-IE8, browsers are pretty easy to deal with on their own.”

From a certain standpoint, any given .js file could be counted as a rudimentary library — not officially a library of course, but one can write a handful of JavaScript functions wrapped up in an object that handle grunt work on the app/site you’re working with. That may as well be your ‘library’ for the purposes of that project, and if you can build against pure JS without, like, missing deadlines or pulling your hair out, it’s probably The Right Decision.

The website goes on to showcase JavaScript that will work for all browser up to and including IE8 if need be – but really, it’s a good question to ask yourself regardless of the project you’re tackling. Are you just toggling classes? Don’t have a ton of transformations? No need to rely on someone else’s code, even if it is jQuery.

Honestly some things look and read far better in pure JavaScript than jQuery anyway. Look at the aforementioned website’s example of comparison via jQuery:

$(el).is($(otherEl));

In JavaScript, this is reduced down to something far more intuitive (that’s an opinion, but really == and === show up in enough other languages that a journeyman would recognize this from convention and previous experience, arguably moreso than a function call):

el === otherEl

Now that may be a loaded example, if for no other reason than a common practice with jQuery is to ‘pre-grab’ and name your jQuery objects like so:

function(el, otherEl){
    var $el = $(el);
    var $otherEl = $(otherEl);
    return $el.is($otherEl);
}

But the point still stands, I think. Building a library on top of another library just to call convenience methods like removeClass() or hide() is taking the long way home.

1

There are libraries like jQuery that truly become less relevant today due to browsers finally catching up.

On the other hand, there are utility belt libraries like Underscore that you’ll end up reimplementing yourself on any moderately complex project. These are simple, focused utility functions that I like to use even on vanilla JS projects.

Then there are frameworks like AngularJS or Montage. These are wildly different beasts than jQuery. Whereas jQuery bridges browser gap, frameworks like AngularJS force you to adopt a completely different paradigm separating your UI in loosely-tied components that have declarative bindings to models. You won’t need these for simple websites, but for highly interactive single-page apps you can’t go far fiddling with DOM—even jQuery won’t save you from managing view lifecycle, updating data in many places on the screen when it changes, client-side routing, etc. Think apps like Facebook, Twitter.

Then there’s a neat niche for libraries that don’t force you to rewrite all your code like AngularJS, but still allow to build rich JS apps. My current favorite is ReactJS by Facebook, its killer feature is one-way data flow and what you may call declarative DOM programming: you specify how DOM tree looks in different program states, and ReactJS calculates and applies minimum set of DOM operations needed to go from one state to another.

As you can see, the space for JS frameworks is vast, and you shouldn’t dismiss all of them just because browsers are finally catching up with jQuery. There are more problems, and more solutions to client-side JS development, and the field is exploding right now.

0

It really depends on how much DOM manipulation you want to do. The nice thing about jQuery is that it gives you a fluent API for manipulating the document object model. If you don’t want something with as much weight, try Zepto, which is a jQuery compatible API that delegates to native browser methods, making it smaller in file size.

If you don’t need to do much DOM manipulation, then a JavaScript library might not be of much use anymore.

0

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

Reasons for moving from raw JavaScript to a JavaScript library

Being aware of the direct benefits of libraries having things wrapped in a package, making daily work easier, my question is leaning more towards the fact that many features not implemented in HTML/DOM/CSS, has become available using these libraries.

There is everything, from visual effects (13 a dozen) to more functional oriented, to choose from.

As I see it today, 2014, with HTML5 and CSS3, more and more of these libraries seems to have played there role, as a kind of a bridge covering the gap between older browsers non capabilites and the new ones ability to handle it built in.

Whats more, is that these libraries also seems to drop older browser support little by little.

This gives me as a developer a hard decision, if to upgrade to next version with more functionality and lose old browser support, or stay on an older version with less functionality but with old browser support and the need of custom development to achieve new functionality.

So my question is, is there anything else I might have missed, which could affect whether to implement a library as a base or use raw JavaScript and add a library when it is really needed?

4

from http://youmightnotneedjquery.com –

“At the very least, make sure you know what jQuery is doing for you,
and what it’s not. Some developers believe that jQuery is protecting
us from a great demon of browser incompatibility when, in truth,
post-IE8, browsers are pretty easy to deal with on their own.”

From a certain standpoint, any given .js file could be counted as a rudimentary library — not officially a library of course, but one can write a handful of JavaScript functions wrapped up in an object that handle grunt work on the app/site you’re working with. That may as well be your ‘library’ for the purposes of that project, and if you can build against pure JS without, like, missing deadlines or pulling your hair out, it’s probably The Right Decision.

The website goes on to showcase JavaScript that will work for all browser up to and including IE8 if need be – but really, it’s a good question to ask yourself regardless of the project you’re tackling. Are you just toggling classes? Don’t have a ton of transformations? No need to rely on someone else’s code, even if it is jQuery.

Honestly some things look and read far better in pure JavaScript than jQuery anyway. Look at the aforementioned website’s example of comparison via jQuery:

$(el).is($(otherEl));

In JavaScript, this is reduced down to something far more intuitive (that’s an opinion, but really == and === show up in enough other languages that a journeyman would recognize this from convention and previous experience, arguably moreso than a function call):

el === otherEl

Now that may be a loaded example, if for no other reason than a common practice with jQuery is to ‘pre-grab’ and name your jQuery objects like so:

function(el, otherEl){
    var $el = $(el);
    var $otherEl = $(otherEl);
    return $el.is($otherEl);
}

But the point still stands, I think. Building a library on top of another library just to call convenience methods like removeClass() or hide() is taking the long way home.

1

There are libraries like jQuery that truly become less relevant today due to browsers finally catching up.

On the other hand, there are utility belt libraries like Underscore that you’ll end up reimplementing yourself on any moderately complex project. These are simple, focused utility functions that I like to use even on vanilla JS projects.

Then there are frameworks like AngularJS or Montage. These are wildly different beasts than jQuery. Whereas jQuery bridges browser gap, frameworks like AngularJS force you to adopt a completely different paradigm separating your UI in loosely-tied components that have declarative bindings to models. You won’t need these for simple websites, but for highly interactive single-page apps you can’t go far fiddling with DOM—even jQuery won’t save you from managing view lifecycle, updating data in many places on the screen when it changes, client-side routing, etc. Think apps like Facebook, Twitter.

Then there’s a neat niche for libraries that don’t force you to rewrite all your code like AngularJS, but still allow to build rich JS apps. My current favorite is ReactJS by Facebook, its killer feature is one-way data flow and what you may call declarative DOM programming: you specify how DOM tree looks in different program states, and ReactJS calculates and applies minimum set of DOM operations needed to go from one state to another.

As you can see, the space for JS frameworks is vast, and you shouldn’t dismiss all of them just because browsers are finally catching up with jQuery. There are more problems, and more solutions to client-side JS development, and the field is exploding right now.

0

It really depends on how much DOM manipulation you want to do. The nice thing about jQuery is that it gives you a fluent API for manipulating the document object model. If you don’t want something with as much weight, try Zepto, which is a jQuery compatible API that delegates to native browser methods, making it smaller in file size.

If you don’t need to do much DOM manipulation, then a JavaScript library might not be of much use anymore.

0

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

Reasons for moving from raw JavaScript to a JavaScript library

Being aware of the direct benefits of libraries having things wrapped in a package, making daily work easier, my question is leaning more towards the fact that many features not implemented in HTML/DOM/CSS, has become available using these libraries.

There is everything, from visual effects (13 a dozen) to more functional oriented, to choose from.

As I see it today, 2014, with HTML5 and CSS3, more and more of these libraries seems to have played there role, as a kind of a bridge covering the gap between older browsers non capabilites and the new ones ability to handle it built in.

Whats more, is that these libraries also seems to drop older browser support little by little.

This gives me as a developer a hard decision, if to upgrade to next version with more functionality and lose old browser support, or stay on an older version with less functionality but with old browser support and the need of custom development to achieve new functionality.

So my question is, is there anything else I might have missed, which could affect whether to implement a library as a base or use raw JavaScript and add a library when it is really needed?

4

from http://youmightnotneedjquery.com –

“At the very least, make sure you know what jQuery is doing for you,
and what it’s not. Some developers believe that jQuery is protecting
us from a great demon of browser incompatibility when, in truth,
post-IE8, browsers are pretty easy to deal with on their own.”

From a certain standpoint, any given .js file could be counted as a rudimentary library — not officially a library of course, but one can write a handful of JavaScript functions wrapped up in an object that handle grunt work on the app/site you’re working with. That may as well be your ‘library’ for the purposes of that project, and if you can build against pure JS without, like, missing deadlines or pulling your hair out, it’s probably The Right Decision.

The website goes on to showcase JavaScript that will work for all browser up to and including IE8 if need be – but really, it’s a good question to ask yourself regardless of the project you’re tackling. Are you just toggling classes? Don’t have a ton of transformations? No need to rely on someone else’s code, even if it is jQuery.

Honestly some things look and read far better in pure JavaScript than jQuery anyway. Look at the aforementioned website’s example of comparison via jQuery:

$(el).is($(otherEl));

In JavaScript, this is reduced down to something far more intuitive (that’s an opinion, but really == and === show up in enough other languages that a journeyman would recognize this from convention and previous experience, arguably moreso than a function call):

el === otherEl

Now that may be a loaded example, if for no other reason than a common practice with jQuery is to ‘pre-grab’ and name your jQuery objects like so:

function(el, otherEl){
    var $el = $(el);
    var $otherEl = $(otherEl);
    return $el.is($otherEl);
}

But the point still stands, I think. Building a library on top of another library just to call convenience methods like removeClass() or hide() is taking the long way home.

1

There are libraries like jQuery that truly become less relevant today due to browsers finally catching up.

On the other hand, there are utility belt libraries like Underscore that you’ll end up reimplementing yourself on any moderately complex project. These are simple, focused utility functions that I like to use even on vanilla JS projects.

Then there are frameworks like AngularJS or Montage. These are wildly different beasts than jQuery. Whereas jQuery bridges browser gap, frameworks like AngularJS force you to adopt a completely different paradigm separating your UI in loosely-tied components that have declarative bindings to models. You won’t need these for simple websites, but for highly interactive single-page apps you can’t go far fiddling with DOM—even jQuery won’t save you from managing view lifecycle, updating data in many places on the screen when it changes, client-side routing, etc. Think apps like Facebook, Twitter.

Then there’s a neat niche for libraries that don’t force you to rewrite all your code like AngularJS, but still allow to build rich JS apps. My current favorite is ReactJS by Facebook, its killer feature is one-way data flow and what you may call declarative DOM programming: you specify how DOM tree looks in different program states, and ReactJS calculates and applies minimum set of DOM operations needed to go from one state to another.

As you can see, the space for JS frameworks is vast, and you shouldn’t dismiss all of them just because browsers are finally catching up with jQuery. There are more problems, and more solutions to client-side JS development, and the field is exploding right now.

0

It really depends on how much DOM manipulation you want to do. The nice thing about jQuery is that it gives you a fluent API for manipulating the document object model. If you don’t want something with as much weight, try Zepto, which is a jQuery compatible API that delegates to native browser methods, making it smaller in file size.

If you don’t need to do much DOM manipulation, then a JavaScript library might not be of much use anymore.

0

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa

Reasons for moving from raw JavaScript to a JavaScript library

Being aware of the direct benefits of libraries having things wrapped in a package, making daily work easier, my question is leaning more towards the fact that many features not implemented in HTML/DOM/CSS, has become available using these libraries.

There is everything, from visual effects (13 a dozen) to more functional oriented, to choose from.

As I see it today, 2014, with HTML5 and CSS3, more and more of these libraries seems to have played there role, as a kind of a bridge covering the gap between older browsers non capabilites and the new ones ability to handle it built in.

Whats more, is that these libraries also seems to drop older browser support little by little.

This gives me as a developer a hard decision, if to upgrade to next version with more functionality and lose old browser support, or stay on an older version with less functionality but with old browser support and the need of custom development to achieve new functionality.

So my question is, is there anything else I might have missed, which could affect whether to implement a library as a base or use raw JavaScript and add a library when it is really needed?

4

from http://youmightnotneedjquery.com –

“At the very least, make sure you know what jQuery is doing for you,
and what it’s not. Some developers believe that jQuery is protecting
us from a great demon of browser incompatibility when, in truth,
post-IE8, browsers are pretty easy to deal with on their own.”

From a certain standpoint, any given .js file could be counted as a rudimentary library — not officially a library of course, but one can write a handful of JavaScript functions wrapped up in an object that handle grunt work on the app/site you’re working with. That may as well be your ‘library’ for the purposes of that project, and if you can build against pure JS without, like, missing deadlines or pulling your hair out, it’s probably The Right Decision.

The website goes on to showcase JavaScript that will work for all browser up to and including IE8 if need be – but really, it’s a good question to ask yourself regardless of the project you’re tackling. Are you just toggling classes? Don’t have a ton of transformations? No need to rely on someone else’s code, even if it is jQuery.

Honestly some things look and read far better in pure JavaScript than jQuery anyway. Look at the aforementioned website’s example of comparison via jQuery:

$(el).is($(otherEl));

In JavaScript, this is reduced down to something far more intuitive (that’s an opinion, but really == and === show up in enough other languages that a journeyman would recognize this from convention and previous experience, arguably moreso than a function call):

el === otherEl

Now that may be a loaded example, if for no other reason than a common practice with jQuery is to ‘pre-grab’ and name your jQuery objects like so:

function(el, otherEl){
    var $el = $(el);
    var $otherEl = $(otherEl);
    return $el.is($otherEl);
}

But the point still stands, I think. Building a library on top of another library just to call convenience methods like removeClass() or hide() is taking the long way home.

1

There are libraries like jQuery that truly become less relevant today due to browsers finally catching up.

On the other hand, there are utility belt libraries like Underscore that you’ll end up reimplementing yourself on any moderately complex project. These are simple, focused utility functions that I like to use even on vanilla JS projects.

Then there are frameworks like AngularJS or Montage. These are wildly different beasts than jQuery. Whereas jQuery bridges browser gap, frameworks like AngularJS force you to adopt a completely different paradigm separating your UI in loosely-tied components that have declarative bindings to models. You won’t need these for simple websites, but for highly interactive single-page apps you can’t go far fiddling with DOM—even jQuery won’t save you from managing view lifecycle, updating data in many places on the screen when it changes, client-side routing, etc. Think apps like Facebook, Twitter.

Then there’s a neat niche for libraries that don’t force you to rewrite all your code like AngularJS, but still allow to build rich JS apps. My current favorite is ReactJS by Facebook, its killer feature is one-way data flow and what you may call declarative DOM programming: you specify how DOM tree looks in different program states, and ReactJS calculates and applies minimum set of DOM operations needed to go from one state to another.

As you can see, the space for JS frameworks is vast, and you shouldn’t dismiss all of them just because browsers are finally catching up with jQuery. There are more problems, and more solutions to client-side JS development, and the field is exploding right now.

0

It really depends on how much DOM manipulation you want to do. The nice thing about jQuery is that it gives you a fluent API for manipulating the document object model. If you don’t want something with as much weight, try Zepto, which is a jQuery compatible API that delegates to native browser methods, making it smaller in file size.

If you don’t need to do much DOM manipulation, then a JavaScript library might not be of much use anymore.

0

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật