Giter Site home page Giter Site logo

minified.js's Introduction

Minified Web

Overview

Minified Web is a universal JavaScript library for HTML applications. It gives you a clean and simple API that provides you with everything that you need to work interact with the browser on an HTML page.

While the purpose and scope of Minified Web are comparable to jQuery and MooTools, its size is smaller almost by an order of magnitude. The compressed size under 9kb, and the gzip'd size is less than 4kb. You can make it even smaller if you don't require all modules of Minified Web. The build tool allows you to remove everything that you don't need to reduce its size even more.

Size Comparison

NameLegacy IE SupportCompiled SizeCompiled and GZip'd
minified-web.jsIE6 and higher9.1kb4089 bytes
minified-web.noie.jsno7.7kb3429 bytes
jQuery 1.10.2IE6 and higher91kb32kb
jQuery 2.0.3no82kb29kb
MooTools Core NoCompat 1.4.5IE6 and higher88kb29kb
Zepto.js 1.0no27kb9.7kb

Feature Comparison

The goal of Minified Web is to provide everything you need on an HTML page to interact with the web browser. Everything else is out-of-scope. Specifically, it does not include polyfills, a class framework, helper for JavaScript core types or similar things. If you need them, microjs.com is a great place to find them.

FeatureMinifiedjQueryMooToolsZepto.js
CSS Selectoryes
CSS1 or browser engine
yes
CSS3 subset + extensions
yes
CSS3 subset + extensions
yes
browser engine
CSS Style Changesyes yes yes yes
CSS Class Changesyes yes yes yes
Element Creationyes yes
HTML-strings only
yes yes
HTML-strings only
Element Cloningyes yes yes yes
DOM Manipulationyes yes yes yes
Animation (numeric)yes yes yes yes
CSS transitions only
Animation (color)yes no yes yes
CSS transitions only
Eventsyes yes yes yes
DOMReadyyesyesyes yes
Ajax/XHRyes yes yes yes
Promises/A+-compatibleyes yes no no
JSONyes yes yes yes
Cookiesyes no yes no
Form Serializationno yes no yes
Array Helpers (Iteration) no yes yes yes
AMD support yes yes no no
Online Builder yes
modules and functions
no yes
modules
no
Internet Explorer compatible yes yes
jQuery 1.x only
yes no

What you can expect from Minified Web

  • General purpose functions to effectively write HTML-based web applications
  • A very small footprint. It will always be smaller than 4kb.
  • A clean and simple, easy to use API.
  • A stable API that won't change.

Licensing

Public Domain. Use, modify and distribute it any way you like. No attribution required. To the extent possible under law, Tim Jansen has waived all copyright and related or neighboring rights to Minified. Please see http://creativecommons.org/publicdomain/zero/1.0/

About Minified

Call me old-fashioned, but the size of JavaScript libraries like jQuery and MooTools has always bothered me. Don't get me wrong, they are fantastic libraries and I really like to use them, but they contain about 90kb of code even after minification. This code needs to be parsed and executed on every page that you include them on. For me, that just feels too large for what that they offer, and especially for what I need. The 30kb size that they have after gzipping will can also cause a significant delay on low-bandwidth networks.

In the last years I worked on some personal projects (jarfiller.org is the only one that has been published), and when I work on them, I usually strive for perfection. Every unnecessary kilobyte hurts. So instead of using jQuery, I started writing my own little helper functions to replace jQuery functionality without the overhead. As I worked on several other projects, I wrote more and more helper functions and started sharing them between projects until they became a library of their own. By now they are so mature that I believe that this library, called Minified, became a valid alternative to jQuery and MooTools at a fraction of the size.

What you see here is only the beginning, a 4kb module for building web sites. The plan is to have three modules, each under 4kb:

  • Minified Web is a browser interaction library, comparable to jQuery or MooTools. It is available now.
  • Minified Util offers utilities for lists and maps, functions, promises, string and number formatting, date handling and internationalization. Its scope and size can be compared to Underscore, but it omits the more obscure functional helpers and replaces them with date and string helpers. You can find an early version in the /src directory on GitHub.
  • Minified Apps will be a MVC-oriented library for single-page applications and complex multi-page apps. The scope will be somewhat similar to Backbone or Angular.js, but with a Plain-Old-JSON-Object (POJO) principles and a template/binding concept that is closely tied to the page's DOM and is predestinated for HTML5 templates. It is built upon the other two modules. A preview should be available by the end of 2013.

Thank you for checking out Minified. Tim Jansen

minified.js's People

Contributors

timjansen avatar

Watchers

James Cloos avatar Roger Poole avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.