Create your own awesome maps

Even on the go

with our free apps for iPhone, iPad and Android

Get Started

Already have an account?
Log In

Practical Web Applications Development by Mind Map: Practical Web Applications
Development
5.0 stars - 8 reviews range from 0 to 5

Practical Web Applications Development

Preface

Greeting

Welcome!

Добре дошли!

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

Hoşgeldiniz!

Who am I?

Stoyan Cheresharov :), 15+ years in Web Applications Development, E-mail: stoyancheresharov@gmail.com, Twitter: @wingman0070, Site: http://www.coolcsn.com/

Thoughts

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

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

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

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

Live video streaming

On YouTube, 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, Links to be added later, My Channel

Using Google+, Hangout, 9 people online

Adventure

Web Development is a Beautiful Journey in a Magical Forest!, It changes as we go!, It becomes more friendly

Mind Maps

Link to this map

Tony Buzan, Answers How to learn and remember., Mind Maps, Supermind, How to read fast and remember everything I want?, ...more

Web Based, Cloud, www.mind42.com, free, No presentations, No google drive integration, Adds, Pay to remove the adds, 1 year Ad-Free $4.99 USD, Unlimited Ad-Free $19.99 USD, www.mindmeister.com, free for 3 maps max, Works with Google Drive, Not a big advantage, Loos the presentations, Your own pictures upload, Presentations

Popular Free Softwares, FreeMind, XMind

Tantek Çelik, IETF

Use it everywhere, Taking notes, Planing, Presenting, Brainstorming, ...more

Own cloud

Inovations

Web Based, Cloud Technologies, Mind Maps, Presentations, Live Streaming, Recording, Google+, Hangout, Cloud Based SDLC

University is to try the cutting edge tehnologies etc.

21 century education

Everything in this series is new.

We will discover and learn things together.

Acknowledgments

доц. д-р Гъров, Gave me the opportunity

Тодор Величков, Inspired me

Copyrights

If I am violating somebodies copyrights, please, contact me! I will remove the picture or give you a credit.I follow the \\\\\\\\\\\\\\\"Fair Use Doctrine\\\\\\\\\\\\\\\". The purpose of the Fair Use Doctrine is to allow for limited and reasonable uses as long as the use does not interfere with owners’ rights or impede their right to do with the work as they wish.

Organization

Introduction

Content

Summary

Q&A

Hangout on Air

1. Zend Framework. Easy, Simple, Fast!

Introduction

LAMP, Linux, Apache web server, MySQL, PHP

Approaches, Computer, Installed, Portable, USB NAND falsh, External Drive, SD card, Dropbox, Google Drive, Cloud Drive (Amazon), skyDrive, iCloud, ...etc., Cloud, Work from anywhere, Use any device, Tablet, Phone, ...etc.

Let's get our hands dirty

Install XAMPP, Method A: Installation with the Installer, Method B: "Installation" without the Installer, 1. Download the zip file, 2. Unzip to the portable or local device (e.g. x:\xampp), 3. Check if there is a service running on port 80, 4. Skype is usualy causing problems, 1. Easy solution - Stop it, Remove the check in Options -> Advanced -> Connections, 5. Go to the folder and run "apache_start.bat", 6. Open the browser and type in the URL filed "localhost"

CGI, Pearl, PHP, BAT files, C, C++, Java + BAT files, bat, Fortran, ...more

ZF1, http://localhost, phpinfo, include paths, extensions folder, php.ini, Download ZF1, Extract and copy Zend to H:\xampp\php\pear folder, Copy zf.bat in /xamp/php, Prepare the environment variables, create a project, create a virtual server, H:\xampp\apache\conf\extra\httpd-vhosts.conf

ZF2, Download ZF2, Extract and copy Zend to H:\xampp\php\pear\ZF2, Add to httpd.conf or H:\xampp\apache\conf\extra\httpd-vhosts.conf, alternative is to add it to.htaccess, ZendSkeletonApplication, Click on download as Zip, Unzip in the projects folder, Create a virtual host, H:\xampp\apache\conf\extra\httpd-vhosts.conf, Optional Read and follow Tutorial App

ZF2 and modules with composer, Install composer, SET PATH, Make sure SSL is enabled in php.ini, cd /xampp/php, Install composer, Create bath file, Make sure composer works, Install ZF2 skeleton App, Install, Create it on C: drive, Alternative, Download from github, composer self-update..., Notice: -d c:..., composer install..., Modules Installation, DoctrineModule, add DoctrineModule to your config/application.config.php, Doctrine ORM or ODM, Zfcuser, add a line to composer.json, composer update..., It depends on ZfcBase, It gets installed

ZF2 with zftool, install zftool with composer, Manual zip from github, zftool.phar

phpcloud, dispaly_errors, index.php, module.config.php

Development Stacks

XAMPP, No xDebug installed in the latest versions, pros, Doesn't start with the sstartup, cons, no Xdebug

WAMP, Download, Microsoft Visual C++ 2010 SP1 Redistributable Package (x86), WAMP server 2.4 not working on Virtual machine Win XP SP3 512 MB RAM, solution is to increase the RAM, config is in, C:\wamp\bin\apache\Apache2.4.4\conf

easyphp

Zend Server, Download, Zend Server (PHP 5.4), Zend Server (PHP 5.4), Zend Server Free Edition, Zend Server CE, Without License or Expired License is CE

IDEs

Notepad++, Portable, Plugins, php script engine, Autocompletion for PHP, DBGP plugin

Eclipse PDT, Zend All-in-ones is Portable. Just unzip and use, PHP Development Tools, All-in-ones download, Zend All-in-ones PDT 3.2.0 w/Eclipse Indigo, Debuggers, Xdebug, Zend Debugger, Eclipse Downloads, pros, ZF2 project, integrates with Zend Server, Creates the sceleton app in the IDE, cons, for Git SVN we need to install plugins, EGit (on top of JGit) for Eclipse, WiKi, HowTo install it, Install, kepler, HoTo, But Not recommended and still need TortoiseGit for SSH

Dreamwaver

Zend Studio

NetBeans, PHP and HTML5 Learning Trail, NetBeans PHP, features, Download, You need JDK 6 or higher, Zend Tutorial App in NetBeans, pros, Has Git and SVN, cons, ZF2 is not supported yet (but could be done trough ZF.bat), SSH git, Generating an SSH Key, Generating And Using RSA key on Windows, RentAFlat ZF1 tutorial app, There is a Readme.html in the root of the project

Microsoft Notepad

Apple TextMate

Linux vi

Sublimetext

Aptana Studio

Linux vim

phpDesigner

JetBrains PHPStorm, phpStorm, It's bit pricey though, unfortunately

ActiveState Komod

PHPEdit

RapidPHP

RadPHP (formerly Delphi for PHP)

OpenKomodo

Comparison, Seven great PHP IDEs compared, List in WiKi

Debuggers

Zend Debugger, proprietary protocol

XDebug, DBGP protocol, Remote Debugging, Profiling, Outputs cachegrind compatible file, Clients, webgrind, KCacheGrind, WinCacheGrind, Clients, Xdebug extensions for web browsers, Start a session

Repositories (SCM, VCS)

SCM -Source Control Management System, VCS - Version Control System,

Distributed, Git, Linus Torvalds, Implementations, git-scm (official), Download (Official - uses Mingw32 - msysgit on Windows), Book ProGit, Try it in your browser, Git for Windows (msysgit), msysgit, Downloads, MinGS (Minimalist GNU for Windows), MSYS, a contraction of "Minimal SYStem", Git on Cygwin, What it is?, TortoiseGit, Version Control Hosting Services, GitHub, Pages GitHub, BitBucket, Atlasian Git Workflows, RSA key pairs for git (Installing SSH keys on Windows), PuTTY, OpenSSH (ssh-keygen), comes with msysgit, Generating a key pair, ssh-keygen -t rsa, Copy the public key, id_rsa.pub (known_hosts), Paste the public key in github, ssh git@github.com, The Authenticity of github.com can't be esteblished. COntinue connecting? Answer with "yes", Create a new repository on the command line, Push an existing repository from the command line, Where the private key is located?, Run "pwd" in git-bash, .ssh, C:\Documents and Settings\user\.ssh, id_rsa, Private key, id_rsa.pub, Public key, git config --list, git config --global user.name "Firstname Lastname", git config --global user.email "your_email@youremail.com", bitbucket, Mange Account (upper Right corner), SSH, Add, paste the public key, ssh git@bitbucket.org, clone git@bitbucket.org:somename/test.git, plans and billing, Configuration (Setting up Git profile), Mercurial, Bazaar

