Carlton Gibson profile image

Carlton Gibson

Django Fellow. I help maintain DRF, Django-Filter, Channels, Crispy Forms, and more. Building @btnapp for simpler deployments. he/him

Twitter Blog

How and when did you get into programming? And into iOS?

I began as a kid — noodling you know.

We were fortunate to always have computers around. Commodore 64, Amstrad 6128, BBC Micro, Acorn A300, then on to Windows 3.1 — I remember loading programs off of a tape drive — it was both awesome and totally rubbish at the same time: if the volume wasn’t right, the program wouldn’t load.

Anyhow, I began more seriously at university, so from 97. They gave us a public folder you could put stuff in, and you could submit scripts for CGI — these would be roughly checked, a bit like the App Store I guess, but you could more or less do what you liked. From there it was all web.

I took up iPhone OS, with iPhone OS 3 — I’d got a 3GS, which was a glorious device, I won’t hear a word against it 😀. No-way was I not going to program for it.

That is some serious history. What did you use? And how quick was the transition to mostly/mainly iOS development after you got the 3GS?

well, I stayed at university for a long time, and when I left it was all PHP and MySQL for web.

Eventually I discovered Django. I was at a conference and everyone was all “Django, django, django” — it must have been new and in the tech news. I went home and Googled it. The site said “The web framework for perfectionists with a deadline”. I thought, That’s me! And I’ve been very happy with it ever since.

On the iPhone side, it took over within the space of a year or so. There was massive a demand for developers. So I got into the agency thing, doing apps for big companies, luxury brands, car manufacturers, sports franchises, internet companies, you name it. It was the gold rush right? Everyone wanted an app. Good times. 😝

I mean the “The web framework for perfectionists with a deadline” is perfect. This spoke to me when I was looking for a framework to build web projects with a few years back...

Yeah, and it really is. Coming from the Apple world, the line I always give is that Steve Jobs one about them iTunes on Windows: coming from PHP, it was like a glass of iced-water in hell. 🙂

Django really enabled me to find my niche for a while: it wasn‘t just that people wanted apps, they also wanted a backend and API to go with it. So, my market was that, building the app, or on a bigger project the network and persistence part of it, together with the backend service, which I‘d do in Django.

This wasn‘t every project, sometimes it was just app, with no backend. Sometimes, particularly the really big clients, they would already have a backend (some kind of SOAP monstrosity no doubt 🙂) and then I‘d integrate with that. But it was often.

It was a good niche. There weren‘t so many folks that could do the backend too.

Do you remember what it was like learning iOS coming from web background? Anything that was especially hard to grasp?

OK, so it was Objective-C to begin, which is a good language, I still like a lot. But mostly it was learning the frameworks, Foundation and UIKit. They‘re so big, the Foundation layer was so mature, it‘s like wow — there is just a massive amount to take in.

I don’t think you can really program Cocoa until you know the design patterns, delegates, and Notification Center, and whatnot. Picking that up takes time.

Fortunately, in my day at least, the Apple docs were pretty good. Very good really.

I‘ve come back to the Apple platforms in the last year or so, really since the iOS 14 and Big Sur betas in last summer, and I‘ve seen several complaints about the state of the documentation. For me, there are enough third-party resources, but I‘m constantly leaning on my old knowledge of *How did this use to work?* I‘m not sure getting started would be as easy as it was. (Also I‘m not doing super-advanced stuff so some of the docs gaps don‘t affect me yet.)

Was there an app you worked on that really stood out?

Ah, good question. I worked on lots of supposedly glamorous projects. Big brands. They looked flash.

Technically they were interesting too — I remember building a drag and drop interface that you do with UICollectionView quite easily, but there was no UICollectionView, so it was custom UI on top of UIScrollView, and yeah I was proud of it. Many like that.

But they were all pretty soulless. In the end I‘d done something cool, but it was in aid of marketing overpriced trinkets. After a while it left me a little cold.

On the side, I tried my hand at my own apps. I had one that was a little video playlist manager that did OK, well even — it‘s was out of the store for 4 years, and I still get the odd support email for it. But times had changed. The App Store had hit that middle period where it was pretty tough. Gone were the glory days. The more sustainable business models hadn‘t arrived. I certainly didn‘t have the marketing or design skills to make a serious go of it as an indie at that time.

The agency thing was also getting old. It‘s a good game, but it‘s fierce. It‘s constant deadline pressure, and there’s no respite. You‘re like an oarsman on a Roman galleon (if you‘ll pardon the Ben-Hur reference).

I had four young children, and I‘d had enough, so I took a step back and started to help smaller clients. The reality there is that they rarely need (or can justify) an iOS app. So, as I say, until this year, it‘s been a while since I‘ve been active in the Apple ecosystem.

So if my timeline is correct, you left iOS world before Swift was announced, yes? And after leaving iOS, I guess you did mostly Django?

No, I was still in the game (just about) when Swift was announced. I remember watching the Keynote and the State of the Union. OK, right, something important just happened. I downloaded Swift straight-away, and had a play, but I didn’t dive-in deep.

I think it was clear enough the Swift was the future on Apple platforms, but it was a little raw (shall we say) to begin.

And yes, I was drifting more and more into Django.

I was working with a major package called Django REST Framework, and I ended up getting involved in maintaining that. Then picked up a few other packages in the ecosystem, and then ended up maintaining Django itself, and doing conference talks and a podcast called Django Chat, and all the rest of it.

So mostly Django is putting it lightly. 😃

What was the return to Apple platforms development? I think you are now working on an app right?

