Joomla in a Box – A Vagrant box for local Joomla developmentJoomlatools
Joomla developers and agencies face the same challenges everyday. Testing their extensions against different Joomla versions, bugs that only happen in certain PHP versions, telling people "works on my machine" over and over again...
What if we didn't have to suffer all this? What if it took 5 seconds to set up a new Joomla site or 2 minutes to test a new PHP version? And what if all your coworkers had the exact same setup as you do?
In this presentation, we introduce Vagrant, a virtual machine manager, and walk through the benefits of using it for development. The slides take you through the different steps to setup a complete local Joomla environment in just minutes, install a site and install an extension from Git. At the end we also include information of the different productivity tools that are installed in the box.
If you develop with Joomla locally then this presentation is one you shouldn’t miss out on. Happy coding !
[JEEConf 2015] Lessons from Building a Modern B2C System in ScalaYuriy Guts
Whenever a functional language is mentioned, everyone talks about typical applications like DSL, parsing, data mining, or scientific computing. But what about mainstream consumer-facing applications? Can you build your next project with Scala? What if your system must run in the cloud, on desktop computers, and on specialized hardware, can you still do it? We’ll share our experience of implementing such a system for a German fitness startup that utilized custom-built devices, biometrics, cross-platform integration, and, of course, Scala. We’ll discuss the challenges we ran into and pitfalls you can avoid when your team decides to go functional.
Joomla in a Box – A Vagrant box for local Joomla developmentJoomlatools
Joomla developers and agencies face the same challenges everyday. Testing their extensions against different Joomla versions, bugs that only happen in certain PHP versions, telling people "works on my machine" over and over again...
What if we didn't have to suffer all this? What if it took 5 seconds to set up a new Joomla site or 2 minutes to test a new PHP version? And what if all your coworkers had the exact same setup as you do?
In this presentation, we introduce Vagrant, a virtual machine manager, and walk through the benefits of using it for development. The slides take you through the different steps to setup a complete local Joomla environment in just minutes, install a site and install an extension from Git. At the end we also include information of the different productivity tools that are installed in the box.
If you develop with Joomla locally then this presentation is one you shouldn’t miss out on. Happy coding !
[JEEConf 2015] Lessons from Building a Modern B2C System in ScalaYuriy Guts
Whenever a functional language is mentioned, everyone talks about typical applications like DSL, parsing, data mining, or scientific computing. But what about mainstream consumer-facing applications? Can you build your next project with Scala? What if your system must run in the cloud, on desktop computers, and on specialized hardware, can you still do it? We’ll share our experience of implementing such a system for a German fitness startup that utilized custom-built devices, biometrics, cross-platform integration, and, of course, Scala. We’ll discuss the challenges we ran into and pitfalls you can avoid when your team decides to go functional.
2. routes.php
In /routes/web.php introduceti ruta urmatoare :
Route::get('about', 'AuthorsController@about');
Aceasta ruta va lega pagina/vederea ‘about’ de metoda about a
controller-ului AuthorsController
3. • Incercati sa vizualizati pagina about:
http://localhost/laravelproj/public/about
Si veti obtine eroarea:
Aceasta erore nu da nici o informatie depre cauza erorii.
Pentru a obtine mai multe informatii despre eroare, modificati numele fisierului:
.env.example ->.env, vizualizati din nou pagina about si veti obtine:
4. Crearea controller-ului
• Pentru a crea un controller din dinia de comanda putem utiliza
utilitarul laravel artisan astfel:
C:xampphtdocslaravel11> php artisan make:controller AuthorsController
Astfel s-a creat controller-ul: AuthorsController
5. • Pentru a crea un controller simplu, fara metode predefinite:
C:xampphtdocslaravel11> php artisan make:controller AuthorsController -- plain
Astfel am creat controller-ul:
<?php namespace AppHttpControllers;
use AppHttpRequests;
use AppHttpControllersController;
use IlluminateHttpRequest;
class AuthorsController extends Controller {
//
}
?>
6. • Pentru a afla optiunile comenzii make:controller putem scrie:
C:xampphtdocslaravel11> php artisan help make:controller
Vom crea o metoda ‘about’ in controller astfel:
<?php namespace AppHttpControllers;
use AppHttpRequests;
use AppHttpControllersController;
use IlluminateHttpRequest;
class AuthorsController extends Controller {
public function about(){
return 'About page';
}
}
Vizualizand pagina ‘about’ vom obtine:
7. • Daca dorim sa legam metoda about de vederea ‘about’ vom scrie:
public function about(){
return view(‘pages.about’);
}
• Acum vom crea directorul pages in /resources/views si in acesta
fisierul about.blade.php:
<!DOCTYPE html>
<h1>About .......</h1>
<p>bla bla..........................</p>
Astfel: http://localhost/laravelproj/public/about va genera:
8. Trimiterea de valori vederii
• Editati controller-ul AuthorsController astfel:
class AuthorsController extends Controller {
public function about(){
$name="Popescu Bogdan";
return view('pages.about')->with('name',$name);
}
}
9. Utilizarea valorii trimise in vedere
Editati vederea about.blade.php astfel:
<!DOCTYPE html>
<h1>About <?php echo $name;?></h1>
<p>bla bla..........................</p>
Astfel: http://localhost/laravelproj/public/about va genera:
10. • De exemplu, sa editam controller-ul astfel:
class AuthorsController extends Controller {
public function about(){
$name='Popescu <span style="color:red">Bogdan</span>';
return view('pages.about')->with('name',$name);
}
}
Vederea about.blade.php va fi:
<!DOCTYPE html>
<h1>About <?php echo $name ;?></h1>
<p>bla bla..........................</p>
Si vom obtine numele scris cu rosu, deoarece variabila {!! $name !!} nu
face escaping!
11. • In cazul in care vom face si escape la datele de input , vom edita
vederea astfel:
<!DOCTYPE html>
<h1>About <?php echo $name;?></h1>
<p>bla bla..........................</p>
si vom obtine:
12. Trimiterea unui array in vedere
• Pentru a trimite un array, vom edita controller-ul astfel:
public function about(){
$name='Popescu <span style="color:red">Bogdan</span>';
return view('pages.about')->with([
"nume"=>"Popescu",
"prenume"=>"Bogdan"
]);
}
13. • Pentru a utiliza ambele variabile vom edita vederea astfel:
<!DOCTYPE html>
<h1>About <?php echo $nume.” “.$prenume;?></h1>
<p>bla bla..........................</p>
si vom obtine:
14. • O alta modalitate de a trimite un array este urmatoarea. Editati controller-
ul astfel:
public function about(){
$data=[];
$data["nume"]="Popescu";
$data["prenume"]="Bogdan";
return view('pages.about', $data);
}
}
Astfel vom obtine:
15. Alta modalitate de a trimite mai multe date vederii este:
public function about(){
$nume="Popescu";
$prenume="Bogdan";
return view('pages.about', compact('nume', 'prenume'));
}
}
si vom obtine acelasi output: