{"id":13848467,"url":"https://github.com/58code/Argo","last_synced_at":"2025-07-12T13:31:07.143Z","repository":{"id":7193464,"uuid":"8497273","full_name":"58code/Argo","owner":"58code","description":"58.com轻量级web框架","archived":false,"fork":false,"pushed_at":"2013-05-15T07:20:13.000Z","size":14399,"stargazers_count":846,"open_issues_count":14,"forks_count":500,"subscribers_count":178,"default_branch":"master","last_synced_at":"2024-08-05T19:35:38.202Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/58code.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-03-01T08:28:08.000Z","updated_at":"2024-07-12T01:13:28.000Z","dependencies_parsed_at":"2022-08-24T20:00:49.894Z","dependency_job_id":null,"html_url":"https://github.com/58code/Argo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/58code%2FArgo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/58code%2FArgo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/58code%2FArgo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/58code%2FArgo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/58code","download_url":"https://codeload.github.com/58code/Argo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225825266,"owners_count":17529905,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-04T19:00:49.950Z","updated_at":"2024-11-22T00:30:26.439Z","avatar_url":"https://github.com/58code.png","language":"Java","funding_links":[],"categories":["开发框架","Java"],"sub_categories":[],"readme":"## 历史，动机(motivation)\r\n\r\nArgo起源与[58同城]的内部web框架wf(web framework)。\r\n\r\n目前wf支撑着[58同城]几乎所有的web站点，包括wap和手机端的访问等，现在wf每天处理10亿级的请求。经过长时间的运作与运行，证明wf是一个可靠的、高效的web框架。\r\n\r\n\r\n作为一个有一定规模的互联网企业，如果在变化的互联网环境中上线一个项目，在软件开发中需要在三方面进行平衡：\r\n\r\n1. 组织/公司，在一个组织内部，需要每个项目开发尽量有统一的风格、架构，学习成本、维护成本等尽可能低；\r\n1. 运维，希望每个站点的配置和可执行部分分离，部署的方式相同；\r\n1. 项目内部，希望程序员聚焦在业务上，可以快速实现产品需求、响应产品变化。\r\n在此基础上，我们开发了wf。\r\n\r\nArgo在wf做了大量优化和重构，以适应各组织软件开发的个性化需求，提升了系统性能，具有更好的可扩展性。Argo的开源反过来也促进wf2.0的开发。\r\n\r\n\r\n## 哲学观 (philosophy)\r\n1. [约定优于配置]，减少软件开发人员需做决定的数量，获得简单的好处，而又不失灵活性。Argo体系中有且只有一个组织级约定，规定包的命名，配置文件路径，日志文件路径等。组织的约定是不容侵犯，每个项目在组织级约定下工作。组织级约定建议以jar形式下发给各项目。\r\n1. 简单，Argo可以不需要任何配置文件，项目代码结构简单，易于维护。\r\n1. 纪律，包和类的命名都受组织级约定的控制，任何违反约定的行为可能导致系统无法正常运行。\r\n\r\n## 系统特点 (features)\r\n\r\n1. SEO友好的URL结构，Argo天然支持RESTful的url结构，并能自动匹配合适的参数；\r\n1. 零配置，甚至你不要web.xml就能在tomcat上运行；\r\n1. 插拔式组件架构，可以灵活扩张功能；\r\n1. 高安全性，提供集群模式下，避免ip欺骗等功能。\r\n\r\n## 系统约定 (convention)\r\n\r\nArgo不是一个通用的web框架，一个问题解决方案可能有很多，但在Argo中只提供一种解决方案。Argo在以下约定中工作：\r\n\r\n1. servlet 3.0环境，主要针对Tomcat 7.x；\r\n1. 基于[guice]的Ioc，组织和项目可以各提供一个module注入模块，而且module的命名必须符合约定；\r\n1. maven依赖，项目的代码体系和maven默认代码体系一致，maven以插件提供开发过程中所需要的开发运行环境（[jetty:run]或[tomcat7:run]）。\r\n\r\n## Hello World\r\n\r\n请参考例子 samples/hello-world\r\n\r\n```shell\r\nmvn tomcat7:run\r\n```\r\n\r\n或者\r\n```shell\r\nmvn jetty:run\r\n```\r\n\r\n然后浏览\r\n\r\nhttp://localhost/\r\n\r\n## 进阶\r\n\r\nTODO\r\n\r\n## 如何实现 (how)\r\n\r\nTODO\r\n\r\n## 更新日志\r\n### 2013-03-21\r\n1. 修正 issues #1, #2,\r\n1. 修正 ContextPath不是根目录(\"/\")下无法正常运行的bug\r\n1. 提供model中默认参数 __beat,便于在view中使用\r\n1. 提供war:war打包plugin实例，移除web.xml的依赖\r\n\r\n```xml\r\n\r\n\u003cplugin\u003e\r\n  \u003cgroupId\u003eorg.apache.maven.plugins\u003c/groupId\u003e\r\n  \u003cartifactId\u003emaven-war-plugin\u003c/artifactId\u003e\r\n  \u003cversion\u003e2.3\u003c/version\u003e\r\n  \u003cconfiguration\u003e\r\n    \u003cfailOnMissingWebXml\u003efalse\u003c/failOnMissingWebXml\u003e\r\n  \u003c/configuration\u003e\r\n\u003c/plugin\u003e\r\n\r\n```\r\n\r\n[58同城]: http://www.58.com/\r\n[约定优于配置]: http://zh.wikipedia.org/wiki/%E7%BA%A6%E5%AE%9A%E4%BC%98%E4%BA%8E%E9%85%8D%E7%BD%AE\r\n[guice]: http://code.google.com/p/google-guice/\r\n[jetty:run]: http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin\r\n[tomcat7:run]: http://tomcat.apache.org/maven-plugin-2.0/tomcat7-maven-plugin/run-mojo.html\r\n\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F58code%2FArgo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F58code%2FArgo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F58code%2FArgo/lists"}