• This repository has been archived on 08/May/2019
  • Stars
    star
    160
  • Rank 234,052 (Top 5 %)
  • Language
    PHP
  • Created over 13 years ago
  • Updated over 9 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

[DEPRECATED for ZF2 & Composer] Best practice Zend Framework (ZF) skeleton / base with Doctrine2 integration : High code coverage & build scripts using TDD. Issues section ar e used for project planning (features etc)

DashboardHub Badge


GOAL - BEST PRACTICE TEST DRIVEN DEVELOPMENT

To achieve a Best Practice Zend Framework skeleton project. Using Doctrine ORM with full Code Coverage on the Doctrine Models and with Database Migrations. Using PHPUnit, Ant & Jenkins for Continous Integration and PHPDocumentor for our API documents. Using jQuery to progessively enhance the UI.

Together we can achieve this! FORK ME!

Follow the latest updates of this project on twitter http://twitter.com/eddiejaoude_git

Project builds on jenkins ci http://build.jaoudestudios.com:8080

Projects using this base: (send me your links) https://github.com/eddiejaoude/github-adv-search

KVM Virtual Machine (VM) hard disk download: coming soon [Ubuntu server 11.04]


FEATURES include

  • ZF Modular (modules) structure
    • auth module
      • login
      • register (inc. captcha)
    • custom controller plugin helpers
    • custom controller action helpers
    • flash message (flashMessenger) helper usable from any controller action
    • ACL (in acl branch)
  • jQuery
  • Unit testing
    • setup & configured
    • high code coverage
  • Best practice php tools
  • Ant build scripts for Continuous Integration
  • Selenium rc tests driven by phpunit
  • Ant deploy script including 'dry run' mode (coming soon)

TECHNOLOGIES USED

  • Zend Framework 1.11+
  • Doctrine 2+
  • PHPUnit 3.5+
  • PHP Documentor (deprecated)
  • DocBlox
  • jQuery

OTHER TECHNOLOGIES REQUIRED

  • PHP 5.3+
  • Xdebug 2.x
  • MySQL 5.x
  • Ant
  • Jenkins (formally Hudson) [selenium: optional]
  • Pear: Testing_Selenium-0.4.4
  • Selenium rc (included in test directory)

ADVANTAGES of TDD (Test Driven Developement)

  • Improved stability
  • Refactoring - code can be improved without breaking
  • Test first - improves code planning
  • High code coverage reports - shows what code is not tested yet
  • ...

RUNNING TESTS

cd tests/ [unit tests only - comment out selenium lines in /tests/phpunit.xml] Comment out selenium lines in tests/phpunit.xml phpunit [selenium tests only - uncomment selenium lines in /tests/phpunit.xml] sh selenium_only.sh phpunit --filter Selenium [selenium tests with Penetration testing by Zap proxy - uncomment selenium lines in /tests/phpunit.xml] sh selenium_with_zap.sh phpunit --filter Selenium [all tests - with/without pen test (zap proxy)] phpunit OR ant


INSTALLATION (linux)

  • Navigation to root directory of project (ie. application,data,docs,library etc)
  • Create the database with the following command

mysql -u[username] -p[password] [database] < data/accounts.sql mysql -u[username] -p[password] [database] < data/account_audit.sql

  • Create apache vhost, with config: <VirtualHost *:80> DocumentRoot /var/www/vhosts/js.skeleton/httpdocs/public ServerName js.skeleton <Directory /var/www/vhosts/js.skeleton/httpdocs/public> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all
- Install/Enable apache module mod_rewrite - Restart apache with: [Ubuntu] > sudo service apache2 restart [CentOS] > sudo service httpd restart - Add ServerName, in this case js.skeleton to your host file with your local IP > vi /etc/hosts > 127.0.0.1 js.skeleton - Update application/config/application.ini file with your database credentials

SCREEN SHOTS

See Wiki


FAQs

Coming shortly


APPENDIX

  • Zend Framework Zend Framework is an open source framework for developing web applications and services with PHP 5. Zend Framework is implemented using 100% object-oriented code. The component structure of Zend Framework is somewhat unique; each component is designed with few dependencies on other components. This loosely coupled architecture allows developers to use components individually. We often call this a "use-at-will" design. While they can be used separately, Zend Framework components in the standard library form a powerful and extensible web application framework when combined. Zend Framework offers a robust, high performance MVC implementation, a database abstraction that is simple to use, and a forms component that implements HTML form rendering, validation, and filtering so that developers can consolidate all of these operations using one easy-to-use, object oriented interface. Other components, such as Zend_Auth and Zend_Acl, provide user authentication and authorization against all common credential stores. Still others implement client libraries to simply access to the most popular web services available. Whatever your application needs are, you're likely to find a Zend Framework component that can be used to dramatically reduce development time with a thoroughly tested foundation.

  • Doctrine Doctrine is an object relational mapper (ORM) for PHP 5.2.3+ that sits on top of a powerful database abstraction layer (DBAL). One of its key features is the option to write database queries in a proprietary object oriented SQL dialect called Doctrine Query Language (DQL), inspired by Hibernates HQL. This provides developers with a powerful alternative to SQL that maintains flexibility without requiring unnecessary code duplication.

  • PHPUnit Even good programmers make mistakes. The difference between a good programmer and a bad programmer is that the good programmer uses tests to detect his mistakes as soon as possible. The sooner you test for a mistake the greater your chance of finding it and the less it will cost to find and fix. This explains why leaving testing until just before releasing software is so problematic. Most errors do not get caught at all, and the cost of fixing the ones you do catch is so high that you have to perform triage with the errors because you just cannot afford to fix them all.

