

Prevel Framework (JS). Convenience in 5 Kb - sigest100500

This is a lightweight all-purpose JavaScript framework. Its functionality designated on all the aspects of modern developing. Moreover, it’s extremely fast (particularly interactions with the DOM).<p>All the popular methods from popular frameworks (interactions with the DOM, Ajax and so on) also attend in Prevel but without “ballast”, because, basically, using heavy frameworks consists of using searching through the DOM and creating Ajax requests.<p>Including a framework which size is 90 Kb on a page which entire size (without a framework) is 20 Kb is a bad tone. But when writing in pure JavaScript arise a few inconveniences connected with that in JavaScript there are no habitual functions such as “$()” or “$.ajax()” and so on; Prevel called to root this problem as an essence by having a clear API and by rapid speed of work.<p>Perhaps you will say that 200 Kb is not a problem nowadays, but there are still lots of people who don’t use the broadband Internet connection. Furthermore, Prevel is quite faster than newfangled frameworks such as jQuery, Mootools, Prototype, etc. Today, in a milestone of interactivity, speed is incredibly important.<p>In addition, you can make Prevel smaller; to do this it’s necessary just to assemble it from modules independently.<p>=================<p>Examples of usage<p>Probably you’ll like it after watching on a few examples (not all the functionality).<p>Ajax:
Ajax attends almost in every application, Prevel simplifies a process of creating requests. Structure of creating queries is like its in jQuery (object with url, type, ...). More detailed instructions are available in documentation.<p>pl.ajax({
  url: ‘prevelAjaxTest.py’,
  type: ‘GET’,
  success: function(data) {
    alert(‘Okay.’);
  }
});<p>DOM:
Function for interacting with the DOM widely respesented in Prevel; it’s possible to find more examples in documentation.<p>Following code makes all the DIVs half-transparent.<p>pl(‘div’).css({
 opacity: 0.5
});<p>Common:
This methods are available from the `pl` namespace.<p>Defining the type of an object.<p>pl.type(Lorem.’) === ‘str’
pl.type([]) === ‘arr’
pl.type({}) === ‘obj’
pl.type(new Date()) === ‘date’
pl.type(/abc/g) === ‘regexp’<p>Defining a browser name. Supported browsers: chrome, opera, firefox, ie, ie6, ie7, ie8, safari, safari_khtml.<p>pl.browser(); // Name of current browser<p>If you suddenly liked Prevel Framework, you could read documentation. By the way, it’s necessary to emphasise one pleasant particularity: call chains supported (e.g. pl(‘div’).after(‘...’).before(‘...’)).<p>On GitHub: https://github.com/chernikovalexey/Prevel
======
obeattie
I'd be intereted to hear how it differs from Zepto (<http://zeptojs.com/>)

~~~
sigest100500
It's oriented on only modern browsers and mobile platform, unfortunately.

And it's better when you have a choice for making decisions on choosing the
framework.

------
sidcool
<https://github.com/chernikovalexey/Prevel>

