Practical Web Applications Development

Get Started. It's Free
or sign up with your email address
Practical Web Applications Development by Mind Map: Practical Web Applications Development

1. 6. JS basics.

1.1. sources of knowledge

1.1.1. David Flanagan

1.1.1.1. JavaScript: The Definitive Guide, Sixth Edition

1.1.1.2. jQuery Pocket Reference

1.1.1.3. JavaScript Pocket Reference, 3rd Edition

1.1.2. Douglas Crockford

1.1.2.1. JavaScript: The Good Parts

1.1.3. Nicholas C. Zakas

1.1.3.1. High Performance JavaScript (Build Faster Web Application Interfaces)

1.1.4. Stoyan Stefanov

1.1.4.1. JavaScript Patterns

1.1.4.2. Object-Oriented Java Script

1.1.5. John Resig

1.1.5.1. Manning: Secrets of the JavaScript Ninja

1.1.6. YUI Theater

1.2. Development

1.2.1. Prototype based

1.2.2. Classless

1.2.3. Object Oriented

1.2.4. Event Driven

1.3. Getting Started Example

1.4. Functions

1.4.1. First Class Objects

1.4.1.1. A function is an instance of the Object type

1.4.1.2. A function can have properties and has a link back to its constructor method

1.4.1.3. You can store the function in a variable

1.4.1.4. You can pass the function as a parameter to another function

1.4.1.5. You can return the function from a function

1.4.2. Example

1.4.3. definitions

1.4.3.1. functions defined with the function statement

1.4.3.2. function defined with literal expression

1.4.3.3. With the Function class

1.4.4. Universal Properties and Methods

1.4.4.1. Properties

1.4.4.1.1. myNewClass.length

1.4.4.1.2. myNewClass.prototype

1.4.4.2. Methods

1.4.4.2.1. myNewClass.call({}, 'arg1', 'arg2')

1.4.4.2.2. myNewClass.apply({}, ['arg1', 'arg2'])

1.4.5. Operators

1.4.5.1. typeof myNewClass

1.4.5.2. myNewClass instanceof Function

1.4.6. Functions methods and Constructors

1.4.6.1. Function Constructor

1.4.6.2. Method

1.5. Objects

1.5.1. Create

1.5.1.1. Created as Literal (Expression)

1.5.1.2. Created with one of the Standart Classes "Object Class"

1.5.1.3. Created with a Constructor that defines a Class of Objects (custom class)

1.5.2. Universal Properties and Methods

1.5.2.1. Properties

1.5.2.1.1. myObject.constructor

1.5.2.2. Methods

1.5.2.2.1. myObject.toString()

1.5.2.2.2. myObject.toLocaleString()

1.5.2.2.3. myObject.valueOf()

1.5.2.2.4. myObject.hasOwnProperty('prop1')

1.5.2.2.5. myObject.propertyIsEnumerable('prop1')

1.5.2.2.6. Object.isPrototypeOf( myObject )

1.5.3. Operators

1.5.3.1. typeof myObject

1.5.3.2. myObject instanceof myClass

1.6. Programming Styles

1.6.1. Pseudoclasical technique

1.6.2. Prototypal style

1.6.3. Functional style

1.7. Ajax

1.7.1. DOM Manipulation

1.7.2. Remouting

1.7.3. Dynamic Behaviour

1.8. Example 1

1.9. Example 2

1.10. Architecture of an app

1.10.1. Leave if you don't like it

1.10.1.1. I am always amazed by the negative people!

1.10.1.1.1. You have to appreciate at least the effort.

1.10.1.1.2. If you have to say something bad, better don't say anything

1.10.1.2. Create somethign yourself.

1.10.1.3. Don't criticise!

1.10.1.4. We live in a free country! Everybody can be stupid and ugly as he likes! :)

1.10.1.5. I have a great lifestyle!

1.10.1.5.1. I am happy and thankful!

1.10.1.6. The fact that somebody doesn't like the ideas, is not going to change the fact I enjoy my life and what I am doing!

1.10.1.7. These are my original ideas

1.10.1.8. Maybe somebody else came up with the same ideas

1.10.1.8.1. Usually the same ideas come to more than one person when the moment is suitable!

1.10.1.8.2. The truth and the ideas are always there the people are just the conductors.

1.10.1.9. I am not asking anybody to watch the videos. If I am the only viewer I still will be happy. they will help me to recall some ideas and concepts.

1.10.1.10. I am doing these videos for myself, my friends, colleagues and students.

1.10.2. lets mimic the real objects and systems

1.10.2.1. Nature

1.10.2.1.1. Plant

1.10.2.1.2. Human

1.10.2.2. Technical systems (They to mimic the nature)

1.10.2.2.1. Space Station

1.10.2.2.2. Motherboard

1.10.3. Everythign starts from a seed

1.10.3.1. Config is the DNA

1.10.3.2. Events (communication object) gives the senses

1.10.3.3. Bootstrap is not really a paradox

1.10.3.3.1. What is first? The chick or the egg?

1.10.3.3.2. What is first the program or the computer? Is it a real paradox?

1.10.3.3.3. it would be a paradox if it is like Baron von Munchausen pulling himself from the swamp.

1.10.3.3.4. Bootstrapping

1.10.3.4. Wizard

1.10.3.4.1. In the case of JS the wizard is (HTML tag)

1.10.3.4.2. The MVC comes later

2. 7. JS toolkits. (frameworks???)

2.1. Dojo Toolkit

2.1.1. Dijit

2.1.2. Getting Dojo

2.1.2.1. Downloading an official release

2.1.2.2. Downloading from Subversion

2.1.2.3. CDN

2.1.3. Hello Dojo

2.1.4. Modern Dojo

2.1.4.1. Migration Guide

2.1.4.2. require()

2.1.4.3. define()

2.1.4.4. module IDs (MID)

2.1.4.5. AMD

2.1.5. Dojo Base and Core

2.1.6. Events and Advice

2.1.7. DOM Manipulation

2.1.8. Waiting for the DOM

2.1.9. Adding Visual Effects

2.1.10. Dijit and Widgets

2.1.11. XHR

2.1.12. Ajax

2.2. jQuery

2.2.1. fluent interfaces and method chaining

2.2.2. An expressive syntax (CSS selectors) for referring to elements in the document

2.2.3. intro

2.2.4. jQuery Basics

2.2.4.1. The jQuery library defines a single global function named jQuery().

2.2.4.1.1. $ as a shortcut for it

2.2.4.2. This single global function with two names is the central query function for jQuery.

2.2.4.3. var divs = $("div");

2.2.4.4. jQuery() is a factory function rather than a constructor: it returns a newly created object but is not used with the new keyword.

2.2.4.5. $("p.details").css("background-color", "yellow").show("fast");

2.2.4.6. method chaining idiom is common in jQuery programming

2.2.4.7. $(".clicktohide").click(function() { $(this).slideUp("slow"); });

2.2.4.8. Obtaining jQuery

2.2.4.8.1. download

2.2.4.8.2. CDN (Content Distribution Network)

2.2.4.9. The jQuery() Function

2.2.4.9.1. $() is to pass a CSS selector

2.2.4.9.2. The second way to invoke $() is to pass it an Element or Document or Window object

2.2.4.9.3. The third way to invoke $() is to pass it a string of HTML text

2.2.4.9.4. Finally, the fourth way to invoke $() is to pass a function to it. If you do this, the function you pass will be invoked when the document has been loaded and the DOM is ready to be manipulated.

2.2.4.9.5. The jQuery library also uses the jQuery() function as its namespace

2.2.4.10. Queries and Query Results

2.2.4.10.1. $("body").length

2.2.5. jQuery Getters and Setters

2.2.5.1. Getting and Setting HTML Attributes

2.2.5.1.1. $("#icon").attr("src", "icon.gif"); set

2.2.5.1.2. $("form").attr("action"); get

2.2.5.2. Getting and Setting CSS Attributes

2.2.5.2.1. $("h1").css("font-weight"); get

2.2.5.2.2. $("div.note").css("border", compound styles "solid black 2px"); set

2.2.5.3. Getting and Setting CSS Classes

2.2.5.3.1. $("h1").addClass("hilite");

2.2.5.4. Getting and Setting HTML Form Values

2.2.5.4.1. $("#surname").val(); get

2.2.5.4.2. $("#email").val("Invalid email address"); set

2.2.5.5. Getting and Setting Element Content

2.2.5.5.1. text()

2.2.5.5.2. html()

2.2.5.6. Getting and Setting Element Geometry

2.2.5.7. Getting and Setting Element Data

2.2.6. Altering Document Structure

2.2.6.1. Inserting and Replacing Elements

2.2.6.2. Copying Elements

2.2.6.3. Wrapping Elements

2.2.6.4. Deleting Elements

2.2.6.4.1. empty() removes all children (including text nodes)

2.2.6.4.2. The remove() method removes any event handlers

2.2.6.4.3. the unwrap()

2.2.7. Handling Events with jQuery

2.2.7.1. Simple Event Handler Registration

2.2.7.2. jQuery Event Handlers

2.2.7.3. The jQuery Event Object

2.2.7.4. Advanced Event Handler Registration

2.2.7.4.1. $('p').bind('click', f);

2.2.7.5. Deregistering Event Handlers

2.2.7.5.1. unbind()

2.2.7.6. Triggering Events

2.2.7.7. Custom Events

2.2.7.8. Live Events

2.2.8. Animated Effects

2.2.8.1. Simple Effects

2.2.8.1.1. fadeIn(), fadeOut(), fadeTo()

2.2.8.1.2. show(), hide(), toggle()

2.2.8.1.3. slideDown(), slideUp(), slideToggle()

2.2.8.2. Custom Animations

2.2.9. Ajax with jQuery

2.2.9.1. The load() Method

2.2.10. Utility Functions

2.2.11. Extending jQuery with Plug-ins

2.2.12. The jQuery UI Library

2.2.12.1. widgets

2.3. Prototype

2.3.1. http://script.aculo.us/

2.4. MooTools

2.5. YUI Library

2.6. Ext JS

2.6.1. Very Good Documentation

2.6.2. JSDuck

2.7. Backbone.js

2.8. Server Side JS

2.8.1. node.js

2.9. AngularJS by Google

2.9.1. on GitHub

2.9.2. MVW

2.10. Twitter Bootstrap

2.10.1. on GitHub

3. 8. JS Zend integration.

3.1. Create a Layout

3.1.1. get the links right

3.1.2. add to your module

3.1.3. Use the View Helpers

3.1.3.1. Doctype Helper

3.1.3.2. HeadLink Helper

3.1.3.3. HeadMeta Helper

3.1.3.4. HeadScript Helper

3.1.3.5. HeadStyle Helper

3.1.3.6. HeadTitle Helper

3.1.3.7. HTML Object Helpers

3.1.3.8. InlineScript Helper

3.1.4. Use existing template example

3.1.5. layout.phtml

3.1.6. change.phtml

3.2. Switch the Layout in the actions

3.3. Load different JS files in the view

3.4. Use widgets (Dojo, jQuery)

