Advertisement
Guest User

Untitled

a guest
Dec 18th, 2014
183
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 15.42 KB | None | 0 0
  1. WEBVTT
  2.  
  3. 00:00:00.000 --> 00:00:04.727
  4. (whooshing sound)
  5.  
  6. 00:00:04.727 --> 00:00:06.287
  7. Hello
  8.  
  9. 00:00:06.287 --> 00:00:09.200
  10. and welcome to this introduction to October
  11.  
  12. 00:00:09.200 --> 00:00:10.989
  13. October is a CMS
  14.  
  15. 00:00:10.989 --> 00:00:12.648
  16. built using PHP
  17.  
  18. 00:00:12.648 --> 00:00:14.971
  19. and is based on the Laravel framework
  20.  
  21. 00:00:14.971 --> 00:00:17.151
  22. the reason we made October
  23.  
  24. 00:00:17.151 --> 00:00:20.111
  25. was because we had a lot of frustration with systems
  26.  
  27. 00:00:20.111 --> 00:00:23.151
  28. that seem to get more complicated every year
  29.  
  30. 00:00:23.151 --> 00:00:26.892
  31. So we built a platform that gets back to the basics of Web Development
  32.  
  33. 00:00:26.892 --> 00:00:28.691
  34. and is also fun to use!
  35.  
  36. 00:00:28.691 --> 00:00:31.951
  37. We've been working really hard on this, so I hope you enjoy it
  38.  
  39. 00:00:31.951 --> 00:00:35.171
  40. This is the back-end interface for October
  41.  
  42. 00:00:35.171 --> 00:00:38.611
  43. You might notice it is a very clean and simple interface
  44.  
  45. 00:00:38.611 --> 00:00:41.211
  46. Devoid of any unnecessary clutter
  47.  
  48. 00:00:41.211 --> 00:00:44.033
  49. At the top there is the Main Menu
  50.  
  51. 00:00:44.033 --> 00:00:47.191
  52. and below to the left, there is the Sub Menu
  53.  
  54. 00:00:47.191 --> 00:00:51.811
  55. This is an expansion on the selected main menu item
  56.  
  57. 00:00:51.811 --> 00:00:53.471
  58. Which is the CMS
  59.  
  60. 00:00:53.471 --> 00:00:55.971
  61. The rest of this content area here
  62.  
  63. 00:00:55.971 --> 00:00:59.351
  64. is free to be used by any of the back-end pages
  65.  
  66. 00:00:59.351 --> 00:01:03.732
  67. Now I'd like to demonstrate some of the features of the CMS
  68.  
  69. 00:01:03.732 --> 00:01:05.731
  70. The first being Pages
  71.  
  72. 00:01:05.731 --> 00:01:09.331
  73. Pages hold the content for each website URL
  74.  
  75. 00:01:09.331 --> 00:01:11.011
  76. So let's create a new one
  77.  
  78. 00:01:11.011 --> 00:01:13.671
  79. We'll call this page "Home"
  80.  
  81. 00:01:13.671 --> 00:01:16.691
  82. As it is the first page we'd like people to see
  83.  
  84. 00:01:16.691 --> 00:01:18.751
  85. when first opening the website
  86.  
  87. 00:01:18.751 --> 00:01:21.151
  88. We'll give it a URL of just slash
  89.  
  90. 00:01:21.151 --> 00:01:24.311
  91. We'll enter some content in the Markup area
  92.  
  93. 00:01:24.311 --> 00:01:26.832
  94. and click "Save" to create this page
  95.  
  96. 00:01:26.832 --> 00:01:29.392
  97. Now that the page exists
  98.  
  99. 00:01:29.392 --> 00:01:31.332
  100. We can preview it in the browser
  101.  
  102. 00:01:31.332 --> 00:01:33.052
  103. by clicking the "Preview" button
  104.  
  105. 00:01:33.052 --> 00:01:36.072
  106. There you can see the content for this page
  107.  
  108. 00:01:36.072 --> 00:01:38.791
  109. You might notice this page looks plain
  110.  
  111. 00:01:38.791 --> 00:01:40.971
  112. That's because it is missing a Layout
  113.  
  114. 00:01:40.971 --> 00:01:43.211
  115. and that moves us to the next feature
  116.  
  117. 00:01:43.211 --> 00:01:46.511
  118. Layouts define the page scaffold
  119.  
  120. 00:01:46.511 --> 00:01:49.871
  121. that is, everything that repeats on a page
  122.  
  123. 00:01:49.871 --> 00:01:51.631
  124. like a Header and a Footer
  125.  
  126. 00:01:51.631 --> 00:01:54.683
  127. So let's create a new Layout
  128.  
  129. 00:01:54.683 --> 00:01:58.071
  130. We will call this layout "basic"
  131.  
  132. 00:01:58.071 --> 00:02:02.031
  133. and it can have a description of "A basic layout"
  134.  
  135. 00:02:02.031 --> 00:02:06.051
  136. I'll enter some content in the markup area
  137.  
  138. 00:02:06.051 --> 00:02:08.551
  139. Then we'll click "Save" to create the Layout
  140.  
  141. 00:02:08.551 --> 00:02:12.091
  142. Now if we return to the page we created before
  143.  
  144. 00:02:12.091 --> 00:02:16.091
  145. You can see we can now select this layout
  146.  
  147. 00:02:16.091 --> 00:02:20.891
  148. Let's Save and Preview the page in the browser again
  149.  
  150. 00:02:20.891 --> 00:02:24.332
  151. Now there is a Stylesheet that has been applied to this page
  152.  
  153. 00:02:24.332 --> 00:02:27.371
  154. and it also has a Header and a Footer
  155.  
  156. 00:02:27.371 --> 00:02:30.553
  157. The next feature I'd like to show you
  158.  
  159. 00:02:30.553 --> 00:02:31.993
  160. is called Partials
  161.  
  162. 00:02:31.993 --> 00:02:36.053
  163. Partials contain reusable chunks of HTML markup
  164.  
  165. 00:02:36.053 --> 00:02:38.411
  166. that can be used anywhere throughout the site
  167.  
  168. 00:02:38.411 --> 00:02:41.091
  169. So we might like to create a new Partial
  170.  
  171. 00:02:41.091 --> 00:02:42.411
  172. that contains some links
  173.  
  174. 00:02:42.411 --> 00:02:44.531
  175. that we can use in various places
  176.  
  177. 00:02:44.531 --> 00:02:46.611
  178. We'll name this Partial "links"
  179.  
  180. 00:02:46.611 --> 00:02:49.351
  181. and enter a description "Some links"
  182.  
  183. 00:02:49.351 --> 00:02:52.511
  184. I'll paste the links in the Markup area
  185.  
  186. 00:02:52.511 --> 00:02:56.083
  187. and click "Save" to create the Partial
  188.  
  189. 00:02:56.083 --> 00:02:59.711
  190. Now we can place these links anywhere
  191.  
  192. 00:02:59.711 --> 00:03:02.431
  193. So let's place them on the Homepage
  194.  
  195. 00:03:02.431 --> 00:03:06.031
  196. We do that by using the "partial" tag
  197.  
  198. 00:03:06.031 --> 00:03:09.612
  199. Along with the name of the partial we created
  200.  
  201. 00:03:09.612 --> 00:03:11.771
  202. In this case it's called "links"
  203.  
  204. 00:03:11.771 --> 00:03:13.852
  205. So if we Save this page
  206.  
  207. 00:03:13.852 --> 00:03:15.871
  208. Then Preview it in the browser again
  209.  
  210. 00:03:15.871 --> 00:03:18.371
  211. You can see that the links appear
  212.  
  213. 00:03:18.371 --> 00:03:22.011
  214. Partials also carry a secondary feature
  215.  
  216. 00:03:22.011 --> 00:03:24.891
  217. And that is, they can be updated dynamically
  218.  
  219. 00:03:24.891 --> 00:03:26.631
  220. via the AJAX Framework
  221.  
  222. 00:03:26.631 --> 00:03:28.591
  223. I'll show you how that works
  224.  
  225. 00:03:28.591 --> 00:03:30.611
  226. But before I do
  227.  
  228. 00:03:30.611 --> 00:03:33.351
  229. I'm going to switch my mode of development
  230.  
  231. 00:03:33.351 --> 00:03:36.191
  232. To point out that October is not just interface driven
  233.  
  234. 00:03:36.191 --> 00:03:38.151
  235. It's also file based
  236.  
  237. 00:03:38.151 --> 00:03:40.571
  238. We're using a Text editor now
  239.  
  240. 00:03:40.571 --> 00:03:43.671
  241. If you remember the Homepage we created earlier
  242.  
  243. 00:03:43.671 --> 00:03:46.533
  244. It can be found in the "pages" directory
  245.  
  246. 00:03:46.533 --> 00:03:49.811
  247. Along with the Layout we created called "basic"
  248.  
  249. 00:03:49.811 --> 00:03:51.331
  250. In the "layouts" directory
  251.  
  252. 00:03:51.331 --> 00:03:53.871
  253. and the Partial called "links"
  254.  
  255. 00:03:53.871 --> 00:03:55.291
  256. in the "partials" directory
  257.  
  258. 00:03:55.291 --> 00:03:57.571
  259. All of the settings that we used
  260.  
  261. 00:03:57.571 --> 00:03:59.611
  262. are retained at the top of the file
  263.  
  264. 00:03:59.611 --> 00:04:01.631
  265. called the Configuration section
  266.  
  267. 00:04:01.631 --> 00:04:05.431
  268. This is useful when collaborating with other developers
  269.  
  270. 00:04:05.431 --> 00:04:08.271
  271. in a Version Control system, like Git
  272.  
  273. 00:04:08.271 --> 00:04:10.831
  274. Returning now to the next feature
  275.  
  276. 00:04:10.831 --> 00:04:12.391
  277. The AJAX Framework
  278.  
  279. 00:04:12.391 --> 00:04:15.551
  280. October comes with an AJAX Framework baked in
  281.  
  282. 00:04:15.551 --> 00:04:18.351
  283. that allows the page to be updated dynamically
  284.  
  285. 00:04:18.351 --> 00:04:22.191
  286. I'll show you how this works by creating a simple calculator
  287.  
  288. 00:04:22.191 --> 00:04:26.131
  289. The first thing we need to do is create a new page
  290.  
  291. 00:04:26.131 --> 00:04:27.731
  292. So let's add a new file
  293.  
  294. 00:04:27.731 --> 00:04:29.251
  295. under the "pages" directory
  296.  
  297. 00:04:29.251 --> 00:04:31.991
  298. We'll call this file "calc.htm"
  299.  
  300. 00:04:31.991 --> 00:04:34.691
  301. Then we need to give the page a URL
  302.  
  303. 00:04:34.691 --> 00:04:37.291
  304. We'll give it the URL of "calc"
  305.  
  306. 00:04:37.291 --> 00:04:39.991
  307. and we can also assign it with a Layout
  308.  
  309. 00:04:39.991 --> 00:04:42.611
  310. We'll use the Layout we created before called "basic"
  311.  
  312. 00:04:42.611 --> 00:04:45.131
  313. We then terminate the configuration section
  314.  
  315. 00:04:45.131 --> 00:04:46.911
  316. by using two equal signs
  317.  
  318. 00:04:46.911 --> 00:04:49.431
  319. Now I'm going to paste in the form
  320.  
  321. 00:04:49.431 --> 00:04:51.511
  322. that we're going to use for our calculator
  323.  
  324. 00:04:51.511 --> 00:04:53.411
  325. As you can see
  326.  
  327. 00:04:53.411 --> 00:04:55.331
  328. this form has three inputs
  329.  
  330. 00:04:55.331 --> 00:04:56.731
  331. and a "Submit" button
  332.  
  333. 00:04:56.731 --> 00:04:58.831
  334. The first input is a value
  335.  
  336. 00:04:58.831 --> 00:05:01.171
  337. The second input is an operation
  338.  
  339. 00:05:01.171 --> 00:05:03.571
  340. And the third input is a another value
  341.  
  342. 00:05:03.571 --> 00:05:05.591
  343. When we hit the "Go" button
  344.  
  345. 00:05:05.591 --> 00:05:08.372
  346. We're going to apply a calculation from "value1"
  347.  
  348. 00:05:08.372 --> 00:05:09.753
  349. to "value2"
  350.  
  351. 00:05:09.753 --> 00:05:12.873
  352. Below the form we have a result section
  353.  
  354. 00:05:12.873 --> 00:05:15.073
  355. This will be the Partial
  356.  
  357. 00:05:15.073 --> 00:05:17.193
  358. that contains our calculation result
  359.  
  360. 00:05:17.193 --> 00:05:19.253
  361. Notice inside the <form> tag
  362.  
  363. 00:05:19.253 --> 00:05:21.733
  364. we have these non-standard attributes
  365.  
  366. 00:05:21.733 --> 00:05:23.373
  367. that begin with the word "data"
  368.  
  369. 00:05:23.373 --> 00:05:25.693
  370. These tell the AJAX Framework
  371.  
  372. 00:05:25.693 --> 00:05:27.613
  373. that when we submit this form
  374.  
  375. 00:05:27.613 --> 00:05:29.733
  376. we'd like to do it using JavaScript
  377.  
  378. 00:05:29.733 --> 00:05:31.413
  379. Without the page refreshing
  380.  
  381. 00:05:31.413 --> 00:05:33.793
  382. The first tag "data-request"
  383.  
  384. 00:05:33.793 --> 00:05:36.073
  385. defines the AJAX event handler
  386.  
  387. 00:05:36.073 --> 00:05:39.793
  388. This is a function name used to process the form data
  389.  
  390. 00:05:39.793 --> 00:05:41.293
  391. and produce a result
  392.  
  393. 00:05:41.293 --> 00:05:43.653
  394. In this case, it's called "onTest"
  395.  
  396. 00:05:43.653 --> 00:05:46.693
  397. The second tag "data-request-update"
  398.  
  399. 00:05:46.693 --> 00:05:48.991
  400. says 'once the request has finished'
  401.  
  402. 00:05:48.991 --> 00:05:51.431
  403. 'we should update an element on the page'
  404.  
  405. 00:05:51.431 --> 00:05:52.971
  406. 'with a specific partial'
  407.  
  408. 00:05:52.971 --> 00:05:56.771
  409. In this case we want to update using the "calcresult" Partial
  410.  
  411. 00:05:56.771 --> 00:06:00.451
  412. an element on the page with the identifier "result"
  413.  
  414. 00:06:00.451 --> 00:06:02.792
  415. At the moment this element doesn't exist
  416.  
  417. 00:06:02.792 --> 00:06:05.484
  418. So I'm going to add it...
  419.  
  420. 00:06:05.484 --> 00:06:08.352
  421. ...
  422.  
  423. 00:06:08.352 --> 00:06:11.332
  424. Now we should create the event handler used by this form
  425.  
  426. 00:06:11.332 --> 00:06:14.651
  427. We do that by adding another section to this page
  428.  
  429. 00:06:14.651 --> 00:06:16.791
  430. called the PHP Code section
  431.  
  432. 00:06:16.791 --> 00:06:20.011
  433. Here we define our event handler called "onTest"
  434.  
  435. 00:06:20.011 --> 00:06:23.551
  436. You can see in the code here
  437.  
  438. 00:06:23.551 --> 00:06:25.611
  439. it processes our form data
  440.  
  441. 00:06:25.611 --> 00:06:27.151
  442. and produces a result
  443.  
  444. 00:06:27.151 --> 00:06:30.351
  445. The result is made available to the next page cycle
  446.  
  447. 00:06:30.351 --> 00:06:32.611
  448. as the variable called "answer"
  449.  
  450. 00:06:32.611 --> 00:06:35.291
  451. This will be used by our Partial
  452.  
  453. 00:06:35.291 --> 00:06:37.011
  454. to display the result
  455.  
  456. 00:06:37.011 --> 00:06:39.551
  457. All that remains to do now is to create our Partial
  458.  
  459. 00:06:39.551 --> 00:06:41.931
  460. We'll do that by creating a new file
  461.  
  462. 00:06:41.931 --> 00:06:43.391
  463. in the "partials" directory
  464.  
  465. 00:06:43.391 --> 00:06:46.323
  466. We'll call this partial "calcresult.htm"
  467.  
  468. 00:06:46.323 --> 00:06:49.811
  469. As you can see in the Markup here
  470.  
  471. 00:06:49.811 --> 00:06:53.531
  472. The first thing we do is check for an "answer" variable
  473.  
  474. 00:06:53.531 --> 00:06:56.151
  475. This variable is supplied to this Partial
  476.  
  477. 00:06:56.151 --> 00:06:59.591
  478. by the "onTest" event handler we created earlier
  479.  
  480. 00:06:59.591 --> 00:07:02.191
  481. If the "answer" variable exists
  482.  
  483. 00:07:02.191 --> 00:07:03.711
  484. we'll display it to the user
  485.  
  486. 00:07:03.711 --> 00:07:06.672
  487. Otherwise we'll display a friendly message
  488.  
  489. 00:07:06.672 --> 00:07:08.692
  490. to say 'Click the Go button'
  491.  
  492. 00:07:08.692 --> 00:07:10.712
  493. Switching modes again now
  494.  
  495. 00:07:10.712 --> 00:07:14.012
  496. Let's see how the calculator looks in the back-end
  497.  
  498. 00:07:14.012 --> 00:07:19.571
  499. As you can see, the calculator we created is now in page list
  500.  
  501. 00:07:19.571 --> 00:07:21.692
  502. Let's click it and have a look
  503.  
  504. 00:07:21.692 --> 00:07:26.024
  505. Let's also close some of these form areas
  506.  
  507. 00:07:26.024 --> 00:07:27.952
  508. to make some more room
  509.  
  510. 00:07:27.952 --> 00:07:30.872
  511. All the Markup we created for our calculator is here
  512.  
  513. 00:07:30.872 --> 00:07:32.292
  514. as expected
  515.  
  516. 00:07:32.292 --> 00:07:35.113
  517. The event handler in the PHP Code section
  518.  
  519. 00:07:35.113 --> 00:07:37.473
  520. can be found in the Code tab
  521.  
  522. 00:07:37.473 --> 00:07:41.753
  523. We can also check for our Partial "calcresult"
  524.  
  525. 00:07:41.753 --> 00:07:44.351
  526. By looking the Partials area
  527.  
  528. 00:07:44.351 --> 00:07:46.343
  529. There it is, let's have a look
  530.  
  531. 00:07:46.343 --> 00:07:49.451
  532. All the Markup is there
  533.  
  534. 00:07:49.451 --> 00:07:52.431
  535. So finally, let's preview our page
  536.  
  537. 00:07:52.431 --> 00:07:54.663
  538. ...
  539.  
  540. 00:07:54.663 --> 00:07:57.239
  541. Here is the AJAX calculator
  542.  
  543. 00:07:57.239 --> 00:07:58.918
  544. Let's try it
  545.  
  546. 00:07:58.918 --> 00:08:02.519
  547. We enter two values and click "Go"
  548.  
  549. 00:08:02.519 --> 00:08:06.919
  550. and you can see the result is shown, without refreshing the page
  551.  
  552. 00:08:06.919 --> 00:08:08.919
  553. If we change the operator
  554.  
  555. 00:08:08.919 --> 00:08:11.219
  556. we should get a different result
  557.  
  558. 00:08:11.219 --> 00:08:14.179
  559. That's the power of the AJAX Framework feature
  560.  
  561. 00:08:14.179 --> 00:08:16.141
  562. You can update the page dynamically
  563.  
  564. 00:08:16.141 --> 00:08:19.141
  565. and easily, with almost no knowledge of JavaScript
  566.  
  567. 00:08:19.141 --> 00:08:22.181
  568. The final thing I want to demonstrate
  569.  
  570. 00:08:22.181 --> 00:08:23.761
  571. is my favorite feature
  572.  
  573. 00:08:23.761 --> 00:08:25.104
  574. called Components
  575.  
  576. 00:08:25.104 --> 00:08:28.444
  577. Components are an extensible feature to October
  578.  
  579. 00:08:28.444 --> 00:08:30.204
  580. They're provided by Plugins
  581.  
  582. 00:08:30.204 --> 00:08:32.304
  583. and are essentially building blocks
  584.  
  585. 00:08:32.304 --> 00:08:34.764
  586. that can be attached to any Page or Layout
  587.  
  588. 00:08:34.764 --> 00:08:37.104
  589. They provide rich functionality
  590.  
  591. 00:08:37.104 --> 00:08:38.924
  592. like the calculator example
  593.  
  594. 00:08:38.924 --> 00:08:40.884
  595. but with only a small amount of markup
  596.  
  597. 00:08:40.884 --> 00:08:43.204
  598. Let's try out this demo Component
  599.  
  600. 00:08:43.204 --> 00:08:45.324
  601. provided by the October Demo Plugin
  602.  
  603. 00:08:45.324 --> 00:08:47.104
  604. It's a "To do" List
  605.  
  606. 00:08:47.104 --> 00:08:48.824
  607. and we'll need a page to use it on
  608.  
  609. 00:08:48.824 --> 00:08:50.564
  610. Let's do that first
  611.  
  612. 00:08:50.564 --> 00:08:52.724
  613. We'll call this page "To Do"
  614.  
  615. 00:08:52.724 --> 00:08:55.724
  616. To attach the component to the page
  617.  
  618. 00:08:55.724 --> 00:08:57.584
  619. We simply click on it
  620.  
  621. 00:08:57.584 --> 00:08:59.804
  622. Each Component uses an Inspector
  623.  
  624. 00:08:59.804 --> 00:09:02.064
  625. with unique properties that can be set
  626.  
  627. 00:09:02.064 --> 00:09:04.964
  628. In this case the list has an alias
  629.  
  630. 00:09:04.964 --> 00:09:07.846
  631. which is a unique name given to the Component
  632.  
  633. 00:09:07.846 --> 00:09:09.846
  634. when using it on the Page or Layout
  635.  
  636. 00:09:09.846 --> 00:09:13.666
  637. It also has a "maximum amount of items" allowed
  638.  
  639. 00:09:13.666 --> 00:09:16.664
  640. We'll leave the default alias as "demoTodo"
  641.  
  642. 00:09:16.664 --> 00:09:19.424
  643. But we'll change the maximum items to "3"
  644.  
  645. 00:09:19.424 --> 00:09:22.264
  646. The Component can then be rendered on the page
  647.  
  648. 00:09:22.264 --> 00:09:24.144
  649. using the "component" tag
  650.  
  651. 00:09:24.144 --> 00:09:27.784
  652. and also the alias, which is "demoTodo"
  653.  
  654. 00:09:27.784 --> 00:09:30.944
  655. This will render the component on the page
  656.  
  657. 00:09:30.944 --> 00:09:32.868
  658. The reason this is my favorite feature
  659.  
  660. 00:09:32.868 --> 00:09:35.164
  661. is because that's the only thing required
  662.  
  663. 00:09:35.164 --> 00:09:39.951
  664. If we Save this page, we can immediately Preview it in the browser
  665.  
  666. 00:09:39.951 --> 00:09:41.291
  667. ...
  668.  
  669. 00:09:41.291 --> 00:09:43.845
  670. This time, instead of having a calculator
  671.  
  672. 00:09:43.845 --> 00:09:45.365
  673. we have a "To Do" list!
  674.  
  675. 00:09:45.365 --> 00:09:46.745
  676. So let's try it!
  677.  
  678. 00:09:46.745 --> 00:09:50.365
  679. I might want to 'Read some more documentation'
  680.  
  681. 00:09:50.365 --> 00:09:55.765
  682. And of course, 'Install my copy of October'
  683.  
  684. 00:09:55.765 --> 00:09:58.305
  685. ...
  686.  
  687. 00:09:58.305 --> 00:09:59.905
  688. As you can see
  689.  
  690. 00:09:59.905 --> 00:10:02.885
  691. I have effortlessly added this functionality to the page
  692.  
  693. 00:10:02.885 --> 00:10:05.345
  694. using the power of Components
  695.  
  696. 00:10:05.345 --> 00:10:09.065
  697. That concludes this demonstration of October's core features
  698.  
  699. 00:10:09.065 --> 00:10:12.545
  700. You can look out for more screencasts with more in-depth details
  701.  
  702. 00:10:12.545 --> 00:10:15.526
  703. I hope you enjoy using October as much as we do!
  704.  
  705. 00:10:15.526 --> 00:10:16.886
  706. Good-bye!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement