jQuery、クロスプラットフォームプログラミングの代替

JavaScriptは、今日最も人気のあるプログラミング言語のXNUMXつです。 Unityなどのゲームエンジンでも、CやJavaで行ったのと同じ結果で、この言語でプログラミングすることができます。 However, JavaScript unnecessarily complicates certain tasks that many developers need to perform, especially when working with other APIs.ただし、JavaScriptは、特に他のAPIを使用する場合に、多くの開発者が実行する必要のある特定のタスクを不必要に複雑にします。 And for that reason, on the web we can find a large number of Frameworks, among whichそのため、ウェブ上には多数のフレームワークがあり、その中には jQueryの 際立っている .

jQueryとは

jQueryは基本的に JavaScriptプログラミングを簡素化するように設計されたライブラリ 。 Thanks to it, instead of having to use confusing JS functions, programmers can greatly simplify the way of interacting with HTML documents, manipulating the DOM tree, handling events, developing animations and adding interaction through AJAX in web pages .そのおかげで、プログラマーは、紛らわしいJS関数を使用する代わりに、HTMLドキュメントの操作、DOMツリーの操作、イベントの処理、アニメーションの開発、およびWebページでのAJAXを介した操作の追加の方法を大幅に簡素化できます。

jQuery、クロスプラットフォームプログラミングの代替

長所と短所

その主な利点は、プログラマーがあらゆる種類の種類を簡単に追加できることです。 プラグイン、 both public and privately developed, which greatly facilitate the programming task.パブリックとプライベートの両方で開発されており、プログラミングタスクが大幅に容易になります。 In addition, it has excellent support thanks to which it solves all kinds of bugs very quickly and the integration with AJAX is one of the best we can find.さらに、あらゆる種類のバグを非常に迅速に解決する優れたサポートがあり、AJAXとの統合は私たちが見つけることができる最高のXNUMXつです。

However, it is not perfect.しかし、それは完璧ではありません。 And is that one of the main qualities often turns into a drawback: the large number ofそして、主な品質のXNUMXつがしばしば欠点に変わるということです:多数の バージョン that are published in a short time.短期間で公開されます。 It is difficult to be up to date when new versions come out every so often.新しいバージョンが頻繁にリリースされるとき、最新の状態にすることは困難です。

In addition, we must be very careful when implementing it in the development environment, since the smallest error can take the entire infrastructure out of service.さらに、最小のエラーでインフラストラクチャ全体がサービスを停止する可能性があるため、開発環境に実装する場合は十分に注意する必要があります。 Also, keep in mind that implementing jQuery on a website impliesまた、ウェブサイトにjQueryを実装することは意味することを覚えておいてください サイズを大きくする 80から100KBの間のウェブサイトの。

最後に、これは比較的単純なフレームワークですが、他のフレームワークと比較するとそれほど単純ではありません。

CódigoJavaScript

主な選択肢

Either because we are looking for more minimalist alternatives, specialized in certain tasks, or simply because we do not like jQuery, we can find a wide variety of alternatives that will allow us to choose the one that best suits our tastes, or our objective.特定のタスクに特化した、よりミニマリストな代替案を探しているため、または単にjQueryが好きではないため、私たちの好みや目的に最も適したものを選択できるさまざまな代替案を見つけることができます。 Next we tell you which are the best.次に、どれが最適かを説明します。

Zepto.js

Zepto is one of the most interesting alternatives that we can find.私たちが見つけることができる最も興味深い選択肢の5つです。 This is one of the minimalist alternatives that developers like the most.これは、開発者が最も好む最小限の選択肢のXNUMXつです。 It is compatible with most of the jQuery syntax, but with the difference that its implementation only increases the total size of the web by XNUMX KB, which represents a considerable saving.これはほとんどのjQuery構文と互換性がありますが、その実装ではWebの合計サイズがXNUMX KBしか増加しないという違いがあり、これはかなりの節約になります。

デフォルトでは、最も使用されているセレクター、メソッド、およびイベントのみが表示されますが、モジュール式であるため、開発者は必要なモジュールをロードできます。

jQueryのこの代替案に関する詳細情報を入手できます ここから .

シュイ

5 KBのZepto.jzが多すぎると思われる場合でも、さらにダウンロードできます。 シュイ brings us a JS framework that we can implement with only 4.1 KB.たったXNUMXKBで実装できるJSフレームワークをもたらします。 This is also based on jQuery, so it shares most of its functions and syntax, although it is especially focused on mobile application development.これもjQueryに基づいているため、モバイルアプリケーションの開発に特に重点を置いていますが、ほとんどの機能と構文を共有しています。

非常に小さなフレームワークであるにもかかわらず、XULには多数のオプションとツールがあり、アプリケーションの開発を最大限に最適化することができます。

XUIコードにアクセスできます このリンクから .

スナック.js

4.1 KBはまだ多すぎますか? Then we can go straight toその後、私たちはまっすぐに行くことができます スナック。 This framework occupies less than 3 KB, which represents an even greater saving in the use of resources.このフレームワークはXNUMXKB未満しか占有しません。これは、リソースの使用をさらに大幅に節約できることを意味します。 This framework is based directly on JavaScript, but it has been greatly simplified both to eliminate little used and unnecessary code and to offer users the essential functions and tools to build web applications for any browser.このフレームワークはJavaScriptに直接基づいていますが、ほとんど使用されていない不要なコードを排除し、任意のブラウザー用のWebアプリケーションを構築するために不可欠な機能とツールをユーザーに提供するために大幅に簡素化されています。

コンセプトはZeptoに基づいていますが、はるかに基本的であり、一部の開発者にとっては不十分な場合があります。

このフレームワークとそのすべてのドキュメントにアクセスできます。 次のリンクから .

140メドレー

Snack.JSの3KBがまだ多すぎるように思われる場合は、試してみることができます 140メドレー。 This framework has been designed to occupy 500 Bytes (that is, 0.5 KB) and is intended to allow you to create JavaScript fragments that will fit in a tweet.このフレームワークは、XNUMXバイト(つまり、XNUMX KB)を占めるように設計されており、ツイートに収まるJavaScriptフラグメントを作成できるようにすることを目的としています。 Despite its small size, it is compatible with templates, events and even AJAX.サイズが小さいにもかかわらず、テンプレート、イベント、さらにはAJAXと互換性があります。 However, it is a very complicated framework to use, and we only have documentation in the form of comments in its source code.ただし、使用するのは非常に複雑なフレームワークであり、ソースコードにはコメント形式のドキュメントしかありません。

私たちはあなたのコードにアクセスすることができます GitHubから .

アンブレラJS

Web開発とマルチプラットフォームモバイルアプリケーションの開発の両方に使用され、両方の場合のロード時間を最適化し、リソース消費を削減します。

is a framework designed from jQuery, so developers who already know this will be able to use it without problems.はjQueryから設計されたフレームワークであるため、これをすでに知っている開発者は問題なく使用できます。 In addition, it is compatible with all types of APIS, such as AJAX, DOM and it even has allowed events.さらに、AJAX、DOMなどのすべてのタイプのAPIと互換性があり、イベントも許可されています。

傘に関連するすべてのものを見つけることができます ここ .

クウェリー

This framework has been specially designed with users who work with many DOM elements in mind.このフレームワークは、多くのDOM要素を念頭に置いて作業するユーザーを対象に特別に設計されています。 This library occupies only 1 KB and has everything necessary to work with these elements and to be able to use the CSS3 syntax in a simpler and more intuitive way.このライブラリはXNUMXKBしか占有せず、これらの要素を操作し、CSSXNUMX構文をよりシンプルで直感的な方法で使用できるようにするために必要なすべてを備えています。 Its syntax is the same as that of jQuery, so if we have already worked with that other framework we will not have a problem.その構文はjQueryの構文と同じであるため、他のフレームワークを既に使用している場合は問題はありません。

このフレームワークに関する詳細情報を入手できます GitHubで .

シズル

大まかに言って、 シズル Qweryの拡張バージョンです。 This 4K framework is focused on taking professional development to the last level.この3Kフレームワークは、専門能力開発を最後のレベルに引き上げることに重点を置いています。 In addition to offering everything that the previous option offers, and also being based on jQuery syntax, it has a built-in API and integrates perfectly with CSSXNUMX.前のオプションが提供するすべてを提供し、jQuery構文に基づいていることに加えて、APIが組み込まれており、CSSXNUMXと完全に統合されています。 Of course, we must take into account that it depends directly on it, so in order to use this library we must first have the previous one.もちろん、それが直接依存していることを考慮に入れる必要があるので、このライブラリを使用するには、最初に前のライブラリが必要です。

私たちはそれを得ることができます このリンクから .

$DOM

Another quite small alternative, only 2 KB, is $ DOM.もうXNUMXつの非常に小さな代替手段であるわずかXNUMXKBは、$ DOMです。 It maintains great compatibility between browsers, especially when we want the web to look good on computers and in responsive designs for mobiles and tablets.特にコンピューターやモバイルやタブレット向けのレスポンシブデザインでウェブの見栄えを良くしたい場合は、ブラウザー間の優れた互換性を維持します。 It is capable of processing simple animations, but in return it lacks quite important functions for some users, such as manipulation of arrays or the use of AJAX.単純なアニメーションを処理することはできますが、その見返りとして、配列の操作やAJAXの使用など、一部のユーザーにとって非常に重要な機能が欠けています。

ReactJS

高速で互換性のあるウェブサイトを作成したい場合は、試してみる必要があります ReactJS。 IEでうまく機能させたいWebサイトを開発している場合は、このフレームワークを使用できます。 Otherwise, better look for other alternatives.それ以外の場合は、他の選択肢を探してください。

からダウンロードできます このリンク .