3.4.1. jQuery

3.4.2. Dijit

3.4.2.1. js file

3.5. View Helper Json

3.6. Disabling the layout in Zend Framework 2

3.7. Disable the layout and the view

3.8. Communicate to the server (ZF2)

3.8.1. Only with JS

3.8.2. jQuery way

3.8.3. Dojo way

3.8.3.1. example

3.9. Deploy to AppFog

3.10. Change the layout for a module

3.11. index.php

4. 9. Ajax.

4.1. Pure JS

4.1.1. Controller Action

4.1.2. View Script

4.1.2.1. js-ajax.phtml

4.1.3. JS File

4.1.3.1. jsAjax.js

4.2. jQuery

4.2.1. Controller Action

4.2.2. View Script

4.2.2.1. jquery-ajax.phtml

4.2.3. JS File

4.2.3.1. jqueryAjax.js

4.3. Dojo

4.3.1. Controller Action

4.3.2. View Script

4.3.2.1. dojo-ajax.phtml

4.3.3. JS File

4.4. Service

4.4.1. View Script

4.4.2. Controller Action

4.5. JSON service

4.5.1. Controller Action

4.5.2. View Script

5. 10. HTML5 CSS3.

6. Lessons Learned

6.1. MInd Maps

6.1.1. MindMesiter

6.1.1.1. Presentations

6.1.1.1.1. Difficult

6.1.1.1.2. Do I realy need them

6.1.1.1.3. Tip

6.1.1.2. Upload Images

6.1.1.3. The Android App

6.1.1.4. Not free

6.1.1.5. Notes are very small

6.1.1.5.1. Try bigger font size

6.1.1.6. Use zoom In Out

6.1.1.7. Right Click to collapse expand nodes

6.1.2. MInd42

6.1.2.1. Free

6.1.2.2. Android 2.2

6.1.2.2.1. Stock Browser

6.1.3. Google Presentations

6.1.3.1. Try the combination

6.2. Google+ Hangout

6.2.1. No background noise

6.2.2. Sound Breaking

6.2.3. No zoom

6.2.4. Ask Somebody to watch the live stream

6.3. Speach

6.3.1. Don't use often

6.3.1.1. "In general"

6.3.1.2. "Общо взето..."

6.3.1.3. "etc."

6.3.1.4. "така нататък"

6.3.2. use

6.3.2.1. acurate words

6.3.2.2. pay attention to the details

6.3.2.3. the right words and terms

6.3.3. replace

6.3.3.1. "I don't know"

6.3.3.1.1. with "We will check"

6.4. Other technologies for recording

6.4.1. Try Adobe Flash Media Live Encoder

6.4.2. screencast-o-matic

6.4.2.1. Doesn't even start in FF and Chrome

6.4.2.1.1. Java updates done

6.5. YouTube

6.5.1. Create playlists

6.6. Use HD, at least 720p

6.7. Use screen resolution of 1280x720p for YouTbe HD

6.7.1. Use 1280x1024 top and render at the same resolution in Camtasia.

6.7.1.1. YouTube is not cutting anything 1280x1024 is also OK

6.7.1.2. YouTube is filling the right and left with black

6.7.1.3. Renderin at 1280x1024 is much slower compare to 1280x720

6.7.2. Camtasia cuts top and the bottom to fit in 1280x720

6.7.3. Resolution 1280x720 doesn't work on my screen 4:3. Everythign is distorted.

6.8. codenvy was giving me [ERROR] on git push zend but no changes have been made

6.9. Codenvy

6.9.1. consol - very limited

6.9.2. I can upload RAS private key

6.9.3. No SFTP client

6.10. git

6.10.1. problems the way we use it

6.10.2. idea

6.10.2.1. git rm .

6.10.2.1.1. still doesn't work

6.10.2.2. clone in codenvy instead of doing init

6.10.2.3. use patch and diff at the bottom ofthe pull requests

6.10.2.4. try to use clone in the IDE instead of new project

6.10.2.5. merge manualy with patches (no fetch merge)

6.10.2.5.1. Don't use the original for anything else

6.10.3. check the diffs and the changes before merging

6.11. Cloud 9

6.11.1. NO way to upload RSA private key

6.11.2. Very nice consol

6.11.3. You can run your pages there

6.11.4. No SFTP client

6.12. Maybe we don't need AppFog for the students

6.13. pay atention

6.13.1. <?php echo $this->basePath(); ?>/

6.13.2. css, js, images in public

6.13.3. ActionNames

6.13.3.1. mmLayoutAction

6.13.3.1.1. mm-layout.phtml

6.14. workflow (idea)

6.14.1. fork (in github)

6.14.1.1. clone (no fetch merge) in the IDE

6.14.1.1.1. PullRequest

6.15. some students don't use the original repo to create their modules

6.16. some students keep css, js, images in the folder module

6.17. some students don't add $this->basePath() to the URLs in the layout

6.18. some students use <? echo $this->basePath(); ?>

6.19. correct the paths in css files also

6.20. codenvy approaches

6.20.1. create new project

6.20.1.1. use PaaS

6.20.1.1.1. git init

6.20.2. clone repo or import from github

6.20.2.1. NO PaaS

6.20.2.1.1. clone guthub

6.20.2.1.2. clone zend

6.20.2.2. Projects -> New -> Import from github

6.20.2.2.1. NO PaaS

6.20.2.3. Git -> Clone

6.20.2.3.1. NO PaaS

6.21. frequent mistakes

6.21.1. Add ...Controller.php at the end of the controller files

6.21.2. Add ..phtml as an extension for the view files

6.21.3. redirect

7. praktiki.mon.bg

7.1. 12 weeks

7.1.1. 240 hours per student

7.1.2. 8 hours per mentor

7.1.3. Every Monday 10:00 BG time untill 12:00 - lection

7.1.3.1. for 4 weeks 8 hours are over

7.1.3.2. But I will continue

7.1.4. Every working day consultations from 13:00 untill 17:00 15 min per student

7.1.4.1. In 6-7 weeks the 8 hours will be over

7.1.4.2. But I will continue

7.1.4.3. 1:15 per student per week

7.2. 5 projects

7.2.1. 3 students per project

7.2.1.1. designer

7.2.1.2. server site (back end)

7.2.1.3. front end

7.2.2. projects

7.2.2.1. BTK

7.2.2.2. MGS

7.2.2.3. GRD

7.2.2.4. STO

7.2.2.5. NIK

7.3. Open source project

7.3.1. Regrouping

7.4. communication

7.4.1. Google+ for the lections

7.4.1.1. Google Hangout on Air

7.4.2. Skype for the consultations

7.4.2.1. shared audio files in google drive

7.4.3. Everythign recorded

7.5. Documents shared in Google Drive

7.5.1. Schedule

7.5.2. Students

7.6. Virtualisation

7.6.1. Oracle VM Virtual Box

7.6.1.1. free

7.6.2. VMware

7.6.2.1. free

7.7. Design

7.7.1. Responsive Design

7.8. JS toolkits

7.8.1. jQuery

7.8.2. Dojo

7.9. cheatsheet

7.10. coding naming standards

7.11. Self project vs Zfc

7.11.1. self

7.11.1.1. pros

7.11.1.1.1. better learning

7.11.1.2. cons

7.11.1.2.1. low quality in the beginning

7.11.2. Zf-commons

7.11.2.1. pros

7.11.2.1.1. popular

7.11.2.1.2. somebody else has done the job

7.11.2.1.3. high quality?

7.11.2.2. cons

7.11.2.2.1. integration in our project

7.12. Shell we use modules vs building them from scratch?

7.12.1. common opinion is to use already build modules

7.12.1.1. Zf-commons

7.13. Git HowTo

7.13.1. Centralized Workflow

7.13.2. How It Works

7.13.2.1. Managing Conflicts

7.13.3. Example

7.13.3.1. Someone initializes the central repository

7.13.3.2. Everybody clones the central repository

7.13.3.2.1. git clone ssh://user@host/path/to/repo.git

7.13.3.3. John works on his feature

7.13.3.4. Mary works on her feature

7.13.3.5. John publishes his feature

7.13.3.5.1. git push origin master

7.13.3.6. Mary tries to publish her feature

7.13.3.6.1. git push origin master

7.13.3.7. Mary rebases on top of John’s commit(s)

7.13.3.7.1. git pull --rebase origin master

7.13.3.8. Mary resolves a merge conflict

7.13.3.8.1. git status

7.13.3.8.2. solve the problem

7.13.3.8.3. git rebase --abort

7.13.3.9. Mary successfully publishes her feature

7.13.3.10. Mary successfully publishes her feature

7.13.3.10.1. git push origin master

7.13.4. How to merge PR on GitHub?

7.14. Skeleton App how to start?

7.14.1. composer

7.14.2. git

7.14.2.1. composer

7.14.3. ZFTool

7.14.3.1. How to Install ZFTool

7.14.3.1.1. Installation using Composer¶

7.14.3.1.2. Manual installation

7.14.3.1.3. Without installation, using the PHAR file

7.14.3.2. Usage

7.14.3.2.1. Basic information

7.14.3.2.2. Project creation

7.14.3.2.3. Module creation

7.14.3.2.4. Classmap generator

7.14.3.2.5. ZF library installation

7.14.3.2.6. Compile the PHAR file

7.14.3.2.7. What works for me

7.15. tasks

7.15.1. ss

7.15.1.1. install

7.15.1.1.1. install DoctrineModule

7.15.1.1.2. ZfcUser

7.15.1.1.3. BjyAuthorize

7.15.1.1.4. Doctrine ZfcUser ORM

7.15.1.1.5. SamUser

7.15.1.1.6. cdli/CdliTwoStageSignup

7.15.1.1.7. How To Extend ZfcUser (and other modules) to match my needs?

7.15.2. designers

7.15.2.1. viewhelpers in the layout

7.15.3. Ajax in the scripts

7.16. NetBeans (very good IDE)

7.17. CMS

7.17.1. libracms

7.17.1.1. github

7.17.2. GotCms

7.17.2.1. github

7.17.3. DotsCms

7.18. ideas for name

7.18.1. DB naming standards

7.18.2. SPDX OpenSource Registry

7.19. Lessons Learnd

7.19.1. Using modules

7.19.1.1. CMS

7.19.1.1.1. Monolyte system

7.19.1.1.2. They almost don't use other modules

7.19.1.1.3. Like Joomla, Drupal, WordPress

7.19.1.1.4. No way to register user

7.19.1.1.5. Only Admin can login

7.19.1.1.6. You can not have ordinary users

7.19.1.1.7. Not easy to learn and extend

7.19.1.1.8. Specific Installations

7.19.1.1.9. Not separate modules applications

7.19.1.1.10. Black Box

7.19.1.1.11. Very simple sites with the available CMS

7.20. DB Naming convensions

7.20.1. DB design for mere mortals

7.20.1.1. Table types

7.20.1.1.1. Data

7.20.1.1.2. Linking

7.20.1.1.3. Subset

7.20.1.1.4. Validation

7.20.1.2. Table Names

