关于 WebView 缓存的重写

本贴最后更新于 2687 天前,其中的信息可能已经时异事殊

在现在的 app 中,越来越多的公司开始使用 webview 来进行一些活动页面的展示,甚至一些公司开始使用 webview 做为主要显示组件,把所有的内容都使用 H5 来呈现,这样一来,就对 WebView 的加载速度开始有越来越高的要求,我们要讨论的是 webview 的原本缓存机制所存在的弊端和如何复写 WebView 的缓存机制。

首先说一下 webview 的自带缓存机制的弊端:
webview 的自带缓存机制是无差别缓存,也就是说,不管是页面,样式还是图片,都会缓存到本地,刷新 webview 的缓存一般分为以下几种:

LOAD_CACHE_ONLY: 不使用网络,只读取本地缓存数据
LOAD_DEFAULT: 根据 cache-control 决定是否从网络上取数据。
LOAD_CACHE_NORMAL: API level 17 中已经废弃, 从 API level 11 开始作用同 LOAD_DEFAULT 模式
LOAD_NO_CACHE: 不使用缓存,只从网络获取数据.
LOAD_CACHE_ELSE_NETWORK,只要本地有,无论是否过期,或者 no-cache,都使用缓存中的数据。

反正不管以上几种具体情况如何,都肯定不是我们想要的。

我们想要的机制是:
1.缓存自己想要缓存的内容。
2.指定一个缓存策略,在需要的时候重新去服务器获取最新数据

于是我想到了以下方法
重写

Java 代码

  1. WebViewClient.shouldInterceptRequest(WebView view,WebResourceRequest request)

方法
首先需要新建一个类,继承 WebViewClient:

Java 代码

  1. public class DVDWebViewClient extends WebViewClient

然后实现

Java 代码

  1. public WebResourceResponse shouldInterceptRequest(WebView view,WebResourceRequest request)

方法
shouldInterceptRequest 方法会将所有页面的资源 URL 都一一列举出来,这样一来就好办了,我们似乎只需要缓存自己想要缓存的 url 就可以了。
然后事实是不是这样的呢?

Java 代码

  1. @Override
  2.  public WebResourceResponse shouldInterceptRequest(WebView view,  
    
  3.                                                    WebResourceRequest request) {  
    
  4.      //获取本地的URL主域名  
    
  5.      String curDomain = request.getUrl().getHost();  
    
  6.      //这行LOG可以不看  
    
  7.      if (BuildConfig.DEBUG) {  
    
  8.          Log.d(LOG_TAG, "curDomain " + curDomain + " request headers " + request.getRequestHeaders());  
    
  9.          for (Map.Entry entry : request.getRequestHeaders().entrySet()) {  
    
  10.              Log.d(LOG_TAG, "key=" + entry.getKey() + " #####value=" + entry.getValue() + "\n");  
    
  11.          }  
    
  12.      }  
    
  13.      //取不到domain就直接返回,把接下俩的动作交给webview自己处理  
    
  14.      if (curDomain == null || !isPicUrl(curDomain)) {  
    
  15.          return null;  
    
  16.      }  
    
  17.      if (BuildConfig.DEBUG) {  
    
  18.          Log.d(LOG_TAG, "shouldInterceptRequest url " + request.getUrl().toString());  
    
  19.      }  
    
  20.      //读取当前webview正准备加载URL资源  
    
  21.      String url = request.getUrl().toString();  
    
  22.      try {  
    
  23.         //根据资源url获取一个你要缓存到本地的文件名,一般是URL的MD5  
    
  24.          String resFileName = getResourcesFileName(url);  
    
  25.          if (resFileName == null || "".equals(resFileName)) {  
    
  26.              return null;  
    
  27.          }  
    
  28.         //这里是处理本地缓存的URL,缓存到本地,或者已经缓存过的就直接返回而不去网络进行加载  
    
  29.          this.dvdUrlCache.register(url, getResourcesFileName(url),  
    
  30.                  request.getRequestHeaders().get("Accept"), "UTF-8", DVDUrlCache.ONE_MONTH);  
    
  31.          return this.dvdUrlCache.load(url);  
    
  32.      } catch (Exception e) {  
    
  33.          Log.e(LOG_TAG, "", e);  
    
  34.      }  
    
  35.      return null;  
    
  36.  }  
    

