定制 athens/core 二次开发

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

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

athens/core

Composer 安装命令:

composer require athens/core

包简介

Modern web framework in PHP for academic environments

README 文档

README

Build Status Code Climate Test Coverage Latest Stable Version

Athens/Core

Athens is a modern PHP web framework built within the University of Washington's Department of Enrollment Management.


![Athens in action](doc/assets/images/demo.png) *Easily create forms and manage submission results in* Athens *created web applications*

Applications built within Athens are:

  1. Secure
*Athens* automatically provides strong protection against a number of web attacks, including CSRF, XSS, and database injection.  

*Athens* also provides easy, seamless encryption for sensitive student information. Encrypting a database column requires a simple declaration in your model schema for each data-field you want to protect. Calls to and from the database on that encrypted data are transparent; *Athens* knows which fields are encrypted and handles the encryption/decryption behind the scenes.
  1. Attractive
*Athens* includes beautiful page templates and user-interface elements. These default templates can be easily overridden with custom themes to implement your own organization's brand.
  1. Legible

    Athens separates declaring what elements shall be on a page from what those elements should look like and the logic of how those elements should behave. Under this model, creating a page is not much more complicated than simply listing the presentational elements that should be present.

  2. Extensible

This separation of concerns also promotes reusability of components: a web-displayed table can be turned into Excel by changing a single line of code; a web-displayed form can be presented as a PDF by changing a single line of code. Adding a column to a table takes only one line, and in most cases *Athens* will be able to populate that column from the database without any further instruction.

Starting an Application

For help installing Athens and beginning a new application, see the application creation tutorial.

Installation

This library is published on packagist. To install using Composer, add the "athens/core": "0.*" line to your "require" dependencies:

{
    "require": {
        ...
        "athens/core": "0.*",
        ...
    }
}

Because Athens depends on multiple other libraries, it is highly recommended that you use Composer to install this library and manage dependencies.

Example

Athens uses classes generated by PropelORM to store and retrieve database rows. First, we define a student class in schema.xml:

<table name="student">
    <column name="id" type="integer" required="true" primaryKey="true" autoIncrement="true"/>

    <column name="uw_student_number" type="varchar" size="7" required="true" phpName="UWStudentNumber"/>
    <column name="first_name" type="varchar" size="127" required="true"/>
    <column name="middle_initial" type="varchar" size="15" required="true"/>
    <column name="last_name" type="varchar" size="127" required="true"/>
    <column name="last_four_ssn" type="varchar" size="4" required="true"/>
</table>

Now we can use Propel to generate a Student instance and create a form which will store the student in the database:

<?php

require_once dirname(__FILE__) ."/../setup.php";

use Athens\Core\Form\FormBuilder;
use Athens\Core\Page\PageBuilder;
use Athens\Core\Page\Page;

use MyProject\Student;

$form = FormBuilder::begin()
    ->setId("student-form")
    ->addObject(new Student())
    ->build();

$page = PageBuilder::begin()
    ->setId('student-submission-page')
    ->setType(Page::PAGE_TYPE_FULL_HEADER)
    ->setTitle("My Project: Enter a Student")
    ->setHeader("My Project")
    ->setSubHeader("Enter a Student")
    ->setBaseHref("..")
    ->setWritable($form)
    ->build();

$page->render();

Add Ons

Additional functionality is provided by the following libraries:

  1. Encryption

Seamlessly encrypt your sensitive data fields. The Encryption package is included with your Athens project to keep any table column encrypted while at rest in the database.

Athens projects include the Encryption package by default; you only have to include a few extra lines in your schema.xml to add encryption to your models. See the [Encryption project documentation(/AthensFramework/Encryption/) or the application creation tutorial for an example.

  1. SendGrid

Send your emails via your SendGrid account. With just a couple of extra lines in your settings, your Athens application will send all of its emails via SendGrid.

The SendGrid package is not automatically included in your Athens project; you must follow the project instructions to use this package.

  1. CSRF

The standard Athens template project includes protection from CSRF attacks using the CSRF package. You can find out more by visiting the project documentation.

Compatibility

  • PHP 5.6, 7.0

Todo

See GitHub issue tracker.

Getting Involved

Feel free to open pull requests or issues. GitHub is the canonical location of this project.

Here's the general sequence of events for code contribution:

  1. Open an issue in the issue tracker.
  2. In any order:
  • Submit a pull request with a failing test that demonstrates the issue/feature.
  • Get acknowledgement/concurrence.
  1. Revise your pull request to pass the test in (2). Include documentation, if appropriate.

PSR-2 compliance is enforced by CodeSniffer in Travis.

athens/core 适用场景与选型建议

athens/core 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 520 次下载、GitHub Stars 达 1, 最近一次更新时间为 2016 年 02 月 19 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 520
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 5
  • 依赖项目数: 12
  • 推荐数: 0

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-02-19