Central server, SVN (Subversion), CVS

Cloud

Virtualization + web services, hypervisor

Categories by what they offer, IaaS, AWS, PaaS, phpcloud.com, CloudBees, CloudFoundry, Appfog, phpfog, Heroku, OpenShift, Google App Engine, Elastic Beans Talk, Microsoft Azure, SaaS, Zoho

Categories by location, Private, Public, Hybrid

Cloud Approaches

IDE, Native apps, Web based (Cloud, HTML5), Requrments, Coding, Code Assist, TODO, Snippets, Fold, Search&Replace, Debugging, Profiling, Unit Testing, Functional Testing, Documenting, DB access, Repository, Project Management, Will detach us from the device

VMware, Zend Image, We control it

VNC, VPN, I have to install native apps, VNC client, tunneling with SSH client

Web Desktop, Web (Browser) OS, Lucid (Dojo), ExtTop

HTML5, CSS3, HTML5, JS (ES5), Alternatives???, Java, Silverlight, Flash, Flex, AS3

Cloud Development Stacks

phpcloud.com, Managing your SSH keys, PEM RSA keypair, Zend Studio, Linux, Eclipse PDT, PPK RSA keypair, PuTTy, WinSCP, Connecting via Git, Connecting via SFTP, WinSCP, Setting up the Debugger, starting the debugger, Connecting to the Database, tools, OpenSSH, Linux, Mac OS X, WinSCP, PuTTy, SSH client, PuTTy for tunneling, Stage1 - Setting Up Your Access Key, use PuTTY to open the PEM file, Save it as PPK, Stage 2 - Connecting to a Saved session, click on the saved session, Stage 3 - Creating a new session, 1. Disable remote command execution, 2. Configure Tunneling, 3. Configure Proxy, 4. Configure authentication using access keys, 5. Save the session, What is SSH tunnelling?, Git, Official site, Tortoise, MySQL, phpMyAdmin, web based, cloud, It is a part of the PaaS, mysql simple command line client, native app, MySQLGUITools, native app, MySQL Workbench, native app, IDEs, Zend Studio, Eclipse PDT, Notepad++, DBGp plugin, Browser Plugins, XDebug, Remote Debugging, Profiling, cachegrind compatible file

phpfog.com appfog.com

Cloud IDEs

Cloud 9, What it is according to Wikipedia?, Public code repositories, GitHub, BitBucket, Works with, Mercurial repositories, Git repositories, FTP servers, Support for deployment (PaaS), Heroku, PHP, Joyent, Windows Azure, Features, OpenId, GitHub, BitBucket, Chrome app, Cloud 9, NOT FREE, Only 1 RSA key pair, Can not export the private key, you can not use PuTTy or WinSCP at the same time with Cloud 9, Can not import RSA key pair, HAS A TERMINAL WINDOW (console), Big plus

Codenvy (former Exo IDE), What it is according to Wikipedia?, No info on first search page, Public code repositories, GitHub, Google ???, Support for deployment (PaaS), Amazon Web Services, appfog, How to do it?, CloudBees, CloudFoundry, Google App Engine, Heroku, OpenShift, OpenId, GitHub, Google, Mobile native Apps, iPad, iPhone, Android, get it on Google play, Chrome app, Cloud IDE, Doesn't support, node.js

Installed on your own server

How to OSS, github, Exo IDE, Create, deploy, appfog, Contribute, deploy, appfog, phpcloud, Cloud9, Create, deploy, heroku, Contribute, deploy, heroku, phpcloud.com, bitbucket

Cloud free public repositories (hosting code)

http://sourceforge.net/

http://code.google.com/

https://github.com/, What is GitHub according to Wikipedia, Main Features, forking, pull request, merge, U can use it without web interface, It has, Issue Tracker, WiKi

https://bitbucket.org/, Issue Tracker, Jira

Summary

Q&A

Cloud Step By Step Tutorial

Exo IDE, Create New OSS project, 1. Create an account on GitHub, 2. (Optional) Create an account on Exo IDE, 1. or use OpenID with your GitHub account, 2. or use OpenID with your google account, 3. Create an account on AppFog, 4. Login to Exo IDE, 5. Choose PaaS, 1. Appgog, 1. Applications, 1. Enter username/password for Appfog, 6. Create a Project, 1. Choose Appfog, 7. (Optional) Delete the files and folders in the new project, 8. (Optional) Create your own files and folders sutable for the project, 9. Do "git init", 1. Git, 10. Create a repository in GitHub, 11. Add Remote Repository (github), 12. Generate RSA key pair in Exo IDE, 13. Add the generated public key to github, 14. In Exo IDE do "git add ."; "git commit -m "My first commit""; "git push <reponame> master", Contribute to an OSS project, 1. Create an account on GitHub, 2. (Optional) Create an account on Exo IDE, 1. or use OpenID with your GitHub account, 2. or use OpenID with your google account, 3. Create an account on AppFog, 4. Login to Exo IDE, 5. Choose PaaS, 1. Appgog, 1. Applications, 1. Enter username/password for Appfog, 6. Create a Project, 1. Choose Appfog, 7. (Optional) Delete the files and folders in the new project, 8. (Optional) Create your own files and folders sutable for the project, 9. Do "git init", 1. Git, Initialize Repository, 10. Add Remote Repository (github) To the project in Exo IDE, 11. Generate RSA key pair in Exo IDE, 12. Add the generated public key to github, 13. Fork the existing project, 14. In Exo IDE do "git pull"

git (DSCM, VCS)

git init

git clone ssh://wingman@wingman.my.phpcloud.com/gitprojects/fmi.git

git remote add zend ssh://wingman@wingman.my.phpcloud.com/gitprojects/fmi.git

git remote

git remote rm zend

git branch, git branch iss53, git checkout iss53, git commit -a -m &#x27;added a new footer [issue 53]&#x27;, git branch -d hotfix, $ git branch -r, Remote tracking branches

git branch mybranch

git rm

git fetch zend

git merge zend/master

.gitignore, git rm --cached filename

git push origin master

git pull origin master

git checkout zend/mybranch

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

