• MVVM 架构模式与其背后的设计思想

  • 在去年 Google 引入 Android Architecture Components 之前,Google 在 Android 原生应用开发的架构上并没有提出任何参考设计,但在江湖上早有各种 MVC、MVP 和 MVVM 的应用。这篇文章主要介绍 MVVM 以及应用这种架构模式背后所蕴含的设计思想。 架构的意义可以被总结为四个字 “抵御风险”,这里风险可以理解为软件开发周期里面的各类成本,总结起来其实就是时间成本和人力成本,因为不管是开发、维护、管理或者计划都可以算作人力和时间的投入。架构好坏的评判标准就在于其抵御风险的能力。好的架构需要具备良好的扩展性、可伸缩性、可...
  • OpenGL - Rotating mapped texture in a rectangular viewport

  • To map a texture to a rectangular viewport, we need to define at least 4 vertices for the rectangle, ensure that the texture coordinates are perfectly mapped to the vertices, and call glDrawArrays(GL_TRIANGLE_STRIP, 0, 4)...
  • Correctly implementing onInterceptTouchEvent and onTouchEvent methods for ViewGroup

  • There's already an article on this topic on the Android developer website, I write this post just to elaborate further on the topic to make it easier to understand. onTouchEvent is declared in the ...
  • Using Minerl with Github Pages

  • Well this does not seem convincing, but I wrote Minerl because I am going to start blogging about my study and work experience after having worked as a programmer for more than 5 years, for doing that, I need a blog and then I need a static site gene...
  • Introduction to Minerl

  • Introduction Minerl is a blog-aware static site generator written in Perl, it supports tagging, automatic archiving, post, page and layout inheritance. ...