Yes. I‘m working on an app called Button, pre-signups at The tag is A Simpler Deployment Story. It’s about getting your (backend) app online.

Every week on Django Chat, deployment would come up — we‘d talk about how hard it is.

There is a lot to deployment, sure, but there‘s also a tendency to make it more complex than it needs to be.

Button is part guide, part tooling, and part community for folks all doing it the same way, to cut through that. It’s slated for 2021 — Early access is very close — I’d hoped to have it out already, but with the pandemic things have gone a little slower than expected. I’m currently just saying soon. 😃

Doing the app in Swift came on after/during WWDC this last year — it was going to be web-first, and maybe web-only. The combination of SwiftUI coming on so well, and Widgets really caught my eye — I really want my deployment status on my phone‘s Home Screen! So I jumped in, and I’m having a ball.

It wasn‘t a cold start. I was never totally away — I always kept up with what was going on. I think it was clear that something was coming for a few years, since Swift was first announced. That something was SwiftUI, so when it was released I took a look. I don‘t think it was ready (certainly not for me) last year, but this year, yeah, I‘m happy to ride the wave, and accept the limitations as constraints. Frankly I think SwiftUI is amazing. I‘m not pushing the envelope so I think SwiftUIs abilities will come on quicker than I‘m able going be limited by them now.

I am curious what's your view on adding 3rd party dependencies to iOS projects?

Ah, another good question. I wrote a little bit about this on my blog recently.

I was looking into the Moya project, which lets you build type safe abstractions around web APIs you want to use. It‘s built on top of Alamofire. I think I saw a reference to it on the HackingWithSwift website, and I checked it out.

It‘s very good, but it looks like it‘s currently unmaintained. So there‘s the big risk. You take on a dependency and then you‘re potentially in trouble if you hit a bug, or if it suddenly breaks with the OS updates.

So the first question is whether the package is well maintained. Alamofire for instance, I wouldn‘t hesitate about. I remember using its predecessor AFNetworking, before NSURLSession was even a thing, and it‘s still going now, better than ever.

If a package is not well maintained, like Moya now, then you have to think, could I pick this up myself? If the answer is yes, then OK consider it, but be cautious: I‘ve seen many projects struggle because of a dependency that went wrong.

I‘m thinking about whether I could take on Moya. I‘d need to drop the ReactiveSwift and the RxSwift stuff — having come back and found Combine, I‘m focusing there. Also the non-SPM package manager stuff would have to go. I simply wouldn‘t have the bandwidth (or knowledge) to even consider it otherwise. Existing users likely couldn‘t take a break like that so it would have to be a redux/fork rather than just carrying-on. But maybe... — it‘s very nice, and not a big package at heart, so we‘ll see.

(Alamofire passes this second test too — it would be a shame to lose it, but it‘s not a big wrapper over URLSession, which itself is a good API, so even if it weren‘t so stable I‘d think it worth the punt.)

Do you have advice or tips for iOS developers who are looking into doing web on the side or maybe completely switching?

I‘d say go for it. Clearly I‘m biased but, I‘d say to give Django a look. Regardless of what framework you choose, being able to build your backend gives you a lot of extra options. You can build exactly what you want, and it‘s not any harder than anything you‘re already doing. Yes, you have to get familiar and learn the patterns, but that‘s a growth project. It‘s worth it.

Frankly it‘s also a lot cheaper than the backend as a service options. At first you think not, because there‘s an effort to spin up a server and stuff, but that same server will scale quite a long way before you pay any more at all, and then you get a whole lot more again for only a bit more, and so on.

On this topic I‘m actually thinking of putting together a Django for Swift devs workshop to introduce the framework and get folks over that first hump, and on to being productive. You can build your own backend easily, so if folks want to learn more about that they can sign up for info here.

I know you‘re using Django for the backend of your projects, so I should ask you how you get on with it? 😃

I am super happy with it. Although I do Django just occassionally, building stuff is actually pretty quick (unless I need to fight with CSS on the front end). I get the appeal of the backend-as-a-service, but I rather spend the time learning proper backend framework than one of these services. A few years back folks built stuff on top of, it then got bought and shut down..

Right, yes, there's that too. To the extent your backend is your business, you have to weigh the risk of that simply going away. We could talk forever on this. I've always leant towards the backend, but I think on balance the of flexibility building your own outweighs the costs. I think for most common use-case it's pretty, CSS perhaps excluded 😀

You currently have dedicated Saturday mornings for working on the Button project. Is this something you would recommend? Instead of doing it bit by bit when time is available to have a dedicated slot?

There's an old productivity hack that recurring work should be scheduled. There's also a context-switching cost. I was just fitting it in, as you say, but I was reviewing 2020 and realised that, since the pandemic had hit, I'd got very little done on Button. Since scheduling it I'm making good progress again, so yes, to that extent I would recommend it.

Nice. Think I will try this approach once I embark on a new side project.

You have a magic wand... and can change one thing about iOS development. What?

The docs. They’re really not as good as they used to be. I’m having massive fun with the new frameworks but I’m reliant on the great ecosystem, rather than Apple’s resources.

Yea that would be an appropriate use of 🪄

Thanks so much for taking the time! Do you want to give someone or something a shoutout?

No not really. If folks are already into Django, they should check out my podcast, DjangoChat. Otherwise signup for info on the Django for Swift developers workshop, and come and find out what all the fuss is about. (Writing a backend isn’t that hard, and it really gives you a powerup so...)

This has been fun, thanks for having me!

Other chats

All chats