Chapters
33 Chapters
|
3:02:08
|
Login to bookmark this video
-
Course Code
Subscribe to download the code!Compatible PHP versions: ^7.2.0
Subscribe to download the code!Compatible PHP versions: ^7.2.0
-
This Video
Subscribe to download the video!
Subscribe to download the video!
-
Subtitles
Subscribe to download the subtitles!
Subscribe to download the subtitles!
-
Course Script
Subscribe to download the script!
Subscribe to download the script!
12.
Immediately Invoked Function Expression!
Scroll down to the script below, click on any sentence (including terminal blocks) to jump to that spot in the video!
Subscribe to jump to this part in the video!
Keep on Learning!
If you liked what you've learned so far, dive in! Subscribe to get access to this tutorial plus video, code and script downloads.
This tutorial uses an older version of Symfony... but since it's a JavaScript tutorial, the concepts are still ? valid!
What PHP libraries does this tutorial use?
// composer.json
{
"require": {
"php": "^7.2.0",
"symfony/symfony": "3.1.*", // v3.1.10
"twig/twig": "2.10.*", // v2.10.0
"doctrine/orm": "^2.5", // v2.7.1
"doctrine/doctrine-bundle": "^1.6", // 1.10.3
"doctrine/doctrine-cache-bundle": "^1.2", // 1.3.2
"symfony/swiftmailer-bundle": "^2.3", // v2.4.0
"symfony/monolog-bundle": "^2.8", // 2.12.0
"symfony/polyfill-apcu": "^1.0", // v1.2.0
"sensio/distribution-bundle": "^5.0", // v5.0.22
"sensio/framework-extra-bundle": "^3.0.2", // v3.0.16
"incenteev/composer-parameter-handler": "^2.0", // v2.1.2
"friendsofsymfony/user-bundle": "~2.0@dev", // dev-master
"doctrine/doctrine-fixtures-bundle": "~2.3", // v2.4.1
"doctrine/doctrine-migrations-bundle": "^1.2", // v1.2.1
"composer/package-versions-deprecated": "^1.11", // 1.11.99
"friendsofsymfony/jsrouting-bundle": "^1.6" // 1.6.0
},
"require-dev": {
"sensio/generator-bundle": "^3.0", // v3.1.1
"symfony/phpunit-bridge": "^3.0" // v3.1.6
}
}
4 Comments
Hey there! This year I've been trying to relearn everything from scratch with the help of you guys. Since most of the projects I've done had to be done in a very tight time frame and with very little budget, leaving me little to no room to "properly" learn things. After finishing the PHP courses, the namespace bonus one and Composer, I've come to go through javascript- I have very little to no javascript experience and while it is "okay" to follow this course, it gets very complicated very quickly. While I can understand core concepts, I feel like I don't quite hit the mark if I finisih this course.
Also making functions to calculate something on the fly *feels* wrong, is this really how it's done in the "real world"? I would've expected that we eventually use functions to get the new weight lifted from the database, to get accurate numbers- I mean these are not wrong, but we're rewriting a logic that could be solved by a simple databse query or am I wrong?
More rambling than question(s), but hey :D
Hey Deniz,
Oh, I see what you mean! Well, first of all, our JS courses are meant that developers already have some strong basic knowledge about JS, i.e. like how it works, the basic syntax, i.e. can already write code in JS. In these tutorials we just mostly show how to improve your code quality. If you know what I mean. So, if you want to learn JS in more deep with basics - I'm afraid we don't have a good course on SymfonyCasts for you yet.
That's a good question... and as always it depends on your own project! First of all, when we're counting with JS on the frontend, and about "counting" I mean doing any heavy operations actually - those operations are done on the *client* side, and so it cause no performance hit for your *server* side. But counting with SQL query would hit both your PHP server and SQL server. We just gave a possible example here, but depends on your business you might want to go a different approach. And another reason why it's done this way - complexity. With calculating on the fly we don't have to send any AJAX requests and then handle possible success / failure cases. So, for learning purposes in this exact spot it works well, but you should definitely look at your own case and see if it fits your needs or there should be a better solution for it.
I hope this clarify things for you a bit and I hope this helps!
Cheers!
Hi,
Thanks for the video, just to tell you there is a problem with subtitles at the end of the video
Hey Mickaƫl M.!
Thanks for letting us know - that happens occasionally with a service we use - we'll get it fixed up!
Cheers!
"Houston: no signs of life"
Start the conversation!