forked from hakimel/reveal.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphp_startit.html
executable file
·696 lines (643 loc) · 20.1 KB
/
php_startit.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>PHP</title>
<meta name="description" content="System overview">
<meta name="author" content="Milan Popović">
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="css/reveal.min.css">
<link rel="stylesheet" href="css/theme/default.css" id="theme">
<link rel="stylesheet" href="css/print/pdf.css" id="print" media="print">
<link rel="stylesheet" href="css/presentation/php_startit.css">
<!-- For syntax highlighting -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<!-- If the query includes 'print-pdf', use the PDF print sheet -->
<script>
document.write('<link rel="stylesheet" href="css/print/' + ( window.location.search.match(/print-pdf/gi) ? 'pdf' : 'paper' ) + '.css" type="text/css" media="print">');
</script>
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<section>
<h1>
PHP SRBIJA
</h1>
</section>
<section>
<h2>Agenda</h2>
<ul>
<li>PHP Srbija</li>
<li>History of PHP</li>
<li>Why PHP?</li>
<li>Composer</li>
<li>PSR 0,1,2,3,4...</li>
<li>Frameworks</li>
<li>Symfony 2</li>
<li>Laravel 4</li>
<li>Zend 2</li>
</ul>
</section>
<section class="" data-id="248a03c47054819a022eecd1cd192504">
<h1>
<img src="img/php_startit/logo_crna_slova_manji.png" style="width: 625px; height: 420px; max-height: none; max-width: none;">
<br>
</h1>
<div>Nemanja Čedomirović / @cedomirovic</div>
</section>
<section class="" data-id="53d19a801e0ac7c9b2208a47d3b1c858">
<h2>
<img src="img/php_startit/twit_phpupbg.png">
<br>
</h2>
</section>
<section class="" data-id="9f1ac35ba28ac9a4a33e681c8793a88b">
<h2>
<br>
</h2>
<h2>
<br>
</h2>
<h2>
<br>
</h2>
<h1>Why?</h1>
<div>
<br>
</div>
</section>
<section class="" data-id="8bd9140a5be32207efe8f00d5ecfdd5e">
<h2>
<br>
</h2>
<h2>
<br>
</h2>
<h2>
<br>
</h2>
<h1>Members</h1>
</section>
<section class="" data-id="b65c0a3c0502bdb15ab66aadf3eec2f3">
<h2>
<br>
</h2>
<div>
<h1 style="font-style: normal; font-variant: normal;">
<br>
</h1>
<h1 style="font-size:100px; font-style: normal; font-variant: normal;">Why are we different?</h1>
</div>
</section>
<section class="" data-id="ed12b67a8d4b22265a07603e495e9a5c">
<h2>
<br>
</h2>
<h2>What we done so far?</h2>
<div>
<br>
</div>
<div>
<br>
</div>
<div>
<ul>
<li>4 events</li>
<li>over 20 speakers</li>
<li>supported by over 20 companies</li>
<li>more than 1000 participants</li>
<li>exyu community gathering</li>
<li>cooperation with Google</li>
<li>cooperation with Owasp</li>
</ul>
</div>
</section>
<section class="" data-id="0abd67a959bb8aeb79478dbe7b1db83d">
<h1>
<br>
</h1>
<h1>
<br>
</h1>
<h1>Plans?</h1>
</section>
<section>
<h1>PHP</h1>
<p>
<img src="img/php_startit/double_claw.jpg" alt="Double Claw" title="Double Claw">
</p>
<p>
<small><a target="_blank" href="http://www.milanpopovic.me">www.milanpopovic.me</a> /
Milan Popović <a target="_blank"
href="http://twitter.com/phpsrbija">@komita1981</a>
</small>
</p>
</section>
<section>
<section>
<h2>History of PHP</h2>
<p class="fragment">
Created in 1994 by Rasmus Lerdorf - <a target="_blank" href="http://twitter.com/rasmus">@rasmus</a>
</p>
<p class="fragment">
Written in C
</p>
<p class="fragment">
Personal Home Page Tools
</p>
</section>
<section>
<h2>History of PHP</h2>
<p class="fragment">
Timeline
<ul class="fragment">
<li>PHP 1 - 1995</li>
<li>PHP 1 - 1996</li>
<li>PHP 3 - 1998 - popularity gained<br></li>
<li>PHP 4 - 2000 - wannabe object</li>
<li>PHP 5 - 2004 - OO support</li>
<li>PHP 5.3 - 2009 <br></li>
<li>PHP 5.4 - 2012</li>
<li>PHP 5.5 - 2013</li>
</ul>
</p>
</section>
<section>
<h2>History of PHP</h2>
<p class="fragment">
Andi Gutmans and Zeev Suraski
</p>
<p class="fragment">
PHP - Hypertext Preprocessor
</p>
<p class="fragment">
<img src="img/php_startit/php_repo.jpg" alt="PHP Repo statistics" title="PHP Repo statistics">
</p>
</section>
</section>
<section>
<h1>WHY PHP???</h1>
</section>
<section>
<section>
<pre>
<font style="font-size: 18px;"><?php</font><font style="font-size: 18px;">
$db = connect_mysql('192.168.1.1', 'root' , 'secretPassword123' );
$item = get_mysql_data('SELECT * FROM my_table WHERE id=</font><font style="font-size: 18px;"><font style="font-size: 18px;">' . </font>$_GET['id']);</font><font style="font-size: 18px;">
?>
</font><font style="font-size: 18px;"><html></font>
<font style="font-size: 18px;"> <head>
</font><font style="font-size: 18px;"> <title><?php echo $item['title'];?></title></font><font style="font-size: 18px;"><br> </head></font><font style="font-size: 18px;"><br> <body><br></font><font style="font-size: 18px;"> <table></font><br><font style="font-size: 18px;"><?php <br></font><font style="font-size: 18px;">$users = get_mysql_data('SELECT * FROM users WHERE bla = '.$item[ 'id2'] ); <br>?><br></font><font style="font-size: 18px;"> <?php for($i=0; $i< count($users);$i++){ ?></font><font style="font-size: 18px;"><br> <tr><td><?php echo $users[$i]['username'] ?></td></tr><br></font><font style="font-size: 18px;"> <?php } ?></font><font style="font-size: 18px;"><br> </table></font><font style="font-size: 18px;"><br> </body><br></font><font style="font-size: 18px;"></html></font>
</pre>
</section>
<section>
<pre>
namespace League\Flysystem;
use LogicException;
use InvalidArgumentException;
class Filesystem implements FilesystemInterface
{
/**
* @var AdapterInterface $adapter
*/
protected $adapter;
/**
* @var Config $config
*/
protected $config;
/**
* Constructor
*
* @param AdapterInterface $adapter
* @param mixed $config
*/
public function __construct(AdapterInterface $adapter, $config = null)
{
$this->adapter = $adapter;
$this->config = Util::ensureConfig($config);
}
</pre>
</section>
<section>
<h2>Hosting</h2>
<p class="fragment">Shared</p>
<p class="fragment">VPS</p>
<p class="fragment">Dedicated servers</p>
<p class="fragment">Heroku</p>
<p class="fragment">Google App Engine</p>
<p class="fragment">Azure</p>
</section>
<section>
<h2>Popularity - TIOBE index</h2>
<p class="fragment">
<img width="800" height="600" src="img/php_startit/php_tiobe.png" alt="PHP Tiobe index" title="PHP Tiobe index">
</p>
</section>
<section>
<h2>Popularity - usage of languages</h2>
<p class="fragment">
<img width="800" height="600" src="img/php_startit/usage_of_server_side_prog_lang.png" alt="Server side language usage" title="Server side language usage">
</p>
</section>
<section>
<h2>Popularity - number of developers</h2>
<p class="fragment">
More than 5 millions PHP developers worldwide
</p>
<p class="fragment">
Up to one thousand PHP developers in Serbia
</p>
</section>
<section>
<p>
<img width="800" height="600" src="img/php_startit/github_new_repos-custom.png" alt="Github new repos stats" title="Github new repos stats">
</p>
</section>
<section>
<p>
<img width="800" height="600" src="img/php_startit/github_new_users_repos_issues_multiplot_composite_simple.png" alt="Github stats" title="Github stats">
</p>
</section>
<section>
<p>
<img src="img/php_startit/zf2_stats.png" alt="ZF2 github stats" title="ZF2 github stats">
<img src="img/php_startit/laravel_stats.png" alt="Laravel github stats" title="Laravel github stats">
</p>
</section>
<section>
<p>
<img src="img/php_startit/symfony_stats.png" alt="Symfony github stats" title="Symfony github stats">
<img src="img/php_startit/silex_stats.png" alt="Silex github stats" title="Silex github stats">
</p>
</section>
</section>
<section>
<section>
<h2>PHP FIG</h2>
<p class="fragment">
PHP Framework Interop Group
</p>
<p class="fragment">
<img width="800" height="600" src="img/php_startit/fig_members.png" alt="Fig members" title="Fig members">
</p>
</section>
<section>
<h2>PSR</h2>
<p class="fragment">
Php Standard Recommendation
</p>
<p class="fragment">
Autoloading standard - PSR-0
</p>
<p class="fragment">
Basic coding standard - PSR-1
</p>
<p class="fragment">
Coding style guide - PSR-2
</p>
<p class="fragment">
Logger interface - PSR-3
</p>
<p class="fragment">
Improved autoloading - PSR-4
</p>
</section>
</section>
<section>
<section>
<h2>Composer</h2>
<p>
<img src="img/php_startit/logo-composer-transparent.png" alt="Composer logo" title="Composer logo">
</p>
<p>
Dependency Manager for PHP
</p>
</section>
<section>
<p>
The problem that Composer solves is this:
</p>
<ul>
<li>
You have a project that depends on a number of libraries.
</li>
<li>
Some of those libraries depend on other libraries.
</li>
<li>
You declare the things you depend on.
</li>
<li>
Composer finds out which versions of which packages need to be installed, and installs them (meaning it downloads them into your project).
</li>
</ul>
</section>
<section>
<p>
Declaring dependencies
</p>
<p>
composer.json
</p>
<pre>
{
"name": "zendframework/skeleton-application",
"description": "Skeleton Application for ZF2",
"license": "BSD-3-Clause",
"keywords": [
"framework",
"zf2"
],
"homepage": "http://framework.zend.com/",
"require": {
"php": ">=5.3.3",
"zendframework/zendframework": "2.2.*",
"aws/aws-sdk-php-zf2": "1.2.1",
"league/flysystem": "0.4.*@dev"
}
}
</pre>
</section>
<section>
<h2>
<img src="img/php_startit/packagist-logo.png" alt="Packagist logo" title="Packagist logo">
</h2>
<pre>
{
"require": {
"vendor/package": "1.3.2",
"vendor/package2": "1.*",
"vendor/package3": ">=2.0.3"
}
}
</pre>
</section>
<section>
<h2>
Packagist statistics
</h2>
<p>
<ul>
<li>29 908 packages registered</li>
<li>110 247 versions available</li>
<li>207 357 630 packages installed (since 2012-04-13)</li>
</ul>
</p>
</section>
</section>
<section>
<section>
<h2>Best framework</h2>
<p class="fragment">
<img src="img/php_startit/which_one_is_the_best.jpg" alt="Best PHP FW" title="Best PHP FW">
</p>
</section>
<section>
<ul>
<li>
Zend Framework 1, 2
</li>
<li>
Symfony 1, 2
</li>
<li>
Laravel
</li>
<li>
Phalcon
</li>
<li>
Silex
</li>
<li>
FuelPHP
</li>
<li>
Yii
</li>
<li>
CakePHP
</li>
<li>
Codeigniter
</li>
</ul>
</section>
</section>
<section>
<h1>Symfony 2</h1>
<h3>PHP Framework for Web projects</h3>
<p>
<small>Created by <a href="http://web-development-php.com">Vladimir Popov</a> / <a href="http://twitter.com/vladapopov">@vladapopov</a></small>
</p>
</section>
<section>
<h2>Symfony info</h2>
<ul>
<li>Currently in version 2.4.4</li>
<li>Sensio Labs</li>
<li><a href="http://fabien.potencier.org/">Fabian Potencier</a></li>
<li><a href="http://symfony.com/">symfony.com</a></li>
</ul>
</section>
<section>
<h1>Why Symfony?</h1>
</section>
<section>
<h2>Framework characteristics</h2>
<ul>
<li>Modular by using Bundles</li>
<li>MVC structure</li>
<li>High performance</li>
<li>Component oriented</li>
<li>Community driven</li>
<li>Tuned with PHP</li>
<li>Great documentation. The Book, Cookbook.</li>
</ul>
</section>
<section>
<h2>Main differences</h2>
<ul>
<li>Symfony is a project. Components, Silex, full stack ...</li>
<li>Used widely</li>
<li>Huge community and large number of contributors</li>
<li>Over 2200 ready to use bundles</li>
<li>Don't reinvent the wheel philosophy, Twig, Doctrine, Monolog ...</li>
</ul>
</section>
<section>
<h2>Components</h2>
<ul>
<li>Easy install via composer</li>
<li>Form</li>
<li>Dependency Injection</li>
<li>EventDispatcher</li>
<li>HttpFoundation</li>
<li>Console</li>
<li><a href="http://symfony.com/components">Other components</a></li>
</ul>
</section>
<section>
<h2>Working environments</h2>
<ul>
<li>Development</li>
<li>Production</li>
<li>Custom</li>
</ul>
</section>
<section>
<h2>Web Developer Toolbar</h2>
<p><small>Available in dev working environment</small></p>
<a class="image" href="http://symfony.com/doc/2.0/quick_tour/the_big_picture.html#working-with-environments" target="_blank">
<img width="600" height="321" src="img/php_startit/web_debug_toolbar.png" alt="Meny">
</a>
</section>
<section>
<h2>Request & Response</h2>
<p><small>How it works?</small></p>
<a class="image" href="http://symfony.com/doc/current/book/http_fundamentals.html" target="_blank">
<img width="600" height="321" src="img/php_startit/http-xkcd.png">
</a>
</section>
<section>
```
<section data-markdown>
<script type="text/template">
## Build around HTTP protocol
It is all about Request and Response
```
$kernel = new AppKernel('dev', true);
$kernel->loadClassCache();
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
```
</script>
</section>
</section>
<section>
<h2>The Symfony Application Flow</h2>
<p><small>From request to response</small></p>
<a class="image" href="http://symfony.com/doc/current/book/http_fundamentals.html" target="_blank">
<img width="690" height="273" src="img/php_startit/request-flow.png">
</a>
</section>
<section>
<h2>Robust</h2>
<p>Recommended for large projects</p>
</section>
<section>
<h2>Not very easy to learn</h2>
<ul>
<li>Steep learning curve</li>
<li>Good documentation on the other hand</li>
</ul>
</section>
<section>
<h1>Laravel</h1>
<h3>The PHP Framework for Web artisans</h3>
<p>
<img src="img/php_startit/Laravel_logo.png" alt="Laravel logo" title="Laravel logo">
</p>
<p>
<small>Created by <a href="http://web-development-php.com">Tihomir Opačić</a> /
<a href="http://twitter.com/tihomiropacic">@tihomiropacic</a>
</small>
</p>
</section>
<section>
<h2>Under the hood</h2>
<p>
Minimum requirement: PHP >= 5.3.7
</p>
<p>Uses the best PHP has to offer</p>
<p>PSR-0 and PSR-1 standards</p>
<p>Decoupled framework based off Symfony framework</p>
<p>Composer dependency management system</p>
</section>
<section>
<h2>Community Centric</h2>
<p>Friendly community</p>
<p>Great free and paid resources</p>
</section>
<section>
<h2>Documentation</h2>
<p>Solid documentation</p>
<p>Great Literature (7 books in last year)</p>
</section>
<section>
<h2>Supports different programming design patterns</h2>
<p>Based off MVC</p>
<p>CQS or CQRS</p>
<p>Domain-driven design</p>
<p>Repository Pattern</p>
<p>Event Driven Architecture</p>
</section>
<section>
<h2>A Great Tool</h2>
<p>Great for rookies</p>
<p>Support you as you grow as a programmer</p>
<p>Great for seniors, too</p>
</section>
<section>
<h2>Highlights</h2>
<p>Soft learning curve</p>
<p>Intuitiveness</p>
<p>Superhero hapiness at work</p>
</section>
<section>
<h1>Questions?</h1>
</section>
<section>
<h1>The end</h1>
</section>
</div>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.min.js"></script>
<script>
// Full list of configuration options available here:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
center: true,
mouseWheel: true,
theme: Reveal.getQueryHash().theme, // available themes are in /css/theme
transition: Reveal.getQueryHash().transition || 'default', // default/cube/page/concave/zoom/linear/fade/none
// Optional libraries used to extend on reveal.js
dependencies: [
{ src: 'lib/js/classList.js', condition: function () {
return !document.body.classList;
} },
{ src: 'plugin/markdown/marked.js', condition: function () {
return !!document.querySelector('[data-markdown]');
} },
{ src: 'plugin/markdown/markdown.js', condition: function () {
return !!document.querySelector('[data-markdown]');
} },
{ src: 'plugin/highlight/highlight.js', async: true, callback: function () {
hljs.initHighlightingOnLoad();
} },
{ src: 'plugin/zoom-js/zoom.js', async: true, condition: function () {
return !!document.body.classList;
} },
{ src: 'plugin/notes/notes.js', async: true, condition: function () {
return !!document.body.classList;
} }
// { src: 'plugin/search/search.js', async: true, condition: function() { return !!document.body.classList; } }
// { src: 'plugin/remotes/remotes.js', async: true, condition: function() { return !!document.body.classList; } }
]
});
</script>
</body>
</html>