7.20.1.3. Fields

7.20.1.3.1. Resolving Multipart Fields

7.20.1.3.2. Resolving Multivalued Fields

7.21. ZF2

7.21.1. Form

7.21.1.1. Binding

7.21.2. ZF tool

7.21.3. Tutorial App

7.21.4. Controller Plugins

7.21.5. Zend/Mvc

7.21.5.1. on top of

7.21.5.1.1. Zend\ServiceManager

7.21.5.1.2. Zend\EventManager

7.21.5.1.3. Zend\Http

7.21.5.1.4. Zend\Stdlib\DispatchableInterface

7.21.5.2. sub-components are exposed

7.21.5.2.1. Zend\Mvc\Router

7.21.5.2.2. Zend\Http\PhpEnvironment

7.21.5.2.3. Zend\Mvc\Controller

7.21.5.2.4. Zend\Mvc\Service

7.21.5.2.5. Zend\Mvc\View

7.21.5.3. The gateway to the MVC

7.21.5.3.1. Zend\Mvc\Application

7.21.5.4. Bootstrapping an Application

7.22. mysqladmin change password

7.23. Book

7.24. Authorization

7.24.1. How to get Zend\Authentication\AuthenticationService

7.24.1.1. new instance every time

7.24.1.2. alias invocables in the config

7.24.1.2.1. use Controller Plugin

7.24.2. simple approach with direct use

7.24.2.1. cons

7.24.2.1.1. Problem with more complex requirments.

7.24.2.1.2. No central point

7.24.2.1.3. No separation of concern.

7.24.2.1.4. We don't follow DRY

7.24.2.2. pros

7.24.2.2.1. very intuitive

7.25. Authentication with Doctrine

7.25.1. Comparison with and without Doctrine

7.25.2. AuthenticationService has 2 Drivers

7.25.2.1. Authentication

7.25.2.2. Storage

7.25.3. ViewHelper

7.25.4. ControllerPlugin

7.26. RememberMe

7.27. Registration with Doctrine

7.27.1. Form Class vs Annotation

7.28. Forgotten Password with Doctrine

7.29. navigation

7.29.1. 2 types of pages

7.29.1.1. MVC

7.29.1.2. URI

7.29.2. navigation.global.php

7.29.2.1. navigation

7.29.2.2. service_manager

7.29.2.2.1. factories

7.29.3. layout/layout

7.29.3.1. ViewHelper

7.29.4. the guard for the controllers and navigation use different mechanisms

7.29.4.1. navigation view helper

7.29.4.2. event listener

7.29.4.3. These 2 controllers access and navigation are independent systems. We have to sync them

7.30. pagination

7.30.1. Zend Paginator

7.30.1.1. module.config.php

7.30.1.1.1. new rout

7.30.1.2. Controller Index

7.30.1.3. view script

7.30.1.3.1. add the view helper

7.30.1.3.2. create the partial

7.30.2. Doctrine Paginator

7.31. phpUnit

7.32. phpDocumentor

7.32.1. Install

7.32.1.1. PEAR

7.32.1.1.1. $ pear channel-discover pear.phpdoc.org

7.32.1.1.2. $ pear install phpdoc/phpDocumentor

7.32.1.2. composer

7.32.1.2.1. $ php composer.phar require phpdocumentor/phpdocumentor WHEN asked dev-develop

7.32.1.2.2. call it

7.32.1.3. phar

7.32.1.3.1. Download the phar file

7.32.2. Getting Started

7.32.2.1. vendor\bin\phpdoc.php.bat --help

7.32.2.2. vendor\bin\phpdoc.php.bat -d <folder to parse> -t <target>

7.32.2.3. $ phpdoc -d [SOURCE_PATH] -t [TARGET_PATH]

7.32.3. phpdoc.xml

7.32.4. What is a docblock

7.32.5. Which structural elements can have a DocBlock

7.32.5.1. namespace

7.32.5.2. require(_once)

7.32.5.3. include(_once)

7.32.5.4. class

7.32.5.5. interface

7.32.5.6. trait

7.32.5.7. function (including methods)

7.32.5.8. property

7.32.5.9. constant

7.32.5.10. variables, both local and global scope.

7.32.6. A DocBlock roughly exists of 3 sections:

7.32.6.1. Short Description; a one-liner

7.32.6.2. Long Description;

7.32.6.3. Tags;

7.32.7. Inline tag reference

7.32.7.1. inline

7.32.7.1.1. {@example [location] [<start-line> [<number-of-lines>] ] [<description>]}

7.32.7.2. tag

7.32.7.2.1. @example [location] [<start-line> [<number-of-lines>] ] [<description>]

7.32.8. Definition of a ‘Type’

7.32.8.1. string

7.32.8.2. integer or int

7.32.8.3. boolean or bool

7.32.8.4. float or double

7.32.8.5. object

7.32.8.6. mixed

7.32.8.7. array

7.32.8.8. resource

7.32.8.9. void

7.33. php-cs-fixer

7.33.1. GitHub

7.33.2. Install

7.33.2.1. Download php-cs-fixer.phar

7.33.3. Run

7.33.4. Update

7.33.5. Usage

7.33.5.1. On my system

7.33.5.2. Dry run

7.33.5.3. One file only

7.34. php-CodeSniffer

7.34.1. GitHub

7.34.2. Documentation

7.34.3. composer installation

7.34.4. blog

7.34.5. Documentation

7.35. less popular CS

7.35.1. PHPCP

7.35.2. Flitch

7.36. PSR-0, PSR-1, PSR-2

7.36.1. PSR0

7.37. COMPo

8. Preface

8.1. Greeting

8.1.1. Welcome!

8.1.2. Добре дошли!

8.1.3. Καλώς ήρθατε!

8.1.4. Hoşgeldiniz!

8.2. Who am I?

8.2.1. Stoyan Cheresharov :)

8.2.1.1. 15+ years in Web Applications Development

8.2.1.2. E-mail: [email protected]

8.2.1.3. Twitter: @wingman0070

8.2.1.4. Site: http://www.coolcsn.com/

8.3. Thoughts

8.3.1. We are on this planet to give love and be happy!

8.3.2. We are drops from the same ocean put in different vessels!

8.3.3. The world is inside of us. We are the creators of our life.

8.3.4. "Nothing makes sense, but it is very important to keep doing it!" Mahatma Gandhi

8.4. Live video streaming

8.4.1. On YouTube

8.4.1.1. 9:15 - 12:30 BG time (7:15 - 10:30 GMT) Every Friday Starting January 11, 2013 on Bulgarian 9:15-10:37:30 11:07:30 - 12:30

8.4.1.2. Links to be added later

8.4.1.3. My Channel

8.4.2. Using Google+

8.4.2.1. Hangout

8.4.2.1.1. 9 people online

8.5. Adventure

8.5.1. Web Development is a Beautiful Journey in a Magical Forest!

8.5.1.1. It changes as we go!

8.5.1.2. It becomes more friendly

8.6. Mind Maps

8.6.1. Link to this map

8.6.2. Tony Buzan

8.6.2.1. Answers How to learn and remember.

8.6.2.2. Mind Maps

8.6.2.3. Supermind

8.6.2.4. How to read fast and remember everything I want?

8.6.2.5. ...more

8.6.3. Web Based, Cloud

8.6.3.1. www.mind42.com

8.6.3.1.1. free

8.6.3.1.2. No presentations

8.6.3.1.3. No google drive integration

8.6.3.1.4. Adds

8.6.3.2. www.mindmeister.com

8.6.3.2.1. free for 3 maps max

8.6.3.2.2. Works with Google Drive

8.6.3.2.3. Your own pictures upload

8.6.3.2.4. Presentations

8.6.4. Popular Free Softwares

8.6.4.1. FreeMind

8.6.4.2. XMind

8.6.5. Tantek Çelik

8.6.5.1. IETF

8.6.6. Use it everywhere

8.6.6.1. Taking notes

8.6.6.2. Planing

8.6.6.3. Presenting

8.6.6.4. Brainstorming

8.6.6.5. ...more

8.6.7. Own cloud

8.7. Inovations

8.7.1. Web Based, Cloud Technologies

8.7.1.1. Mind Maps

8.7.1.2. Presentations

8.7.1.3. Live Streaming

8.7.1.4. Recording

8.7.1.5. Google+

8.7.1.6. Hangout

8.7.1.7. Cloud Based SDLC

8.7.2. University is to try the cutting edge tehnologies etc.

8.7.3. 21 century education

8.7.4. Everything in this series is new.

8.7.5. We will discover and learn things together.

8.8. Acknowledgments

8.8.1. доц. д-р Гъров

8.8.1.1. Gave me the opportunity

8.8.2. Тодор Величков

8.8.2.1. Inspired me

8.9. Copyrights

8.10. Organization

8.10.1. Introduction

8.10.2. Content

8.10.3. Summary

8.10.4. Q&A

8.11. Hangout on Air

9. 1. Zend Framework. Easy, Simple, Fast!

9.1. Introduction

9.1.1. LAMP

9.1.1.1. Linux

9.1.1.2. Apache web server

9.1.1.3. MySQL

9.1.1.4. PHP

9.1.2. Approaches

9.1.2.1. Computer

9.1.2.1.1. Installed

9.1.2.1.2. Portable

9.1.2.2. Cloud

9.1.2.2.1. Work from anywhere

9.1.2.2.2. Use any device

9.2. Let's get our hands dirty

9.2.1. Install XAMPP

9.2.1.1. Method A: Installation with the Installer

9.2.1.2. Method B: "Installation" without the Installer

9.2.1.2.1. 1. Download the zip file

9.2.1.2.2. 2. Unzip to the portable or local device (e.g. x:\xampp)

9.2.1.2.3. 3. Check if there is a service running on port 80

9.2.1.2.4. 4. Skype is usualy causing problems

9.2.1.2.5. 5. Go to the folder and run "apache_start.bat"

9.2.1.2.6. 6. Open the browser and type in the URL filed "localhost"

9.2.2. CGI

9.2.2.1. Pearl

9.2.2.2. PHP

9.2.2.3. BAT files

9.2.2.4. C

9.2.2.5. C++

9.2.2.6. Java + BAT files

9.2.2.6.1. bat

9.2.2.7. Fortran

9.2.2.8. ...more

9.2.3. ZF1

9.2.3.1. http://localhost

9.2.3.1.1. phpinfo

9.2.3.2. Download ZF1

9.2.3.3. Extract and copy Zend to H:\xampp\php\pear folder

9.2.3.4. Copy zf.bat in /xamp/php

9.2.3.5. Prepare the environment variables

9.2.3.6. create a project

9.2.3.7. create a virtual server

9.2.3.7.1. H:\xampp\apache\conf\extra\httpd-vhosts.conf

9.2.4. ZF2

9.2.4.1. Download ZF2

9.2.4.2. Extract and copy Zend to H:\xampp\php\pear\ZF2

9.2.4.3. Add to httpd.conf or H:\xampp\apache\conf\extra\httpd-vhosts.conf

9.2.4.3.1. alternative is to add it to.htaccess

