Stack/Unstuck: Frameworks And Fundamentals
Frameworks exist to make building apps easier, and there are a lot to choose from. We hear from one long-time Java developer about his passion project, an app designed to remind users of important deadlines and appointments. We explore his app’s framework—How he chose it, and how things changed along the way.
While they are there to help developers build applications very quickly, frameworks shouldn’t be seen as a salve or a substitute for basic knowledge. When things go awry, that’s where knowing the fundamentals can help, whether you are building applications on your own, or working on a larger team.
00:03 — Kim Huang
This is Tariq Wilson, he's a software engineer.
00:07 — Tariq Wilson
I was working in Washington, DC and I was working for a government agency as a contractor.
00:14 — Kim Huang
Tariq is describing a challenge that a lot of IT professionals face.
00:19 — Tariq Wilson
Folks in DC are well aware of this, but sometimes certain government agencies that you work for, you can't bring in your cell phones, you can't have direct connections to the internet. You're essentially working in a box, cutoff from the rest of the outside world. You can receive calls and things of that nature, but you can't use your mobile devices.
00:36 — Kim Huang
By design, government organizations are very strict. They're opaque, they don't let information flow freely, that's to be expected. But people have lives, they have important things going on outside of work they need to remember. For Tariq, this problem became something that he wanted to address.
00:57 — Tariq Wilson
I use reminders on my phone, but again, you couldn't bring reminders into the building.
01:03 — Kim Huang
Just like any other problem that a person like Tariq faces, there was a solution waiting to be created.
01:10 — Tariq Wilson
I always like to tinker and I like to build things on my own. So I said, "What if I make an app or some program that will call me and tell me when I have to do things?" because in those environments you can receive phone calls. With traffic at the time, you have so many things you got to plan for and I didn't want to forget anything. So I said, "Let me make a program that will call me on a certain schedule and remind me to do things."
01:35 — Kim Huang
He had turned his personal challenge with time management into a very good app idea. Eventually, he would turn that passion project and make it into a product for others to subscribe to.
01:51 — Tariq Wilson
That's how Tie My Finger was born.
01:59 — Brent Simoneaux
This is Compiler, an original podcast from Red Hat. I'm Brent Simoneaux.
02:05 — Angela Andrews
And I'm Angela Andrews.
02:07 — Brent Simoneaux
We're taking you on a journey through the software stack. We call this series, Stack Unstuck.
02:14 — Angela Andrews
Today's episode, we are looking at frameworks. This is one episode of a series. If you want to listen from the beginning, you can start from our episode, The Great Stack Debate.
02:26 — Brent Simoneaux
Producer Kim Huang is here with our story.
02:34 — Kim Huang
Brent, Angela, I introduced you to Tariq in the beginning. He made this app to solve his own problem. He decided to open it up to more users, more people to use. I wanted to talk about his story in the lens of frameworks.
02:52 — Angela Andrews
02:53 — Brent Simoneaux
Well, let's do some definitional work at first.
02:56 — Angela Andrews
Yeah, we definitely have to level set here, okay.
03:03 — Brent Simoneaux
If we go back to one of the stacks that we talked about in the first episode of this series, we talked about the LAMP stack, right?
03:10 — Angela Andrews
03:11 — Kim Huang
03:12 — Brent Simoneaux
Angela, we know this is your favorite.
03:14 — Angela Andrews
Heart emoji, yes.
03:18 — Brent Simoneaux
Which part of this is the framework?
03:22 — Angela Andrews
Actually, none of it. That's interesting.
03:26 — Brent Simoneaux
03:27 — Kim Huang
03:28 — Angela Andrews
Oh, snap, exactly. We would say LINUX is the operating system, Apache is the web server. It is an actual web server. The M is for MySQL, the database, and P is for PHP, which is a programming language, it is not a framework.
03:49 — Brent Simoneaux
Interesting, so where does the framework come in here?
03:54 — Angela Andrews
Well, in this stack it does not specifically exist. But in other stacks, when you're talking about Node.js, that is definitely a framework.
04:06 — Kim Huang
04:07 — Angela Andrews
04:08 — Brent Simoneaux
Got it. What exactly is a framework though? Help me out, Kim.
04:15 — Kim Huang
A framework, I'm stealing this example, but think of it as you're building a house and the framework is like the frame for the house. People have been building houses for a very long time. Most of the time, architects or contractors, they know that a house has to have certain things. It has to have door frames, for example, so that people can go in and out of a building and go in and out of their house. They know that it has to have support beams. They know that it has to have all these things. You're not reinventing the wheel every single time you build a house. Well, frameworks are very similar. They are made so that people can get things up and running as far as app development very quickly, and you don't have to build all of the different things that you need in an app from scratch.
05:04 — Angela Andrews
Yeah, it just does the heavy lifting.
05:07 — Kim Huang
Awesome. Talk more about that though. What do you mean by heavy lifting?
05:10 — Angela Andrews
I mean, think about your analogy was perfect. If we're talking about building houses, you don't have to go out and start from scratch because there's really a template that just really makes things easier. If you want to change the house ever so slightly, you don't have to figure out what kind of wood to use, what type of nails to use, it's out there. So the framework analogy really fits. As opposed to using an actual programming language where if you even wanted to get to the point of where the framework is, you'd have to do a lot more coding. The framework is there and you can just take it from there and move on, as opposed to starting at the root programming language. You really do have to build it up to get that level of doorframe functionality. I don't know.
06:02 — Brent Simoneaux
Doorframe functionality. This sounds, I think a little similar to libraries. I'm wondering what's the distinction between frameworks and libraries?
06:17 — Angela Andrews
Can I take this one?
06:18 — Kim Huang
06:19 — Brent Simoneaux
06:19 — Angela Andrews
No problem. Libraries are those little pieces, those are those little things that add a little bit of something. I want to add a little bit of authentication, or I want to add a little bit of, I don't know, something else to the application. There are tons of libraries out there that people have created that you can add to your application that gives it just so much more functionality than without. There are tons of different libraries and they bring the flavor, they bring the actual cool features and things from the outside, you bring it inside your application. To build a successful application, you can't forget your libraries, depending on the language and framework.
07:07 — Brent Simoneaux
If we're going with this metaphor of building a house...
07:10 — Kim Huang
07:11 — Brent Simoneaux
What would libraries be in this metaphor?
07:14 — Angela Andrews
The sofa, the lamps, the chandeliers, the lock on the front door. They add those creature comforts, the functionality.
07:25 — Kim Huang
For me, I think that distinction there is if you're pulling out my interior decoration hat, if you're into a farmhouse revival instead of a modern bohemian, it's the difference between having a regular door that has a hinge, or having one of those really cute sliding barn doors. They're still doors, but they're just different kinds of doors and they require different design elements. Is that what you were saying, Angela?
07:51 — Angela Andrews
That'll work. Yeah, different design elements. That's what libraries bring.
07:59 — Brent Simoneaux
I mean, again, using this house metaphor, what are frameworks useful for? What do they really do for us?
08:09 — Angela Andrews
Well, I think they help people work inside of a language quicker.
08:15 — Brent Simoneaux
08:15 — Angela Andrews
08:51 — Kim Huang
I did want to point out a couple of things. One, in this episode, we're going to go back and forth between frameworks for web applications and frameworks for software stacks.
09:03 — Angela Andrews
09:03 — Kim Huang
And the second part was that people on the internet say things, and one of the things that they say is that frameworks can remove the focus from learning the basics of coding and the basics of programming language.
09:14 — Angela Andrews
09:15 — Kim Huang
I wanted to know... Oh, you agree? I wanted to know if that was true, honestly. What do you think?
09:21 — Angela Andrews
I 100% agree. Again, we're going to use analogies here. I can't draw to save my life, but I can trace. I can buy me a really nice coloring book and get the picture that I want. Understanding the underpinnings of how things work and when things don't work, why they don't work, I think that's very important.
09:46 — Brent Simoneaux
I think we're going to get into some of these core questions. Why even use a framework in the first place? How exactly does a framework help us build applications? Right, Kim?
10:01 — Kim Huang
Yes, and for that we're going to go back to Tariq and Tie My Finger. (10:09): I wanted to know exactly how Tariq's app, Tie My Finger, came together. First, let's talk about of course, tech stack. What kind of stack did Tariq use?
10:24 — Tariq Wilson
I've been using Java since '97, I think. That's the first time I learned Java and wrote any Java code. That's my language. I always look to work around Java and building a stack that works with it. At the time, I used Spring and Spring NBC, the entire Spring ecosphere.
10:46 — Kim Huang
He talks about Spring NBC, it's one web application framework of many. With frameworks, an application can talk to other services through an API.
10:56 — Tariq Wilson
If you call a bank or something like that and you're interacting, it's likely using Twilio or something like that.
11:02 — Kim Huang
Twilio is a telecommunications company that has its own API or application programming interface, so that an app like Tie My Finger can talk to different systems, like an email client for example.
11:18 — Brent Simoneaux
How did this all come together?
11:22 — Kim Huang
The app works like this: you'll put in an appointment. For example, you have to go to the dentist.
11:26 — Brent Simoneaux
I do need to go to the dentist.
11:28 — Kim Huang
Me too. Tie My Finger, you put it into the web app, and then around the time, maybe 30 minutes before your appointment, maybe an hour before your appointment, the app will send a message to, I guess Twilio. It will talk to that certain API to send an automated phone call to your desk at work, to the number that you've determined that is your number [inaudible 00:11:59]. Yeah, your point of contact. It acts like an early version of push notifications. You ever seen notifications on your phone where you have an appointment in your calendar app and it notifies you 30 minutes before? You have a alarm you can put on there, maybe it has a little ding or a little ring tone or something associated with it. All of those happen through what he was talking about, the framework that allows him to build something to talk to that API. That API creates that connection between the app, and in this case Twilio.
12:35 — Brent Simoneaux
What are frameworks doing for Tariq in this scenario?
12:44 — Angela Andrews
Definitely making his app building easier.
12:47 — Kim Huang
12:47 — Brent Simoneaux
12:48 — Angela Andrews
He wanted to build an app quickly and as opposed to starting from scratch, he said, "Oh, well let me use this framework." The framework has a lot of the functionality built in, so if he's just calling functions and modules and whatever to do what needs to be done, he doesn't have to write them. Everything's already in the framework. He's not coming to the table with just a hammer and nails. He basically has what he needs in front of him and then he can just start building from there. It probably helped him build his application a whole lot quicker.
13:26 — Kim Huang
With that, Tariq gives his own general breakdown of what a framework is and what it does.
13:32 — Tariq Wilson
If you develop any decent size application, there are a lot of components that you have to build and integrate. You've got services that you're developing and those services have to talk to different things on the back end, perhaps a database or some sort of middleware or another system, another service somewhere. All of that has to be wired together and talk and communicate in a consistent way. A framework gives you rules on how you can make that happen in a consistent way.
14:03 — Kim Huang
Tariq has an excellent example of this.
14:05 — Tariq Wilson
For subscriptions, at the time I used something called Chargify. I don't even know if they had a API at the time. No, they did have an API, of course, but I don't think they had a tool that you can use to say, "Hey, drop this component into your application and go." But they did have an API. But see, the Spring framework had a REST component where you can easily develop REST code to talk to their systems.
14:36 — Brent Simoneaux
I think I'm lost again. What is REST code?
14:41 — Angela Andrews
Well, REST is... What is it?
14:45 — Kim Huang
Yeah, it's an acronym. It stands for Representational State Transfer.
14:49 — Angela Andrews
I'm so bad with acronyms, but what I hear him saying is that there are these multiple components and they're just right there and then you can use them to help you build things out. Again, you're not building things from scratch, you use what the framework has to offer. If this component does X, that's the one you use. If this one does Y, that's the one you use. It sounds to me that they make integration so much easier because it's almost like plug and play. He just made it sound super easy and I know it isn't, but he really did make it sound like plug and play.
15:28 — Kim Huang
Yes, the idea behind the REST code is that it works with plug and play analogy because you have the code on the back end of an application to talk to a specific service. In this case, the service of Chargify that he was using to enable people to pay him for using the app, which is how you monetize an app. That's the important aspect on the back end for talking about developing an application. That's an important functional requirement to have, if you want to say, monetize your creation. (16:10): Tariq is our case study here of how frameworks can help people when they're building an app. Frameworks help with the heavy lifting and tying different components of a service together.
16:24 — Tariq Wilson
No system nowadays, even back then, operated in isolation. You had to talk to, depending on the size of application, like some of the things I built for the government, you may have hundreds of different services that you need to talk to. A framework gives you a consistent way to talk to each one of those services, whether it's a database service or a REST web service, even SOAP or some other service. Then it has other things around it like authentication and logging and all kinds of things. Caching to help improve performance, improve security. A framework gives you all of those technologies.
16:59 — Angela Andrews
17:00 — Kim Huang
Yeah. What stuck out to you?
17:02 — Angela Andrews
I mean, what stuck out to me is it sounds like when he talks about a consistent way to talk to each other, that immediately makes me think APIs. That's what APIs do. I'm going out on a limb here because again, I'm not a developer, this is just seeming like a lot of these frameworks have these parts already built in that make communication to other services so much simpler. You don't have to wed yourself to any one thing that you're going to talk to. You can talk to all the things. I'm going to assume here he's talking about the frameworks allow him to make communication between all of these disparate services so much easier.
17:53 — Kim Huang
17:56 — Brent Simoneaux
Kim, you said that Tariq's app is a smaller app. How do frameworks work in building really large software projects?
18:08 — Kim Huang
Yes, that's a very good question and that's something that we can take on next. (18:18): Now we know how frameworks help individual developers build apps, but what happens when you don't have just one developer, but a team of people working on a project? I wanted to speak to someone who had that exact experience and it's someone you might recognize. His name is Adam Bergstein, he spoke to us about the front end on one of our tech stack episodes before. Adam goes on to talk about web frameworks interfacing with the database layer, for example, in a tech stack.
18:51 — Adam Bergstein
Sometimes I think in school you might learn about SQL, you might learn about running a database server, you might learn about the services on the infrastructure side. Here's how you run a database server, here's how you interface with it, here's how you authenticate to it and write queries in a database server. Then the question becomes, well if you're using a framework, it interfaces and uses a database in different ways. So if I want to use Drupal to build an application as an example, I would be able to set up my database automatically with Drupal. With the right information, the right settings, the right connection. You might not be writing raw SQL, you could, the framework might support that, but frameworks tend to be steering people towards using a certain set of practices and those practices apply to the database layer itself.
19:50 — Angela Andrews
Frameworks are opinionated. How about that?
19:55 — Kim Huang
A little bit.
19:56 — Angela Andrews
You see what I did there? No, I mean he said it so perfectly. It's steering people towards doing certain practices and that is great, especially if you don't know all of the myriad of ways that you can do, said one thing. It's nice to have something that says, "Okay, this way works. This is the way we're doing it." I think that's pretty clever.
20:21 — Kim Huang
It is. It definitely cuts down on errors, on bad code, on people just not knowing, like you said, not knowing exactly what roads to take if they're writing a raw code. It's really great to have this thing is tried and tested and true and works and it has worked and it's in the library and that you can reference it and sleep at night knowing that it's not going to be a disaster. (20:54): From that, we can understand how frameworks simplify the process of building apps.
20:59 — Angela Andrews
21:00 — Kim Huang
But what about people that say it simplifies things too much?
21:06 — Adam Bergstein
One of the jobs that I had when I worked in higher education was trying to implement a Drupal website and building with that framework helped me to learn a little bit and focus a little bit more on the back end development, but also gave some guardrails around implementing things with a framework. Instead of just getting my hands on the keyboard and doing a bunch of code, the framework really added a lot of discipline of here's how you develop the code, here are some tools that you can use to build your code. That was a really useful thing for me to learn.
21:49 — Kim Huang
Adam started out doing a lot of raw coding. He doesn't think that frameworks detract from learning the basics of code. He says he's become an avid supporter of what frameworks can do, how it can provide those parameters and provide those guardrails and provide help to developers who want to build things.
22:11 — Adam Bergstein
I was able to learn almost just by picking up Notepad on the computer and typing stuff, getting that low level really, really helps you appreciate everything else. Like, "Wow, this framework does a lot. Wow, this IDE is really powerful. It can scan my code and show errors and everything like that."
22:34 — Angela Andrews
Work smarter, not harder.
22:37 — Kim Huang
Yes. (22:41): Frameworks can cut down on errors in that way. It's a type of standardization that makes things more efficient, especially if you're building in a team environment. Someone else can come in, a new person can be hired and come in and look at your code and they can do updates and they can do maintenance. They're not completely put out by something that someone has made say, bespoke. They can use those same best practices and those same parameters to make changes to an app without breaking it essentially. Besides being able to get apps up and running quickly, frameworks help large teams with standardization and maintainability.
23:26 — Angela Andrews
Two very important features when you're working with teams.
23:29 — Brent Simoneaux
23:30 — Kim Huang
Word. Yes, and Adam says that that is the true strength of the framework itself.
23:36 — Adam Bergstein
You could build something and you could do it really quickly or rapidly, and those are skills that people have. But I think the most talented people that go through and they evolve in their career are the ones that say, "Sure, I can build this and I can do it really quickly," but the ones that really stand out are the ones that are like, "I can build it really quickly and I've done it in a way that is extremely supportable and maintainable and follows to the letter the standards and best practices that are put in place."
24:10 — Brent Simoneaux
One thing that I've been thinking about is we've been talking about a lot of the benefits of frameworks and I'm curious if there are any drawbacks. Are there any limitations to them?
24:22 — Kim Huang
Yes, there's a few that I can think of, but I wanted to hear from Tariq again because he has something to say about this.
24:31 — Tariq Wilson
The thing that will happen is at some point in time you will exhaust the limits of whatever framework you've chosen. At some point in time it really is going to behoove you to really learn the technology that's underlying that framework. If you don't, that's when you have those long nights trying to solve some thorny issue, if you don't really know what's happening.
24:52 — Angela Andrews
I said that in the beginning.
24:54 — Kim Huang
Yeah, exactly. It's something that we talked about at the beginning of the episode.
24:58 — Angela Andrews
Oh, my gosh. That's a thing, there are limits to this and you have to really understand what's underneath it to make it make sense.
25:08 — Kim Huang
25:08 — Angela Andrews
25:10 — Kim Huang
Yes, and learning frameworks is a great way to build applications and build them very quickly. But in order to understand how they work and to understand how the app works and understand challenges and troubleshoot issues when they come up, it's very beneficial to know the fundamentals of coding.
25:29 — Angela Andrews
25:32 — Brent Simoneaux
I imagine that there are quite a lot of frameworks out there. Did Tariq and Adam talk about how to choose a framework? What's most important in making that decision?
25:45 — Angela Andrews
That's a good question.
25:46 — Kim Huang
I spoke with Tariq about that and here's what he had to say.
25:49 — Tariq Wilson
Well, it's like if you walk into a party and you're the only person there, then you might not want to be at that party. If no one else is using that framework and no one else, meaning whoever you consider to be an industry leader, or you look around on sites like Stack Overflow, look for frameworks where it has some longevity and it has a pretty thriving community. There's one secret that I've learned over the years about frameworks, and really it's to look at the documentation. If they have really good documentation and the documentation matches the framework when you really start using it, then it's probably a good framework.
26:30 — Brent Simoneaux
It's something like sustainability, right?
26:32 — Angela Andrews
Yes. If it has a lot of users-
26:35 — Brent Simoneaux
26:36 — Angela Andrews
If it has great documentation, if it has a community around it, you want to use something that has that staying power. Those few signs are really good indicators that you're onto something that'll be around for a while, that'll be supported, that the documentation actually helps and works for you. That is a great litmus test for deciding what framework should you be using. Nice.
27:07 — Kim Huang
Yes, exactly. Making an informed decision is just a matter of looking at the vibrance and the activity going on in a community. Its support, its documentation, how many people are talking about it, are other developers in your networks talking about it? Those are all very good ways to figure out how to choose a framework to work with.
27:31 — Angela Andrews
You want to hear what they're talking about and what they're talking about. That's really how you make those good choices.
27:39 — Kim Huang
Yes, you want to hear the praises, but you also want the [inaudible 00:27:43].
27:43 — Angela Andrews
27:50 — Brent Simoneaux
Kim, Angela, we've talked about some of the fundamentals of frameworks and we've talked about applications of these frameworks. What should we be taking away from this whole conversation though?
28:04 — Angela Andrews
Well, I think there's many little nuggets that we heard throughout from both of our guests that frameworks are helpful. They help you learn quicker, they help you get your app up quicker. They really do aid you and assist you. They help you with standardization, especially when you're working with different services, they make that so much easier. But we also learned the other side of it too. I like the fact that we played both sides in this episode because I think folks who are listening, they need to hear that.
28:47 — Brent Simoneaux
Kim, what's on your mind after talking with both of our guests? What's going through your mind now?
28:53 — Kim Huang
Well, I'll be honest. In the beginning, I wasn't exactly sure I even understood the concept of frameworks. I thought that most developers just started writing raw code and making everything from scratch. The more and more I learned about frameworks, the more and more it made sense. You don't make a house from scratch every single time. There are different types and different styles of houses that you can reference or use. All houses have to have doors. All of them have to have walls and ceilings. Why try to reinvent the wheel so many times and do everything brand new when you have so many different things to reference and so many different things that have been tried and true and tested? Things that other people can vouch for, that other people in your communities or in your networks can vouch for. (29:43): Frameworks are there to help developers build applications very quickly, but they should not be seen as a cure all or a [inaudible 00:29:53] or a substitute for basic knowledge. Instead, they should be considered essential for large teams that have to check their code and have to work together. Maybe you're bringing new people onto a project and they need to get up to speed very quickly, a framework will help you do that. But when things go wrong or when things go awry, which they always do, that's where falling back on that fundamental knowledge becomes really important, whether you're working by yourself or you're working with other people.
30:23 — Brent Simoneaux
Frameworks aren't technically part of the stack, but they are a really important part of it though, at the same time. Or at least in building applications.
30:36 — Kim Huang
Yes, they're a very important aspect of the development process.
30:41 — Angela Andrews
30:42 — Kim Huang
Yes. (30:47): After a couple of detours, a few stops, a few rest stops along the way, we've arrived.
30:53 — Brent Simoneaux
This was a little detour, wasn't it?
30:55 — Kim Huang
Yes, we have arrived at the database layer. You can come back next time to listen to this very essential aspect of the tech stack. It's very exciting, I'm excited to hear about it.
31:10 — Angela Andrews
31:11 — Brent Simoneaux
All right, so up next, the database.
31:14 — Angela Andrews
Well, I hope you enjoyed this episode. What are your thoughts about frameworks? Use them, not use them, doesn't matter? Tweet us at Red Hat. Use the hashtag Compiler podcast. We want to hear from you. What do you think about frameworks? (31:34): That does it for this episode of Compiler.
31:38 — Brent Simoneaux
Today's episode was produced by Kim Huang and Caroline Craighead. Victoria Lawton is never the only person at the party.
31:48 — Angela Andrews
Our audio engineer is Elisabeth Hart. Special thanks to Shawn Cole. Our theme song was composed by Mary Ancheta.
31:56 — Brent Simoneaux
A big old thank you to our guests, Tariq Wilson and Adam Bergstein.
32:02 — Angela Andrews
Our audio team includes Leigh Day, Laura Barnes, Stephanie Wonderlick, Mike Esser, Nick Burns, Aaron Williamson, Karen King, Boo Boo Howse, Rachel Ertel, Mike Compton, Ocean Matthews, Alex Traboulsi and Laura Walters.
32:20 — Brent Simoneaux
If you liked today's episode, go ahead and follow the show. Give us a rating, leave us a review and share it with someone you know. It really does help us out.
32:31 — Angela Andrews
Thanks so much everybody, we'll see you next time.
32:34 — Brent Simoneaux
All right, see you next time.
In this limited run of Compiler, we speak to people within development teams and communities to bring clarity to the tech stack.