More efficient programming with Hyva_Admin


Faster, more efficient programming and thus more time for finding solutions to exciting and challenging problems in e-commerce? Probably the dream of every (Magento) developer.

But is it that simple? On 12 February, the public launch of the commercially available version of Hyvä Themes was presented at a relaunch party. Vinai Kopp, a long-time Magento developer and creator of Hyva_Admin, was one of the speakers at the party. With his new approach to the Magento backend, he has made the dream more feasible for everyone.

Please introduce yourself briefly

My name is Vinai Kopp, I live near Heidelberg in the Neckar Valley and have been a freelance developer since 1998.

I've been working with Magento for what feels like forever - I think since 2008, because my first shop went live around the beginning of 2009. In between, from 2011 to 2014, I was even employed by Magento and worked for the training and certification department. I was part of a team there and included in the organisational chart under the people in California, but was the only employee in Germany. However, that was at a time when Adobe had not yet joined Magento and the construct only worked because Ebay had an office in Berlin at that time.
Actually, what I did during my time at Magento was "business as usual", but I had a hard time getting into the company processes that were common there, so I finally decided to become a freelancer again after all.

As a freelancer, I support agencies with projects and many smaller retailers with teams between 2 - 10 people. For a certain time, sometimes months, sometimes years, I support them in the development of online shops until their migration. And I train the staff until I have made myself redundant :-). By the way, I still give trainings for Adobe/Magento, only now as a contract trainer.

It was never planned that I would do Magento for so long, but it just happened that way and was always OK. And now, of course, with Hyvä, it's super exciting again and you can feel the fresh wind, which ties it back to how it used to be.

Why did you develop Hyva_Admin?

With the introduction of Magento 2, I turned away from frontend programming a little. Somehow I didn't enjoy it any more. And instead of trying out a new solution, I just muddled through with the existing offering if need be.

And then I saw at the Reacticon what Willem (note: Willem Wigman, developer of hyvä themes, see also this blog post) had developed with Hyvä - who also took the step to develop his own in the first place out of frustration with the "impractical" Magento 2 frontend.

I then wrote to Willem and told him how great and inspiring I found his talk - and also shared my enthusiasm on Twitter. A short time later, we spoke and the whole thing inspired me to focus on the admin area and develop a prototype.

Incidentally, I've wanted to build the grids I've been working on since Magento 1 - and even more so with Magento 2 - but I always had the feeling that it was too big, too much for me. And I kept thinking: "I can't do it on my own, let Magento do it". But the conversation with Willem finally gave me a push and I started without further ado.

Of course for the area in which I feel more at home, i.e. the admin area. Incidentally, this is also due to the desire to do more in frontend development again. I'm counting on this area being more fun again and getting better overall, but I have to admit that I first had to get back into it myself.

Hyvä-Grid of a demo shopHyvä-Grid of a demo shop | Source: Vinai Kopp

What is special about Hyva_Admin?

Since Magento 2, I have been working almost exclusively in the backend, in areas that are visible neither to customers nor to administrators, but which need a certain visibility for administrators. That's why it was clear to me that if I build something, it should rather be something for admins.

Building functioning user interfaces is always a bit of "the same thing in green". Again and again you need a list of things to filter, select, sort, export, import and so on. Or you have forms where something is configured, or created, or controlled. Building these things has always been a bit cumbersome and a bit over the top with Magento 2. I just don't like a lot of the stuff that's built there, because it's flexible, but it's also hard for me to learn. Perhaps also because I simply don't understand the meaning behind many things and there is also only very poor documentation for it. As hard as I have tried, I just haven't warmed up to it and doing standards has become more and more of a chore.

That's why I wanted to develop something that would allow me to do these jobs, because 80% of my time is spent building similar things in the user interface over and over again. So why build these things over and over again in a cumbersome way? Why not make it as simple as possible so that it's fast but also good? I don't want to do a bad job, but something good that I also enjoy. And that ensures that I can concentrate on things that I find more exciting than "basic work", namely solving problems.

The idea behind Hyva_Admin is therefore to reduce large amounts of code to a minimum. So in case of doubt, maybe 2-3 lines of code instead of 500 lines. And the programming almost runs by itself, because I as a user see exactly what is possible and don't make any typing errors, because everything is suggested to me. The starting point should be that you begin with an almost blank sheet - only with content that supports me in my work - and from there I can write down everything very quickly and easily. So it's clearly about efficiency: I'm faster as a programmer and the result of my work is also faster.

Example of code at Hyva_AdminExample of code at Hyva_Admin | Source: Vinai Kopp

Are there still "construction sites"?

A main construction site, if you can call it that, is the development of forms. Automatic form creation for existing repositories and data models or ORM and resource models are high on my to-do list. There will probably be a few more in the course of the next few weeks, but my plan is to consider my ongoing work on Hyva_Admin as complete in a few months.

What are your plans regarding Hyva_Admin?

I am firmly convinced that everyone would rather do interesting work than tedious tasks. Building grids is actually rather annoying for me personally, although there are certainly developers who find it super. It's not mine, so I'll keep trying to find other solutions for standard tasks.

With this approach, I would also like to support the "new generation" and show that you can quickly complete routine tasks and then open up completely new areas of interest through more exciting topics.

That is why I have tried to comment and document each of my steps in a comprehensible way so that developers can quickly get to grips with Hyvä Amin. However, videos are still on the agenda to further support this approach, because some people simply prefer to learn and therefore learn better when they can consume the content via video. My goal would be that after one hour of reading the documentation or watching the video, everyone knows everything they need to know to implement standard applications with Hyva_Admin immediately.

Hyvä Admin Logo

By the way, Hyva_Admin is completely independent of Hyvä (frontend) themes - there is neither a technical nor a licence dependency. Of course, this also means that Hyva_Admin can also be used for Magento 2 shops that use a different frontend. And Hyva_Admin is open source and freely available on GitHub, so nothing stands in the way of further development by the community.

And this is where another plan or wish comes into play: I would like the community to become more independent. In the sense that they trust themselves to simply tackle changes themselves and not wait until Adobe perhaps implements the ideas and suggestions. This mindset was much stronger in Magento 1 back then, certainly also due to necessity, as the company was much smaller. However, I believe that a stronger, more confident community would be very good not only for the company, but also for Magento as a whole ecosystem, making it strong, robust, diverse and sustainable.

One last question: Why a "Pooh the Bear" quote at Hyva_Admin?

There is a tradition around Clojure programmes to publish small quotes. I think it's a very nice idea and I'm always happy to read them, so I've started doing that as well.
The quotes are usually much shorter, this is now a particularly long one, because Winnie-the-Pooh has held a special place with me from an early age. And I found this quote, with its story about a new house, very appropriate for Hyva_Admin.

Published on 15.03.2021 | NM

You have questions, requests, criticism, suggestions or just want to tell us your opinion about our blog? Here you have the opportunity to contact us directly.

Send e-mail