定制 midgard/midgardmvc-project-template 二次开发

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

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

midgard/midgardmvc-project-template

Composer 安装命令:

composer require midgard/midgardmvc-project-template

包简介

README 文档

README

This is a project template for creating new websites or applications powered by the Midgard MVC framework for PHP.

Creating new Midgard MVC projects

This project template is designed to be used together with the Composer PHP dependency management tool. You can create new Midgard MVC projects on your current machine with:

$ composer create-project midgard/midgardmvc-project-template myproject

This will download the Midgard MVC project template and set it up together with the dependencies. This new project will be set up in the myproject directory.

Where is everything?

The Midgard MVC project template follows a file structure typical for Composer-installed Midgard MVC applications:

  • application.yml contains the application configuration, including site's node hierarchy and list of enabled components
  • composer.json lists the dependencies for your application
  • manifest.yml contains routes for the site's main component (in this case midgardmvc_project_template)
  • controllers contains controllers of the main component
  • templates contains templates of the main component
  • vendor contains all Composer-installed dependencies, including Midgard MVC in vendor/midgard/midgardmvc-core
  • var contains logs and caches used by the Vagrant setup

Creating development VMs with Vagrant

Vagrant gives an easy way to manage development virtual machines using Midgard MVC.

Dependencies

  • Vagrant
  • NFS (out-of-the-box in OS X, on Debian-based Linux systems install nfs-kernel-server)

Installation

To set up a Vagrant project, download this project template, and then:

$ cd setup/vagrant
$ vagrant up

The up command will download a Ubuntu 12.10 base image, start it in VirtualBox and then use the Puppet configuration management system to set up Midgard2, PHP, AppServer-in-PHP, and your Midgard MVC project.

This setup can take a long time depending on your internet connection. Once it is done, there should be a Midgard MVC instance running based on your project setup. You can access it at http://localhost:8181.

Usage

The Vagrant VM will mount your project directory over NFS, and so all of your file changes will apply to the virtual machine instantly. If you need to tweak something on the VM, you can get an SSH connection to it with:

$ vagrant ssh

Your mounted project directory will be available in /opt/midgardmvc.

Restarting AiP

Since AiP is a persistent PHP process, you'll need to restart it when you make changes to your files. You can do that after vagrant ssh with:

$ sudo service midgardmvc stop
$ sudo service midgardmvc start

Managing the virtual machine

You can use the vagrant halt command to stop your virtual machine, and vagrant up to restart it.

If you want to start from scratch, simply run vagrant destroy, and rebuild the VM image with another vagrant up.

If you want to distribute your VM image with your team, read the Vagrant packaging documentation.

midgard/midgardmvc-project-template 适用场景与选型建议

midgard/midgardmvc-project-template 是一款 基于 Puppet 开发的 Composer 扩展包,目前已累计 27 次下载、GitHub Stars 达 3, 最近一次更新时间为 2012 年 12 月 11 日, 在 PHP 生态内属于活跃度较高的组件。

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

围绕 midgard/midgardmvc-project-template 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

  • 总下载量: 27
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 10
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 1
  • Forks: 0
  • 开发语言: Puppet

其他信息

  • 授权协议: Unknown
  • 更新时间: 2012-12-11