Zend Lableonguyen.com
Features- Purpose: An open source Zend CMS- GUI: Bootstrap + jQuery + Dojo- Technology: Zend 2 + Node.js + NoSQL
Modules- Content:+ News, Media (Photo-Video|Infographic-Mindmap), Slide+ Products-Cart, Vote-Survey-Chat, Form+App- Channe...
Design- Logo & Icon- Color scheme & Pattern- Typography- Elements
Layout - Responsive
Layout - Metro
Zend Core
Installation- Download Zend Server Community Edition (include ZendFramework 2.0) (http://framework.zend.com/downloads/late...
Start Zend Server- Go to http://localhost:10081/ZendServer
Generate a Trial License for Zend Server- Go to http://www.zend.com/en/products/server/license
Config Zend Application- Download Zend Skeleton Application (https://github.com/zendframework/ZendSkeletonApplication)
New Environtment Variables
Config Windows Host- Go to: C:WindowsSystem32driversetchosts
Config Zend Server Host- Go to: C:Program FilesZendZendServeretcsites.d- Make host file: vhost_zendcms.com.conf- Restart Z...
Start ZF2 Skeleton Application- Go to: http://zendcms.com
Config Zend Module- Download Zend Skeleton Module (https://github.com/zendframework/ZendSkeletonModule)
Add Skeleton Module- Go to: <Source Path>zendcmsmodule- Extract to: ZendSkeletonModule
Config application.config- Go to: <Source Path>zendcmsconfig- Edit file: application.config.php
Config module.config- Go to: <Source Path>zendcmsmoduleZendSkeletonModuleconfig- Edit file: module.config.php
Start Skeleton Module- Go to: http://zendcms.com/skeleton
Zend MVC- Programmer’s Reference Guide of Zend Framework 2: http://framework.zend.com/manual/2.0/en/index.html#zendframewo...
MVC Diagram
DAO Design Pattern
Describe Album Module- The application that we are going to build is a simple inventory systemto display which albums we o...
Create directories- Creating following directories.
Create Module.php- Create Module.php in the Album module.
Configuration- Create a file module.config.php under <SourcePath>zendcmsmoduleAlbumconfig
Config application.config- Go to: <Source Path>zendcmsconfig- Edit file: application.config.php
Routing and controllers- As we have four pages that all apply to albums, we will group them ina single controller AlbumCon...
Add Router- Modify module.config.php under<SourcePath>zendcmsmoduleAlbumconfig
Create the Controller- Create controller class AlbumController.php under <SourcePath>moduleAlbumsrcAlbumController
DB Schema- Create SQL statements to create the album table.
Create the Model- Create model class Album.php under <SourcePath>moduleAlbumsrcAlbumModel
Create the Model Table- Create model classAlbumTable.php under<SourcePath>moduleAlbumsrcAlbumModel
Using ServiceManager to configure thetable gateway and inject into theAlbumTable- Create Module.phpin the Album module.
Config DB Driver- Modify global.php under <Source Path>configautoload
Config DB Credentials- Modify local.php under <Source Path>configautoload
Create the View- Create view index.phtml under <SourcePath>moduleAlbumviewalbumalbum
Open Album- Go to: http://zendcms.com/album
Forms and Actions - Add album - Form- Create view AlbumForm.php under<SourcePath>moduleAlbumsrcAlbumForm
Forms and Actions - Add album - Model- Modify model class Album.phpunder <SourcePath>moduleAlbumsrcAlbumModel
Forms and Actions - Add album - Controller- Modify controller class AlbumController.php under <SourcePath>moduleAlbumsrcAl...
Forms and Actions - Add album - View- Create view add.phtml under <SourcePath>moduleAlbumviewalbumalbum
Forms and Actions - Add album - Open- Go to: http://zendcms.com/album/add
Forms and Actions - Edit album - Controller- Modify controller classAlbumController.php under<SourcePath>moduleAlbumsrcAlb...
Forms and Actions - Edit album - Model- Modify model class Album.php under <SourcePath>moduleAlbumsrcAlbumModel
Forms and Actions - Edit album - View- Create view edit.phtml under <SourcePath>moduleAlbumviewalbumalbum
Forms and Actions - Delete album - Controller- Modify controller classAlbumController.php under<SourcePath>moduleAlbumsrcA...
Forms and Actions - Edit album - View- Create view delete.phtml under <SourcePath>moduleAlbumviewalbumalbum
Zend Authentication
Zfc [Base.User.Acl]- Download (https://github.com/ZF-Commons/ZfcUser)(https://github.com/ZF-Commons/ZfcBase)(https://githu...
Add ZfcBase, ZfcUser, BjyAuthorize- Go to: <Source Path>zendcmsvendor- Extract to: ZfcUser, ZfcBase, BjyAuthorize
Config application.config- Go to: <Source Path>zendcmsconfig- Edit file: application.config.php
Make database.local- Go to: <Source Path>zendcmsconfigautoload- Create file: database.local.php
Start url User- Go to: http://zendcms.com/user/login
DB ListStar:1) User (u)2) Tag (t): Page, Menu, Category3) Post (p): Article, Products, Banner4) Meta (m): Media5) Option (...
Table List1) u: uId, uName, uPass, uEmail, uDesc2) t: tId, tName, tDesc3) p: pId, uId, pTitle, pContent4) m: mId, pId, mKe...
1) User (u)CREATE TABLE `user` (`uId` INT NOT NULL AUTO_INCREMENT ,`uName` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_...
2) Tag (t)CREATE TABLE `tag` (`tId` INT NOT NULL AUTO_INCREMENT ,`tName` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_ge...
3) Post (p)CREATE TABLE `post` (`pId` INT NOT NULL AUTO_INCREMENT ,`uId` INT NOT NULL ,`pTitle` VARCHAR( 255 ) CHARACTER S...
4) Meta (m)CREATE TABLE `meta` (`mId` INT NOT NULL AUTO_INCREMENT ,`pId` INT NOT NULL ,`mKey` VARCHAR( 255 ) CHARACTER SET...
5) Option (o)CREATE TABLE `option` (`oId` INT NOT NULL AUTO_INCREMENT ,`oKey` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE ut...
Login
Back-endI) User Manager (Permission)II) Tag Manager (Grid hierachy)III) Layout Manager (Row added elements)Star: 1) Header...
Github- Go to: https://github.com/leonguyen/zendcms
Upcoming SlideShare
Loading in …5
×