9.2.4.4. ZendSkeletonApplication

9.2.4.4.1. Click on download as Zip

9.2.4.4.2. Unzip in the projects folder

9.2.4.5. Create a virtual host

9.2.4.5.1. H:\xampp\apache\conf\extra\httpd-vhosts.conf

9.2.4.6. Optional Read and follow Tutorial App

9.2.5. ZF2 and modules with composer

9.2.5.1. Install composer

9.2.5.1.1. SET PATH

9.2.5.1.2. Make sure SSL is enabled in php.ini

9.2.5.1.3. cd /xampp/php

9.2.5.1.4. Install composer

9.2.5.1.5. Create bath file

9.2.5.1.6. Make sure composer works

9.2.5.2. Install ZF2 skeleton App

9.2.5.2.1. Install

9.2.5.2.2. Alternative

9.2.5.3. Modules Installation

9.2.5.3.1. DoctrineModule

9.2.5.3.2. Doctrine ORM or ODM

9.2.5.3.3. Zfcuser

9.2.6. ZF2 with zftool

9.2.6.1. install zftool with composer

9.2.6.2. Manual zip from github

9.2.6.3. zftool.phar

9.2.7. phpcloud

9.2.7.1. dispaly_errors

9.2.7.1.1. index.php

9.2.7.1.2. module.config.php

9.3. Development Stacks

9.3.1. XAMPP

9.3.1.1. No xDebug installed in the latest versions

9.3.1.2. pros

9.3.1.2.1. Doesn't start with the sstartup

9.3.1.3. cons

9.3.1.3.1. no Xdebug

9.3.2. WAMP

9.3.2.1. Download

9.3.2.2. Microsoft Visual C++ 2010 SP1 Redistributable Package (x86)

9.3.2.3. WAMP server 2.4 not working on Virtual machine Win XP SP3 512 MB RAM

9.3.2.3.1. solution is to increase the RAM

9.3.2.4. config is in

9.3.2.4.1. C:\wamp\bin\apache\Apache2.4.4\conf

9.3.3. easyphp

9.3.4. Zend Server

9.3.4.1. Download

9.3.4.1.1. Zend Server (PHP 5.4)

9.3.4.1.2. Zend Server (PHP 5.4)

9.3.4.2. Zend Server Free Edition

9.3.4.3. Zend Server CE

9.3.4.4. Without License or Expired License is CE

9.3.5. If you are using PHP 5.4 or above - CLI server (cli-server)

9.3.5.1. php -S 0.0.0.0:8080 -t public/ public/index.php

9.3.6. Display Errors

9.3.6.1. Add to public/index.php

9.4. IDEs

9.4.1. Notepad++

9.4.1.1. Portable

9.4.1.2. Plugins

9.4.1.2.1. php script engine

9.4.1.2.2. Autocompletion for PHP

9.4.1.2.3. DBGP plugin

9.4.2. Eclipse PDT

9.4.2.1. Zend All-in-ones is Portable. Just unzip and use

9.4.2.2. PHP Development Tools

9.4.2.3. All-in-ones download

9.4.2.4. Zend All-in-ones PDT 3.2.0 w/Eclipse Indigo

9.4.2.5. Debuggers

9.4.2.5.1. Xdebug

9.4.2.5.2. Zend Debugger

9.4.2.6. Eclipse Downloads

9.4.2.7. pros

9.4.2.7.1. ZF2 project

9.4.2.7.2. integrates with Zend Server

9.4.2.7.3. Creates the sceleton app in the IDE

9.4.2.8. cons

9.4.2.8.1. for Git SVN we need to install plugins

9.4.2.9. EGit (on top of JGit) for Eclipse

9.4.2.9.1. WiKi

9.4.2.9.2. HowTo install it

9.4.2.9.3. Install

9.4.2.9.4. HoTo

9.4.2.9.5. But Not recommended and still need TortoiseGit for SSH

9.4.3. Dreamwaver

9.4.4. Zend Studio

9.4.5. NetBeans

9.4.5.1. PHP and HTML5 Learning Trail

9.4.5.2. NetBeans PHP

9.4.5.3. features

9.4.5.4. Download

9.4.5.5. You need JDK 6 or higher

9.4.5.6. Zend Tutorial App in NetBeans

9.4.5.7. pros

9.4.5.7.1. Has Git and SVN

9.4.5.8. cons

9.4.5.8.1. ZF2 is not supported yet (but could be done trough ZF.bat)

9.4.5.9. SSH git

9.4.5.10. Generating an SSH Key

9.4.5.10.1. Generating And Using RSA key on Windows

9.4.5.11. RentAFlat ZF1 tutorial app

9.4.5.11.1. There is a Readme.html in the root of the project

9.4.6. Microsoft Notepad

9.4.7. Apple TextMate

9.4.8. Linux vi

9.4.9. Sublimetext

9.4.10. Aptana Studio

9.4.11. Linux vim

9.4.12. phpDesigner

9.4.13. JetBrains PHPStorm

9.4.13.1. phpStorm

9.4.13.2. It's bit pricey though, unfortunately

9.4.14. ActiveState Komod

9.4.15. PHPEdit

9.4.16. RapidPHP

9.4.17. RadPHP (formerly Delphi for PHP)

9.4.18. OpenKomodo

9.4.19. Comparison

9.4.19.1. Seven great PHP IDEs compared

9.4.19.2. List in WiKi

9.5. Debuggers

9.5.1. Zend Debugger

9.5.1.1. proprietary protocol

9.5.2. XDebug

9.5.2.1. DBGP protocol

9.5.2.2. Remote Debugging

9.5.2.3. Profiling

9.5.2.3.1. Outputs cachegrind compatible file

9.5.2.3.2. Clients

9.5.2.4. Clients

9.5.2.5. Xdebug extensions for web browsers

9.5.2.6. Start a session

9.6. Repositories (SCM, VCS)

9.6.1. Distributed

9.6.1.1. Git

9.6.1.1.1. Linus Torvalds

9.6.1.1.2. Implementations

9.6.1.1.3. Version Control Hosting Services

9.6.1.1.4. RSA key pairs for git (Installing SSH keys on Windows)

9.6.1.1.5. Configuration (Setting up Git profile)

9.6.1.2. Mercurial

9.6.1.3. Bazaar

9.6.2. Central server

9.6.2.1. SVN (Subversion)

9.6.2.2. CVS

9.7. Cloud

9.7.1. Virtualization + web services

9.7.1.1. hypervisor

9.7.2. Categories by what they offer

9.7.2.1. IaaS

9.7.2.1.1. AWS

9.7.2.2. PaaS

9.7.2.2.1. phpcloud.com

9.7.2.2.2. CloudBees

9.7.2.2.3. CloudFoundry

9.7.2.2.4. Appfog

9.7.2.2.5. Heroku

9.7.2.2.6. OpenShift

9.7.2.2.7. Google App Engine

9.7.2.2.8. Elastic Beans Talk

9.7.2.2.9. Microsoft Azure

9.7.2.3. SaaS

9.7.2.3.1. Zoho

9.7.3. Categories by location

9.7.3.1. Private

9.7.3.2. Public

9.7.3.3. Hybrid

9.8. Cloud Approaches

9.8.1. IDE

9.8.1.1. Native apps

9.8.1.2. Web based (Cloud, HTML5)

9.8.1.2.1. Requrments

9.8.1.2.2. Will detach us from the device

9.8.2. VMware

9.8.2.1. Zend Image

9.8.2.1.1. We control it

9.8.3. VNC

9.8.3.1. VPN

9.8.3.1.1. I have to install native apps

9.8.4. Web Desktop, Web (Browser) OS

9.8.4.1. Lucid (Dojo)

9.8.4.2. ExtTop

9.8.5. HTML5

9.8.5.1. CSS3

9.8.5.2. HTML5

9.8.5.3. JS (ES5)

9.8.5.3.1. Alternatives???

9.9. Cloud Development Stacks

9.9.1. phpcloud.com

9.9.1.1. Managing your SSH keys

9.9.1.1.1. PEM RSA keypair

9.9.1.1.2. PPK RSA keypair

9.9.1.2. Connecting via Git

9.9.1.3. Connecting via SFTP

9.9.1.3.1. WinSCP

9.9.1.4. Setting up the Debugger

9.9.1.4.1. starting the debugger

9.9.1.5. Connecting to the Database

9.9.1.6. tools

9.9.1.6.1. OpenSSH

9.9.1.6.2. WinSCP

9.9.1.6.3. PuTTy

9.9.1.6.4. Git

9.9.1.6.5. MySQL

9.9.1.6.6. IDEs

9.9.1.6.7. Browser Plugins

9.9.1.6.8. XDebug

9.9.2. phpfog.com appfog.com

9.10. Cloud IDEs

9.10.1. Cloud 9

9.10.1.1. What it is according to Wikipedia?

9.10.1.2. Public code repositories

9.10.1.2.1. GitHub

9.10.1.2.2. BitBucket

9.10.1.3. Works with

9.10.1.3.1. Mercurial repositories

9.10.1.3.2. Git repositories

9.10.1.3.3. FTP servers

9.10.1.4. Support for deployment (PaaS)

9.10.1.4.1. Heroku

9.10.1.4.2. Joyent

9.10.1.4.3. Windows Azure

9.10.1.5. Features

9.10.1.6. OpenId

9.10.1.6.1. GitHub

9.10.1.6.2. BitBucket

9.10.1.7. Chrome app

9.10.1.7.1. Cloud 9

9.10.1.8. NOT FREE

9.10.1.9. Only 1 RSA key pair

9.10.1.10. Can not export the private key

9.10.1.10.1. you can not use PuTTy or WinSCP at the same time with Cloud 9

9.10.1.11. Can not import RSA key pair

9.10.1.12. HAS A TERMINAL WINDOW (console)

9.10.1.12.1. Big plus

9.10.2. Codenvy (former Exo IDE)

9.10.2.1. What it is according to Wikipedia?

9.10.2.1.1. No info on first search page

9.10.2.2. Public code repositories

9.10.2.2.1. GitHub

9.10.2.2.2. Google ???

9.10.2.3. Support for deployment (PaaS)

9.10.2.3.1. Amazon Web Services

9.10.2.3.2. appfog

9.10.2.3.3. CloudBees

9.10.2.3.4. CloudFoundry

9.10.2.3.5. Google App Engine

9.10.2.3.6. Heroku

9.10.2.3.7. OpenShift

9.10.2.4. OpenId

9.10.2.4.1. GitHub

9.10.2.4.2. Google

9.10.2.5. Mobile native Apps

9.10.2.5.1. iPad

9.10.2.5.2. iPhone

9.10.2.5.3. Android

9.10.2.6. Chrome app

9.10.2.6.1. Cloud IDE

9.10.2.7. Doesn't support

9.10.2.7.1. node.js

9.10.3. Installed on your own server

9.10.4. How to OSS

9.10.4.1. github

9.10.4.1.1. Exo IDE

9.10.4.1.2. Cloud9

9.10.4.2. bitbucket