接下来我们看下 DVDUrlCache 的实现:
DVDUrlCache 主要做了这么几件事:
1.封装一个内部类 CacheEntry,做一些基本信息存储

Java 代码

  1. private static class CacheEntry {
  2.     //用作存储的URL  
    
  3.      public String url;  
    
  4.      //本地保存的文件名称  
    
  5.      public String fileName;  
    
  6.      //标记资源的头部,通过request参数取回  
    
  7.      String mimeType;  
    
  8.      //需要缓存的资源文件的编码  
    
  9.      public String encoding;  
    
  10.      //缓存最大有效时间  
    
  11.      long maxAgeMillis;  
    
  12.      private CacheEntry(String url, String fileName,  
    
  13.                         String mimeType, String encoding, long maxAgeMillis) {  
    
  14.          this.url = url;  
    
  15.          this.fileName = fileName;  
    
  16.          this.mimeType = mimeType;  
    
  17.          this.encoding = encoding;  
    
  18.          this.maxAgeMillis = maxAgeMillis;  
    
  19.      }  
    
  20.  }  
    

接下来是类的构造放方法以及需要映射的 map

Java 代码

  1. //Key 为 URL
  2. private Map cacheEntries = new HashMap<>();
  3. //缓存路径的根目录
  4.  private File rootDir = null;  
    
  5.  DVDUrlCache() {  
    
  6. //获取本地缓存路径,这个请在调试中自行修改
  7.      this.rootDir = DiskUtil.getDiskCacheDir(DVDApplicationContext.getInstance().getApplicationContext());  
    
  8.  }  
    
  9. //资源注册,参考 DVDWebViewClient 的调用
  10. public void register(String url, String cacheFileName,
  11.                       String mimeType, String encoding,  
    
  12.                       long maxAgeMillis) {  
    
  13.      CacheEntry entry = new CacheEntry(url, cacheFileName, mimeType, encoding, maxAgeMillis);  
    
  14.      this.cacheEntries.put(url, entry);  
    
  15.  }  
    

然后是核心内容

