 Oh, it's nice when it works. Right, so Magento, hopefully you've heard of it. It's made some impact, I think, over the last few years. And recently, we released the first major version since it was introduced, the first new major version. I got fans everywhere. So this is not actually a talk on PHP Bolt and Nano Server on Hyper-V on your laptop or Azure Cloud. As was noted, there's been a bit of a switch up just because one of our speakers had issues with the whole immigration thing. So thanks for inviting me to be here. I appreciate it. I gave a tutorial yesterday. But it's always good to evangelize, given that I'm Magento's evangelist. So I came from the development world, where I was working for an agency in the States that specializes in Magento development. And my agency has actually grown a lot. It started in 2008. That's my contact information. I'll put it up there again. But always feel free to reach out to me. Time for class to change. And this concludes the Magento presentation. I speak a lot, but this is actually a first for me, I think. And I would like to call out Davey Schaffek, who probably just wanted to miss this presentation. And so he pulled the fire alarm. Is everyone remaining calm? I can't tell. It sounds like it's getting softer. The fire is slowly. Oh, is that it now? Yeah, I can hear it now. Well, I'm just going to keep talking. And if anyone smells smoke, just raise your hand and I'll run out the door. If you see me running, everyone follow me. Right. So does this work? Yeah, I like this better. So well, the sound guy's in the booth, so he probably knows what's up. Anyway, so for Magento, there we go. Crisis is over. So I started working with Magento in 2008 and joined a company. I was employee number one. And I left that company a couple years ago to actually join Magento itself. And that company is now 160 or 130, 140 people. The company's done quite well. As have many companies, many people have made colleagues that have multimillion-dollar businesses based on Magento. Just developing for Magento. So Magento started out in, not 12, 7, that actually should say 12, 6. And I'm a professional, so I'm going to change that right here right now. It's kind of like test-driven development. It's sort of like failure-driven presentation. So yeah, so development started December of 2006. And was released on the end of March in 2008. And we had Magento 1 up until November 15th. I'm sorry, November 17th of 2015. So Magento 1 lasted quite a long time. And I think one of the things that is remarkable is that in that time, and what we have currently, 150,000 transacting sites and $50 billion a year flowing through Magento code base. That's actually a conservative estimate. So who here actually has worked with Magento before as a thing? That's good. Who really enjoyed the experience? Couple of sympathetic hands up in the back. I appreciate the support, gentlemen. I remember actually, so this was one of those interesting things, like when I started out, I remember, but especially back in 2008, there just wasn't a lot of support. It was a small company that built the system in the first place. And documentation was the thing that suffered the most. And that was unfortunate because it really would have benefited from some documentation. So there were just a lot of knowledge gaps. And it was something that I think no one had ever seen before in the PHP world was this very Java-esque approach to a framework. So I always like to give that little introduction to say that Magento is, it is just a PHP framework. Now, just like every framework, it has opinions about how things should be done. And the nice thing is, it's open source. And that's both the community version, which is free, and the enterprise version, which is licensed. You're just expected to pay for it. The PHP MVC implementation in Magento is its own, right? It doesn't follow the conventions of Zend, doesn't follow Symphony, does its own thing. And as a framework, it was built to be extensible. And that extensible modular approach is how the application, the e-commerce application, was built, right? So when you're working with Magento, whether it's Magento 1 or Magento 2, you're actually working with something that can be used for something entirely other than commerce. There are some other aspects there. I mean, internationalization, the ability to host multiple sites, multiple themes. But really, the pivotal feature for Magento and I remember, because I got my start doing OS commerce. And who here has worked with OS commerce? Who here enjoys that experience? I'd say it's pretty awful, because OS commerce, the problem is you can't really do much with it. And well, there's always the concern like, well, if we make this change here, we'll never be able to upgrade. Of course, it was stuck at 2.2 for a decade. But Magento was built to be customized. And the reason for that is because commerce is always custom, always. Now, Magento out of the box allows you to configure things pretty well so that you may not actually have to get programmatic in order to affect the customization. But very often you do. You just need to get down to the programmatic level to make some changes. And Magento allows you to do that. Another benefit of using Magento is the third party marketplace. That's basically the ability to leverage other people's work, other people's code to get stuff done quickly for clients. Now, so Magento 2, I mean, I'm a big fan of Magento. And the jump to Magento 2 was a little bit tough for me as well. And that's someone who has been teaching Magento development to developers for years. And that's because Magento needed to grow up. You saw the timeline up there. And that timeline basically says that Magento was about eight years old by the time we started getting Magento 2 out the door to people. And think about how much development, how much even just online commerce has changed in eight years. So all of us siloed Magento developers, all of a sudden we had to catch up with what our core team did at Magento to modernize the application for how developers are used to working today. So some of the goals of Magento 2 were to deal with areas where the application could improve in terms of performance, scalability, and really just to deal with some of the antiquity of Magento 1. So things like people expect to test their work. They expect to use Composer. They want to leverage other things that other people are doing even outside of the commercial space. They don't want to be dealing with this highly coupled system. And they sure as heck would like documentation and education to be available. So one of the things that you should know about Magento is Magento has a fantastic, absolutely fantastic community, very much driven by open source ethos. You're going to be kidding me. Thank you. We could have literally just gotten up for this half hour that this person wasn't speaking and just told jokes. It would have been great. OK, sorry. So to bring it back, I have no segue from the voice in the sky. To bring it back, Magento benefits a lot from open source. We have, I've never seen anything like it. It's not even just the developers sharing their work with each other and getting together and hosting hackathons, putting on events around the world makes my job very easy. I just have to show up. It is agencies, even competing agencies, calling each other and just sharing market information, passing off work to other competing agencies when they're too busy. This kind of ethos really infuses the entire Magento ecosystem. And it's something that you can see if you start following, if you jump on Twitter and start following a few of the Magento personalities. You'll see this right away. So we tapped into that for Magento 2. So we accepted pull requests, comments, issue, filing on GitHub. We hosted forums for developers to actually come and attend and work alongside with our team and give us direct feedback. We also worked with the end users of the system, customers and store administrators. We did heat maps and all sorts of interesting UX stuff to improve the user experience. And of course, we hired technical writers. It's actually if you have technical writers on staff, you're a lot more likely to actually get documentation written. It's a lovely thing, highly recommended. And we also built in performance acceptance criteria for our core developers. So they weren't allowed to contribute code that slowed things down. So that's just a little cultural introduction. So here is Magento 2 at a glance. Module structure. So if you've ever wondered about Magento development or had a quick touch with it for a job requirement, it's not rocket science here, right? It's kind of MVC stratification, unit test folder, composer manifests. It's pretty easy stuff. That's it. There are no dragons, no evil things in there. Just PHP code, so a lot of XML. We like declarative configuration. And yeah, there's one thing that you have to know, though, for Magento 2. We put a premium on decoupling code. So everything is all the dependencies are injected via constructor injection. That can be a dogmatic discussion, for sure. That's how we solved it. And then we wrap the whole thing in an architecture that uses XML that allows you to adjust the actual class instances that are passed to each other. You can also adjust parameters that are passed in to constructors via this XML configuration system. And the really interesting thing is this exposes a way to change how the core code functions. And as long as you follow proper implementation of interfaces, things just work. It's quite an interesting system. So one of the ways that you affect customizations in Magento, both Magento 1 and Magento 2, is through an event system. So events are just designed to say, hey, if you're really far way down deep down in an execution stack, and this is the kind of thing where you may need to register something that's happened with an external system or with some kind of logging mechanism or something else, or just trigger some custom code. It's a very easy system for observing that something has happened and also getting the details about what has happened. The example I gave in my tutorial yesterday, which was filmed and which will be online, is add to cart process. You can imagine if someone goes to a product page and adds a product to the cart, all of a sudden there's data being attached to a session. Maybe if they're logged in, this is also involving the customer object. Well, this stuff is then passed in context to this system that can be consumed very easily by your code and directly. It's nice because you don't have to somehow finagle your way down into this call stack. But the preferred way of doing customizations in Magento 2 is via plugins. So plugins are an interceptor implementation. What they do is they turn every public method in the code base into a hookable flow of execution. So you can execute custom code before a public method, after or around. And by your silence, I can tell you're all very impressed. It is a way. It's actually a way forward for us to work on a potential multi-tenant solution. It's a very powerful customization mechanism, which means people are going to use it for all sorts of evil stuff. We just trust that developers will be astute in their use of this. And if you ever have to take over a Magento 2 site, you'll want to go and check and see what people are doing through this plugin system. Now, one of the things you have to know if you're interested in getting into Magento 2 is that events, this plugin system, they're all actually part of how core code functions as well. So we don't have these just for third party customization. We actually use this internally to keep things nice and decoupled among modules. One other thing to know is that this is all affected through aspect-oriented programming, which is to say, once you start placing some of this configuration for plugins into your system, we actually have a compilation process where we will generate entirely new class definitions from this stuff. The nice thing is those materialized classes are stored right there for you, and they're commented with where that generated code comes from. Another thing that we added in Magento 2 is UI components. UI components are just their combination of front-end templating, JavaScript, client-side elements, essentially that allow you to do things that the canonical example would be like a products grid in the admin, where just with some simple configuration and the presence of some specific classes, you end up with this highly functional grid. It provides a ton of functionality. Admins can actually add attributes about products to this grid. They can sort it. They can filter it. They can even save those views. And you just get all of that just by choosing to use the UI components. Another thing that you get is a highly optimized communication. So you're not re-rendering an entire view anytime someone applies a filter. You're just exchanging the data that drives that view in a client. Oh, and we just had a documentation sprint in our Kiev office, and we're actually going to have documentation for the UI components pretty soon, like next week, I think. So I will say, our community keeps us honest. We just had a pull request, because the description for UI components was that it's an easy, basically it's an easy user interface customization. And one of our most noteworthy community members submitted a pull request that just removed the word easy. It was really funny, but also really painful. And I share that story with you just to say, I really don't want to get up here and pretend that Machento is the best thing ever, which it is. But it is a great tool. It's a powerful tool. Machento 2 is less than a year old, and our community is giving us a ton of feedback that is making it materially better every single sprint. And we value that. So one more little thing to talk about is our command line tool. So you can imagine, and something as big as an e-commerce application, there are a lot of tasks which developers have to do. So we actually built this tool for some of the regular tasks that you have to do as a developer just as part of the framework. Maybe you're doing some development, you need to clear out some caches, or you need to enable or disable modules, run upgrades, grips, et cetera. And this command line tool is just built on the, I think, pretty well-known Symphony 2 component. And the great thing about it is it's extensible. So you as a developer, if you want to build an extension, by the way, which I highly recommend, because it'll tie in to our brand new App Store marketplace with high quality extensions, you can actually release your extension with, you can release your extension with lots of, basically with any kind of command line tool, command line functionality that you want and hook into the system. So let's see, yeah. So we're fully decoupled. We have tests. We actually have tested code now. We have unit tests, functional tests, integration tests, ships with the core. And we're adding more test coverage regularly. So it is now a best practice to actually cover your custom code with tests as well. It was not very straightforward in Magento 1 just because of its architecture. Again, 2007, people weren't really testing their code. Maybe if your last name was Bergman or something. Native full page caching. So this is in our community edition. It used to be an enterprise feature. But that's actually there's a native varnish implementation. And we actually have a PHP analog for that for development so that you're not having to do a lot of DevOps stuff to actually visualize changes. We have a service layer, which is there are a couple of complete examples in the core code. We'll be adding more service layer coverage to the rest of the modules over time. But what this is, it's a mechanism through which you can have a common API for web services. You can also use that same API for data just internally natively on your server. And then for scalability, we separated scalability concerns to our enterprise product. And those scalability concerns are affected through things like being able to use a separate database for checkout and via message queuing protocol with RabbitMQ implementation. And EE, of course, comes with other features. Now we also have that we just announced a platform as a service product, which is the enterprise version. There is only one. But we handle all of your infrastructure with CDN, diagnostics, analytics, and hosting on AWS. So the community resources. Again, community is our biggest and best resource. And the community resources at your disposal, I will full disclosure, I use these tools regularly to help myself. In fact, I was using one of the vagrant images that I'll have, vagrant files, which I have linked. On the next slide, I was using that in my tutorial yesterday. So we have kind of the godfather of our community, Alan Storm. And Alan Storm has done a very good job. He has several scholarly articles on Magenta II architecture. So he is an absolute must read. Alan Kent is our Australian chief architect. Fantasticly nice guy, brilliant. We got him from the eBay search team. And he's pretty a prolific blogger. So his blog is full of useful content. Our documentation lives on devdocs.magento.com. That actually, and if you go there, you'll actually see that the pages have an edit this page link. You can actually click on that and submit pull requests, because all of our documentation is hosted on GitHub. We also have education available. I've had it from day one for Magenta II. Some of it is online self-paced. Some of it is taught in person. And then, of course, we have our repository. So I would love it if everyone absolutely go right now and get going on Magenta II development. When you find a cause to get involved with Magenta II, we devote a lot of our engineering time to the feedback that we get through GitHub. So please, if you're getting going on Magenta II and you're having any kind of issues or questions, you can contact us there. You can also contact us at our community forum. And then, of course, there's my baby, the Magento Stack Exchange site. Getting started, highly recommend PHP Storm. It just seems to be the best IDE for Magenta development. And Gary, when you watch this video, I'll expect to check. X debug, you need to be able to step through the code. And in general, if you're doing PHP development and you're not doing step debugging, get on the train. You'll never look back. Our dev docs actually has a pretty thorough section on how to install Magento for different purposes, whether you want to contribute to the core code, or you just want to maintain an installation for yourself or your clients. There is also a fantastic tool. I recommend you create your own modules from scratch at least a couple times. But it's just a web-based module generator, magetougen.com. And it's open source, so you can actually fork the project. And if you want to contribute to it, you can. And then I also recommend FormatChapter 2 development, at least when you're starting out. Use one of the VMs. It saves you a ton of effort getting it set up. VM images that you might want to check out. I've just got some, I'm not really doing this for my own personal stats. I'm just doing this because the links are crazy to remember because there's like Ukrainian names and things. So we have a couple of different vagrant images, or I'm sorry, vagrant files that you can check out. And then there is a pretty well-known Docker image that folks are using, not intended for production. We are actually working on an official Magento 2 Docker image. And we're doing that with the Docker team. That's my contact information. I'm Ben Marks. I'm not supposed to be here. Thanks, guys. Thank you, Ben. Okay, well, we'll open the floor to some questions. If anyone has them. This is your best chance to ask the Magento evangelist. Any questions you have? Yeah, I'm literally getting on a plane tomorrow. Yeah. Anyone? Yeah, there we go. So the question is, is Magento still using Zen Framework components? We are fans of options. So not only are we using Zen Framework 1, we're using Zen Framework 2, and we're using Symphony 2. We couldn't figure out a way to shoehorn in Kodakniter or, you know, Laravel or any of the others. Any other questions? Yes, you down in front. Oh, no. Why Magento? Why not WooCommerce? Now, so there's an interesting discussion that I probably don't have time for. How much time do I have? Like 10 minutes? I've got 10 more minutes. Like five to 10. Five to 10 minutes. Well, let me tell you a little story. So one of the interesting things that you deal with in the world of commerce is, well, when mommy and daddy get together and they wanna have a commerce site, they get to choose. They get to, thanks, spotlight person. They get to choose a platform. Now, for a long time, Magento had, I think, one of the best taglines that it ever had, which was, it is the e-commerce platform for growth. And one of the cool things that you get with Magento, so in addition to, you know, this entire community of work that you can leverage, whether it's commercial or open source or, you know, freely available, is you do have this platform that can scale up. And I mean scale all the way up. You know, we're talking, you know, $100 million in a very short amount of time. Maybe not up to like Alibaba scale, but like so, WooCommerce is a good solution. I actually may be the worst evangelist ever because I won't say to someone you should always use Magento for everything. If you have a very small shop, a great example, when I was at the agency, we had a client come to us and she had been sold on the idea, she had a great product, she had been sold on the idea that she had to have Magento. And she came to us for our Magento expertise. And she had, is one product in five colors. And we just said, absolutely not. And I think we set her up on Lemonstand or big commerce or something. She had great margins, so it actually made sense for her to use one of the SaaS platforms because it just completely eliminated overhead. I mean, you know, open source, an open source commerce product, it can be free, but it's like the most expensive free product you'll ever have, right? So it takes effort, it takes care and feeding, you always want to make sure you have a good partner. But I will say this, you can only go so far on something like WooCommerce. Magento can pretty much cover low level, all the way up to the biggest of the big. And now with our platform solution, you can actually get really, really big. Most people though, they're in the small to medium business range, and we work pretty darn well there. That's been our bread and butter for a long time. So with that, does anyone have any other questions? I'm sorry, did we still have more? Yes. 1.9, community 1.9? Okay. So the question is, should you go from, if you're on 1.9, which is actually the last minor release, or the most recent minor release of Magento 1, should you jump to 2.0? 2.0, it's not a direct jump. So you have to rebuild your theme. The theme we had to make some fundamental changes there, so you'll have to re-implement your theme. And depending on how much custom code you have, those extensions won't port over. We do, excuse me, have some data conversion and even some code conversion tools, but it's not like push button. So the utility is there. My advice at this point is to wait, wait until you have, wait until you have enough of the new features being released for, I mean, we just released 2.1, which did introduce a lot of good, nice new features. But as we go down the minor release path, we'll be introducing more functionality, and that very well may kind of justify the budget of upgrading. So that would be my, that would be my advice. I have time for one more question, I think. Yes. What is, oh, we got a technical question. What is the implementation behind our ORM? Gosh. So it's actually an emerging story because I think we're actually going to evolve the ORM over time. Because right now we still, so, well, from a class hierarchy standpoint, we're actually using inheritance to provide, inheritance to provide our model functionality. But we want to move to more of a composition base, right? And in some places we have that. Now that's the mechanics, right? Wait, were you at the meetup last night? Were you at the PHP meetup last night? No, okay. So our implementation, gosh, data mapper. We are not, well, it's kind of a hybrid because we have a domain object, so you have your actual model layer, and this has business logic, and then that connects to a resource model which knows about the storage pattern. Because we have different storage patterns underneath, and then we have a collection which is actually kind of a, sort of a hybrid that takes both via composition. So think of like Java beans. The query story, the query story, so the question there or the statement was the, that basically it's an issue of queries. Magento uses a lot of queries. We really use a lot of queries. And a lot of this is because some of our objects, some of our elements, things like products, customers, they have arbitrary attributes depending on who store it is. And so we use EAV as a pattern for that. And that involves a lot of queries. We also index the absolute hell out of it so that you can read efficiently. But there are curious things that happen with writes. That's actually why Enterprise has a job queue. I'm pointing at the thing that's not there on the slide anymore. But we have a job queue that you can actually offload some of these during high availability times, you can offload some of this stuff so the queries can process over time. I think, is that the end of my presentation? That's the end of my presentation. Thank you guys very much. This was unexpected and fun. And now I'm gonna go have some more Lotus Bonds. Okay, bye-bye. If you guys have any more questions, you can catch him during lunch later. Now we have Prem Shree from Etsy.