9.11. Cloud free public repositories (hosting code)

9.11.1. http://sourceforge.net/

9.11.2. http://code.google.com/

9.11.3. https://github.com/

9.11.3.1. What is GitHub according to Wikipedia

9.11.3.2. Main Features

9.11.3.2.1. forking

9.11.3.2.2. pull request

9.11.3.2.3. merge

9.11.3.3. U can use it without web interface

9.11.3.4. It has

9.11.3.4.1. Issue Tracker

9.11.3.4.2. WiKi

9.11.4. https://bitbucket.org/

9.11.4.1. Issue Tracker

9.11.4.1.1. Jira

9.12. Summary

9.13. Q&A

9.14. Cloud Step By Step Tutorial

9.14.1. Exo IDE

9.14.1.1. Create New OSS project

9.14.1.1.1. 1. Create an account on GitHub

9.14.1.1.2. 2. (Optional) Create an account on Exo IDE

9.14.1.1.3. 3. Create an account on AppFog

9.14.1.1.4. 4. Login to Exo IDE

9.14.1.1.5. 5. Choose PaaS

9.14.1.1.6. 6. Create a Project

9.14.1.1.7. 7. (Optional) Delete the files and folders in the new project

9.14.1.1.8. 8. (Optional) Create your own files and folders sutable for the project

9.14.1.1.9. 9. Do "git init"

9.14.1.1.10. 10. Create a repository in GitHub

9.14.1.1.11. 11. Add Remote Repository (github)

9.14.1.1.12. 12. Generate RSA key pair in Exo IDE

9.14.1.1.13. 13. Add the generated public key to github

9.14.1.1.14. 14. In Exo IDE do "git add ."; "git commit -m "My first commit""; "git push <reponame> master"

9.14.1.2. Contribute to an OSS project

9.14.1.2.1. 1. Create an account on GitHub

9.14.1.2.2. 2. (Optional) Create an account on Exo IDE

9.14.1.2.3. 3. Create an account on AppFog

9.14.1.2.4. 4. Login to Exo IDE

9.14.1.2.5. 5. Choose PaaS

9.14.1.2.6. 6. Create a Project

9.14.1.2.7. 7. (Optional) Delete the files and folders in the new project

9.14.1.2.8. 8. (Optional) Create your own files and folders sutable for the project

9.14.1.2.9. 9. Do "git init"

9.14.1.2.10. 10. Add Remote Repository (github) To the project in Exo IDE

9.14.1.2.11. 11. Generate RSA key pair in Exo IDE

9.14.1.2.12. 12. Add the generated public key to github

9.14.1.2.13. 13. Fork the existing project

9.14.1.2.14. 14. In Exo IDE do "git pull"

9.15. git (DSCM, VCS)

9.15.1. git init

9.15.2. git clone ssh://[email protected]/gitprojects/fmi.git

9.15.3. git remote add zend ssh://[email protected]/gitprojects/fmi.git

9.15.4. git remote

9.15.5. git remote rm zend

9.15.6. git branch

9.15.6.1. git branch iss53

9.15.6.2. git checkout iss53

9.15.6.3. git commit -a -m 'added a new footer [issue 53]'

9.15.6.4. git branch -d hotfix

9.15.6.5. $ git branch -r

9.15.6.5.1. Remote tracking branches

9.15.7. git branch mybranch

9.15.8. git rm

9.15.9. git fetch zend

9.15.10. git merge zend/master

9.15.11. .gitignore

9.15.11.1. git rm --cached filename

9.15.12. git push origin master

9.15.13. git pull origin master

9.15.14. git checkout zend/mybranch

9.15.15. git add index.php (. to add all files)