Java 代码

  1. public WebResourceResponse load(final String url) {
  2.      try {  
    
  3.          final CacheEntry cacheEntry = this.cacheEntries.get(url);  
    
  4.          if (cacheEntry == null) {  
    
  5.              return null;  
    
  6.          }  
    
  7.          final File cachedFile = new File(this.rootDir.getPath() + File.separator + cacheEntry.fileName);  
    
  8.          if (BuildConfig.DEBUG) {  
    
  9.              Log.d(LOG_TAG, "cachedFile is " + cachedFile);  
    
  10.          }  
    
  11.          if (cachedFile.exists() && isReadFromCache(url)) {  
    
  12.              //还没有下载完,在快速切换URL的时候,可能会有很多task并没有及时完成,所以这里需要一个map用于存储正在下载的URL,下载完成后需要移除相应的task  
    
  13.              if (queueMap.containsKey(url)) {                 
    
  14.                  return null;  
    
  15.              }  
    
  16. //过期后直接删除本地缓存内容
  17.              long cacheEntryAge = System.currentTimeMillis() - cachedFile.lastModified();  
    
  18.              if (cacheEntryAge > cacheEntry.maxAgeMillis) {  
    
  19.                  cachedFile.delete();  
    
  20.                  if (BuildConfig.DEBUG) {  
    
  21.                      Log.d(LOG_TAG, "Deleting from cache: " + url);  
    
  22.                  }  
    
  23.                  return null;  
    
  24.              }  
    
  25.              //cached file exists and is not too old. Return file.  
    
  26.              if (BuildConfig.DEBUG) {  
    
  27.                  Log.d(LOG_TAG, url + " ### cache file : " + cachedFile.getAbsolutePath());  
    
  28.              }  
    
  29.              return new WebResourceResponse(  
    
  30.                      cacheEntry.mimeType, cacheEntry.encoding, new FileInputStream(cachedFile));  
    
  31.          } else {  
    
  32.              if (!queueMap.containsKey(url)) {  
    
  33.                  queueMap.put(url, new Callable() {  
    
  34.                      @Override  
    
  35.                      public Boolean call() throws Exception {  
    
  36.                          return downloadAndStore(url, cacheEntry);  
    
  37.                      }  
    
  38.                  });  
    
  39.                  final FutureTask futureTask = ThreadPoolManager.getInstance().addTaskCallback(queueMap.get(url));  
    
  40.                  ThreadPoolManager.getInstance().addTask(new Runnable() {  
    
  41.                      @Override  
    
  42.                      public void run() {  
    
  43.                          try {  
    
  44.                              if (futureTask.get()) {  
    
  45.                                  if (BuildConfig.DEBUG) {  
    
  46.                                      Log.d(LOG_TAG, "remove " + url);  
    
  47.                                  }  
    
  48.                                  queueMap.remove(url);  
    
  49.                              }  
    
  50.                          } catch (InterruptedException | ExecutionException e) {  
    
  51.                              Log.d(LOG_TAG, "", e);  
    
  52.                          }  
    
  53.                      }  
    
  54.                  });  
    
  55.              }  
    
  56.          }  
    
  57.      } catch (Exception e) {  
    
  58.          Log.d(LOG_TAG, "Error reading file over network: ", e);  
    
  59.      }  
    
  60.      return null;  
    
  61.  }  
    
  62. //这个方法是资源下载
  63.  private boolean downloadAndStore(final String url, final CacheEntry cacheEntry)  
    
  64.          throws IOException {  
    
  65.      FileOutputStream fileOutputStream = null;  
    
  66.      InputStream urlInput = null;  
    
  67.      try {  
    
  68.          URL urlObj = new URL(url);  
    
  69.          URLConnection urlConnection = urlObj.openConnection();  
    
  70.          urlInput = urlConnection.getInputStream();  
    
  71.          String tempFilePath = DVDUrlCache.this.rootDir.getPath() + File.separator + cacheEntry.fileName + ".temp";  
    
  72.          File tempFile = new File(tempFilePath);  
    
  73.          fileOutputStream = new FileOutputStream(tempFile);  
    
  74.          byte[] buffer = new byte[1024];  
    
  75.          int length;  
    
  76.          while ((length = urlInput.read(buffer)) > 0) {  
    
  77.              fileOutputStream.write(buffer, 0, length);  
    
  78.          }  
    
  79.          fileOutputStream.flush();  
    
  80.          File lastFile = new File(tempFilePath.replace(".temp", ""));  
    
  81.          boolean renameResult = tempFile.renameTo(lastFile);  
    
  82.          if (!renameResult) {  
    
  83.              Log.w(LOG_TAG, "rename file failed, " + tempFilePath);  
    
  84.          }  
    
  85. // Log.d(LOG_TAG, "Cache file: " + cacheEntry.fileName + " stored. ");
  86.          return true;  
    
  87.      } catch (Exception e) {  
    
  88.          Log.e(LOG_TAG, "", e);  
    
  89.      } finally {  
    
  90.          if (urlInput != null) {  
    
  91.              urlInput.close();  
    
  92.          }  
    
  93.          if (fileOutputStream != null) {  
    
  94.              fileOutputStream.close();  
    
  95.          }  
    
  96.      }  
    
  97.      return false;  
    
  98.  }  
    
  99.  private boolean isReadFromCache(String url) {  
    
  100.      return true;  
    
  101.  }  
    

完整的 DVDURLCache 代码,方便大家直接 copy