git add <folder>/*

git commit -m "My first commit"

git --version

Zend help, git --version, git clone <git repo URL>, $ GIT_SSL_NO_VERIFY=1 git clone <git repo URL>, .git/configfile, [http] postBuffer = 524288000, $ git add index.php$ git commit -m "Adding index.php", $ git push origin master, Pushing an Existing Git Project into Zend Developer Cloud Platform, $ git remote add zendcloud <git repository URL>, $ git pull zendcloud master, $ git push zendcloud master

Oficial Git tutorial, $ git config --global user.name "Your Name Comes Here", $ git config --global user.email you@yourdomain.example.com

Cloud Design

wix.com

tools, frameworks, distribution systems (networks), repositories

PEAR

PECL

Pyrus

Composer

Phar extension

ZF2 Modules

github.com

Deployment to AppFog

.htaccess, root, public, all other folders

vendor, ZF2, library, Zend

.gitignore, public, vendor, first you have to remove the file, do git remove <filename>, After the removal the ignore will take place, Note: you can not ignore existing files without first deleting them

Services, MySQL, local.php, install phpMyAdmin, Create App approach, Create new app on the same infrastructure as the service, initialise repo in Codenvy, add remote, Notice: from appfog repo, Clone and change the Properties, with the PHP project open, go to Project > Properties, edit the Target property to "AppFog", close the project and re-open, deploy to AppFog is available, config.inc.php phpMyAdmin, don't have to do it, Bind your PhpMyAdmin app to the MySQL service, PMA_PASSWORD, in your application, use your username for AppFog, or, set PMA_USERNAME

Custom DNS, Free public DNS, Free DNS hosting, Cloud DNS hosting

public/index.php

autoload file in vendor

phpunit

Installation, PEAR, Composer, PHP Archive (PHAR), Optional packages, Upgrading

ZF2 cheatsheet

PSR-0 (Pretty Standard, Really)

Getting Started with composer packages

PHPspc

is a development tool, designed to help you achieve clean and working PHP code by using a technique derived from test-first development called (spec) behaviour driven developement, or SpecBDD.

Behat

Behat

Red Mind

HTML5, CSS3, JS IDEs

Continuous integration

The best Server IDE combinations

Zend EclipsePDT, Zend Server (Zend Debugger), EGit extra installed, SSH? trough PuTTY

NetBeans, XAMPP, Install Xdebug, WAMP, Comes with Xdebug, Why doesn't work, Comes with Git, SSH?, HoTo, 1 Download and install Git, 2* (Optional) Generate RSA key pairs, ssh-keygen -t rsa, 3* (Optional) Enter the public key in your bitbucket account, 4 Download and install WAMP, 5 add to PATH, 6 Enable SSL in PHP manualy, 7 Install composer, 8 Virtual host, 9 NetBeans

Minimalistic approach, Git (MSYS), ssh-keygen -t rsa, XAMPP, WAMP or Zend Server, Add to Path, vhost with ports, vhost subdomain, C:\WINDOWS\system32\drivers\etc\hosts, C:\wamp\bin\apache\Apache2.4.4\conf\httpd.conf, C:\wamp\bin\apache\Apache2.4.4\conf\extra\httpd-vhosts.conf, IMPORTANT NOTES for vhosts, enclose in brackets the folder paths, e.g. DocumentRoot "C:\Documents and Settings\User\mgs\public", WAMP users before adding virtual hosts enable mod_rewrite, WAMP->Apache->Modules->rewrite_module, Enableble OpenSSL, C:\wamp\bin\php\php5.4.16\php.ini, WAMP 2.2 if you are going to use port, comment: # Require all granted, composer, In the PATH, get composer.phar, create a bath file, IMPORTANT NOTES (espacialy for WAMP), Enable OpenSSL, C:\wamp\bin\php\php5.4.16\php.ini, Notepad++

PPI framework Skeleton Application

ZfcUser, BjyAuthorize and Doctrine working together

How to start a project?

Naming coding standards

ZendTool

To install the ZFTool you can use one of the following methods or you can just download the PHAR package and use it.

GitHub

separate from ZF2 project

Documentation

Installation, Composer, Move the folder to vendor, Sugested changes, Manual, Without installation, using the PHAR file, I have created zf.bat in the same folder as zftool.phar

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

2. MVC. Model View Controller.

HTML5 kingdom

HTML5 the king and knight, HTML - HyperText Markup Language, History, Tim Berners-Lee in CERN, 1980 proposed and prototyped ENQUIRE, 1989 Berners-Lee wrote a memo, 1990 Berners-Lee specified HTML and wrote the browser and server software, 1991 document called "HTML Tags", History of HTML5, 2004, tags, block, div, inline, span, What is new in HTML5, The <canvas> element for 2D drawing, The <video> and <audio> elements for media playback, Support for local storage, New content-specific elements, like <article>, <footer>, <header>, <nav>, <section><aside>, New form controls, like calendar, date, time, email, url, search, Browser Support for HTML5, HTML5 is not yet an official standard, W3C, Structure, some structural HTML5 tags, section, header, nav, article, aside, footer, drawing

CSS3 the tailor, structure and visualisation separation, W3C, Position, External, <link rel="stylesheet" href="style.css" .../>, Internal, <style type="text/css">...</style>, ...style="position: absolute;" />, Selectors, Properties (style attributes ), Pseudo-classes, Pseudo elements, CSS for DHTML, position, static, default, absolute, fixed, relative, top, left, bottom, right, width, height, z-index, display, none, block, more..., visibility, hidden, visible, clip, overflow, visible, default, hidden, scroll, auto, margin, border, padding, background, opacity, CSS Box model, Internet Explorer quirks, Our CSS, Main file, Layout, Typography, Navigation

JavaScript (ES5) the wizard, Embedding Scripts in HTML, The <script> Tag, Scripts in External Files

To conquer all natives

Progressive Enhancement vs Graceful Degradation

The all cool things in the web

ULITA, Usability, Localisation (l10n), Internationalization (i18n), Translation, Accessability

PHP

"Hello World"

";" at the end of the statement

Variables start with "$", a-z A-Z 0-9 _, don't start with number

Loosely Typed (dynamic), vs, Stricktly Typed (Static)

Types, Numeric, float, int, Boolean, true, false, String

functions

PHP Arrays

PHP is from the syntax group of the C languages

Operators

Statements, if, if else, switch

while

do-while

for

$_GET

$_POST

constants

some magic constants, __FILE__, __DIR__, __METHOD__, __CLASS__

some predefined constants, DIRECTORY_SEPARATOR, PATH_SEPARATOR

some predefined superglobal variables, $_SERVER, $_COOKIE, setcookie('name', 'value', time() + 3600, "/", "", 0), $_SESSION, session_start();

1000+ functions, header($header, $replace, $response_code), OSI Model, ob_start();, ob_flush()

OOP - Object Oriented Programing

Features, Inheritance, Abstraction, Encapsulation, Polymorphism, example, pet_index.php, pet_autoloader.php, PetTrainer.php, PetInterface.php, PetCat.php, PetDog.php, FIle Structure, coolcsn, Interfaces, PetInterface.php, Trainer, PetTrainer.php, PetCat.php, PetDog.php, pet_index.php, pet_autoloader.php

Goal, Reuse, Arhitecture (Structure), The cost of change, vs hacking, 1 more level of abstraction, system programming usualy NO OOP, computer doesn care, Agile Software Development (Extreme programming), Continuous Integration (OOP), Refactoring, Test Driven Development, Everyone can write code which the computer can understand, but not everyone can write a code that othe human can understand., Is it the Holy Grail? NO., We continue searching and discovering

Topics, Class, Blueprint, Constructor, Destructor, Methods, Properties, Object, Instance of a class, Methods, Member functions, Access Parent Class, parent::, Properties, Member variables, Scope, private, protected, public, Constants, Static, Methods, Properties, for access ::, $this not available (use self), has scope, Abstract Class, Must have at least 1 abstarct method, No body, No direct instance, Must be inherited, No abstract properties, Interface, Determen the methods, Can implement multiple interfaces, If no methods with the same names, interface - keyword, implements - keyword, methods, ONLY public, ONLY without body, makes sure there are well know methods comming from the interface, Overriding, Overloading, Magical methods, Autoload, Since PHP 5.2, spl_autoload_register(), Namespaces, Since PHP 5.3, basics, use, Anonymous (Lambda) functions and Closures, SInce 5.3, callback parameters, variable assignment, Closure, own scope, keyword "use", favor object composition over inheritance, inheritance, "Is a", composition, "Has a", Interfaces, "Dose a"

Letter to a student (personal)

Design Patterns

Solutions for common problems. In software engineering, a design pattern is a general reusable solution to a commonly occurring problem within a given context in software design.

Christopher Alexander, architect, first created the term

Gang Of Four - Design Patterns, Elements Of Reusable Object Oriented Software, Creational Patterns, Abstract Factory, Intent, Also Known As, Motivation, Applicability, Structure, Participants, Collaborations, Consequences, Implementation, Sample Code, Known Uses, Related Patterns, Builder, Factory Method, Prototype, Singleton, Structural Patterns, Adapter, Bridge, Composite, Decorator, Façade, Flyweight, Proxy, Behavioral Patterns, Chain of Responsibility, Command, Interpreter, Iterator, Mediator, Memento, Observer, State, Strategy, Template Method, Visitor

Patterns of Enterprise Application Architecture, Domain Logic Patterns, Transaction Script, Domain Model, Table Module, Service Layer, Data Source Architectural Patterns, Table Data Gateway, Row Data Gateway, Active Record, Data Mapper, Object-Relational Behavioral Patterns, Unit of Work, Identity Map, Lazy Load, Object-Relational Structural Patterns, Identity Field, Foreign Key Mapping, Association Table Mapping, Dependent Mapping, Embedded Value, Serialized LOB, Single Table Inheritance, Class Table Inheritance, Concrete Table Inheritance, Inheritance Mappers, Object-Relational Metadata Mapping Patterns, Metadata Mapping, Query Object, Repository, Web Presentation Patterns, Model View Controller, Page Controller, Front Controller, Template View, Transform View, Two-Step View, Application Controller, Distribution Patterns, Remote Facade, Data Transfer Object, Offline Concurrency Patterns, Optimistic Offline Lock, Pessimistic Offline Lock, Coarse Grained Lock, Implicit Lock, Session State Patterns, Client Session State, Server Session State, Database Session State, Base Patterns, Gateway, Mapper, Layer Supertype, Separated Interface, Registry, Value Object, Money, Special Case, Plugin, Service Stub, Record Set

Zend Framework 2

Zend Framework 2 (ZF2) is an open-source framework for developing web applications and services with PHP. ZF2 is implemented using 100% object-oriented code, with a component structure that incorporates a \\\\\\\\\\\\\\\"use-at-will\\\\\\\\\\\\\\\" design. The ZF2 architecture is extremely flexible, using events and listeners to shape application flow. Another powerful feature is service management, which allows developers to configure shared or unique services in order to build classes via factories which can inject parameters. Leveraging advanced PHP 5.3.x features such as namespaces and closures, ZF2 incorporates advanced design patterns, including MVC, publish/subscribe, and strategy, among others.

Building a module, Modules, Setting up the Album module, Create Module.php, Autoloading files, PSR-0, autoload_classmap.php, Configuration, config/module.config.php, Informing the application about our new module, config/application.config.php, Routing and controllers, module.config.php, AlbumController.php, Initialise the view scripts, module/Album/view/album/album/index.phtml, module/Album/view/album/album/add.phtml, module/Album/view/album/album/edit.phtml, module/Album/view/album/album/delete.phtml, Database, connect, Database host:, mycontainer-db.my.phpcloud.com, Database port:, 3306, Database schema name:, mycontainer, Database user:, mycontainer, Database password:, your container password, Models, model classes represent each entity in your application, mapper objects that load and save entities to the database, ORM, Doctrine, Propel, Forms and actions, gitignore

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

Know just enough to get the job done

Use google

3. Forms.

ZF2 sources of knowledge

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

Maillist Subscribe Browse, Archive

Webinars, (old) Doctrine2 ZF1

Blogs, Enrico Zimuel, Matthew Weier O&#x27;Phinney, Rob Allen, Ralph Schindler, Ryan Mauger, github, Evan Coury

Official site, About, Overview, Pyrus, Composer, PHPUnit, Travis CI, About, Getting started, Mailing List Archives, IRC, Freenode IRC, #zftalk, #zftalk.dev, Webchat Freenode IRC, FAQ (ZF2 FAQ), A new Zend Framework release? Why?, What new features will I find in Zend Framework 2?, Zend Framework 1, until at least early 2014, PHP 5.3+, ZF1 FAQ, What do I have to do to contribute to Zend Framework?, individual Contributors License Agreement (CLA), Security, Changelog, Blog, New BSD License, Learn, User Guide, Getting Started with Zend Framework 2, Some assumptions, A skeleton application, Virtual host, The tutorial application, Zend Framework Tool (ZFTool), Copyright Information, Reference Guide, Introduction to Zend Framework 2, Overview, Installation, User Guide, Getting Started with Zend Framework 2, Getting started: A skeleton application, Unit Testing, Modules, Routing and controllers, Database and models, Styling and Translations, Forms and actions, Conclusion, Zend Framework Tool (ZFTool)¶, Learning Zend Framework 2¶, Learning Dependency Injection, Very brief introduction to Di, $b = new B(new A());, A was injected into B, Matthew Weier O’Phinney’s Analogy, Ralph Schindler’s Learning DI, Fabien Potencier’s Series on DI, Very brief introduction to Di Container, TBD, Simplest usage case (2 classes, one consumes the other, $b = new B(new A());, dependency injection container - possible solution used in ZF2, $di = new Zend\Di\Di; $b = $di->get(&#x27;My\B&#x27;);, $b = $di->newInstance(&#x27;My\B&#x27;);, To Instantiate a new Object, A requires some configuration, injection types, setter injection, Constructor injection, Simplest Usage Case Without Type-hints, BuilderDefinition, NO Type-hints, RuntimeDefinition, default, Simplest usage case with Compiled Definition, PHP at its core is not DI friendly, PHP doesn&#x27;t have an app layer with objects stored in RAM, Creating a precompiled definition for others to use, Using Multiple Definitions From Multiple Sources, Generating Service Locators, Zend Framework 2 Reference¶, Zend\Authentication¶, Zend\Barcode¶, Zend\Cache¶, Zend\Captcha¶, Zend\Config¶, Zend\Console¶, Zend\Crypt¶, Zend\Db¶, Zend\Di¶, Zend\Dom¶, Zend\EventManager¶, Zend\Feed¶, Zend\Filter¶, Zend\Form¶, Zend\Http¶, Zend\I18n¶, Zend\InputFilter¶, Zend\Json¶, Zend\Ldap¶, Zend\Loader¶, Zend\Log¶, Zend\Mail¶, Zend\Math¶, Zend\Mime¶, Zend\ModuleManager¶, Zend\Mvc¶, Zend\Navigation¶, Zend\Paginator¶, Zend\Permissions\Acl¶, Zend\Permissions\Rbac¶, Zend\Serializer¶, Zend\Server¶, Zend\ServiceManager¶, Zend\Soap¶, Zend\Stdlib¶, Zend\Tag¶, Zend\Text¶, Zend\Uri¶, Zend\Validator¶, Zend\Version¶, Zend\View¶, Zend\XmlRpc¶, Services for Zend Framework 2 Reference¶, ZendService\Akismet¶, ZendService\Amazon¶, ZendService\Audioscrobbler¶, ZendService\Del.icio.us¶, ZendService\Developer Garden¶, ZendService\Flickr¶, ZendService\Google\Gcm¶, ZendService\LiveDocx¶, ZendService\Nirvanix¶, ZendService\Rackspace¶, ZendService\ReCaptcha¶, ZendService\SlideShare¶, ZendService\StrikeIron¶, ZendService\Technorati¶, ZendService\Twitter¶, ZendService\Windows Azure¶, Copyright, APIs, Zend Framework 2, Version 2.1, Zend Framework 1, Version 1.12, Training & Certification, Training, Zend Framework: Fundamentals Training, Zend Framework 2: Fundamentals Training (new!), Zend Framework: Advanced Training, Test Prep: Zend Framework Certification Training, Special Bundle Offer - Zend Framework from A-Zend, Certification, Support & Consulting, Get Started, Downloads, Get the Skeleton App, Try on phpcloud.com, Participate, Overview, Contributors Guide, Blogs, Enrico Zimuel, Matthew Weier O&#x27;Phinney, Rob Allen, Ralph Schindler, Contact Us, form, mailing lists, IRC

Zend Framework 2, Getting started, Reference Guide, API

skeleton app, Welcome to Zend Framework 2, ZF2 Skeleton Application, Fork Zend Framework 2 on GitHub », Follow Development, wiki, dev blog, issue tracker, ZF2 Development Portal, Discover Modules, on GitHub, Explore ZF2 Modules »(web site), Help & Support, IRC: #zftalk (#zftalk.2 - closed) on Freenode, http://www.zftalk.com, www.zfforums.com, www.zftutorials.com, Development of ZF itself in #zftalk.dev, mailing lists, Ping us on IRC », [Channel closed, please use #zftalk]

How to use ZF1 libraries in ZF2

Wiki

? Thorsten Ruf&#x27;s ZF1(zenddispatch_en.pdf) ?

? Dispatch ZF2 Diagram ?

? Front Controller Dispatch Process ?

Dispatch ZF2, correct link

Zend Framework 2 Cheat Sheet

ZF2 Patterns

Event Manager, Triggered: Zend Framework 2&#x27;s EventManager, Event, something does happen, Listener, a callback, responds to an event, Event Manager (Connection Bus), a collection of Listeners, triggers events, Priority, how to trigger, Listeners, Receive a single argument ($e), Any PHP callback, Custom Events, Recomendations, __FUNCTION__, dot-notation, dispatch.pre, pass all input as a parameter, Global Events, some terms, trigger/attach, public/subscribe, notify/listen, other terms, target, context

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

The MVC architecture of ZF2, New architecture, MVC, Di, Events, Service, Module, PSR-2 compliant, packaging system, pyrus, composer, PHP 5.3.5, Performace Improvments, Lazy Loading, The new core, ZF1, Singleton, Registry, Hard Coded Dependancies, ZF2, Aspect oriented design, Di, MVC, separation of concern, code reusability, Event Driven Architecture, bootstrap, root, trys to find out which controller to run, dispatch, Controller gets loaded and executed, A common workflow, Default services, EventManager, ModuleManager, Request, Response, RouteListener, Router, DispatchListener, VIewManager, config/application.config.php, public/.htaccess, The front controller is index.php, public/index.php, Zend\ServiceManager, IS A SL (SERVICE LOCATOR) implementation, Well known object in which you can register object and retrieve them later, Driven by configuration, Type of services, Explicit, name => object pairs, Invocables, name => class to instantiate, full namespace, uses lazy loading, Factories, name => callable returning object, Aliases, name => some other name, Abstract Factories, unknown services, Scoped Containers, limit what can be created, Shared, or not you decide, modules, inform the MVC about services and event listeners, subset of the app, Modules are simply, A namespace, Containing single classfile: Module.php, module/Application/Module.php, module/Application/config/module.config.php, module/Application/src/Application/Controller/IndexController.php

ZF 2, Doctrine 2, Using Doctrine 2 in Zend Framework 2, Install Doctrine 2 on ZF2, Doctrine 2 ORM Module for Zend Framework 2 github, Tutorial, github

Composer - Dependency Management for PHP, on github, Official site, Install, in php folder, Make sure SSL enabled in PHP, Make it global, create a bat file, use, Create Project, Require Module, DoctrineOrmModule, Manualy Add a Module, add to composer.json, execute, Don't forget to add the modules to application.config.php, Autoloading, require 'vendor/autoload.php';

Do we need framework at all???

Some tips to write better Zend Framework 2 modules, On Russian

ZF2 Di Theory

Strong Cohesion

Loosly Coupling, Decoupling

Reuse

Cost of change

IoC Inversion of Control ( concep), Inversion of Control Containers and the Dependency Injection pattern, Components and Services, component, localy used, service, will be used remotely, A Naive Example, Inversion of Control, removing the dependency patterns, Service Locator, Dependency Injection, Forms of Dependency Injection, Constructor Injection (PicoContainer), type 3 IoC, Setter Injection (Spring), type 2 IoC, Interface Injection, type 1 IoC, Using a Service Locator, Using a Segregated Interface for the Locator, A Dynamic Service Locator, Using both a locator and injection with Avalon, Deciding which option to use, Service Locator vs Dependency Injection, Service Locator every user of a service has a dependency to the locator, Constructor versus Setter Injection, Code or configuration files, Separating Configuration from Use, Some further issues, Concluding Thoughts

Di - Dependancy Injection (pattern), Constructor Injection, pros, Object in ready state, Clear, easy and simple, Object declares complexity upfront, cons, Cyclical, hard to change the properties of the consumed object, There is a param per dependancy, not polymorphic, Setter Injection, pros, CLear injection Point for each injection, cons, Consumer has to be very honest about all injections, Construction is not upfront, what are optional?, Interface injection, "Aware", cons, A lot of interfaces, DiC Dependancy Injection Container (tool), sources of information, webinar, Zend\Di - only this container, Di, This is a PATTERN, DiC - Dependancy Injection Container, This is a TOOL, Everyone writes DiC slightly different, Di in a nutshell, Composition and practicing IoC, very easy testing, Not the most important reason, Paddy Brady, Types of Injections, Constructor Injection, Pico Container Derivatives, Setter Injection, Spring Container Derivatives, Interface Injection, Zend/Di, Definition, building, Runtime, Compilers, By hand, ClassDefinition, BuilderDefinition, Instance Configuration, GitHub Di examples, Documentation on the site

Service Locator (pattern), alternative for Di, (SL) Service Locator !== (DiC) Dependancy injection Container, But DiC == SL, DiC can be the foundation of consumed for Service Location, cons, SL becomes a dependancy, We have to inject the SL in order to do its jpb, pros, Not all code paths may use all dependancies

Zend\Di (DiC implementation), Not a requirment, supprot for both, constructor, setter, Not "Hello World" friendly

Type-hints

Event Manager

Space Station Modules, Consists by independent modules, Each module is build from a group of smaller modules following the same pattern, The smaller modules are build from even smaller modules following the same pattern etc., ..., Each module can trigger an event, There are maybe modules listening on this channel (for this event) or maybe not, This is not going to break the system, Each module can listen for an event, But there are maybe modules emitting (notifying) about this event or not, This is not going to breack the system

Electronic Circuits, Phisical Interfaces, Logical, Electrical, Phisical

Event, Something that does happen

Listener, a callback, responds to an event

Event Manager (how to attach a callback listener), a collection of Listeners, triggers events

Priority

how to trigger

Listeners, Receive a single argument ($e), Any PHP callback

Recomendations, __FUNCTION__, dot-notation, dispatch.pre, pass all input as a parameter

Global Events

some terms, trigger/attach, public/subscribe, notify/listen

more terms, target, context

associations, Environment for signals, Wires, Channels, Connection, Bus

MVC architecutre of ZF2

Bridge the domain Model and the View layer

spread across, Controller, Model, View, list = index

Terms, Hydration, Extraction

The bond, $form->bind($model), Make the bond, Fly in the Clouds

Zend Hydrators, Zend\Stdlib\Hydrator\ArraySerializable, Zend\Stdlib\Hydrator\ClassMethods, Zend\Stdlib\Hydrator\ObjectProperty, HydratorInterface

Look the "Album" tutorial app

Annotation to unite

4. ORM. Object Relational Mapping.

Object-relational mapping (ORM, O/RM, and O/R mapping) in computer software is a programming technique for converting data between incompatible type systems in object-oriented programming languages.

Doctrine 2

What is Doctrine?

What are Entities?

Doctrine 2 Working with Associations

Doctrine configuration

EntityManager, The main access point

Association Mapping

Getting Started

new Zend Form features explained

Hydrator

Notes on Doctrine 2

Doctrine ZF2 Lection

Propel

No SQL DB (ODM)

Mongo DB

Apache CouchDB

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

noun

First build the DB as a result of the system analysis?, If you don't know the programming language framework etc., The ORM has tools for reverse engineering to build the classes from DB.

First build the domain logic with classes (Entities) as a result of the system analysis., If you are going to use OOP, If you are planning to use ORM, If the ORM has tools for creating DB, Always keep in mind the DB at the back of your head, If you don't know what DB are you going to use'

Composer is used for the modules (Doctrine)

Cloud 9 offers console but you have to pay

I would prefer to install development stack on a local machine, XAMPP, Composer

Local workflow

Start Notepad++

Start Git console, Clone the repo

/xampp/apache_start.bat

/xampp/mysql_start.bat

Console for MySQL

Start MongoDB, shutdown, The 32 bit version works on 46 bit WIn7, 64 bit allocates about 4GB disk space

Console for MongoDB, show databases = show dbs, tables = collections, rows = documents

Console for composer, Install ONLY ZF2, Install ONLY DoctrineORM, Install ONLY DoctrineODM, Install the Doctrine modules for ZF2, DoctrineModule, DoctrineORM Module, DoctrineODM Module

Allow the modules and setup the connections etc., DoctrineORM, add DoctrineModule and DoctrineORMModule to your config/application.config.php, create directory data/DoctrineORMModule/Proxy, module.config.php or application.config.php, /config/autoload/, Registered Service names, Command Line, Service Locator, DoctrineODM, my/project/directory/configs/application.config.php, config/autoload/module.doctrine-mongo-odm.local.php, create directory my/project/directory/data/DoctrineMongoODMModule/Proxy, create directory my/project/directory/data/DoctrineMongoODMModule/Hydrator, Command Line, Service Locator

Console for Doctrine, DoctrineORM, Commands, you need cli-config.php and bootstrap, DoctrineODM, Commands, you need cli-config.php and bootstrap, Reverse engineer the DB, Create the bootstrap.php in your project, Create cli-config.php, Create the mappings, Generate the entities, CLI with the ZF2 module doctrine-module.bat, no bootsrap and cli-config neccessary, update, create, drop and create

Apache Virtual Host, .htaccess, local.php

links to the projects and initial installation, xampp, MongoDB, Download, Install and run on Windows, Composer, Getting Started, https://packagist.org/, Install, Doctrine, Zend Framework doc, Zend Modules, DoctrineModule on github, doctrine/doctrine-module on composer packagist.org, DoctrineORMModule on github, doctrine/doctrine-orm-module on composer packagist.org, commands, form elements, DoctrineMongoODMModule on github, doctrine/doctrine-mongo-odm-module on composer packagist.org, php_intl, tinyMCE, in the view script, jQuery Date/Time Entry, in the view script, Dojo, dijit/form/DateTextBox, Themes and Theming, dijit/form/DateTextBox, in the view script

Module.php, module.config.php

5. CRUD. Create Retrieve Update Delete.

WInSCP (native app) for the sensitive files

With Cloud 9

Only Git

No access to the private key, No other app can be used

Only Git tricks but very complex, Branch public, Branch production, Merging is a problem???

Codenvy

The solution for the sensitive files

Creating new Controller in Application

branch, exp1

module.config.php, controllers, invokables

view, optional

Set MIME type

application/php

branches

will be more dificult

approaches

MySQL, Oracle, PostgreSQL etc. API, MySQL Functions, mysql_connect

DBAL: ADOdb, PDO, PDO, PDO Drivers, PDO, connection, PDO statement, ADOdb, ADOdb Active Record, Dealing with Collections, ADOdb_Active_Record::Load($where), ADOdb_Active_Record::Find($whereOrderBy, $bindarr=false, $pkeyArr=false), Active Record Considered Bad?, ADOConnection::GetActiveRecords(), Zend\Db\Adapter, thin wrapper, Doctrine DBAL, thin wrapper of PDO, \Doctrine\DBAL\Driver\Driver, \Doctrine\DBAL\Driver\Statement

Zend\Adapter, Doctrine DBAL, Doctrine, DBAL over PDO, Zend, DBAL Zend\Db\Adapter

ORM technics, Design Patterns, Table Data Gateway, Row data Gateway, Active Record, Data Mapper, Doctrine

The progress in ZF2

Simple CRUD (with Table Data Gateway), The Result Set is a Collection of Objects (each row is an object), 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, It Is a Row Data Gatewa, We can use $object->save(), Return Custom Object, Array Object Interface with hydration and extraction with exhchangeArray and getArrayCopy and public properties. ResultSet to create the prototype., Zend\Stdlib\Hydrator\ArraySerializable Object, Use a fully fledget Doctrine like Entity with protected or private properties and accessory methods Setters and Getters. use HydratorResutlSet to send the prototype, Zend\Stdlib\Hydrator\Reflection, The Result Set is an Zend\Db\ResultSet\ResultSet of ArrayObjects. Each row is an ArrayObject., The ArrayObject can be used as an ordinar array or as an object. $row->usr_id and $row['usr_id'] will both work

Integrate Doctrine wirh ZF2, Doctrine DBAL, almost the same like Zend\Db\Adapter\Adapter, Doctrine Entity Manager, With separate classes and files for forms and DQL in the controller, We use annotations to generate forms from the entities, Entity Repositories, Free to use DQL, Free to use native SQL statements

The evolution

1) native DB API, set of functions and variables, difficult to replace

2) Abstract the connection to DB, DBAL OOP. We delegate the communication to DB to an object., We create the SQL statments, Easy to replace the RDBMS by changing the Object, But we still deal with concrete tables (we have to know the names structure etc.) and we use SQL statements

3) Abstract the tables - objects in the DB, We can change the tables and still be OK, Table Data Gateway, 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

4) Abstract the rows (they better represent the real entities of our domain logic), Row Data Gateway

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..), 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

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., 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.

7) Forget about the DB. Use a dedicated Data Mapper like Doctrine., We don't have to create the datamapper objects anymore for each table, There is Doctirne Entity Manager (ORM) or Doctrine DOcumentManager (ODM), Network of objects. Virtual Data Base

6. JS basics.

sources of knowledge

David Flanagan, JavaScript: The Definitive Guide, Sixth Edition, jQuery Pocket Reference, JavaScript Pocket Reference, 3rd Edition

Douglas Crockford, JavaScript: The Good Parts

Nicholas C. Zakas, High Performance JavaScript (Build Faster Web Application Interfaces)

Stoyan Stefanov, JavaScript Patterns, Object-Oriented Java Script

John Resig, Manning: Secrets of the JavaScript Ninja

YUI Theater

Development

Prototype based

Classless

Object Oriented

Event Driven

Getting Started Example

(function(){ window.onload = function(e){ var elements, i=0; elements = document.getElementsByTagName(\\\\\\\\\\\\\\\'h1\\\\\\\\\\\\\\\'); for (i=0; i < elements.length; i++) { alert(elements[i]); elements[i].style.color = \\\\\\\\\\\\\\\'red\\\\\\\\\\\\\\\'; } };})();

Functions

Really, just like any other variable

First Class Objects, A function is an instance of the Object type, A function can have properties and has a link back to its constructor method, You can store the function in a variable, You can pass the function as a parameter to another function, You can return the function from a function

Example

definitions, functions defined with the function statement, function defined with literal expression, With the Function class

Universal Properties and Methods, Properties, myNewClass.length, myNewClass.prototype, Methods, myNewClass.call({}, 'arg1', 'arg2'), myNewClass.apply({}, ['arg1', 'arg2'])

Operators, typeof myNewClass, myNewClass instanceof Function

Functions methods and Constructors, Function Constructor, Method

Objects

Create, Created as Literal (Expression), Created with one of the Standart Classes "Object Class", Created with a Constructor that defines a Class of Objects (custom class)

Universal Properties and Methods, Properties, myObject.constructor, Methods, myObject.toString(), myObject.toLocaleString(), myObject.valueOf(), myObject.hasOwnProperty('prop1'), myObject.propertyIsEnumerable('prop1'), Object.isPrototypeOf( myObject )

Operators, typeof myObject, myObject instanceof myClass

Programming Styles

Pseudoclasical technique

Prototypal style

Functional style

Ajax

DOM Manipulation

Remouting

Dynamic Behaviour

Example 1

var deferer = window.setInterval(functionToExecute, 42); // 24 frames per second

Example 2

(function(){})();

Architecture of an app

Leave if you don't like it, I am always amazed by the negative people!, You have to appreciate at least the effort., If you have to say something bad, better don't say anything, Create somethign yourself., Don't criticise!, We live in a free country! Everybody can be stupid and ugly as he likes! :), I have a great lifestyle!, I am happy and thankful!, 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!, These are my original ideas, Maybe somebody else came up with the same ideas, Usually the same ideas come to more than one person when the moment is suitable!, The truth and the ideas are always there the people are just the conductors., 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., I am doing these videos for myself, my friends, colleagues and students.

lets mimic the real objects and systems, Nature, Plant, Human, Technical systems (They to mimic the nature), Space Station, Motherboard

Everythign starts from a seed, Config is the DNA, Events (communication object) gives the senses, Bootstrap is not really a paradox, What is first? The chick or the egg?, What is first the program or the computer? Is it a real paradox?, The computer is first!, The computer can use switches for the first command!, it would be a paradox if it is like Baron von Munchausen pulling himself from the swamp., “Pull yourself up by your bootstraps” means to succeed without outside help., Bootstrapping, WiKi, Wizard, In the case of JS the wizard is (HTML tag), The MVC comes later, HTML - Model???, CSS - View (presentation), JS - Controller

7. JS toolkits. (frameworks???)

Dojo Toolkit

Dojo Toolkit, an Open Source DHTML toolkit written in JavaScript.

Dijit

Getting Dojo, Downloading an official release, Downloading from Subversion, CDN

Hello Dojo

Modern Dojo, Migration Guide, require(), define(), module IDs (MID), AMD

Dojo Base and Core

Events and Advice

DOM Manipulation

Waiting for the DOM

Adding Visual Effects

Dijit and Widgets

XHR

Ajax

jQuery

jQuery, a JavaScript framework that provides an Ajax framework and other utilities, and jQuery UI, a plug-in that provides abstractions for low-level interaction and animation, advanced effects and high-level, themeable widgets

fluent interfaces and method chaining

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

intro

jQuery Basics, The jQuery library defines a single global function named jQuery()., $ as a shortcut for it, This single global function with two names is the central query function for jQuery., var divs = $("div");, jQuery() is a factory function rather than a constructor: it returns a newly created object but is not used with the new keyword., $("p.details").css("background-color", "yellow").show("fast");, method chaining idiom is common in jQuery programming, $(".clicktohide").click(function() { $(this).slideUp("slow"); });, Obtaining jQuery, download, CDN (Content Distribution Network), The jQuery() Function, $() is to pass a CSS selector, it returns the set of elements from the current document that match the selector, The second way to invoke $() is to pass it an Element or Document or Window object, simply wraps the element, document, or window in a jQuery object and returns that object., The third way to invoke $() is to pass it a string of HTML text, When you do this, jQuery creates the HTML element or elements described by that text and then returns a jQuery object representing those elements., 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., The jQuery library also uses the jQuery() function as its namespace, jQuery.noConflict(), jQuery.each(), jQuery.parseJSON(), Queries and Query Results, $("body").length

jQuery Getters and Setters, Getting and Setting HTML Attributes, $("#icon").attr("src", "icon.gif"); set, $("form").attr("action"); get, Getting and Setting CSS Attributes, $("h1").css("font-weight"); get, $("div.note").css("border", compound styles "solid black 2px"); set, Getting and Setting CSS Classes, $("h1").addClass("hilite");, Getting and Setting HTML Form Values, $("#surname").val(); get, $("#email").val("Invalid email address"); set, Getting and Setting Element Content, text(), html(), Getting and Setting Element Geometry, Getting and Setting Element Data

Altering Document Structure, Inserting and Replacing Elements, Copying Elements, Wrapping Elements, Deleting Elements, empty() removes all children (including text nodes), The remove() method removes any event handlers, the unwrap()

Handling Events with jQuery, Simple Event Handler Registration, jQuery Event Handlers, The jQuery Event Object, Advanced Event Handler Registration, $('p').bind('click', f);, Deregistering Event Handlers, unbind(), Triggering Events, Custom Events, Live Events

Animated Effects, Simple Effects, fadeIn(), fadeOut(), fadeTo(), show(), hide(), toggle(), slideDown(), slideUp(), slideToggle(), Custom Animations

Ajax with jQuery, The load() Method

Utility Functions

Extending jQuery with Plug-ins

The jQuery UI Library, widgets

Prototype

Prototype, a JavaScript framework that provides Ajax and other utilities, and Script.aculo.us, a plug-in for animations and interface development

http://script.aculo.us/

MooTools

MooTools, a compact and modular JavaScript framework best known for its visual effects and transitions.

YUI Library

YUI Library, a set of utilities and controls, for building richly interactive web applications using techniques such as DOM scripting, DHTML and Ajax

Ext JS

Ext JS, a library that extends Prototype, Jquery and YUI until version 1.0. Since version 1.1 a standalone Ajax framework.

Very Good Documentation

JSDuck

Backbone.js

Backbone.js, loosely based on the Model-View-Controller application design paradigm

Server Side JS

node.js

AngularJS by Google

on GitHub

MVW

Twitter Bootstrap

BootstrapSleek, intuitive, and powerful front-end framework for faster and easier web development.

on GitHub

8. JS Zend integration.

Create a Layout

get the links right

add to your module

Use the View Helpers, Doctype Helper, HeadLink Helper, HeadMeta Helper, HeadScript Helper, HeadStyle Helper, HeadTitle Helper, HTML Object Helpers, InlineScript Helper

Use existing template example

layout.phtml

change.phtml

Switch the Layout in the actions

// in an action\\\\\\\\ $this->layout(\\\\\\\\\\\\\\\'layout/student\\\\\\\\\\\\\\\');

Load different JS files in the view

);

Use widgets (Dojo, jQuery)

jQuery

Dijit, js file

View Helper Json

?>

Disabling the layout in Zend Framework 2

}

Disable the layout and the view

}

Communicate to the server (ZF2)

Only with JS

jQuery way

Dojo way, example

Deploy to AppFog

Change the layout for a module

{

index.php

ini_set(\\\\\\\\\\\\\\\'display_errors\\\\\\\\\\\\\\\', 1);

9. Ajax.

Pure JS

Controller Action

View Script, js-ajax.phtml

JS File, jsAjax.js

jQuery

Controller Action

View Script, jquery-ajax.phtml

JS File, jqueryAjax.js

Dojo

Controller Action

View Script, dojo-ajax.phtml

JS File

Service

View Script

Controller Action

JSON service

Controller Action

View Script

10. HTML5 CSS3.

Introduction

What is a Web Development?

Web development is a broad term for the work involved in developing a web site for the Internet (World Wide Web) or an intranet (a private network).

What is the Web Application Development?

Web application development is the process and practice of developing web applications.

Web Application

A web application is an application that is accessed by users over a network such as the Internet or an intranet.[1] The term may also mean a computer software application that is coded in a browser-supported programming language (such as JavaScript, combined with a browser-rendered markup language like HTML) and reliant on a common web browser to render the application executable.

Software engineering

Software engineering (SE) is the application of a systematic, disciplined, quantifiable approach to the design, development, operation, and maintenance of software, and the study of these approaches; that is, the application of engineering to software.

Could be the best job in the world!, No boss!, No working hours., Full creative freedom!, You are an ... alien!

Why some people think "The cariera in IT sucks?", Average salary in the developed countries., A lot of work, Age and sex discrimination, There are no "old experience professionals", Everyone is a newbie, How can be "old experience professional" in a 6 months old technology, You never stop reading and learning

We have to raise the prestige of the profession.

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

The topics

Server-side (The first 5 Fridays), PHP, ZF

Client-side (The last 5 Firdays), Front End Engineering, JavaScript, HTML, CSS

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

Used tools

Web Based, Cloud

The students can change the devices

Lessons Learned

About using Mind Maps and Google+ Hangout for doing technical presentations

MInd Maps

MindMesiter, Presentations, Difficult, Do I realy need them, Tip, Upload Images, The Android App, Not free, Notes are very small, Try bigger font size, Use zoom In Out, Right Click to collapse expand nodes

MInd42, Free, Android 2.2, Stock Browser

Google Presentations, Try the combination

Google+ Hangout

No background noise

Sound Breaking

No zoom

Ask Somebody to watch the live stream

Speach

Don't use often, "In general", "Общо взето...", "etc.", "така нататък"

use, acurate words, pay attention to the details, the right words and terms

replace, "I don't know", with "We will check"

Other technologies for recording

Try Adobe Flash Media Live Encoder

screencast-o-matic, Doesn't even start in FF and Chrome, Java updates done

YouTube

Create playlists

Use HD, at least 720p

Use screen resolution of 1280x720p for YouTbe HD

Use 1280x1024 top and render at the same resolution in Camtasia., YouTube is not cutting anything 1280x1024 is also OK, YouTube is filling the right and left with black, Renderin at 1280x1024 is much slower compare to 1280x720

Camtasia cuts top and the bottom to fit in 1280x720

Resolution 1280x720 doesn&#x27;t work on my screen 4:3. Everythign is distorted.

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

Codenvy

consol - very limited

I can upload RAS private key

No SFTP client

git

problems the way we use it

idea, git rm ., still doesn't work, clone in codenvy instead of doing init, use patch and diff at the bottom ofthe pull requests, try to use clone in the IDE instead of new project, merge manualy with patches (no fetch merge), Don't use the original for anything else

check the diffs and the changes before merging

Cloud 9

NO way to upload RSA private key

Very nice consol

You can run your pages there

No SFTP client

Maybe we don't need AppFog for the students

pay atention

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

css, js, images in public

ActionNames, mmLayoutAction, mm-layout.phtml

workflow (idea)

fork (in github), clone (no fetch merge) in the IDE, PullRequest

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

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

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

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

correct the paths in css files also

codenvy approaches

create new project, use PaaS, git init, add as remote github, add as remote zend

clone repo or import from github, NO PaaS, clone guthub, clone zend, Projects -> New -> Import from github, NO PaaS, Git -> Clone, NO PaaS

frequent mistakes

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

Add ..phtml as an extension for the view files

redirect

praktiki.mon.bg

12 weeks

240 hours per student

8 hours per mentor

Every Monday 10:00 BG time untill 12:00 - lection, for 4 weeks 8 hours are over, But I will continue

Every working day consultations from 13:00 untill 17:00 15 min per student, In 6-7 weeks the 8 hours will be over, But I will continue, 1:15 per student per week

5 projects

3 students per project, designer, server site (back end), front end

projects, BTK, MGS, GRD, STO, NIK

Open source project

Regrouping

communication

Google+ for the lections, Google Hangout on Air

Skype for the consultations, shared audio files in google drive

Everythign recorded

Documents shared in Google Drive

Schedule

Students

Virtualisation

Oracle VM Virtual Box, free

VMware, free

Design

Responsive Design

JS toolkits

jQuery

Dojo

cheatsheet

coding naming standards

Self project vs Zfc

self, pros, better learning, cons, low quality in the beginning

Zf-commons, pros, popular, somebody else has done the job, high quality?, cons, integration in our project

Shell we use modules vs building them from scratch?

Shell we use modules vs building them from scratch? This is what we are going to use:http://samminds.com/2013/03/zfcuser-bjyauthorize-and-doctrine-working-together/ Information for Zend:http://zf2cheatsheet.com/ Coding Naming standards:http://framework.zend.com/wiki/display/ZFDEV2/Coding+Standards Git Workflows:http://www.atlassian.com/git/workflowsCentralized Workflowhttp://www.atlassian.com/git/workflows#!workflow-centralized CMS systems- https://github.com/ZF-Commons/ZfcUser- http://www.ejoom.com/libra-zend-framework-2-cms- http://got-cms.com

common opinion is to use already build modules, Zf-commons

Git HowTo

Centralized Workflow

How It Works, Managing Conflicts

Example, Someone initializes the central repository, Everybody clones the central repository, git clone ssh://user@host/path/to/repo.git, John works on his feature, Mary works on her feature, John publishes his feature, git push origin master, Mary tries to publish her feature, git push origin master, Mary rebases on top of John’s commit(s), git pull --rebase origin master, Mary resolves a merge conflict, git status, solve the problem, git rebase --abort, Mary successfully publishes her feature, Mary successfully publishes her feature, git push origin master

How to merge PR on GitHub?

Skeleton App how to start?

composer

git, composer

ZFTool, How to Install ZFTool, Installation using Composer¶, Manual installation, Without installation, using the PHAR file, Usage, Basic information, Project creation, Module creation, Classmap generator, ZF library installation, Compile the PHAR file, What works for me, zf2 composer create project test, content of zf2.bat, cd test, composer install

tasks

ss, install, install DoctrineModule, DoctrineModule, GitHub, DoctrineORMModule, GitHub, ZfcUser, ZfcBase, GitHub, ZfcUser, GitHub, BjyAuthorize, GitHub, Doctrine ZfcUser ORM, GitHub, SamUser, github, composer, "manuakasam/sam-user": "dev-master", cdli/CdliTwoStageSignup, GitHub, How To Extend ZfcUser (and other modules) to match my needs?, StackOverflow, ZF-Commons/ZfcUserDoctrineORM, Use 3rd party modules in Zend Framework 2, Change a route, Change a view script, Change a form

designers, viewhelpers in the layout

Ajax in the scripts

NetBeans (very good IDE)

CMS

libracms, github

GotCms, github

DotsCms

ideas for name

1) In composer lower case dashescoolcsn/csn-usercoolcsn/csn-cms - for composer and github/bitbucket. On github or bitbucket can be called coolcsn/CsnCMs but for the packge in composer should be lower case with dashescoolcsn/csn-user - composer name (the repo could be coolcsn/CsnUser)coolcsn/csn-aclcoolcsn/csn-menuetc. 2) In gitHub/bitbucketCan be Pascal Camel Casecollcsn/CsnUserlibracms/Libra CMS - bitbucketordoctrine/DOctrineORMModulegit@bitbucket.org:libracms/libra-cms.git or evenzf2-mustache-module kapitchi/KapitchiEntity 3) The module in ZF2 is Pascal Camel CaseCsnUserCsnCmsCsnAcl Notice how it is Prefixed by the name of the vendor In the composer example lower case with dashes is used for the name of the repo and packagistrepopackagist: acme/hello-worldgithub: github.com/username/hello-world Example: DoctrineORMModule

DB naming standards

SPDX OpenSource Registry

Lessons Learnd

Using modules, CMS, Monolyte system, They almost don't use other modules, Like Joomla, Drupal, WordPress, No way to register user, Only Admin can login, You can not have ordinary users, Not easy to learn and extend, Specific Installations, Not separate modules applications, Black Box, Very simple sites with the available CMS

DB Naming convensions

DB design for mere mortals, Table types, Data, Linking, Subset, Validation, Table Names, Fields, Resolving Multipart Fields, Resolving Multivalued Fields

ZF2

Form, Binding

ZF tool

Tutorial App

Controller Plugins

Zend/Mvc, on top of, Zend\ServiceManager, Zend\EventManager, Zend\Http, Zend\Stdlib\DispatchableInterface, sub-components are exposed, Zend\Mvc\Router, Zend\Http\PhpEnvironment, Zend\Mvc\Controller, Zend\Mvc\Service, Zend\Mvc\View, The gateway to the MVC, Zend\Mvc\Application, Bootstrapping an Application

mysqladmin change password

Book

Authorization

How to get Zend\Authentication\AuthenticationService, new instance every time, alias invocables in the config, use Controller Plugin

simple approach with direct use, cons, Problem with more complex requirments., No central point, No separation of concern., We don't follow DRY, pros, very intuitive