定制 emeraldion/emerails 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

emeraldion/emerails

Composer 安装命令:

composer create-project emeraldion/emerails

包简介

Rails-like LAMP web application framework

README 文档

README

Build Status Coverage Status Latest Unstable Version composer.lock Total Downloads Monthly Downloads

EmeRails

EmeRails is a PHP web application framework loosely inspired to Ruby on Rails. It has a MVC architecture, an ORM layer that mimics ActiveRecord, and separates presentation from business logic quite nicely, prioritizing conventions over configuration.

It supports templating, page caching, action filtering, and a lot of useful features out of the box that save coding time and server load. Similarly to Rails, EmeRails has a generate.php script that can quickly get you up and running, creating your controllers, models, and views in no time.

EmeRails comes with default support for MySQL via mysql (deprecated) and mysqli extensions, is continuously tested on PHP 5.6, 7.1, and nightly.

Generator

EmeRails comes with a generator script that creates controllers, views, and models with no code:

scripts/generate.php
Usage: generate.php controller controller_name [action1 [action2 ...]]
       generate.php model model_name [field1 [type1 [field2 [type2 ...]]]]

In order to generate a controller and its views, run the generator script as follows:

scripts/generate.php controller foo bar baz

This will create a controller class FooController with the default FooController::index action, and two actions, FooController::bar and FooController::baz. It will also generate the views index, bar, and baz.

In order to generate a model with a list of fields and types, run the generator script as follows:

scripts/generate.php model foo bar int baz float

This will create a model class Foo with two fields, bar of type int, and baz of type float. It will also create the backing table in the DB.

Contributing

Thank you for your interest in EmeRails! Feel free to open issues or submit a PR. See the Contributing Guidelines for detailed instructions.

Development

EmeRails is a PHP web application. If you are unsure what to do, follow these steps:

Installing a local MySQL server

For development, it's best to use a local MySQL server. I use MAMP on Mac OS X, but you can also run MySQL server in a Docker container.

Install dependencies

make install

Create test DB

This command will create a test MySQL DB:

make create_test_db

Note the script assumes there is a mysql command in the PATH. It also assumes the database user is root and will prompt for the password. If you want to use another user, you have to edit Makefile.

Run tests

Run tests (limited coverage):

php_env=test make test

Docker

If you're familiar with Docker and Docker Compose, you may want to package your app as a Docker image thanks to the included Dockerfile:

make docker-build

This goal builds the app as the emerails-app image; to easily run the image in a container:

make docker-run

This goal runs a mysql DB container, spins up an app container, links them, and forwards the app container's port 80 to local port 8080. You can then hit the app opening your browser on http://localhost:8080.

To stop the app and mysql containers, run the goal:

make docker-stop

There's also a handy goal to cleanup when you're done with Docker images:

make docker-clean

The included docker-compose.yml configuration also allows you to spin up the application locally:

docker-compose up --build -d

Documentation

To generate documentation, you will need Doxygen. You can build it from sources, download a binary, or install it via homebrew:

brew install doxygen

Once you have Doxygen, you can run the docs target:

make docs

License

MIT

Copyright (c) 2008, 2017 Claudio Procida

emeraldion/emerails 适用场景与选型建议

emeraldion/emerails 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.57k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2017 年 01 月 07 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「framework」 「rails」 「webapp」 「lamp」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 emeraldion/emerails 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 emeraldion/emerails 我们能提供哪些服务?
定制开发 / 二次开发

基于 emeraldion/emerails 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 1.57k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 30
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-01-07