GithubHelp home page GithubHelp logo

oldratlee / io-api Goto Github PK

View Code? Open in Web Editor NEW
56.0 5.0 19.0 1.13 MB

📐 generic API design example by I/O, the demo implementation of https://dzone.com/articles/generic-inputoutput-api-java

Home Page: https://github.com/oldratlee/io-api

License: Apache License 2.0

Java 100.00%
io api java generic demo api-design design io-api

io-api's Introduction

📐 Java的通用IO API设计

Github Workflow Build Status Codecov Java support License GitHub Stars GitHub Forks GitHub Issues GitHub repo size gitpod: Ready to Code

📖 English Documentation | 📖 中文文档



Java的通用I/O API(by Rickard Öberg)中给出了一个通用Java IO API设计,并且有APIDemo代码。更重要的是给出了这个API设计本身的步骤和过程,这让API设计有些条理。文中示范了从 普通简单实现 整理成 正交分解、可复用、可扩展、高性能、无错误的API设计 的过程,这个过程是很值得理解和学习!

设计偏向是艺术,一个赏心悦目的设计,尤其是API设计,旁人看来多是妙手偶得的感觉,如果能有些章可循真是一件美事。

在艺术工作中,真的艺术性工作量也只是一部分,而给出 方法减少艺术工作之中艺术性工作量 的人是 大师。 ❤️

原文中只给出设计的

  • 发展思路
  • 关键接口
  • 典型的使用方式

没有给出可运行的实现及其连接的细节,看起来可能比较费力,因为设计细致分解后抽象度高而不容易理解。

为了大家和自己更深入有效地学习,需要:

  1. 给出这个通用IO API的可运行的Demo实现。
    这个工程即是本人的可运行的Demo实现。
    当然个人力荐你先自己实现练习一下,这样比直接看我的实现,在学习上会有效得多!
  2. 写了一篇分析总结。
    本人的分析总结:用Java I/O API设计练习的分析和总结。这个你可以直接看,以更高效方便地理解这个API的设计。

PS:

上面2件事其实是份自学的家庭作业哦~ 😆
在阿里中间件团队的时候(2011年),@ShawnQianx 大大看到这篇文章时,给组员布置的家庭作业~ :bowtie:

@ShawnQianx 对这篇文章及作者的评论:

设计时,一要分解好系统,二是多个组件拼回来还是系统预期的样子,二步都做好是难度所在。这个人分析和把控的功力很好!

包的功能

  • com.oldratlee.io.core
    核心接口
  • com.oldratlee.io.core.filter
    实现的Filter功能的类
  • com.oldratlee.io.utils
    工具类
  • com.oldratlee.io.demo
    Demo示例的Main

更多信息

API设计的进一步学习资料

简单资料

系统书籍

io-api's People

Contributors

dependabot[bot] avatar oldratlee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  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.