McKenna Regets, Manager of Community Program, Pantheon Reading estimate: 8 minutes
Pantheon Hero Spotlight: Roy Sivan, Senior Software Developer at Disney
If you could have any superpower in the world, what would it be?
Most of us tend toward the more flashy powers, like flight, super strength, or invulnerability. Abilities that would make life easier.
Roy Sivan has a slightly different take. āMy favorite superheroes are non-superpowered people, people like Iron Man and Batman,ā he says. āPeople who are willing to use what they have to do good in the world.ā
In other words, Roy doesnāt want superpowers making his life easier. Instead, he daydreams about taking on even more challenges. That attitude definitely informs his work as a web developer. āI pick clients that are looking to build outside of the box with WordPress,ā he says. āIf you come to me with a challenge, Iām far more likely to take on the work.ā
Royās extraordinary ability to solve challenges with unconventional thinking has served him well: Heās a Senior Software Developer at Disney and highly regarded in the WordPress open source community, all of which made him an ideal fit for the Pantheon Heroes program. Projects like his Gutenberg object plugin have proven as useful as they are innovative.
We sat down with Roy to talk about innovation and collaboration, both as a solo developer and in building a WebOps team.
How did you end up where you are now? What kind of job did you want when you were growing up?
When I was a kid, I wanted to be a doctor or a lawyer. Mostly because thatās what my mom wanted me to be. When I was in high school, I got into animation. I was actually accepted by the Academy of Arts in San Francisco. I thought Iād go be one of the cool animators at Pixar.
But my high school physics teacher also got me interested in engineering, which seemed like a more solid career path. Still, I was into the creative side of things, too.
So I was studying engineering and building web sites on the side. Eventually, I realized I was having way more fun with my side gig than I was taking yet another Calculus class. So I switched to the business school, and incorporated my web development education into a marketing degree. And I was still taking on web dev projects on the side.
Eventually, I was making enough at the āside gigā that I decided to pursue it full time.
You started with WordPress in the very early days, right?
My first install was .7 of the beta. I really got into how easy it was to kick off a website for a client. They had the themes, plugins, and it was easy to put up a blog and throw some content on it. I got into pushing the boundaries pretty quickly, just seeing what all I could do with it.
Your Angular WordPress theme seems like a good example of boundary-pushing. How did that come together?
Right, that was a good example of using creative workarounds to get software to do what you want it to do. I called it a ātheme,ā but really itās not pulling much from WordPress itself. It was almost a headless WordPress implementation; we just didnāt have the vocabulary for that back then. There also wasnāt a WordPress API, either. So I was using Admin Ajax calls instead, and then AngularJS as the controller and ReactJS as the view layer.
So youāve had a successful freelance career, and now of course youāre working with teams at Disney. Whatās your advice for putting together a successful WebOps team?
For me, WebOps depends on putting the right people in the right places. If you can do that, you can build incredible projects.
As soon as you have more than two people on a team, you should be figuring out what each personās strengths are, and letting them work to those strengths. Youāre looking for just a little overlap, but not much.
For example, a great team would have someone who loves front-end stuff, someone who has a keen eye for pixel-perfect design, and someone who is really into building out back-end stuff. So that maps to one person handling the JavaScript, one doing the CSS, and one building the API. Thatās a very efficient team.
And yes, there should be some overlap, a little crossover as the team collaborates. That makes the project even better. That way, you can learn what you want to learn from each other, without having to take on a whole task thatās outside of your wheelhouse.
For a WebOps team to be efficient, you have to know a little bit of everything, but you should be able to focus on what youāre best at.
What got you interested in becoming a Pantheon hero?
I was sold on Pantheon ever since my first conversation with [Pantheon Co-Founder] Josh Koenig, at WordCamp in 2014.
I thought, āThis is what everyone should be doing.ā As I grew, and as I learned, I realized Pantheon was already four steps ahead. I feel like Iāve been trying to get people to realize that.
When I see people who are starting to do code, starting with Git for the first time, I tell them, āI know where you are right now because Iāve been you. So hereās Pantheon, and hereās the workflow. And I know itās a little hard to get used to, and you get annoyed because you canāt just install plugins on the live site, but thatās a good thing!ā
I know the workflow is just 1% of what Pantheon offers, but itās a huge aspect for what Iām working on. It just makes sense to me. Any time I have a client, any time Iām building a website, I say, āletās throw it on Pantheon, get the dev environment, and build up.ā
And it keeps clients from hopping in and breaking their own website. That dev workflow is what really sold me, and everything else has been a sugar coating.
Is there a dream project youāre waiting for? Something you really want to sink your teeth into?
I really want to build more stuff that uses WordPress as an admin. Headless. I want to see more projects that are like, āHey, we have a great content team that loves WordPress, but we want to do something really complicated with it, and we donāt think WordPress can handle it.ā
I want to dabble in things like React Native and phone application development with JavaScript tools, building something custom that someone could throw on their phone as an app, but itās powered by WordPress. Basically, I want something more advanced than just content.
Iām also interested in incorporating WordPress with other data sources. I want to build that.
And finally, Iām intrigued by highly interactive web apps, where users can log in and do something functional that canāt be done with a simple plugin.
Can you take us inside your development thought process?
Sure. It starts with a challenge, right? For example, the Gutenberg object plugin: that started with a challenge that came about when they updated the WordPress editor for WordPress 5.
The challenge was Gutenberg, the new editor, saves data in a way that is not helpful to developers who want to build something outside of the WordPress ecosystem. So if you wanted to build something outside of a general theme, it would be hard to do that with the way the data is set up and stored.
The challenge is, how do we take whatās there and make it more user-friendly. See, the way itās saved by default is with HTML. So when youāre in the new editor, you see blocks, and each block has its own settings for appearance. Theyāre all block settings. And in the end, that outputs to the front end through the WordPress theme. And then the theme takes over, styling the output based on those settings.
The issue is all of that is marked up in HTML, which is just flat text. Thereās no data there. So I thought, there has to be an easy way to go through each block, look at the settings for each block, and then manipulate that data. But, by default, thereās no easy way to do that.
The solution was to hijack Gutenberg and use the āSaveā command. When you save, the content goes into WordPress, but the plugin goes through all the blocks and stores all the data from each block, from REACT into a new database table that I create with my plugin.
I create a new table. Then I modified the API to include the endpoint, and to include the post data.
So, instead of just saving the post content, you get a new piece of data in that object that has the array of that Gutenberg data, saved as an array of objects and the data for those objects.
I achieved that with a little hijacking, a little creative coding. I store it in a place where I have solid access to it, and then spit it out where people would expect to find it, either by itself or with other post data.
Fantastic. Iāve seen that you have collaborated with people a bit on the plugin, adding features based on suggestions?
For sure. Anything I have put up on GitHub, Iām open to collaborating on. Ping me with an issue there, or ping me on Twitter with questions. The Gutenberg plugin has been pretty popular, and there have been some requests Iāve built out.
You have to choose wisely on those requests, though. For example, someone asked how they could get at one block, in particular. Thatās tricky, because the way Gutenberg stores blocks, each block has a UID, but it gets resaved every time you hit āSave.ā That was a fun challenge.
I had to go in, add a new piece of data to each block, a stagnant ID, and that allowed me to go in and grab each block individually. So that was a request that came to Github, I created it and tested it, and we added it to the core plugin.
On the other side, there was someone who requested basically the reverse of what the plugin does now. They requested the ability to save Gutenberg data using the plugin, pulling it from elsewhere and storing it in the database, so when the editor loads up, that dataās already there.
But I could see that would lead to two editors editing the same content. There wouldnāt be version control, and it would have caused more problems than it solved. So, in the end, I chose not to take on that challenge.
Part of the development process is seeing challenges for what they are, and choosing which ones to take on. Itās not just about what you can do, itās about what you should do.