Giter Site home page Giter Site logo

chenjianping99 / gankdaily Goto Github PK

View Code? Open in Web Editor NEW

This project forked from maoruibin/gankdaily

0.0 2.0 0.0 1.68 MB

A application used to show technical information in every working days, use MVP pattern.

Home Page: http://fir.im/gankdaily

License: GNU General Public License v3.0

HTML 3.17% Java 96.83%

gankdaily's Introduction

###GankDaily

icon

每日提供技术干货的App

###干货数据源

应用中的所有干货数据均来自干货集中营

干货集中营是一个技术干货共享平台。每个工作日,网站都会分享一些技术干货信息,包括Android、iOS、App等技术干货,除此之外还有福利和休息视频可供你享用。 如果你是移动开发者,这个App一定很适合你。当然,如果你是一个宅男,也许你会对每天的福利更感兴趣。Enjoy it。

App设计

整个项目借鉴自 @drakeet 的妹纸。但是在原项目基础上, 自己在代码层面和UI层面上做了自己的修改。

####UI设计

放弃使用瀑布式的妹子流做主页,转而让首页展示当天干货信息,更加注重干货内容(Content)的呈现, 如下所示,相比原妹纸项目,现在首屏只有一张福利图,如果觉得看的不过瘾,应用也提供了纯妹子视图入口,点击首页 右上角按钮,选择纯妹子,就可以看到所有的妹子们了,更加纯粹的妹子流。

gank_daily_introduce

####代码设计

原项目使用 Retrofit+RxJava 的组合获取网络数据,再加上使用Lambda表达式,代码已经变得很精简,所以把获取数据的代码放在 Activity 中也不显得混乱, 但是作为一个有追求的程序员,既然已经知道有 MVP 这种架构模式可以解决项目分层的问题, 那为什么不试着使用 MVP 去对代码进行进一步的优化呢,所以整个项目使用了 MVP 架构,将所有的数据请求、业务逻辑都提取到 Presenter 层中。 使用 MVP 后需要为每一个 Activity 编写一个对应一个 Presenter(控制器)类,让 Activity 担当纯粹的 View 角色, 这样 Activity 就主要负责一些界面更新操作,具体的业务逻辑都交托给 Presenter 层处理,代码结构因此也变得更加清晰。

更多关于项目中对 MVP 模式的实践,这里自己整理了一篇博客进行详细介绍。

MVP 模式在 GankDaily 中的应用

下载


fir下载

###依赖库

###参考资料

License

/*
 *       
 * Copyright (C) 2015 Drakeet <[email protected]>
 * Copyright (C) 2015 GuDong <[email protected]>
 *
 * Meizhi is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Meizhi is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Meizhi.  If not, see <http://www.gnu.org/licenses/>.
 */

gankdaily's People

Contributors

gongwen avatar maoruibin avatar

Watchers

 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.