Testing with PHPUnit is not a totally different activity from what you should already be doing. It is just a different way of doing it. The difference is between testing, that is, checking that your program behaves as expected, and performing a battery of tests, runnable code-fragments that automatically test the correctness of parts (units) of the software. These runnable code-fragments are called unit tests.

  • Jenkins Jenkins monitors executions of repeated jobs, such as building a software project or jobs run by cron. Among those things, current Jenkins focuses on the following two jobs:
  1. Building/testing software projects continuously, just like CruiseControl or DamageControl. In a nutshell, Jenkins provides an easy-to-use so-called continuous integration system, making it easier for developers to integrate changes to the project, and making it easier for users to obtain a fresh build. The automated, continuous build increases the productivity.
  2. Monitoring executions of externally-run jobs, such as cron jobs and procmail jobs, even those that are run on a remote machine. For example, with cron, all you receive is regular e-mails that capture the output, and it is up to you to look at them diligently and notice when it broke. Jenkins keeps those outputs and makes it easy for you to notice when something is wrong.
  • PHPDocumentor phpDocumentor uses an extensive templating system to change your source code comments into human readable, and hence useful, formats. This system allows the creation of easy to read documentation in 15 different pre-designed HTML versions, PDF format, Windows Helpfile CHM format, and in Docbook XML. You can also create your own templates to match the look and feel of your project.

  • Selenium Selenium Remote Control (RC) is a test tool that allows you to write automated web application UI tests in any programming language against any HTTP website using any mainstream JavaScript-enabled browser.

  • OWASP Zed Attack Proxy (ZAP) The OWASP Zed Attack Proxy (ZAP) is an easy to use integrated penetration testing tool for finding vulnerabilities in web applications. It is designed to be used by people with a wide range of security experience and as such is ideal for developers and functional testers who are new to penetration testing as well as being a useful addition to an experienced pen testers toolbox.

More Repositories

1

book-open-source-tips

Open Source book on Open Source Tips
Makefile
262
star
2

eddiejaoude

Custom GitHub profile for Eddie Jaoude
200
star
3

EddieBot

Discord bot for Eddie Jaoude's Discord server
TypeScript
98
star
4

stargate

Discord bot using Stargate Serverless (Cassandra DB)
TypeScript
69
star
5

zf2-logger

[DEPRECATED] Zend Framework 2 Logger - log request & response data, multiple output streams, filter levels per environment
PHP
35
star
6

open-source-repo-checklist

What should YOUR Open Source repo have...
32
star
7

dotfiles

My dotfiles for setting up my computers and CodeSpaces πŸ€“
Shell
26
star
8

Wish-Eddie

Wish Eddie on his birthday by creating a PR. And save it forever πŸŽ‰. Live site πŸ‘‡
25
star
9

SymfonyQuickStart

Symfony 2 QuickStart with Best Practice tools including Behat 3, PHPSpec 2, PHPUnit 4 & Twitter Bootstrap 3, TravisCI & Heroku
PHP
21
star
10

php-useful-resources

PHP useful resources - Designed to be Objective...from Blogs, Framework agnostic libraries/tools etc..
19
star
11

dev-helper-cmds

Useful commands for every Developer - composer, travis ci, symfony etc
Makefile
17
star
12

devrel-presentation

Everyone developer is in DevRel
JavaScript
15
star
13

eddiejaoude.github.com

Eddie Jaoude's website
HTML
15
star
14

about-me

Revealjs presentation About Me http://eddiejaoude.github.io/about-me
JavaScript
15
star
15

toran-proxy-packages

List of Composer Packages - most popular & latest still available
14
star
16

zend-framework-best-practice-model-github-api

ZF model mapper for github's api with unit tests & mocks
PHP
13
star
17

open-source-healthcheck

Health check list for your Open Source project
13
star
18

symfony-translation-twig-collection-bundle

Symfony Translation Bundle for Twig Extension to handle collection
PHP
12
star
19

perf-ci-public

PerfCI - Build, Measure, Learn (BML) - docs & issues are public
12
star
20

rock-paper-scissors-game

Rock paper scissors game built with Angular + Material Design
TypeScript
12
star
21

opensource-first-presentation

Open Source First Presentation http://eddiejaoude.github.io/opensource-first-presentation
JavaScript
11
star
22

fullstack-nuxtjs-nestjs-datastax-video

Fullstack app using NuxtJS, NestJS and DataStax
Vue
11
star
23

linkfree-vuejs-live-stream

Vue
10
star
24

jenkins-vagrant-saltstack

Jenkins VM with Vagrant & SaltStack
Scheme
10
star
25

video-realtime-chat-react-express

Realtime chat app built with react and express
JavaScript
9
star
26

video-fullstack-nextjs-datastax

Demo project for YouTube video on NextJS and DataStax
JavaScript
7
star
27

live-react-datastax

Fullstack app using react, express and DataStax AstraDB
JavaScript
7
star
28

video-novu-random-issues

Email random "good first issues" using NextJS and Novu
JavaScript
7
star
29

node-express-course

An introduction to Node.js and Express.js servers
JavaScript
7
star
30

gender-pay-gap-gov-uk-importer

Import Gov UK csv data to ElasticSearch for #GPGHack
JavaScript
6
star
31

vagrant-ansible-php7

Vagrant & Ansible VM for PHP7
Shell
6
star
32

EddieCon-01-workshop

Workshop for EddieCon 0.1
JavaScript
6
star
33

saltstack

Various SaltStack receipts, including php, mysql, redis, elastic search, apache, vhost, git etc...
Scheme
6
star
34

vagrant-ansible-squid-proxy-cache

Squid proxy with Vagrant and Ansible
Shell
6
star
35

opensource-deployment-presentation

Two of my favourite subjects, open source and pipeline
JavaScript
6
star
36

video-tdd-api-pactumjs-cucumber

TDD API ExpressJS testing with PactumJS and Cucumber
JavaScript
6
star
37

zf2-doctrine2-manager-registry-service

Creates & Exposes Doctrine2 Register Service for Zend Framework 2 as a Module (ManagerRegistry)
PHP
6
star
38

toran-proxy-vagrant-ansible

Local mirror of Packagist with Toran Proxy and Vagrant / Ansible
Shell
5
star
39

video-fullstack-sveltekit-datastax

Video fullstack using SvelteKit (Svelte) with Bootstrap and DataStax
Svelte
5
star
40

github-adv-search

Using GitHub's API this will allow one to sort search results & to filter them further
PHP
5
star
41

db2es

[DEPRECATED] Using Spring Boot with Spring Batch & Websockets to sync data from Database to ElasticSearch
Java
4
star
42

hello-github-actions

Dockerfile
4
star
43

book-cv-tips

CV tips
HTML
4
star
44

upandcomingphpdevs

Similar to FollowPHPDevs but for up and coming developers (new blood)
HTML
4
star
45

getting-into-tech-faqs

FAQs for getting into tech
4
star
46

slack-commands

Prototype
JavaScript
3
star
47

computer-checklist

From security to backups
3
star
48

http-archive-crawler

Powered by 'HTTP Archive' & 'Web Page Test'
3
star
49

video-reactjs-search

Example code used for my YouTube video
JavaScript
3
star
50

video-fullstack-angular-express-datastax

Video fullstack using Angular, Express and DataStax
TypeScript
3
star
51

why-opensource-your-project

Why Open Source your project
JavaScript
3
star
52

phpunit-selenium-parallel

Different ways to improve the speed of selenium tests running in parallel with phpunit & additional tools
PHP
3
star
53

twitter-fix

Fix your Twitter timeline by ignoring these engagement farming posts
2
star
54

ministryofjustice-opg-48h-hackathon

MoJ OPG 48hr Hackathon project
PHP
2
star
55

zf-model-db-best-practice

Exposing a database as a webservice using best practices (inc. unit testing, mocks, ant, continuous integration etc)
PHP
2
star
56

vagrant-ansible-docker

Vagrant with Ansible, Docker, Blackfire, Xdebug
Smarty
2
star
57

flagsmith-nextjs-demo

Playing with Flagsmith
JavaScript
2
star
58

DevRel

DevRel community discussion with tips, including how to running virtual events & meetups
2
star
59

nuxtjs-members-live

Live demo using NuxtJS, NestJS, DataStax AstraDB and Copilot
Vue
2
star
60

perfect-developer-role

Apart from salary, wfh and flexitime. What are other factors that make a developer role appealing?
2
star
61

merge-conflicts

HTML
2
star
62

github-slideshow

A robot powered training repository πŸ€–
Ruby
2
star
63

ANT-Project-Deployment-Tool

Deploys GIT projects onto any Linux server using RSYNC
2
star
64

BattleSnake

BattleSnake build using NestJS with testing tools PactumJS and Cucumber
Gherkin
1
star
65

phpunit-wrapper

PHPUnit wrapper - wraps the functionality of phpunit with easy to use plain English
PHP
1
star
66

zf-service-layer

Simple example of how to create a service layer within Zend Framework to handle business logic
PHP
1
star
67

dev-default-config

Vim Script
1
star
68

batch-1-photos

Batch 1 Graduation Photos
1
star
69

aevi-alexa

Read public marketplace apps list using Alexa
JavaScript
1
star
70

Eddiehub_share

HTML
1
star
71

nextjs-members-live

Live demo using NextJS, DataStax and Copilot
JavaScript
1
star
72

html-css-presentation

Intro to html, css with GitHub Pages
JavaScript
1
star