Zend Lab

749
-1

Published on

Zend Lab
http://leonguyen.com

Published in: Technology
0 Comments
2 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
749
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
15
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide

Zend Lab

  1. 1. Zend Lableonguyen.com
  2. 2. Features- Purpose: An open source Zend CMS- GUI: Bootstrap + jQuery + Dojo- Technology: Zend 2 + Node.js + NoSQL
  3. 3. Modules- Content:+ News, Media (Photo-Video|Infographic-Mindmap), Slide+ Products-Cart, Vote-Survey-Chat, Form+App- Channel:+ Web, Tablet, Mobile, Email, SMS, Print
  4. 4. Design- Logo & Icon- Color scheme & Pattern- Typography- Elements
  5. 5. Layout - Responsive
  6. 6. Layout - Metro
  7. 7. Zend Core
  8. 8. Installation- Download Zend Server Community Edition (include ZendFramework 2.0) (http://framework.zend.com/downloads/latest)
  9. 9. Start Zend Server- Go to http://localhost:10081/ZendServer
  10. 10. Generate a Trial License for Zend Server- Go to http://www.zend.com/en/products/server/license
  11. 11. Config Zend Application- Download Zend Skeleton Application (https://github.com/zendframework/ZendSkeletonApplication)
  12. 12. New Environtment Variables
  13. 13. Config Windows Host- Go to: C:WindowsSystem32driversetchosts
  14. 14. Config Zend Server Host- Go to: C:Program FilesZendZendServeretcsites.d- Make host file: vhost_zendcms.com.conf- Restart Zend Server
  15. 15. Start ZF2 Skeleton Application- Go to: http://zendcms.com
  16. 16. Config Zend Module- Download Zend Skeleton Module (https://github.com/zendframework/ZendSkeletonModule)
  17. 17. Add Skeleton Module- Go to: <Source Path>zendcmsmodule- Extract to: ZendSkeletonModule
  18. 18. Config application.config- Go to: <Source Path>zendcmsconfig- Edit file: application.config.php
  19. 19. Config module.config- Go to: <Source Path>zendcmsmoduleZendSkeletonModuleconfig- Edit file: module.config.php
  20. 20. Start Skeleton Module- Go to: http://zendcms.com/skeleton
  21. 21. Zend MVC- Programmer’s Reference Guide of Zend Framework 2: http://framework.zend.com/manual/2.0/en/index.html#zendframeworkreference
  22. 22. MVC Diagram
  23. 23. DAO Design Pattern
  24. 24. Describe Album Module- The application that we are going to build is a simple inventory systemto display which albums we own. The main page will list our collectionand allow us to add, edit and delete CDs.Page DescriptionList of albumsThis will display the list of albums and provide links to edit and delete them.Also, a link to enable adding new albums will be provided.Add new album This page will provide a form for adding a new album.Edit album This page will provide a form for editing an album.Delete album This page will confirm that we want to delete an album and then delete it.
  25. 25. Create directories- Creating following directories.
  26. 26. Create Module.php- Create Module.php in the Album module.
  27. 27. Configuration- Create a file module.config.php under <SourcePath>zendcmsmoduleAlbumconfig
  28. 28. Config application.config- Go to: <Source Path>zendcmsconfig- Edit file: application.config.php
  29. 29. Routing and controllers- As we have four pages that all apply to albums, we will group them ina single controller AlbumController within our Album module as fouractionsPage Controller ActionHome AlbumController indexAdd new album AlbumController addEdit album AlbumController editDelete album AlbumController delete
  30. 30. Add Router- Modify module.config.php under<SourcePath>zendcmsmoduleAlbumconfig
  31. 31. Create the Controller- Create controller class AlbumController.php under <SourcePath>moduleAlbumsrcAlbumController
  32. 32. DB Schema- Create SQL statements to create the album table.
  33. 33. Create the Model- Create model class Album.php under <SourcePath>moduleAlbumsrcAlbumModel
  34. 34. Create the Model Table- Create model classAlbumTable.php under<SourcePath>moduleAlbumsrcAlbumModel
  35. 35. Using ServiceManager to configure thetable gateway and inject into theAlbumTable- Create Module.phpin the Album module.
  36. 36. Config DB Driver- Modify global.php under <Source Path>configautoload
  37. 37. Config DB Credentials- Modify local.php under <Source Path>configautoload
  38. 38. Create the View- Create view index.phtml under <SourcePath>moduleAlbumviewalbumalbum
  39. 39. Open Album- Go to: http://zendcms.com/album
  40. 40. Forms and Actions - Add album - Form- Create view AlbumForm.php under<SourcePath>moduleAlbumsrcAlbumForm
  41. 41. Forms and Actions - Add album - Model- Modify model class Album.phpunder <SourcePath>moduleAlbumsrcAlbumModel
  42. 42. Forms and Actions - Add album - Controller- Modify controller class AlbumController.php under <SourcePath>moduleAlbumsrcAlbumController
  43. 43. Forms and Actions - Add album - View- Create view add.phtml under <SourcePath>moduleAlbumviewalbumalbum
  44. 44. Forms and Actions - Add album - Open- Go to: http://zendcms.com/album/add
  45. 45. Forms and Actions - Edit album - Controller- Modify controller classAlbumController.php under<SourcePath>moduleAlbumsrcAlbumController
  46. 46. Forms and Actions - Edit album - Model- Modify model class Album.php under <SourcePath>moduleAlbumsrcAlbumModel
  47. 47. Forms and Actions - Edit album - View- Create view edit.phtml under <SourcePath>moduleAlbumviewalbumalbum
  48. 48. Forms and Actions - Delete album - Controller- Modify controller classAlbumController.php under<SourcePath>moduleAlbumsrcAlbumController
  49. 49. Forms and Actions - Edit album - View- Create view delete.phtml under <SourcePath>moduleAlbumviewalbumalbum
  50. 50. Zend Authentication
  51. 51. Zfc [Base.User.Acl]- Download (https://github.com/ZF-Commons/ZfcUser)(https://github.com/ZF-Commons/ZfcBase)(https://github.com/bjyoungblood/BjyAuthorize)
  52. 52. Add ZfcBase, ZfcUser, BjyAuthorize- Go to: <Source Path>zendcmsvendor- Extract to: ZfcUser, ZfcBase, BjyAuthorize
  53. 53. Config application.config- Go to: <Source Path>zendcmsconfig- Edit file: application.config.php
  54. 54. Make database.local- Go to: <Source Path>zendcmsconfigautoload- Create file: database.local.php
  55. 55. Start url User- Go to: http://zendcms.com/user/login
  56. 56. DB ListStar:1) User (u)2) Tag (t): Page, Menu, Category3) Post (p): Article, Products, Banner4) Meta (m): Media5) Option (o): Configuration
  57. 57. Table List1) u: uId, uName, uPass, uEmail, uDesc2) t: tId, tName, tDesc3) p: pId, uId, pTitle, pContent4) m: mId, pId, mKey, mValue5) o: oId, oKey, oValue
  58. 58. 1) User (u)CREATE TABLE `user` (`uId` INT NOT NULL AUTO_INCREMENT ,`uName` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOTNULL ,`uPass` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,`uEmail` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,`uDesc` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,PRIMARY KEY ( `uId` )) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci
  59. 59. 2) Tag (t)CREATE TABLE `tag` (`tId` INT NOT NULL AUTO_INCREMENT ,`tName` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,`tDesc` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,PRIMARY KEY ( `tId` )) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci
  60. 60. 3) Post (p)CREATE TABLE `post` (`pId` INT NOT NULL AUTO_INCREMENT ,`uId` INT NOT NULL ,`pTitle` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,`pContent` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ,PRIMARY KEY ( `pId` )) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci
  61. 61. 4) Meta (m)CREATE TABLE `meta` (`mId` INT NOT NULL AUTO_INCREMENT ,`pId` INT NOT NULL ,`mKey` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,`mValue` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,PRIMARY KEY ( `mId` )) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci
  62. 62. 5) Option (o)CREATE TABLE `option` (`oId` INT NOT NULL AUTO_INCREMENT ,`oKey` VARCHAR( 255 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,`oValue` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,PRIMARY KEY ( `oId` )) ENGINE = MYISAM CHARACTER SET utf8 COLLATE utf8_general_ci
  63. 63. Login
  64. 64. Back-endI) User Manager (Permission)II) Tag Manager (Grid hierachy)III) Layout Manager (Row added elements)Star: 1) Header, 2) Content, 3) Footer, 4) Top, 5) BottomIV) Media ManagerV) Option ManagerPyramid: Navigation (Circle -> Menu) -> Datatable (Search-Filter,Action,Grid-Edit) -> Form (Main Input,Desc Grid) + Custom
  65. 65. Github- Go to: https://github.com/leonguyen/zendcms
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×