Learn EasyAdminBundle by Doing.

This week saw three new videos added to the site.

In these videos we’re going to start with a gentle introduction to EasyAdminBundle.

If you haven’t yet seen EasyAdminBundle then I would recommend you check it out.

In a nutshell, it’s the easy to use admin panel that Symfony has been missing.

Personally I like working on logic. The fundamentally interesting business challenge that I’m trying to solve.

Admin Panels are a necessary evil. You gotta please dem stakeholders.

Making a decent, working admin panel is a going to sap a bunch of my time and if there’s one that does a “good enough” job then I’m going to use it.

As it happens EasyAdminBundle does more than “good enough”. It’s production quality, in my opinion.

Seriously, a massive thank you to Javier Eguiluz and the other 94 contributors.

We’re going to learn EasyAdminBundle by integrating it into our Wallpaper website system.

In the first of this week’s videos we start gently.

https://codereviewvideos.com/course/let-s-build-a-wallpaper-website-in-symfony-3/video/easyadminbundle-setup-and-category-configuration

By the end of this video we will have gone from no admin area, to a working admin area that allows us to CRUD our Categories.

https://codereviewvideos.com/course/let-s-build-a-wallpaper-website-in-symfony-3/video/easyadminbundle-wallpaper-setup-and-list-view

It’s easy, but it’s not a one-click job.

Beyond basic entities, we will need to add a little configuration.

We’re not going to be directly creating forms, controllers, or creating services.

Instead, we provide some configuration and let the bundle take care of the rest.

Our Wallpaper entity is pretty basic so far, but even now it has complexity. We have a relation to worry about. There’s also improvements to the provided output that I’d like to make.

We’re going to add in an image preview to our List view, and a few more additions and tweaks besides.

https://codereviewvideos.com/course/let-s-build-a-wallpaper-website-in-symfony-3/video/easyadminbundle-starting-with-wallpaper-uploads

At the moment on our imaginary Wallpaper website we have no visitors.

We haven’t “launched” yet.

The reason this pretend concept matters is that we – the humble admin – will need to both seed, and keep our site updated with Wallpapers.

We looked at this already as part of the Wallpaper Setup Command videos, and the Doctrine Fixtures videos.

We might wish to outsource this task at some point in the future.

To keep the site fresh, we will want to add in new wallpapers over time.

To make this process as painless as possible we are going to add in a way to do this from our Admin Panel.

https://codereviewvideos.com/course/let-s-build-a-wallpaper-website-in-symfony-3/video/easyadminbundle-starting-with-wallpaper-uploads

This means we need a way to handle uploads from our Admin panel.

There is already an integration guideline on the official docs for Integrating VichUploaderBundle to Upload Files and Images.

You can go with this. Or, if you’d like to learn a little more, we’re going to implement our own file upload system.

It’s extra work, and it’s all about the learning.

This is a part of the site that is going be very heavily used.

We’re going to want this to work, as otherwise it will become a potential source of bugs. And that means distracting ourselves from writing interesting code.

If I want to make sure the code that I write works, then  I’m reaching for my test suite.

My personal preference here is PhpSpec. And that’s what we’re going to use.

By the end of this video we will have you all set up for testing in a way that not only makes sure your code is well tested, but also the massive “hidden” additional benefit of giving you a much improved architecture.

If you’re not the most “pattern oriented” person then one of the biggest wins for me is that PhpSpec has led to the concept of emergent design.

By which I mean it reveals a good system design to me as I try and solve my problem. It often does this by making bad decisions very painful to test. Sounds bizarre, and I don’t think my explanation here does it the justice it deserves.

Hopefully you’re open to improving your code. If you are, then I think PhpSpec can do just that.

I also appreciate that this is a beginners series, and we are about to ramp up the difficult here. The thing with testing is it’s probably one of the fastest ways to improve yourself as a coder.

Start Watching 🙂

Until next week, have a great weekend and happy coding.

Chris

(If you liked this, consider subscribing to the mailing list)

 

 

 

Shares

Published by

Code Review

Code Review

CodeReviewVideos is a video training site helping software developers learn Symfony faster and easier.

Leave a Reply

Your email address will not be published. Required fields are marked *