kutty, jQuery-free intercooler.js

栏目: IT技术 · 发布时间: 5年前

内容简介:I'm pleased to announce the0.0.1 release of kutty, the successor toLike intercooler, kutty brings features of modern browsers that normally require javascript (AJAX, CSS transitions, etc.) directly into HTML.I chose to rename the project for a few reasons:

Kutty 0.0.1 Release

I'm pleased to announce the0.0.1 release of kutty, the successor to intercooler.js !

Like intercooler, kutty brings features of modern browsers that normally require javascript (AJAX, CSS transitions, etc.) directly into HTML.

Why the rename?

I chose to rename the project for a few reasons:

  • I wanted the freedom to clean up mistakes and remove ideas that hadn't worked out as cleanly as I wanted
  • The JS in intercooler.js implied a javascript-orientation. The more I developed intercooler the more I realized that it was really about enhancing (completing?) HTML, not javascript. This project doesn't really compete with tools like angular, vue or react, it's something different, so I wanted a different name.
  • kutty is short and memorable, kutty.org was available, and it has consonance with "cuttlefish" which is the official cephalopod of kutty development.

So what's new & different about kutty vs. intercooler?

  • First and foremost, kutty has no external dependencies ! No more dragging in jQuery just to do HTML-oriented web development. It has been tested with IE11.
  • It follows conventional naming and behavior standards more closely than intercooler does (e.g. innerHTML and outerHTML )
  • Kutty isn't the kitchen-sink-of-features that intercooler is. Kutty is more focused on the features that are amenable to a declarative approache and less on replacing javascript entirely.
  • Kutty has a better swapping mechanism which introduces a settling step, which allows for nice CSS transitions with minimal complexity. Check out theprogress bar to see how this works: by returning HTML in the old web 1.0 style, you can get nice, smooth CSS-based transitions. Fun!

Beyond that, basic kutty and intercooler code will look a lot a like:

<div kt-post="/clicked">Click Me!</div>

This will issue an AJAX post to /clicked , in a manner familiar to anyone who has used intercooler.

What will happen to intercooler?

I'm planning on maintaining both projects. Intercooler is a slow moving project anyway, and the code is stable and works fine for people who want to go the jQuery route. I have a large application written with it and I'm not planning on moving that to kutty any time soon.

How hard will a port to kutty from intercooler be?

Depends a lot on how into the weeds you got with intercooler. The core attributes are pretty close to one another but if you were using ic-action or event handlers extensively it will be a project.

OK, so what should I do?

The usual:

  • read thedocs
  • star the repo
  • tell your friends
  • enjoy fully functional HTML, the way Roy Fielding intended it

Cheers!


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

天涯虚拟社区

天涯虚拟社区

刘华芹 / 民族出版社 / 2005-11 / 23.00元

网络空间很复杂,好多人并不完全了解或者只是了解到一些皮毛。比如说好多人对于见网友一事总是抱着浪漫或者暖昧的想法,而事实却并不总是想象的那样。作者在做虚拟社区研究甚至是在有这个想法之前并不常呆在网上,互联网对于作者来说就是查查资料、收发信年、看看新闻的工具。担是看着越来越多的人把时间花在网上,一处文化上的直觉告诉作者:有一种新的生活方式产生了。强烈的好奇心驱使着作者走到了网上,走到了天涯虚拟社区,并......一起来看看 《天涯虚拟社区》 这本书的介绍吧!

HTML 压缩/解压工具
HTML 压缩/解压工具

在线压缩/解压 HTML 代码

MD5 加密
MD5 加密

MD5 加密工具

XML 在线格式化
XML 在线格式化

在线 XML 格式化压缩工具