Java 代码

  1. package com.davdian.seller.util.WebUtil;
  2. import android.util.Log;
  3. import android.webkit.WebResourceResponse;
  4. import com.davdian.seller.BuildConfig;
  5. import com.davdian.seller.global.DVDApplicationContext;
  6. import com.davdian.seller.util.DiskUtil;
  7. import com.davdian.seller.util.ThreadPoolManager;
  8. import java.io.*;
  9. import java.net.URL;
  10. import java.net.URLConnection;
  11. import java.util.HashMap;
  12. import java.util.LinkedHashMap;
  13. import java.util.Map;
  14. import java.util.concurrent.Callable;
  15. import java.util.concurrent.ExecutionException;
  16. import java.util.concurrent.FutureTask;
  17. /**
    • 只缓存图片的自定义接口
    • Created by hongminghuangfu on 16/9/3.
  18. */
  19. public class DVDUrlCache {
  20.  private static final String LOG_TAG = "DVDUrlCache";  
    
  21.  private static final long ONE_SECOND = 1000L;  
    
  22.  private static final long ONE_MINUTE = 60L * ONE_SECOND;  
    
  23.  static final long ONE_HOUR = 60 * ONE_MINUTE;  
    
  24.  static final long ONE_DAY = 24 * ONE_HOUR;  
    
  25.  static final long ONE_MONTH = 30 * ONE_DAY;  
    
  26.  private static final LinkedHashMap> queueMap = new LinkedHashMap<>();  
    
  27.  private static class CacheEntry {  
    
  28.      public String url;  
    
  29.      public String fileName;  
    
  30.      String mimeType;  
    
  31.      public String encoding;  
    
  32.      long maxAgeMillis;  
    
  33.      private CacheEntry(String url, String fileName,  
    
  34.                         String mimeType, String encoding, long maxAgeMillis) {  
    
  35.          this.url = url;  
    
  36.          this.fileName = fileName;  
    
  37.          this.mimeType = mimeType;  
    
  38.          this.encoding = encoding;  
    
  39.          this.maxAgeMillis = maxAgeMillis;  
    
  40.      }  
    
  41.  }  
    
  42.  private Map cacheEntries = new HashMap<>();  
    
  43.  private File rootDir = null;  
    
  44.  DVDUrlCache() {  
    
  45. //本地缓存路径,请在调试中自行修改
  46.      this.rootDir = DiskUtil.getDiskCacheDir(DVDApplicationContext.getInstance().getApplicationContext());  
    
  47.  }  
    
  48.  public void register(String url, String cacheFileName,  
    
  49.                       String mimeType, String encoding,  
    
  50.                       long maxAgeMillis) {  
    
  51.      CacheEntry entry = new CacheEntry(url, cacheFileName, mimeType, encoding, maxAgeMillis);  
    
  52.      this.cacheEntries.put(url, entry);  
    
  53.  }  
    
  54.  public WebResourceResponse load(final String url) {  
    
  55.      try {  
    
  56.          final CacheEntry cacheEntry = this.cacheEntries.get(url);  
    
  57.          if (cacheEntry == null) {  
    
  58.              return null;  
    
  59.          }  
    
  60.          final File cachedFile = new File(this.rootDir.getPath() + File.separator + cacheEntry.fileName);  
    
  61.          if (BuildConfig.DEBUG) {  
    
  62.              Log.d(LOG_TAG, "cachedFile is " + cachedFile);  
    
  63.          }  
    
  64.          if (cachedFile.exists() && isReadFromCache(url)) {  
    
  65.              //还没有下载完  
    
  66.              if (queueMap.containsKey(url)) {                  
    
  67.                  return null;  
    
  68.              }  
    
  69.              long cacheEntryAge = System.currentTimeMillis() - cachedFile.lastModified();  
    
  70.              if (cacheEntryAge > cacheEntry.maxAgeMillis) {  
    
  71.                  cachedFile.delete();  
    
  72.                  if (BuildConfig.DEBUG) {  
    
  73.                      Log.d(LOG_TAG, "Deleting from cache: " + url);  
    
  74.                  }  
    
  75.                  return null;  
    
  76.              }  
    
  77.              //cached file exists and is not too old. Return file.  
    
  78.              if (BuildConfig.DEBUG) {  
    
  79.                  Log.d(LOG_TAG, url + " ### cache file : " + cachedFile.getAbsolutePath());  
    
  80.              }  
    
  81.              return new WebResourceResponse(  
    
  82.                      cacheEntry.mimeType, cacheEntry.encoding, new FileInputStream(cachedFile));  
    
  83.          } else {  
    
  84.              if (!queueMap.containsKey(url)) {  
    
  85.                  queueMap.put(url, new Callable() {  
    
  86.                      @Override  
    
  87.                      public Boolean call() throws Exception {  
    
  88.                          return downloadAndStore(url, cacheEntry);  
    
  89.                      }  
    
  90.                  });  
    
  91.                  final FutureTask futureTask = ThreadPoolManager.getInstance().addTaskCallback(queueMap.get(url));  
    
  92.                  ThreadPoolManager.getInstance().addTask(new Runnable() {  
    
  93.                      @Override  
    
  94.                      public void run() {  
    
  95.                          try {  
    
  96.                              if (futureTask.get()) {  
    
  97.                                  if (BuildConfig.DEBUG) {  
    
  98.                                      Log.d(LOG_TAG, "remove " + url);  
    
  99.                                  }  
    
  100.                                  queueMap.remove(url);  
    
  101.                              }  
    
  102.                          } catch (InterruptedException | ExecutionException e) {  
    
  103.                              Log.d(LOG_TAG, "", e);  
    
  104.                          }  
    
  105.                      }  
    
  106.                  });  
    
  107.              }  
    
  108.          }  
    
  109.      } catch (Exception e) {  
    
  110.          Log.d(LOG_TAG, "Error reading file over network: ", e);  
    
  111.      }  
    
  112.      return null;  
    
  113.  }  
    
  114.  private boolean downloadAndStore(final String url, final CacheEntry cacheEntry)  
    
  115.          throws IOException {  
    
  116.      FileOutputStream fileOutputStream = null;  
    
  117.      InputStream urlInput = null;  
    
  118.      try {  
    
  119.          URL urlObj = new URL(url);  
    
  120.          URLConnection urlConnection = urlObj.openConnection();  
    
  121.          urlInput = urlConnection.getInputStream();  
    
  122.          String tempFilePath = DVDUrlCache.this.rootDir.getPath() + File.separator + cacheEntry.fileName + ".temp";  
    
  123.          File tempFile = new File(tempFilePath);  
    
  124.          fileOutputStream = new FileOutputStream(tempFile);  
    
  125.          byte[] buffer = new byte[1024];  
    
  126.          int length;  
    
  127.          while ((length = urlInput.read(buffer)) > 0) {  
    
  128.              fileOutputStream.write(buffer, 0, length);  
    
  129.          }  
    
  130.          fileOutputStream.flush();  
    
  131.          File lastFile = new File(tempFilePath.replace(".temp", ""));  
    
  132.          boolean renameResult = tempFile.renameTo(lastFile);  
    
  133.          if (!renameResult) {  
    
  134.              Log.w(LOG_TAG, "rename file failed, " + tempFilePath);  
    
  135.          }  
    
  136. // Log.d(LOG_TAG, "Cache file: " + cacheEntry.fileName + " stored. ");
  137.          return true;  
    
  138.      } catch (Exception e) {  
    
  139.          Log.e(LOG_TAG, "", e);  
    
  140.      } finally {  
    
  141.          if (urlInput != null) {  
    
  142.              urlInput.close();  
    
  143.          }  
    
  144.          if (fileOutputStream != null) {  
    
  145.              fileOutputStream.close();  
    
  146.          }  
    
  147.      }  
    
  148.      return false;  
    
  149.  }  
    
  150.  private boolean isReadFromCache(String url) {  
    
  151.      return true;  
    
  152.  }  
    
  153. }

