PHP
Article

ZgPHP Report – What We Learned

By Bruno Skvorc

Last week was WebCamp in Zagreb, Croatia. It’s an enormous free-to-attend conference dedicated to web technologies. ZgPHP was part of that, as we’d already announced in our ZgPHP post not so long ago. The one-day PHP-oriented sub-conference took place at a different, slightly smaller venue.

Opening

I got there early in an effort to mingle, and after infusing myself with some coal-black coffee and picking Ross Tuck’s brain, we were welcomed into the speaker’s hall. With no technical difficulties in sight and a fully respected schedule, the conference was declared open.

Talks

The talks were highly versatile, ranging from theory and recaps of experiences to actual code implementation and design patterns.

Ultra mega rapid development, a startup in 24 hours

Tony Mrakovčić from Degordian had the first slot on the stage. He focused on the positive and negative experiences of having an impromptu team of people try and build a startup in 24 hours from scratch, including the name, domain, design, SEO and other meta stuff, alongside development. Oddly, they chose the outdated Yii as an underlying framework.

He talked about the chaos, fatigue, version control problems (it seems ultra rapid development on a decent sized team implies multiple people working on the same file sometimes), imbalance between front end and back end manpower and the difference such an imbalance makes, and much more. He wrapped things up with a short artsy atmosphere video the footage of which was being shot during these 24 hours.

HIVEPEEK AFTER MOVIE from Degordian on Vimeo.

The end product, HivePeek, was fairly decent considering it was all done in a single day, but the entire endeavor still couldn’t be called a product success – though it did seem to be a team success: they realized it was great way to not only team-build, but also see how well people perform under pressure.

HHVM and Hack: Might These Be The Droids We Are Looking For?

This being a very interesting topic we’ve explored to a fair extent on SitePoint already with posts like these and these, I eagerly awaited Nikola Plejić’s talk hoping I’d get some more insight into matters we hadn’t covered yet. I wasn’t disappointed – while the gist of the talk was basic, after a short history recap of HHVM, Nikola did go into some interesting depth. We were shown HH byte code generated from PHP functions when using HHVM, introduced to Hack modes of operation and some use cases for its advanced features like type aliases, shown how it does lambdas right, and more.

Nikola wrapped up the talk by linking to a repository of his containing

…a really simple Docker container for playing around with Facebook’s HHVM / Hack.

The slides of his talk are available here.

Lets do Events

Robert Šorn from Trikoder introduced the audience to Event Driven Programming, demonstrating everything on actual code and diagrams of a webshop his company built. I had never done any Event Driven Programming in PHP, not in the true sense of the word, so learning from his experience and perspective was a fun ride.

Unfortunately, his slides aren’t available at this moment (edit: his slides are now up here), but we did learn that Symfony’s EventDispatcher is worth its weight in gold if you’re aiming for Events in your application.

Partially off topic, if you’d like to see an interesting Event Driven Framework that’s just now coming to fruition, check out the Webiny Framework, the basis of an upcoming CMS we’ll soon have more to say about.

Getting paid to play with new technologies

In this short talk, I described the work process at SitePoint and called upon people to join us either as readers or authors. I explained the various perks one can get as an author and tried to squeeze some community data into the talk, too. There’s not much point in rehashing it here – regular readers of SitePoint will be familiar with our bi-monthly call to action, and will have known about the IDE survey results which provided some interesting community insight.

If you’re interested, the slides are here.

Symfony2 + AngularJS

In a somewhat rehashed talk from PHPSummerCamp, Antonio Perić from Locastic described the process of building a web application that’s equal parts Angular and Symfony. Instead of APIfying the Symfony app completely, they opted for a hybrid that neither does away with the Twig engine, nor refreshes the entire page to load new data.

I personally feel like that’s an interesting approach, though I’d never take it – an SPA should, in my opinion, have the front end either fully decoupled from the back end and communicate through API, or both bound into one maintainable whole. I’d have to see the code in more depth, but right now I’m not sold on the concept. Although I do like both Symfony and Angular, I’m not as fond of their child as such.

Shifting Gears With Gearman

Srđan Vranac talked us through Gearman, a topic we’ve touched on before, though in no noticeable depth. His intimidating stage presence was nothing if not reinforced by firm arguments or humorous sarcasm after every slide, and he drove the point home well.

In between musings about the CAP theorem, order reliability and job queues, he also taught us that Gearman was an anagram of Manager, and that it did roughly the same kind of work: delegation and not much more.

His slides are available online.

The power of ESI and HTTP Cache for performant page delivery

Ivo Lukač of Netgen and PHPSummerCamp fame came in to talk about eZ Publish and its implementation of Symfony’s HTTPCache and ESI to reduce the expense of invalidating an entire cached page. Caching in eZ is reaching a new level in the upcoming (and currently newest) version. Seeing as it’s based on Symfony components, you’ll best grasp the concepts if you read through the aforementioned links.

If you’re a regular reader, you might also remember his post about why you should choose eZ for your next CMS based project.

HTTP & Your Angry Dog

Last but not least, Ross Tuck of, well, Ross Tuck fame took the stage. Apart from being a terribly entertaining individual, Ross also seems to know something about etags or some such…

Joking aside, his introduction into the world of HTTP headers was truly enlightening. I never really gave them much thought, but when Ross showed us some use cases for the tags we take for granted most of the time, I noticed the potential gains, particularly cache-wise, in heavily utilizing them. He talked about the dark side of including file extension and query param support in your API endpoints, how to avoid this temptation with Accept headers and Content-Types, how to tell the server about the level of preference for a specific content type, Vary headers, and other sorcery.

As this is one of his most popular talks, the slides are readily available here.

Wrap-up

With a raffle at the end giving out PhpStorm licenses and Github passes to random audience members, the ZgPHP one-day conference drew to a close. It was interesting and refreshing to be a part of this somewhat tightly knit community of developers and enthusiasts, particularly in the after hours when a local brewery brought out the more interesting discussions, and I’m looking forward to joining them next year for the entire WebCamp event.

  • Antonio Perić

    Regarding my talk, I told at the beginning that the simplest and the most clean way is to separate this two things but this approach allows you to take best from both worlds. This concept for sure has a lot of pros and cons but idea is to make this two worlds to work together in best way they can. If you are interested I can write more about that as guest post at sitepoint.

    Best,
    Antonio Peric

Recommended
Sponsors
Because We Like You
Free Ebooks!

Grab SitePoint's top 10 web dev and design ebooks, completely free!

Get the latest in PHP, once a week, for free.