reasonableframework/README.md

88 lines
5.8 KiB
Markdown
Raw Normal View History

2019-02-16 06:34:35 +00:00
# ReasonableFramework
2020-07-01 01:55:26 +00:00
![License LGPLv3](https://img.shields.io/github/license/gnh1201/reasonableframework.svg)
2019-06-11 00:14:36 +00:00
2024-04-29 13:08:59 +00:00
ReasonableFramework is RVHM structured PHP framework. aka, RSF, VSPF, C-2020-018490
2019-03-15 01:49:27 +00:00
2024-04-29 13:07:45 +00:00
## Specifications
- Various types of database connection drivers. e.g, PHP PDO, MySQLi, Legacy MySQL, MySQL over the shell, Oracle(OCI)
2024-04-29 13:07:59 +00:00
- No OOP, Just `RVHM` structure
2024-04-29 13:16:02 +00:00
- R is Route. like as `controller`
2024-04-29 13:07:45 +00:00
- V is View
2024-04-29 13:16:02 +00:00
- H is Helper. like a `import` on Python, Go, NodeJS
- M is Model. it implemented with `KV bind`(like as `Map` data structure), Model is optional.
2024-04-29 13:07:45 +00:00
- Controllable shared variables: Minimize abuse of global variables. Inspired by the `scope` of AngularJS, and `SharedPreferences` of Android Framework
- CGI style compatibility prepared for industrial applications: This framework can utilize both the latest object-oriented style and the CGI style required in industrial applications.
2017-12-17 20:36:36 +00:00
2017-12-22 18:45:53 +00:00
## Compatible
2017-12-22 18:46:12 +00:00
- Tested in PHP 5.3.3
- Tested in PHP 7.x
2017-12-22 18:45:53 +00:00
2017-12-17 20:36:55 +00:00
## How to use
2018-12-11 07:02:45 +00:00
- Extract or clone this project to your (restrictive) shared web hosting.
2019-02-16 06:44:40 +00:00
- You can intergrate all of PHP projects (linear, modular (ex. `autoloader`), or others) without complicated extensions.
2019-02-16 06:39:31 +00:00
- You can write your code and rewrite by `route` parameter without heavy framework. (like as `controller`)
2019-02-16 06:39:13 +00:00
- You can add your custom `ini.php` configuration file in `config` directory.
2017-12-17 20:36:36 +00:00
- Enjoy it!
2018-04-14 16:48:55 +00:00
## Map of structure
2019-02-16 06:39:13 +00:00
![Map of structure](https://github.com/gnh1201/reasonableframework/raw/master/assets/img/reasonableframework.jpg)
2018-04-06 09:06:34 +00:00
2018-06-11 05:02:46 +00:00
## Quick Start
1. git clone https://github.com/gnh1201/reasonableframework.git
2021-04-02 05:08:01 +00:00
2. edit database configuration: `/storage/config/database.ini.php`
2020-02-17 03:35:16 +00:00
3. create new file: `/route/example.php`
2021-04-02 05:08:01 +00:00
4. go to `http://:base_url/?route=example` or `http://:base_url/example/`(if set `.htaccess`) in the web browser.
2020-07-01 02:01:25 +00:00
5. code it.
2018-06-11 05:02:46 +00:00
2023-04-12 06:36:46 +00:00
## Use cases
2020-04-20 08:31:40 +00:00
- [Send severities from Zabbix to Grafana](https://gist.github.com/gnh1201/792964e9719d2f62157cf46e394888f5)
2023-04-12 06:36:46 +00:00
- [REST API Integration (Papago Translation REST API)](https://gist.github.com/gnh1201/081484e6f5e10bd3be819093ba5f49c8)
- [Payment Gateway Integration](https://github.com/gnh1201/reasonableframework/blob/master/route/orderpay.pgkcp.php)
2018-03-10 17:15:08 +00:00
2023-02-27 11:01:24 +00:00
## Remote logging
- Remote logging feature based on [RFC3164(The BSD Syslog Protocol)](https://tools.ietf.org/html/rfc3164)
2020-02-07 01:29:34 +00:00
2024-04-29 13:07:45 +00:00
## Tested on free web hostings
2020-04-13 02:58:19 +00:00
| Provider | Pass? | Tested version | Note
2020-07-01 02:01:25 +00:00
| ---------------------- | ------ | -------------- | -------------------------- |
2020-07-01 08:36:54 +00:00
| [vultr.com](https://catswords.re.kr/go/vultr) (Vultr Holdings Co.) | :heavy_check_mark: Passed | v1.6.5.2 | Paid, Pre-configured LAMP server |
| cafe24.com (Cafe24 Inc.) | :heavy_check_mark: Passed | v1.6.2 | Paid |
2020-07-01 08:35:03 +00:00
| woobi.co.kr (MyCGI) | :heavy_check_mark: Passed | v1.6.2 | |
| dothome.co.kr (Anysecure Inc.) | :heavy_check_mark: Passed | v1.5 | |
| ivyro.net (Smileserv Inc.) | :heavy_check_mark: Passed | v1.5 | |
2020-07-01 02:09:17 +00:00
| 000webhost.com | :warning: Warn | v1.5 | Advertising logo |
| freewebhostingarea.com | :heavy_check_mark: Passed | v1.5 | |
| infinityfree.net | :warning: Warn | v1.5 | Anti-crawling |
| freehosting.io | :heavy_check_mark: Passed | v1.5 | |
| freehostingeu.com | :warning: Warn | v1.5 | CURL blocked |
| freehostingnoads.net | :warning: Warn | v1.5 | CURL blocked |
| awardspace.com | :warning: Warn | v1.5 | CURL blocked |
2020-04-13 02:58:19 +00:00
2023-04-12 06:36:46 +00:00
## How to use CLI (Command-line interface)
2018-07-23 05:01:54 +00:00
```
2021-04-02 05:08:01 +00:00
$ php cli.php --route :route --session-id :session_id
2018-07-23 05:01:54 +00:00
```
2023-04-12 06:36:46 +00:00
## Comment about PSR standards
2023-04-14 08:53:14 +00:00
Many people are saying that this project seems to be distant from the [PSR](https://www.php-fig.org/psr/) standards, and that claim is correct.
2023-04-12 06:36:46 +00:00
2023-04-12 06:52:36 +00:00
The coding convention of this project is similar to the CGI style that was widely used in the early 2000s. Moreover, this style is still observed in solutions written in PHP that are sold in markets such as [WordPress](https://wordpress.org/) plugins, [a local-optimized CMS](https://github.com/gnuboard/gnuboard5), or [Codecanyon](https://codecanyon.net/) in 2023.
2023-04-12 06:36:46 +00:00
Although this project hardly uses object-oriented concepts and does not use package managers like Composer much, it still incorporates concepts such as Model, View, Controller, Router, and Helper that are proposed in modern frameworks, and we have made efforts to provide a similar experience as much as possible.
2023-04-14 08:55:44 +00:00
We made efforts to address common security vulnerabilities (XSS, CSRF, SQL injection) in web applications, and included many code snippets that were designed to minimize reliance on specific DBMS or communication drivers.
2023-04-12 06:36:46 +00:00
The specifications that this project offers are still in demand in enterprise environments, so it can be a useful solution if you happen to be in such a situation.
2020-01-28 12:19:23 +00:00
2023-04-12 07:02:15 +00:00
Whenever this project was introduced, I received a lot of questions about PSR, and I also made efforts to find customers who were willing to pay for a PSR version, such as holding conferences for existing customers. However, there is still no good news. Until good news comes, my plan is to mainly maintain this project.
2023-04-12 06:45:27 +00:00
If you want to comply with the PSR standards and your colleagues are also ready to learn them humbly, we recommend that you consider [Codeigniter](https://github.com/bcit-ci/CodeIgniter) (which has a similar structure to this project) or [Silm Framework](https://github.com/slimphp/Slim).
2024-04-29 13:22:32 +00:00
## Security Policy
- [Security policy](SECURITY.md)
2020-01-28 12:19:23 +00:00
## Contact us
2022-11-25 14:15:20 +00:00
- abuse@catswords.net
2023-08-08 05:43:51 +00:00
- ActivityPub [@catswords_oss@catswords.social](https://catswords.social/@catswords_oss)