ThreadPoolManager 很简单:

Java 代码

  1. package com.davdian.seller.util;
  2. import android.util.Log;
  3. import java.util.concurrent.Callable;
  4. import java.util.concurrent.ExecutorService;
  5. import java.util.concurrent.Executors;
  6. import java.util.concurrent.FutureTask;
  7. /**
    • 线程池
    • Created by hongminghuangfu on 16/9/9.
  8. */
  9. public class ThreadPoolManager {
  10.  private static final String LOG_TAG = "ThreadPoolManager";  
    
  11.  private static final ThreadPoolManager instance = new ThreadPoolManager();  
    
  12.  private ExecutorService threadPool = Executors.newFixedThreadPool(100);  
    
  13.  public static ThreadPoolManager getInstance() {  
    
  14.      return instance;  
    
  15.  }  
    
  16.  /** 
    
  17.   * @param runnable 不返回执行结果的异步任务 
    
  18.   */  
    
  19.  public void addTask(Runnable runnable) {  
    
  20.      try {  
    
  21.          if (runnable != null) {  
    
  22.              threadPool.execute(runnable);  
    
  23.          }  
    
  24.      } catch (Exception e) {  
    
  25.          Log.e(LOG_TAG, "", e);  
    
  26.      }  
    
  27.  }  
    
  28.  /** 
    
  29.   * @param callback 异步任务 
    
  30.   * @return 你可以获取相应的执行结果 
    
  31.   */  
    
  32.  public FutureTask addTaskCallback(Callable callback) {  
    
  33.      if (callback == null) {  
    
  34.          return null;  
    
  35.      } else {  
    
  36.          FutureTask futureTask = new FutureTask<>(callback);  
    
  37.          threadPool.submit(futureTask);  
    
  38.          return futureTask;  
    
  39.      }  
    
  40.  }  
    
  41. // 这是一个 demo,如果你看不懂,可以打开跑一下
  42. // public static void main(String args[]) {
  43. // FutureTask ft = ThreadPoolManager.getInstance().addTaskCallback(new Callable() {
  44. // @Override
  45. // public Object call() throws Exception {
  46. // int sum = 0;
  47. // for (int i = 0; i < 1000; i++) {
  48. // sum++;
  49. // }
  50. // return sum;
  51. // }
  52. // });
  53. // try {
  54. // System.out.println("执行结果是:" + ft.get());
  55. // } catch (InterruptedException | ExecutionException e) {
  56. // e.printStackTrace();
  57. // }
  58. //
  59. // }
  60. }
  • Android

    Android 是一种以 Linux 为基础的开放源码操作系统,主要使用于便携设备。2005 年由 Google 收购注资,并拉拢多家制造商组成开放手机联盟开发改良,逐渐扩展到到平板电脑及其他领域上。

    334 引用 • 323 回帖 • 17 关注
  • Java

    Java 是一种可以撰写跨平台应用软件的面向对象的程序设计语言,是由 Sun Microsystems 公司于 1995 年 5 月推出的。Java 技术具有卓越的通用性、高效性、平台移植性和安全性。

    3169 引用 • 8208 回帖

