All Projects → taoweiji → Grouter Android

taoweiji / Grouter Android

Licence: apache-2.0
原名ActivityRouter,Android 页面及服务组件化框架

Programming Languages

java
68154 projects - #9 most used programming language
kotlin
9241 projects

Projects that are alternatives of or similar to Grouter Android

Vue.isotope
📱 Vue component for isotope filter & sort magical layouts
Stars: ✭ 326 (-13.07%)
Mutual labels:  component
React Hint
Tooltip component for React, Preact, Inferno
Stars: ✭ 338 (-9.87%)
Mutual labels:  component
Nanocomponent
🚃 - create performant HTML components
Stars: ✭ 355 (-5.33%)
Mutual labels:  component
Cache
The Cache component provides an extended PSR-6 implementation for adding cache to your applications.
Stars: ✭ 3,606 (+861.6%)
Mutual labels:  component
Dependency Injection
The DependencyInjection component allows you to standardize and centralize the way objects are constructed in your application.
Stars: ✭ 3,635 (+869.33%)
Mutual labels:  component
Notifier
Sends notifications via one or more channels (email, SMS, ...).
Stars: ✭ 346 (-7.73%)
Mutual labels:  component
Dom Crawler
The DomCrawler component eases DOM navigation for HTML and XML documents.
Stars: ✭ 3,499 (+833.07%)
Mutual labels:  component
Polyfill Ctype
This component provides a partial, native PHP implementation for the Ctype extension.
Stars: ✭ 3,774 (+906.4%)
Mutual labels:  component
React Star Rating Component
Basic React component for star (or any other icon based) rating elements
Stars: ✭ 337 (-10.13%)
Mutual labels:  component
Jigsaw
Jigsaw七巧板 provides a set of web components based on Angular5/8/9+. The main purpose of Jigsaw is to help the application developers to construct complex & intensive interacting & user friendly web pages. Jigsaw is supporting the development of all applications of Big Data Product of ZTE.
Stars: ✭ 354 (-5.6%)
Mutual labels:  component
React Virtualized Tree
A virtualized tree view component making use of react
Stars: ✭ 328 (-12.53%)
Mutual labels:  component
Vue Designer
Vue component design tool
Stars: ✭ 333 (-11.2%)
Mutual labels:  component
Liquor Tree
Tree component based on Vue.js
Stars: ✭ 348 (-7.2%)
Mutual labels:  component
React Music Player
🎵 Maybe the best beautiful HTML5 responsive player component for react :)
Stars: ✭ 321 (-14.4%)
Mutual labels:  component
For Editor
for-editor - A markdown editor based on React
Stars: ✭ 358 (-4.53%)
Mutual labels:  component
Synedit
SynEdit main project
Stars: ✭ 324 (-13.6%)
Mutual labels:  component
Seaside
The framework for developing sophisticated web applications in Smalltalk.
Stars: ✭ 341 (-9.07%)
Mutual labels:  component
Element Queries Spec
A spec for a Container-Style Element Query Syntax
Stars: ✭ 375 (+0%)
Mutual labels:  component
React Cool Img
😎 🏞 A React <Img /> component let you handle image UX and performance as a Pro!
Stars: ✭ 356 (-5.07%)
Mutual labels:  component
Minui
基于规范的小程序 UI 组件库,自定义标签组件,简洁、易用、工具化
Stars: ✭ 3,512 (+836.53%)
Mutual labels:  component

Download

GRouter - 为Android组件化开发而生的路由框架

组件化开发架构中,页面跳转组件间调用是至关重要的两大问题,目前Github上已经有多个开源框架,基本都是通过拼接参数来实现页面跳转、获取服务实例。

GRouter 兼容拼接参数方式同时,区别于其他组件化方案推出了安全构造器方案,把工程内的Activity和服务类的构造器生成在GActivityCenter、GComponentCenter、GTaskCenter、GDelegateCenter类中,方便我们安全地调用,避免了拼接参数容易写错,或者目标类被修改带来的运行错误。

特点

  1. 支持AndroidX、支持 Java 和 Kotlin。
  2. 支持FlutterHybrid H5混合项目,可以通过URL调用原生模块获取服务数据、跳转Activity。
  3. 支持多Module项目、多工程项目;多工程项目支持多scheme。
  4. Activity 跳转支持设置默认转场动画,支持设置单次转场动画,支持指定 Flag,支持多级跳转
  5. Activity、Fragment、Task支持参数注入,无需手动解析参数。
  6. 提供RouterComponent、RouterTask、RouterDelegate三种强大的组件间调用服务组件。
  7. 支持生成HTML文档和导入RAP,方便查询。
  8. 支持服务降级,支持通过服务降级Mock数据,可以实现单Module运行调试,提高开发效率。
  9. 各个组件均支持自动生成构造器,避免拼接参数容易写错问题。
  10. 提供 IDEA 插件,支持快捷跳转到目标类,支持 Java 和 Kotlin。
  11. 使用Gradle插件注册Module模块,简化配置。
  12. RouterComponent支持获取Fragment。
  13. 支持从外部浏览器和其它APP打开内部Activity
  14. 内置5组页面Activity过场动画,并支持5.0的Activity过场动画。

GRouter已经在拥有434个Activity、28个Module的千万用户级别APP稳定使用,大家可以放心使用。GRouter 会一直致力于组件化解决方案,如果你有更好的建议,可以提Issues或私聊联系我。如果你觉得还不错,欢迎 star 该 Github 项目,我们会有持续的优化迭代,感谢你的支持!

文档

查看文档

示例

Activity 页面跳转

// 不推荐
GRouter.getInstance().startActivity(context, "grouter://activity/user?uid=1")
// 不推荐
GRouter.getInstance().activityBuilder("user").put("uid",1).start(context)
// 推荐
GActivityCenter.UserActivity().uid(123).start(context)

下沉接口式 - 组件间服务调用

// 不推荐
val userService = GRouter.getInstance().getComponent("userService") as UserService
// 不推荐
val userService = GRouter.getInstance().getComponent("userService",UserService::class.java)
// 推荐
val userService = GComponentCenter.UserServiceImpl()

非下沉式 - 组件间单任务调用

// 不推荐
val response = GRouter.getInstance().taskBuilder("grouter://task/getUser?uid=1").execute()
// 不推荐
val response = GRouter.getInstance().taskBuilder("getUser").put("uid",1).execute()
// 推荐
val response = GTaskCenter.GetUserTask().uid(1).execute()
// 获取返回值
val user = response.value(User::class.java)

非下沉式 - 反射代理服务

val accountServiceDelegate = GDelegateCenter.AccountService(context)

License

Copyright 2019 taoweiji

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

   http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].