9.15.16. git add <folder>/*

9.15.17. git commit -m "My first commit"

9.15.18. git --version

9.15.19. Zend help

9.15.19.1. git --version

9.15.19.2. git clone <git repo URL>

9.15.19.3. $ GIT_SSL_NO_VERIFY=1 git clone <git repo URL>

9.15.19.4. .git/configfile

9.15.19.4.1. [http] postBuffer = 524288000

9.15.19.5. $ git add index.php$ git commit -m "Adding index.php"

9.15.19.6. $ git push origin master

9.15.19.7. Pushing an Existing Git Project into Zend Developer Cloud Platform

9.15.19.7.1. $ git remote add zendcloud <git repository URL>

9.15.19.7.2. $ git pull zendcloud master

9.15.19.7.3. $ git push zendcloud master

9.15.20. Oficial Git tutorial

9.15.20.1. $ git config --global user.name "Your Name Comes Here"

9.15.20.2. $ git config --global user.email [email protected]

9.16. Cloud Design

9.16.1. wix.com

9.17. tools, frameworks, distribution systems (networks), repositories

9.17.1. PEAR

9.17.2. PECL

9.17.3. Pyrus

9.17.4. Composer

9.17.5. Phar extension

9.17.6. ZF2 Modules

9.17.7. github.com

9.18. Deployment to AppFog

9.18.1. .htaccess

9.18.1.1. root

9.18.1.2. public

9.18.1.3. all other folders

9.18.2. vendor

9.18.2.1. ZF2

9.18.2.1.1. library

9.18.3. .gitignore

9.18.3.1. public

9.18.3.2. vendor

9.18.3.3. first you have to remove the file

9.18.3.3.1. do git remove <filename>

9.18.3.4. After the removal the ignore will take place

9.18.3.5. Note: you can not ignore existing files without first deleting them

9.18.4. Services

9.18.4.1. MySQL

9.18.4.1.1. local.php

9.18.4.1.2. install phpMyAdmin

9.18.4.1.3. config.inc.php phpMyAdmin

9.18.4.1.4. Bind your PhpMyAdmin app to the MySQL service

9.18.4.1.5. PMA_PASSWORD

9.18.4.1.6. use your username for AppFog

9.18.4.1.7. configuration in the app

9.18.5. Custom DNS

9.18.5.1. Free public DNS

9.18.5.2. Free DNS hosting

9.18.5.3. Cloud DNS hosting

9.18.6. public/index.php

9.18.7. autoload file in vendor

9.19. phpunit

9.19.1. Installation

9.19.1.1. PEAR

9.19.1.2. Composer

9.19.1.3. PHP Archive (PHAR)

9.19.1.4. Optional packages

9.19.1.5. Upgrading

9.20. ZF2 cheatsheet

9.21. PSR-0 (Pretty Standard, Really)

9.22. Getting Started with composer packages

9.23. PHPspc

9.24. Behat

9.25. Red Mind

9.26. HTML5, CSS3, JS IDEs

9.27. Continuous integration

9.28. The best Server IDE combinations

9.28.1. Zend EclipsePDT

9.28.1.1. Zend Server (Zend Debugger)

9.28.1.2. EGit extra installed

9.28.1.2.1. SSH? trough PuTTY

9.28.2. NetBeans

9.28.2.1. XAMPP

9.28.2.1.1. Install Xdebug

9.28.2.2. WAMP

9.28.2.2.1. Comes with Xdebug

9.28.2.2.2. Why doesn't work

9.28.2.3. Comes with Git

9.28.2.3.1. SSH?

9.28.2.4. HoTo

9.28.2.4.1. 1 Download and install Git

9.28.2.4.2. 2* (Optional) Generate RSA key pairs

9.28.2.4.3. 3* (Optional) Enter the public key in your bitbucket account

9.28.2.4.4. 4 Download and install WAMP

9.28.2.4.5. 5 add to PATH

9.28.2.4.6. 6 Enable SSL in PHP manualy

9.28.2.4.7. 7 Install composer

9.28.2.4.8. 8 Virtual host

9.28.2.4.9. 9 NetBeans

9.28.3. Minimalistic approach

9.28.3.1. Git (MSYS)

9.28.3.1.1. ssh-keygen -t rsa

9.28.3.2. XAMPP, WAMP or Zend Server

9.28.3.2.1. Add to Path

9.28.3.2.2. vhost with ports

9.28.3.2.3. vhost subdomain

9.28.3.2.4. IMPORTANT NOTES for vhosts

9.28.3.3. composer

9.28.3.3.1. In the PATH

9.28.3.3.2. get composer.phar

9.28.3.3.3. create a bath file

9.28.3.3.4. IMPORTANT NOTES (espacialy for WAMP)

9.28.3.4. Notepad++

9.29. PPI framework Skeleton Application

9.30. ZfcUser, BjyAuthorize and Doctrine working together

9.30.1. How to start a project?

9.31. Naming coding standards

9.32. ZendTool

9.32.1. GitHub

9.32.2. separate from ZF2 project

9.32.3. Documentation

9.32.4. Installation

9.32.4.1. Composer

9.32.4.1.1. Move the folder to vendor

9.32.4.1.2. Sugested changes

9.32.4.2. Manual

9.32.4.3. Without installation, using the PHAR file

9.32.4.3.1. I have created zf.bat in the same folder as zftool.phar

9.32.5. Doesn't create composer.phar in the root of the project

10. 2. MVC. Model View Controller.

10.1. HTML5 kingdom

10.1.1. HTML5 the king and knight

10.1.1.1. HTML - HyperText Markup Language

10.1.1.1.1. History

10.1.1.2. History of HTML5

10.1.1.2.1. 2004

10.1.1.3. tags

10.1.1.3.1. block

10.1.1.3.2. inline

10.1.1.4. What is new in HTML5

10.1.1.4.1. The <canvas> element for 2D drawing

10.1.1.4.2. The <video> and <audio> elements for media playback

10.1.1.4.3. Support for local storage

10.1.1.4.4. New content-specific elements, like <article>, <footer>, <header>, <nav>, <section><aside>

10.1.1.4.5. New form controls, like calendar, date, time, email, url, search

10.1.1.5. Browser Support for HTML5

10.1.1.5.1. HTML5 is not yet an official standard

10.1.1.6. W3C

10.1.1.7. Structure

10.1.1.7.1. some structural HTML5 tags

10.1.1.7.2. drawing

10.1.2. CSS3 the tailor

10.1.2.1. structure and visualisation separation

10.1.2.2. W3C

10.1.2.3. Position

10.1.2.3.1. External

10.1.2.3.2. Internal

10.1.2.4. Selectors

10.1.2.5. Properties (style attributes )

10.1.2.6. Pseudo-classes

10.1.2.7. Pseudo elements

10.1.2.8. CSS for DHTML

10.1.2.8.1. position

10.1.2.8.2. top, left

10.1.2.8.3. bottom, right

10.1.2.8.4. width, height

10.1.2.8.5. z-index

10.1.2.8.6. display

10.1.2.8.7. visibility

10.1.2.8.8. clip

10.1.2.8.9. overflow

10.1.2.8.10. margin, border, padding

10.1.2.8.11. background

10.1.2.8.12. opacity

10.1.2.9. CSS Box model

10.1.2.9.1. Internet Explorer quirks

10.1.2.10. Our CSS

10.1.2.10.1. Main file

10.1.2.10.2. Layout

10.1.2.10.3. Typography

10.1.2.10.4. Navigation

10.1.3. JavaScript (ES5) the wizard

10.1.3.1. Embedding Scripts in HTML

10.1.3.1.1. The <script> Tag

10.1.3.1.2. Scripts in External Files

10.1.4. To conquer all natives

10.1.5. Progressive Enhancement vs Graceful Degradation

10.1.6. The all cool things in the web

10.1.7. ULITA

10.1.7.1. Usability

10.1.7.2. Localisation (l10n)

10.1.7.3. Internationalization (i18n)

10.1.7.4. Translation

10.1.7.5. Accessability

10.2. PHP

10.2.1. "Hello World"

10.2.2. ";" at the end of the statement

10.2.3. Variables start with "$"

10.2.3.1. a-z A-Z 0-9 _

10.2.3.2. don't start with number

10.2.4. Loosely Typed (dynamic)

10.2.4.1. vs

10.2.4.1.1. Stricktly Typed (Static)

10.2.5. Types

10.2.5.1. Numeric

10.2.5.1.1. float

10.2.5.1.2. int

10.2.5.2. Boolean

10.2.5.2.1. true

10.2.5.2.2. false

10.2.5.3. String

10.2.6. functions

10.2.7. PHP Arrays

10.2.8. PHP is from the syntax group of the C languages

10.2.9. Operators

10.2.10. Statements

10.2.10.1. if

10.2.10.2. if else

10.2.10.3. switch

10.2.11. while

10.2.12. do-while

10.2.13. for

10.2.14. $_GET

10.2.15. $_POST

10.2.16. constants

10.2.17. some magic constants

10.2.17.1. __FILE__

10.2.17.2. __DIR__

10.2.17.3. __METHOD__

10.2.17.4. __CLASS__

10.2.18. some predefined constants

10.2.18.1. DIRECTORY_SEPARATOR

10.2.18.2. PATH_SEPARATOR

10.2.19. some predefined superglobal variables

10.2.19.1. $_SERVER

10.2.19.2. $_COOKIE

10.2.19.2.1. setcookie('name', 'value', time() + 3600, "/", "", 0)

10.2.19.3. $_SESSION

10.2.19.3.1. session_start();

10.2.20. 1000+ functions

10.2.20.1. header($header, $replace, $response_code)

10.2.20.1.1. OSI Model

10.2.20.2. ob_start();

10.2.20.3. ob_flush()

10.3. OOP - Object Oriented Programing

10.3.1. Features

10.3.1.1. Inheritance

10.3.1.2. Abstraction

10.3.1.3. Encapsulation

10.3.1.4. Polymorphism

10.3.1.4.1. example

10.3.2. Goal

10.3.2.1. Reuse

10.3.2.2. Arhitecture (Structure)

10.3.2.2.1. The cost of change

10.3.2.2.2. vs hacking

10.3.2.3. 1 more level of abstraction

10.3.2.3.1. system programming usualy NO OOP

10.3.2.3.2. computer doesn care

10.3.2.4. Agile Software Development (Extreme programming)

10.3.2.4.1. Continuous Integration (OOP)

10.3.2.4.2. Refactoring

10.3.2.4.3. Test Driven Development

10.3.2.5. Everyone can write code which the computer can understand, but not everyone can write a code that othe human can understand.

10.3.2.6. Is it the Holy Grail? NO.

10.3.2.6.1. We continue searching and discovering

10.3.3. Topics

10.3.3.1. Class

10.3.3.1.1. Blueprint

10.3.3.1.2. Constructor

10.3.3.1.3. Destructor

10.3.3.1.4. Methods

10.3.3.1.5. Properties

10.3.3.2. Object

10.3.3.2.1. Instance of a class

10.3.3.3. Methods

10.3.3.3.1. Member functions

10.3.3.4. Access Parent Class

10.3.3.4.1. parent::

10.3.3.5. Properties

10.3.3.5.1. Member variables

10.3.3.6. Scope

10.3.3.6.1. private

10.3.3.6.2. protected

10.3.3.6.3. public

10.3.3.7. Constants

10.3.3.8. Static

10.3.3.8.1. Methods

10.3.3.8.2. Properties

10.3.3.8.3. for access ::

10.3.3.8.4. $this not available (use self)

10.3.3.8.5. has scope

10.3.3.9. Abstract Class

10.3.3.9.1. Must have at least 1 abstarct method

10.3.3.9.2. No direct instance

10.3.3.9.3. No abstract properties

10.3.3.10. Interface

10.3.3.10.1. Determen the methods

10.3.3.10.2. Can implement multiple interfaces

10.3.3.10.3. interface - keyword

10.3.3.10.4. implements - keyword

10.3.3.10.5. methods

10.3.3.10.6. makes sure there are well know methods comming from the interface

10.3.3.11. Overriding

10.3.3.12. Overloading

10.3.3.12.1. Magical methods

10.3.3.13. Autoload

10.3.3.13.1. Since PHP 5.2

10.3.3.13.2. spl_autoload_register()

10.3.3.14. Namespaces

10.3.3.14.1. Since PHP 5.3

10.3.3.14.2. basics

10.3.3.14.3. use

10.3.3.15. Anonymous (Lambda) functions and Closures

10.3.3.15.1. SInce 5.3

10.3.3.15.2. callback parameters

10.3.3.15.3. variable assignment

10.3.3.15.4. Closure

10.3.3.16. favor object composition over inheritance

10.3.3.16.1. inheritance

10.3.3.16.2. composition

10.3.3.16.3. Interfaces

10.3.4. Letter to a student (personal)

10.4. Design Patterns

10.4.1. Christopher Alexander

10.4.1.1. architect

10.4.1.2. first created the term

10.4.2. Gang Of Four - Design Patterns, Elements Of Reusable Object Oriented Software

10.4.2.1. Creational Patterns

10.4.2.1.1. Abstract Factory

10.4.2.1.2. Builder

10.4.2.1.3. Factory Method

10.4.2.1.4. Prototype

10.4.2.1.5. Singleton

10.4.2.2. Structural Patterns

10.4.2.2.1. Adapter

10.4.2.2.2. Bridge

10.4.2.2.3. Composite

10.4.2.2.4. Decorator

10.4.2.2.5. Façade

10.4.2.2.6. Flyweight

10.4.2.2.7. Proxy

10.4.2.3. Behavioral Patterns

10.4.2.3.1. Chain of Responsibility

10.4.2.3.2. Command

10.4.2.3.3. Interpreter

10.4.2.3.4. Iterator

10.4.2.3.5. Mediator

10.4.2.3.6. Memento

10.4.2.3.7. Observer

10.4.2.3.8. State

10.4.2.3.9. Strategy

10.4.2.3.10. Template Method

10.4.2.3.11. Visitor

10.4.3. Patterns of Enterprise Application Architecture

10.4.3.1. Domain Logic Patterns

10.4.3.1.1. Transaction Script

10.4.3.1.2. Domain Model

10.4.3.1.3. Table Module

10.4.3.1.4. Service Layer

10.4.3.2. Data Source Architectural Patterns

10.4.3.2.1. Table Data Gateway

10.4.3.2.2. Row Data Gateway

10.4.3.2.3. Active Record

10.4.3.2.4. Data Mapper

10.4.3.3. Object-Relational Behavioral Patterns

10.4.3.3.1. Unit of Work

10.4.3.3.2. Identity Map

10.4.3.3.3. Lazy Load

10.4.3.4. Object-Relational Structural Patterns

10.4.3.4.1. Identity Field

10.4.3.4.2. Foreign Key Mapping

10.4.3.4.3. Association Table Mapping

10.4.3.4.4. Dependent Mapping

10.4.3.4.5. Embedded Value

10.4.3.4.6. Serialized LOB

10.4.3.4.7. Single Table Inheritance

10.4.3.4.8. Class Table Inheritance

10.4.3.4.9. Concrete Table Inheritance

10.4.3.4.10. Inheritance Mappers

10.4.3.5. Object-Relational Metadata Mapping Patterns

10.4.3.5.1. Metadata Mapping

10.4.3.5.2. Query Object

10.4.3.5.3. Repository

10.4.3.6. Web Presentation Patterns

10.4.3.6.1. Model View Controller

10.4.3.6.2. Page Controller

10.4.3.6.3. Front Controller

10.4.3.6.4. Template View

10.4.3.6.5. Transform View

10.4.3.6.6. Two-Step View

10.4.3.6.7. Application Controller

10.4.3.7. Distribution Patterns

10.4.3.7.1. Remote Facade

10.4.3.7.2. Data Transfer Object

10.4.3.8. Offline Concurrency Patterns

10.4.3.8.1. Optimistic Offline Lock

10.4.3.8.2. Pessimistic Offline Lock

10.4.3.8.3. Coarse Grained Lock

10.4.3.8.4. Implicit Lock

10.4.3.9. Session State Patterns

10.4.3.9.1. Client Session State

10.4.3.9.2. Server Session State

10.4.3.9.3. Database Session State

10.4.3.10. Base Patterns

10.4.3.10.1. Gateway

10.4.3.10.2. Mapper

10.4.3.10.3. Layer Supertype

10.4.3.10.4. Separated Interface

10.4.3.10.5. Registry

10.4.3.10.6. Value Object

10.4.3.10.7. Money

10.4.3.10.8. Special Case

10.4.3.10.9. Plugin

10.4.3.10.10. Service Stub

10.4.3.10.11. Record Set

10.5. Zend Framework 2

10.5.1. Building a module

10.5.1.1. Modules

10.5.1.1.1. Setting up the Album module

10.5.1.1.2. Configuration

10.5.1.1.3. Informing the application about our new module

10.5.1.2. Routing and controllers

10.5.1.2.1. module.config.php

10.5.1.2.2. AlbumController.php

10.5.1.2.3. Initialise the view scripts

10.5.1.3. Database

10.5.1.3.1. connect

10.5.1.4. Models

10.5.1.4.1. model classes represent each entity in your application

10.5.1.4.2. ORM

10.5.1.5. Forms and actions

10.5.1.6. gitignore

10.6. We don't have to know the entire technology in details to start working

10.6.1. Know just enough to get the job done

10.6.2. Use google

11. 3. Forms.

11.1. ZF2 sources of knowledge

11.1.1. IRC: #zftalk (#zftalk.2 - closed) on Freenode Webchat

11.1.2. Maillist Subscribe Browse

11.1.2.1. Archive

11.1.3. Webinars

11.1.3.1. (old) Doctrine2 ZF1

11.1.4. Blogs

11.1.4.1. Enrico Zimuel

11.1.4.2. Matthew Weier O'Phinney

11.1.4.3. Rob Allen

11.1.4.4. Ralph Schindler

11.1.4.5. Ryan Mauger

11.1.4.5.1. github

11.1.4.6. Evan Coury

11.1.5. Official site

11.1.5.1. About

11.1.5.1.1. Overview

11.1.5.1.2. FAQ (ZF2 FAQ)

11.1.5.1.3. ZF1 FAQ

11.1.5.1.4. Security

11.1.5.1.5. Changelog

11.1.5.1.6. Blog

11.1.5.1.7. New BSD License

11.1.5.2. Learn

11.1.5.2.1. User Guide

11.1.5.2.2. Reference Guide

11.1.5.2.3. APIs

11.1.5.2.4. Training & Certification

11.1.5.2.5. Support & Consulting

11.1.5.3. Get Started

11.1.5.3.1. Downloads

11.1.5.3.2. Get the Skeleton App

11.1.5.3.3. Try on phpcloud.com

11.1.5.4. Participate

11.1.5.4.1. Overview

11.1.5.4.2. Contributors Guide

11.1.5.4.3. Blogs

11.1.5.5. Contact Us

11.1.5.5.1. form

11.1.5.5.2. mailing lists

11.1.5.5.3. IRC

11.1.6. Zend Framework 2

11.1.6.1. Getting started

11.1.6.2. Reference Guide

11.1.6.3. API

11.1.7. skeleton app

11.1.7.1. Welcome to Zend Framework 2

11.1.7.1.1. ZF2 Skeleton Application

11.1.7.1.2. Fork Zend Framework 2 on GitHub »

11.1.7.2. Follow Development

11.1.7.2.1. wiki

11.1.7.2.2. dev blog

11.1.7.2.3. issue tracker

11.1.7.2.4. ZF2 Development Portal

11.1.7.3. Discover Modules

11.1.7.3.1. on GitHub

11.1.7.3.2. Explore ZF2 Modules »(web site)

11.1.7.4. Help & Support

11.1.7.4.1. IRC: #zftalk (#zftalk.2 - closed) on Freenode

11.1.7.4.2. mailing lists

11.1.7.4.3. Ping us on IRC »

11.1.8. How to use ZF1 libraries in ZF2

11.1.9. Wiki

11.1.10. ? Thorsten Ruf's ZF1(zenddispatch_en.pdf) ?

11.1.11. ? Dispatch ZF2 Diagram ?

11.1.12. ? Front Controller Dispatch Process ?

11.1.13. Dispatch ZF2

11.1.13.1. correct link

11.1.14. Zend Framework 2 Cheat Sheet

11.1.15. ZF2 Patterns

11.1.16. Event Manager

11.1.16.1. Triggered: Zend Framework 2's EventManager

11.1.16.1.1. Event

11.1.16.1.2. Listener

11.1.16.1.3. Event Manager (Connection Bus)

11.1.16.1.4. Priority

11.1.16.1.5. how to trigger

11.1.16.1.6. Listeners

11.1.16.1.7. Custom Events

11.1.16.1.8. Recomendations

11.1.16.1.9. Global Events

11.1.16.1.10. some terms

11.1.16.1.11. other terms

11.1.17. Service Manager ("object manager” or “instance manager”)

11.1.18. The MVC architecture of ZF2

11.1.18.1. New architecture

11.1.18.1.1. MVC

11.1.18.1.2. Di

11.1.18.1.3. Events

11.1.18.1.4. Service

11.1.18.1.5. Module

11.1.18.2. PSR-2 compliant

11.1.18.3. packaging system

11.1.18.3.1. pyrus

11.1.18.3.2. composer

11.1.18.4. PHP 5.3.5

11.1.18.5. Performace Improvments

11.1.18.5.1. Lazy Loading

11.1.18.6. The new core

11.1.18.6.1. ZF1

11.1.18.6.2. ZF2

11.1.18.7. MVC

11.1.18.7.1. separation of concern

11.1.18.7.2. code reusability

11.1.18.8. Event Driven Architecture

11.1.18.8.1. bootstrap

11.1.18.8.2. root

11.1.18.8.3. dispatch

11.1.18.9. A common workflow

11.1.18.10. Default services

11.1.18.10.1. EventManager

11.1.18.10.2. ModuleManager

11.1.18.10.3. Request

11.1.18.10.4. Response

11.1.18.10.5. RouteListener

11.1.18.10.6. Router

11.1.18.10.7. DispatchListener

11.1.18.10.8. VIewManager

11.1.18.11. config/application.config.php

11.1.18.12. public/.htaccess

11.1.18.12.1. The front controller is index.php

11.1.18.13. public/index.php

11.1.18.14. Zend\ServiceManager

11.1.18.14.1. IS A SL (SERVICE LOCATOR) implementation

11.1.18.14.2. Well known object in which you can register object and retrieve them later

11.1.18.14.3. Driven by configuration

11.1.18.15. Type of services

11.1.18.15.1. Explicit

11.1.18.15.2. Invocables

11.1.18.15.3. Factories

11.1.18.15.4. Aliases

11.1.18.15.5. Abstract Factories

11.1.18.15.6. Scoped Containers

11.1.18.15.7. Shared

11.1.18.16. modules

11.1.18.16.1. inform the MVC about services and event listeners

11.1.18.16.2. subset of the app

11.1.18.16.3. Modules are simply

11.1.18.17. module/Application/Module.php

11.1.18.18. module/Application/config/module.config.php

11.1.18.19. module/Application/src/Application/Controller/IndexController.php

11.1.19. ZF 2, Doctrine 2

11.1.19.1. Using Doctrine 2 in Zend Framework 2

11.1.19.2. Install Doctrine 2 on ZF2

11.1.19.3. Doctrine 2 ORM Module for Zend Framework 2 github

11.1.19.4. Tutorial

11.1.19.4.1. github

11.1.20. Composer - Dependency Management for PHP

11.1.20.1. on github

11.1.20.2. Official site

11.1.20.3. Install

11.1.20.3.1. in php folder

11.1.20.3.2. Make sure SSL enabled in PHP

11.1.20.3.3. Make it global

11.1.20.4. use

11.1.20.4.1. Create Project

11.1.20.4.2. Require Module

11.1.20.4.3. Manualy Add a Module

11.1.20.4.4. Don't forget to add the modules to application.config.php

11.1.20.5. Autoloading

11.1.20.5.1. require 'vendor/autoload.php';

11.1.21. Do we need framework at all???

11.1.22. Some tips to write better Zend Framework 2 modules

11.1.22.1. On Russian

11.2. ZF2 Di Theory

11.2.1. Strong Cohesion

11.2.2. Loosly Coupling

11.2.2.1. Decoupling

11.2.3. Reuse

11.2.4. Cost of change

11.2.5. IoC Inversion of Control ( concep)

11.2.5.1. Inversion of Control Containers and the Dependency Injection pattern

11.2.5.1.1. Components and Services

11.2.5.1.2. A Naive Example

11.2.5.1.3. Inversion of Control

11.2.5.1.4. Forms of Dependency Injection

11.2.5.1.5. Using a Service Locator

11.2.5.1.6. Deciding which option to use

11.2.5.1.7. Some further issues

11.2.5.1.8. Concluding Thoughts

11.2.6. Di - Dependancy Injection (pattern)

11.2.6.1. Constructor Injection

11.2.6.1.1. pros

11.2.6.1.2. cons

11.2.6.2. Setter Injection

11.2.6.2.1. pros

11.2.6.2.2. cons

11.2.6.3. Interface injection

11.2.6.3.1. "Aware"

11.2.6.3.2. cons

11.2.6.4. DiC Dependancy Injection Container (tool)

11.2.6.5. sources of information

11.2.6.5.1. webinar

11.2.6.5.2. Documentation on the site

11.2.7. Service Locator (pattern)

11.2.7.1. alternative for Di

11.2.7.2. (SL) Service Locator !== (DiC) Dependancy injection Container

11.2.7.3. But DiC == SL

11.2.7.4. DiC can be the foundation of consumed for Service Location

11.2.7.5. cons

11.2.7.5.1. SL becomes a dependancy

11.2.7.6. pros

11.2.7.6.1. Not all code paths may use all dependancies

11.2.8. Zend\Di (DiC implementation)

11.2.8.1. Not a requirment

11.2.8.2. supprot for both

11.2.8.2.1. constructor

11.2.8.2.2. setter

11.2.8.3. Not "Hello World" friendly

11.2.9. Type-hints

11.3. Event Manager

11.3.1. Space Station Modules

11.3.1.1. Consists by independent modules

11.3.1.2. Each module is build from a group of smaller modules following the same pattern

11.3.1.2.1. The smaller modules are build from even smaller modules following the same pattern etc.

11.3.1.3. Each module can trigger an event

11.3.1.3.1. There are maybe modules listening on this channel (for this event) or maybe not

11.3.1.4. Each module can listen for an event

11.3.1.4.1. But there are maybe modules emitting (notifying) about this event or not

11.3.2. Electronic Circuits

11.3.2.1. Phisical Interfaces

11.3.2.1.1. Logical

11.3.2.1.2. Electrical

11.3.2.1.3. Phisical

11.3.3. Event

11.3.3.1. Something that does happen

11.3.4. Listener

11.3.4.1. a callback

11.3.4.1.1. responds to an event

11.3.5. Event Manager (how to attach a callback listener)

11.3.5.1. a collection of Listeners

11.3.5.2. triggers events

11.3.6. Priority

11.3.7. how to trigger

11.3.8. Listeners

11.3.8.1. Receive a single argument ($e)

11.3.8.2. Any PHP callback

11.3.9. Recomendations

11.3.9.1. __FUNCTION__

11.3.9.1.1. dot-notation

11.3.9.2. pass all input as a parameter

11.3.10. Global Events

11.3.11. some terms

11.3.11.1. trigger/attach

11.3.11.2. public/subscribe

11.3.11.3. notify/listen

11.3.12. more terms

11.3.12.1. target

11.3.12.2. context

11.3.13. associations

11.3.13.1. Environment for signals

11.3.13.2. Wires

11.3.13.3. Channels

11.3.13.4. Connection

11.3.13.5. Bus

11.4. MVC architecutre of ZF2

11.5. Bridge the domain Model and the View layer

11.5.1. spread across

11.5.1.1. Controller

11.5.1.2. Model

11.5.1.3. View

11.5.1.3.1. list = index

11.5.2. Terms

11.5.2.1. Hydration

11.5.2.2. Extraction

11.5.3. The bond

11.5.3.1. $form->bind($model)

11.5.3.1.1. Make the bond

11.5.3.1.2. Fly in the Clouds

11.5.4. Zend Hydrators

11.5.4.1. Zend\Stdlib\Hydrator\ArraySerializable

11.5.4.2. Zend\Stdlib\Hydrator\ClassMethods

11.5.4.3. Zend\Stdlib\Hydrator\ObjectProperty

11.5.4.4. HydratorInterface

11.5.5. Look the "Album" tutorial app

11.5.6. Annotation to unite

12. 4. ORM. Object Relational Mapping.

12.1. Doctrine 2

12.1.1. What is Doctrine?

12.1.2. What are Entities?

12.1.3. Doctrine 2 Working with Associations

12.1.4. Doctrine configuration

12.1.5. EntityManager

12.1.5.1. The main access point

12.1.6. Association Mapping

12.1.7. Getting Started

12.1.8. new Zend Form features explained

12.1.9. Hydrator

12.1.10. Notes on Doctrine 2

12.1.11. Doctrine ZF2 Lection

12.2. Propel

12.3. No SQL DB (ODM)

12.3.1. Mongo DB

12.3.2. Apache CouchDB

12.4. "What is first, the chicken or the egg?"

12.4.1. First build the DB as a result of the system analysis?

12.4.1.1. If you don't know the programming language framework etc.

12.4.1.2. The ORM has tools for reverse engineering to build the classes from DB.

12.4.2. First build the domain logic with classes (Entities) as a result of the system analysis.

12.4.2.1. If you are going to use OOP

12.4.2.2. If you are planning to use ORM

12.4.2.3. If the ORM has tools for creating DB

12.4.2.4. Always keep in mind the DB at the back of your head

12.4.2.5. If you don't know what DB are you going to use'

12.5. Composer is used for the modules (Doctrine)

12.5.1. Cloud 9 offers console but you have to pay

12.5.2. I would prefer to install development stack on a local machine

12.5.2.1. XAMPP

12.5.2.2. Composer

12.6. Local workflow

12.6.1. Start Notepad++

12.6.2. Start Git console

12.6.2.1. Clone the repo

12.6.3. /xampp/apache_start.bat

12.6.4. /xampp/mysql_start.bat

12.6.5. Console for MySQL

12.6.6. Start MongoDB

12.6.6.1. shutdown

12.6.6.2. The 32 bit version works on 46 bit WIn7

12.6.6.3. 64 bit allocates about 4GB disk space

12.6.7. Console for MongoDB

12.6.7.1. show databases = show dbs

12.6.7.2. tables = collections

12.6.7.3. rows = documents

12.6.8. Console for composer

12.6.8.1. Install ONLY ZF2

12.6.8.2. Install ONLY DoctrineORM

12.6.8.3. Install ONLY DoctrineODM

12.6.8.4. Install the Doctrine modules for ZF2

12.6.8.4.1. DoctrineModule

12.6.8.4.2. DoctrineORM Module

12.6.8.4.3. DoctrineODM Module

12.6.9. Allow the modules and setup the connections etc.

12.6.9.1. DoctrineORM

12.6.9.1.1. add DoctrineModule and DoctrineORMModule to your config/application.config.php

12.6.9.1.2. create directory data/DoctrineORMModule/Proxy

12.6.9.1.3. module.config.php or application.config.php

12.6.9.1.4. /config/autoload/

12.6.9.1.5. Registered Service names

12.6.9.1.6. Command Line

12.6.9.1.7. Service Locator

12.6.9.2. DoctrineODM

12.6.9.2.1. my/project/directory/configs/application.config.php

12.6.9.2.2. config/autoload/module.doctrine-mongo-odm.local.php

12.6.9.2.3. create directory my/project/directory/data/DoctrineMongoODMModule/Proxy

12.6.9.2.4. create directory my/project/directory/data/DoctrineMongoODMModule/Hydrator

12.6.9.2.5. Command Line

12.6.9.2.6. Service Locator

12.6.10. Console for Doctrine

12.6.10.1. DoctrineORM

12.6.10.1.1. Commands

12.6.10.1.2. you need cli-config.php and bootstrap

12.6.10.2. DoctrineODM

12.6.10.2.1. Commands

12.6.10.2.2. you need cli-config.php and bootstrap

12.6.10.3. Reverse engineer the DB

12.6.10.3.1. Create the bootstrap.php in your project

12.6.10.3.2. Create cli-config.php

12.6.10.3.3. Create the mappings

12.6.10.3.4. Generate the entities

12.6.10.4. CLI with the ZF2 module doctrine-module.bat

12.6.10.4.1. no bootsrap and cli-config neccessary

12.6.10.4.2. update

12.6.10.4.3. create

12.6.10.4.4. drop and create

12.6.11. Apache Virtual Host

12.6.11.1. .htaccess

12.6.11.2. local.php

12.6.12. links to the projects and initial installation

12.6.12.1. xampp

12.6.12.2. MongoDB

12.6.12.2.1. Download

12.6.12.2.2. Install and run on Windows

12.6.12.3. Composer

12.6.12.3.1. Getting Started

12.6.12.3.2. https://packagist.org/

12.6.12.3.3. Install

12.6.12.4. Doctrine

12.6.12.5. Zend Framework doc

12.6.12.6. Zend Modules

12.6.12.6.1. DoctrineModule on github

12.6.12.6.2. DoctrineORMModule on github

12.6.12.6.3. DoctrineMongoODMModule on github

12.6.12.7. php_intl

12.6.12.8. tinyMCE

12.6.12.8.1. in the view script

12.6.12.9. jQuery Date/Time Entry

12.6.12.9.1. in the view script

12.6.12.10. Dojo, dijit/form/DateTextBox

12.6.12.10.1. Themes and Theming

12.6.12.10.2. dijit/form/DateTextBox

12.6.12.10.3. in the view script

12.6.13. Module.php

12.6.13.1. module.config.php

13. 5. CRUD. Create Retrieve Update Delete.

13.1. WInSCP (native app) for the sensitive files

13.2. With Cloud 9

13.2.1. Only Git

13.2.2. No access to the private key

13.2.2.1. No other app can be used

13.2.3. Only Git tricks but very complex

13.2.3.1. Branch public

13.2.3.2. Branch production

13.2.3.3. Merging is a problem???

13.3. Codenvy

13.3.1. The solution for the sensitive files

13.4. Creating new Controller in Application

13.4.1. branch

13.4.1.1. exp1

13.4.2. module.config.php

13.4.2.1. controllers

13.4.2.1.1. invokables

13.4.3. view

13.4.3.1. optional

13.5. Set MIME type

13.5.1. application/php

13.6. branches

13.6.1. will be more dificult

13.7. approaches

13.7.1. MySQL, Oracle, PostgreSQL etc. API

13.7.1.1. MySQL Functions

13.7.1.1.1. mysql_connect

13.7.2. DBAL: ADOdb, PDO

13.7.2.1. PDO

13.7.2.1.1. PDO Drivers

13.7.2.2. ADOdb

13.7.2.3. ADOdb Active Record

13.7.2.3.1. Dealing with Collections

13.7.2.4. Zend\Db\Adapter

13.7.2.4.1. thin wrapper

13.7.2.5. Doctrine DBAL

13.7.2.5.1. thin wrapper of PDO

13.7.3. Zend\Adapter, Doctrine DBAL

13.7.3.1. Doctrine

13.7.3.1.1. DBAL over PDO

13.7.3.2. Zend

13.7.3.2.1. DBAL Zend\Db\Adapter

13.7.4. ORM technics

13.7.4.1. Design Patterns

13.7.4.1.1. Table Data Gateway

13.7.4.1.2. Row data Gateway

13.7.4.1.3. Active Record

13.7.4.1.4. Data Mapper

13.8. The progress in ZF2

13.8.1. Simple CRUD (with Table Data Gateway)

13.8.1.1. The Result Set is a Collection of Objects (each row is an object)

13.8.1.1.1. The ResultSet is Zend\Db\ResultSet\ResultSet. Each row is an Zend\Db\RowGateway\RowGateway Object. Zend\Db\TableGateway\Feature\RowGatewayFeature('usr_id') in Table Data Gateway

13.8.1.1.2. Return Custom Object

13.8.1.2. The Result Set is an Zend\Db\ResultSet\ResultSet of ArrayObjects. Each row is an ArrayObject.

13.8.1.2.1. The ArrayObject can be used as an ordinar array or as an object. $row->usr_id and $row['usr_id'] will both work

13.8.2. Integrate Doctrine wirh ZF2

13.8.2.1. Doctrine DBAL

13.8.2.1.1. almost the same like Zend\Db\Adapter\Adapter

13.8.2.2. Doctrine Entity Manager

13.8.2.2.1. With separate classes and files for forms and DQL in the controller

13.8.2.2.2. We use annotations to generate forms from the entities

13.8.2.2.3. Entity Repositories

13.9. The evolution

13.9.1. 1) native DB API

13.9.1.1. set of functions and variables

13.9.1.2. difficult to replace

13.9.2. 2) Abstract the connection to DB

13.9.2.1. DBAL OOP. We delegate the communication to DB to an object.

13.9.2.2. We create the SQL statments

13.9.2.3. Easy to replace the RDBMS by changing the Object

13.9.2.4. But we still deal with concrete tables (we have to know the names structure etc.) and we use SQL statements

13.9.3. 3) Abstract the tables - objects in the DB

13.9.3.1. We can change the tables and still be OK

13.9.3.2. Table Data Gateway

13.9.3.3. but we deal with functions which have nothing to do with our domain logic CRUD and we have to know the structure of the DB

13.9.4. 4) Abstract the rows (they better represent the real entities of our domain logic)

13.9.4.1. Row Data Gateway

13.9.5. 5) Add domain logic to these Row Objects. Think for them as Domain Objects. (e.g. teach Object User to tell his name. add tellYourName(), greating etc..)

13.9.5.1. We still think about technical details. We are not detached from the concrete implementation. We have our domain logic in the DB not in the App

13.9.6. 6) Forget about the DB. Create a Domain model using Entities. Network of objects - virtual DB. Data mapper. Persisting is not a concern for this object. We don't need methods like save delete etc. We have ONLY the properties-characteristics of the object and accessory methods to set and get values to the properties.

13.9.6.1. In the perfect world we will not need to save anything to persistent layer. The SSD drives will become the RAM of the computer. Even if you turn your computer off the running programs will keep their state until we decide to exit or close the program.

13.9.7. 7) Forget about the DB. Use a dedicated Data Mapper like Doctrine.

13.9.7.1. We don't have to create the datamapper objects anymore for each table

13.9.7.2. There is Doctirne Entity Manager (ORM) or Doctrine DOcumentManager (ODM)

13.9.7.3. Network of objects. Virtual Data Base

14. Introduction

14.1. What is a Web Development?

14.2. What is the Web Application Development?

14.3. Web Application

14.4. Software engineering

14.4.1. Could be the best job in the world!

14.4.1.1. No boss!

14.4.1.2. No working hours.

14.4.1.3. Full creative freedom!

14.4.1.4. You are an ... alien!

14.4.2. Why some people think "The cariera in IT sucks?"

14.4.2.1. Average salary in the developed countries.

14.4.2.2. A lot of work

14.4.2.3. Age and sex discrimination

14.4.2.4. There are no "old experience professionals"

14.4.2.4.1. Everyone is a newbie

14.4.2.4.2. How can be "old experience professional" in a 6 months old technology

14.4.2.5. You never stop reading and learning

14.4.3. We have to raise the prestige of the profession.

14.4.4. Nothing can stop you if you have a real passion and fun!

14.5. The topics

14.5.1. Server-side (The first 5 Fridays)

14.5.1.1. PHP

14.5.1.1.1. ZF

14.5.2. Client-side (The last 5 Firdays)

14.5.2.1. Front End Engineering

14.5.2.1.1. JavaScript

14.5.2.1.2. HTML

14.5.2.1.3. CSS

14.6. I hold the rights to change the topics as we go.

14.7. Used tools

14.7.1. Web Based, Cloud

14.7.2. The students can change the devices