相关帖子

欢迎来到这里!

我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。

注册 关于
请输入回帖内容 ...
  • 被你的图片骗进来了。为嘛要用图片打那么多的星呢? emoji 多好,还好看。 ⭐️ 🌟

推荐标签 标签

  • 微信

    腾讯公司 2011 年 1 月 21 日推出的一款手机通讯软件。用户可以通过摇一摇、搜索号码、扫描二维码等添加好友和关注公众平台,同时可以将自己看到的精彩内容分享到微信朋友圈。

    130 引用 • 793 回帖
  • GitLab

    GitLab 是利用 Ruby 一个开源的版本管理系统,实现一个自托管的 Git 项目仓库,可通过 Web 界面操作公开或私有项目。

    46 引用 • 72 回帖
  • Sym

    Sym 是一款用 Java 实现的现代化社区(论坛/BBS/社交网络/博客)系统平台。

    下一代的社区系统,为未来而构建

    524 引用 • 4599 回帖 • 701 关注
  • Vim

    Vim 是类 UNIX 系统文本编辑器 Vi 的加强版本,加入了更多特性来帮助编辑源代码。Vim 的部分增强功能包括文件比较(vimdiff)、语法高亮、全面的帮助系统、本地脚本(Vimscript)和便于选择的可视化模式。

    28 引用 • 66 回帖 • 7 关注
  • 游戏

    沉迷游戏伤身,强撸灰飞烟灭。

    171 引用 • 814 回帖
  • 链滴

    链滴是一个记录生活的地方。

    记录生活,连接点滴

    143 引用 • 3752 回帖 • 2 关注
  • CloudFoundry

    Cloud Foundry 是 VMware 推出的业界第一个开源 PaaS 云平台,它支持多种框架、语言、运行时环境、云平台及应用服务,使开发人员能够在几秒钟内进行应用程序的部署和扩展,无需担心任何基础架构的问题。

    5 引用 • 18 回帖 • 150 关注
  • FFmpeg

    FFmpeg 是一套可以用来记录、转换数字音频、视频,并能将其转化为流的开源计算机程序。

    23 引用 • 31 回帖 • 8 关注
  • Thymeleaf

    Thymeleaf 是一款用于渲染 XML/XHTML/HTML5 内容的模板引擎。类似 Velocity、 FreeMarker 等,它也可以轻易的与 Spring 等 Web 框架进行集成作为 Web 应用的模板引擎。与其它模板引擎相比,Thymeleaf 最大的特点是能够直接在浏览器中打开并正确显示模板页面,而不需要启动整个 Web 应用。

    11 引用 • 19 回帖 • 322 关注
  • MyBatis

    MyBatis 本是 Apache 软件基金会 的一个开源项目 iBatis,2010 年这个项目由 Apache 软件基金会迁移到了 google code,并且改名为 MyBatis ,2013 年 11 月再次迁移到了 GitHub。

    170 引用 • 414 回帖 • 398 关注
  • 安装

    你若安好,便是晴天。

    131 引用 • 1184 回帖 • 1 关注
  • ReactiveX

    ReactiveX 是一个专注于异步编程与控制可观察数据(或者事件)流的 API。它组合了观察者模式,迭代器模式和函数式编程的优秀思想。

    1 引用 • 2 回帖 • 143 关注
  • 持续集成

    持续集成(Continuous Integration)是一种软件开发实践,即团队开发成员经常集成他们的工作,通过每个成员每天至少集成一次,也就意味着每天可能会发生多次集成。每次集成都通过自动化的构建(包括编译,发布,自动化测试)来验证,从而尽早地发现集成错误。

    14 引用 • 7 回帖
  • Mobi.css

    Mobi.css is a lightweight, flexible CSS framework that focus on mobile.

    1 引用 • 6 回帖 • 715 关注
  • 微软

    微软是一家美国跨国科技公司,也是世界 PC 软件开发的先导,由比尔·盖茨与保罗·艾伦创办于 1975 年,公司总部设立在华盛顿州的雷德蒙德(Redmond,邻近西雅图)。以研发、制造、授权和提供广泛的电脑软件服务业务为主。

    8 引用 • 44 回帖 • 3 关注
  • 锤子科技

    锤子科技(Smartisan)成立于 2012 年 5 月,是一家制造移动互联网终端设备的公司,公司的使命是用完美主义的工匠精神,打造用户体验一流的数码消费类产品(智能手机为主),改善人们的生活质量。

    4 引用 • 31 回帖 • 10 关注
  • Caddy

    Caddy 是一款默认自动启用 HTTPS 的 HTTP/2 Web 服务器。

    10 引用 • 54 回帖 • 142 关注
  • 程序员

    程序员是从事程序开发、程序维护的专业人员。

    544 引用 • 3531 回帖
  • jQuery

    jQuery 是一套跨浏览器的 JavaScript 库,强化 HTML 与 JavaScript 之间的操作。由 John Resig 在 2006 年 1 月的 BarCamp NYC 上释出第一个版本。全球约有 28% 的网站使用 jQuery,是非常受欢迎的 JavaScript 库。

    63 引用 • 134 回帖 • 726 关注
  • 快应用

    快应用 是基于手机硬件平台的新型应用形态;标准是由主流手机厂商组成的快应用联盟联合制定;快应用标准的诞生将在研发接口、能力接入、开发者服务等层面建设标准平台;以平台化的生态模式对个人开发者和企业开发者全品类开放。

    15 引用 • 127 回帖
  • 笔记

    好记性不如烂笔头。

    306 引用 • 782 回帖 • 1 关注
  • Node.js

    Node.js 是一个基于 Chrome JavaScript 运行时建立的平台, 用于方便地搭建响应速度快、易于扩展的网络应用。Node.js 使用事件驱动, 非阻塞 I/O 模型而得以轻量和高效。

    138 引用 • 268 回帖 • 128 关注
  • Openfire

    Openfire 是开源的、基于可拓展通讯和表示协议 (XMPP)、采用 Java 编程语言开发的实时协作服务器。Openfire 的效率很高,单台服务器可支持上万并发用户。

    6 引用 • 7 回帖 • 97 关注
  • Maven

    Maven 是基于项目对象模型(POM)、通过一小段描述信息来管理项目的构建、报告和文档的软件项目管理工具。

    186 引用 • 318 回帖 • 332 关注
  • IPFS

    IPFS(InterPlanetary File System,星际文件系统)是永久的、去中心化保存和共享文件的方法,这是一种内容可寻址、版本化、点对点超媒体的分布式协议。请浏览 IPFS 入门笔记了解更多细节。

    20 引用 • 245 回帖 • 241 关注
  • jsDelivr

    jsDelivr 是一个开源的 CDN 服务,可为 npm 包、GitHub 仓库提供免费、快速并且可靠的全球 CDN 加速服务。

    5 引用 • 31 回帖 • 50 关注
  • PWA

    PWA(Progressive Web App)是 Google 在 2015 年提出、2016 年 6 月开始推广的项目。它结合了一系列现代 Web 技术,在网页应用中实现和原生应用相近的用户体验。

    14 引用 • 69 回帖 • 135 关注