You can listen to the podcast and read the show notes here.
Michaela Light: 00:01 Hey, welcome back to the show. I'm here with Noland up and we're gonna be talking about cold fusion and angular and we're gonna look at why you might want to use those both together and we'll also start off just with a refresher of what angular is and the difference between this differences between angular one and angular two and also talk a bit about coldfusion Api. So welcome Nolan.
Nolan Erck: 00:24 Thank you. Thanks for having me.
Michaela Light: 00:27 Yeah, good to see you too. And if you don't know Nolan, he is a chief coldfusion guru at uh, south of Shasta productions and he's been doing programming for more than 20 years and started off doing game programming, but now he's been doing coldfusion and other web development for quite a while and he just came back from Germany where he was speaking at cf camp on cold fusion Anangula I did. So I think we should just start off for folks who don't know. Angular is um, you know what Miller.
Nolan Erck: 01:08 Okay. So angular is one of the growing piles of javascript frameworks that are getting really popular these days. I'm like the other ones, Vue, js and react. Uh, the basics of what angular does is it gives you a model view controller structure for your javascript applications. The more people are relying on Javascript to build modern web development to have more than just the typical request response sort of behavior in their applications. A more functionality is going into Java script than used to be there maybe five, 10 years ago and people are writing tons more javascript now. Therefore the need lots more organization of that Java script and that's where these a javascript frameworks come into play. And Angular is one of the current handful of really popular frameworks to help give you that structure to your front end applications.
Michaela Light: 02:04 Okay. So we, if you, I'm not going to use angular, what are the competing frameworks is jquery or react to it?
Nolan Erck: 02:15 Jquery kind of. You could make an argument for jquery been a similar kind of framework. I think of that more as for doing what I'll call Ui candy in your websites. I'm not really a full on structured mvc framework, but I guess there might be a way to sort of shoehorn jquery into doing that. Uh, some more closely. Um, uh, some more similar frameworks might be things like vjs that's a really popular one right now. React is another popular one that a lot of people like, uh, there's one called Ember and oh, there's probably several others that people are going to be wildly offended that I'm not thinking of at the moment, but those are kind of the main ones I, I, uh, mostly hear about in conversation will be angular view and react would be the main ones right now. Okay. And then the number
Michaela Light: 03:03 and do you prefer wrangler over the others or.
Nolan Erck: 03:06 Honestly, no, they all sorts of different things that irritate me a little bit along the way. Sort of depends on what the clients and the project needs for that particular application. If there's already code in place, sometimes we'll factor that in a to decide, okay, we're going to use angular for this one or Vue js or something else. Um, no, honestly I don't think there's a perfect front end framework. They all, they all have things they do well and they all have things that as I get in and start writing code, I'm bugged me in one way or another.
Michaela Light: 03:39 Okay, well maybe we'll get into some of the things that bug you later. But um, I think now we know the angle is a front end thing. You know, what, what would they use cases be for why you'd want to include angular in your web app.
Nolan Erck: 03:59 Really, you'd include it for building what I would call modern websites. People are moving the current design firms and the more modern design agencies, the more modern looking websites, they're varying off of what I'll call the traditional request response sort of layout. So in a typical coldfusion APP, you might have like a a header and footer dot cfm file, or maybe accustomed tag or even better, you might have an mvc framework like cold box that gives you a header and footer around your website and you inject the page content into an individual page and every time you click a link in that website, the entire header and the entire footer and all this stuff in between gets sent from the server back down to the browser. And there's a lot of repetitive data being sent back and forth. That way the header on a website doesn't change between page to page and page on the site.
Nolan Erck: 04:50 So if I click 10 different links, a website, all of that header code, all of that Java script and graphics and whatever else gets recent down to the browser every time. And yeah, there's like cash and you can turn on your browser. But basically the same thing is happening. The, the, uh, requests requesting the entire website to come back down. Every time you click a link, what people are finding is you can get rid of that phenomenon. Have everything sucked down to the browser once and essentially unplug the server and have it all run inside the browser. There's enough power and functionality in modern web browsers to do a lot more things on the client side than there used to be, so we don't need to do a fresh call of everything off of the server and bring it back down to the browser every time like we used to have to do maybe five, 10 years ago combined that with so many people are surfing the web now on their mobile devices, their iphones and their tablets and they want an experience that just is more engaging than a traditional website might've been.
Nolan Erck: 05:48 You know, in the early two thousands. So you do a lot more heavy javascript animation and a lot more javascript functionality just to make sort of Ajax style things happening in your website a lot rather than the entire page refreshing. Every time you click a link, maybe only know part of the page refreshes if that's where the new data is based on what you've clicked in the site and leave the header and footer in the side Nav. All stays exactly the same and you have more of an application style experience in your website and less of a webpage after webpage sort of experience. And that's where a framework like angular comes into play. It makes it really easy to build that application style functionality into what was traditionally a website or a webpage.
Michaela Light: 06:32 So basically this is going to replace what we Ui Code you would have written in html.
Nolan Erck: 06:38 Not really, no. So you, um, you'll still use html tags just like you did before. You'll still use css just like you did before. In fact, that people are familiar with things like bootstrap for their css. You can use bootstrap inside your angler applications and that all works exactly the same as it did previously. What's going to change is when you click on a link in that webpage, it's not going to go up to the server again and pull down an entire new webpage. It's going to just stay within the client side browser and if it needs new data from the server rather than grabbing an entire new webpage and bringing that down, it's going to talk to maybe a server side Api and just grab the bits of Jason data that it needs to bring that down instead of an entire webpage with a header and footer and redoing all the graphics and so on.
Michaela Light: 07:24 [inaudible]. So this is basically what you hand coded using Ajax maybe 10 or 15 years ago, but it kind of does all the complicated stuff for you.
Nolan Erck: 07:36 Yeah, it's kind of like, I guess Ajax on steroids would be a good way to think about it. We've got that age act style functionality that we had with kind of Vanilla Java script 10 years ago or with something like jquery query as well as the organization of a full blown framework like you would have on the coldfusion side from something like framework one or cold box and you get that all though on the, in your browser and the javascript level.
Michaela Light: 08:02 So I, I guess the next question for me is, you know, if you knew to Anglo, how long does it take to get up to speed so that you can start using it effectively?
Nolan Erck: 08:14 Oh, that's a good question. So there's two types of angular that are out there right now. There's anger there, one which is also called Angular Js, and there's angular two and above. I think they're on version six right now. Stephen might have just been released somewhere around the version six, a ballpark, a angular one or angular js is really, really easy to start using. If you're not familiar with javascript frameworks, if you've only used the Nela javascript and maybej query a angular one is an easier way to go. You can just like jquery where you drop a jquery dot js file into your website and then you can start doing jquery things. Angular works in a very similar fashion. You drop an angular js file into your website with a script source equals tag, and then you can turn on angular and start doing things with it.
Nolan Erck: 08:58 Um, angular two and above is more of an involved process. You have to download no js, uh, there are various command line tools you have to type to get your javascript app to compile angular two and above as much more of, I'm kind of a classic or a desktop app kind of experience. If you're building like a Java or c plus plus App, you have to compile that code and that compiled code gets output it to a binary file or a distribution folder of some kind. And that compiled stuff is what actually runs on your computer. Angular two and above is similar to that. You take all of your fact, you don't even write javascript in an angular two and above you, right? Typescript. You run that typescript through an angular compiler that turns the typescript into javascript and that javascript is what actually gets run in your browser.
Nolan Erck: 09:45 So angular one would be the easier way to go for people that are brand new to dwayne modern and VC, a front end development. Um, I brought this up at the uh, so when I gave this talk in Germany, the demos that I gave my talk where used angular one and there was a comment from the room, they ask why are you using the older version of it? Isn't that basically dead? Uh, the short answer is no, it's not actually dead yet. Yes. They are whipping out new versions of angular every few months. I mean, they're up to version six already. A Google has already said they will support angular one up through the middle of 2020. So for the next almost two years, if Jay Creek comes out with something that breaks angular, they'll fix it. If a modern web browser, firefox and chrome, et Cetera, come out with a new version and that breaks angular one, they'll fix that as well.
Nolan Erck: 10:31 And if they discover any security problems within angular one, they'll fix that too. So there are, there is decent support for it for at least the next roughly two years. And that just Google's official support, I mean the code is not going to just magically stopped working the day that Google says, okay, we're done right in angular one code. That's not, that's not the way technology works. I mean it's possible that a feature update in a browser could come out and break something, but that's not part of the current workflow or roadmap that anyone has in front of them. So I like angular one for people that are brand new to doing this. You can build NBC apps with it, you can talk to server site Apis, you can do all of the MBC type of stuff that are basically the reasons you would start using a framework anyway.
Nolan Erck: 11:17 And then once you're comfortable with that and once you have something you want, if you do it to a point where you feel like, okay, it's time to look at angular two and above, then go ahead and switch gears and you can rebuild your app doing something like that. The um, the good thing about angular one is it's really easy to start using. The bad thing about angular one would be when you move to angular two and above, it's an entire reboot. The code you wrote for anger, the one pretty much all has to be rewritten to use angular two and above. Uh, the Nice thing though is if you write it, the angular two way, going from version two to three to four to five to six extra, there is no three, excuse me, but to, to any of the other versions above it, five or six or whatever, those are all really, really similar so that the pain point is going from one to two and then once you're on the version two type of angular APP after there, it's a pretty much like differences in Java or.net where, or coldfusion where the core language is the same.
Nolan Erck: 12:15 They just add new functionality here and there. They add a couple of new functions, maybe move code from one library to another. So a couple of your config files need to change a tiny bit, but that's just a bit. So that's kind of it. Yeah. I would start with either one for people that are brand new to NBC, if you're comfortable with no, and if you're comfortable with MVC frameworks, if you like learning new languages, especially if you like things that are tight like.net or c plus plus then check out angular two and above and go with one of those.
Michaela Light: 12:44 And you mentioned it's written in typescript. Rank is like pretty similar to javascript or is it a whole new language or?
Nolan Erck: 12:52 It's a little of both. So typescript can do everything. Javascript can do plus a whole bunch of stuff wrapped around the outside of it. So all of the javascript syntax people are familiar with the alert statement if statements and array a for loop writing your own functions. All of that stays the same in typescript. And what they did is they wrapped a whole bunch of stuff around the outside of it that gives you basically typed a type language on top of javascript. It looks to me very similar to things like.net or c sharp. Uh, so one of the nice things about language like coldfusion is I can make a variable called first name and I can stick the word Nolan and it, and it's just fine. And 20 lines of code later I can take first name and set it equal to a number 75 and javascript will let me, uh, excuse me, coldfusion will let me change data types in a variable without complaining at all.
Nolan Erck: 13:42 It's a very loosely type language and Java script is similar in that regard. I can swap different types of data in and out of a variable. And overall it's fine. There's a couple of situations where it's not, but generally it's a loosely typed language. And what typescript lets you do is in javascript. You can have strongly typed functionality on things. So if I don't want to variable to change from a string to an integer to an array to something else, I want to mark it as this variable is only going to hold an array of integers or this variable is only going to hold a string. I can do that sort of thing with typescript. And it's much more of like a compiled a process similar to like c plus plus or Java would be some of the upsides of that you get type of behavior and a, for people like me that come from a c plus plus background, sometimes that's just an easier mindset to get into when building larger applications.
Nolan Erck: 14:36 Uh, it can also help you get rid of some types of errors in your app. If you accidentally passed the wrong type of data into a function in Javascript, you won't really know that until you run the code and see a blow up in front of, hopefully in your test lab that not in front of the client. Whereas with a tight script, a lot of that sort of a checking happens at compile time so I can actually get those errors in my editor while I'm writing code as opposed to after it's been deployed out to a server and um, you know, a client sees or what have you.
Michaela Light: 15:07 So because some areas don't show up until that particular piece of code gets exercise.
Nolan Erck: 15:13 Exactly. Yeah. And that's not to say the typescript is perfect. You still have the possibility of runtime errors, it's just the strongly typed a behavior in it helps get rid of some of that sort of a problem and helps kind of make it easier to wrap your mind around what type of data is this code going to be handling? Everything isn't just the word Var all the way down the page. Like it would be in a javascript APP. You can have actual type snacks. Two variables. This is a string. This is a person's name. This is an array of email addresses, whatever the, um, the types are that you're dealing with.
Michaela Light: 15:45 Now I noticed that Jeffrey House has a new book out on angular and cold fusion. I'm Angela, seven bootstrapping, coldfusion enterprise application development.
Nolan Erck: 15:56 Um,
Michaela Light: 15:57 so I'm guessing in the seven must be just about to come out.
Nolan Erck: 16:01 I'm a yes. I've seen little bits of news about angular seven. I haven't looked at it yet myself. I'm currently actually, I'm still using version five for current projects. I'm working on a. They crank them out pretty pretty regularly. I haven't actually read Jeffrey's book and either I'll have to check that out. I didn't know that was coming out.
Michaela Light: 16:21 Yeah, well we had one on angular, previous motion finding the right. Think he gets updated it.
Nolan Erck: 16:25 Okay. So yeah.
Michaela Light: 16:29 So okay, so we talked about angular one and angular two and typescript, but you mentioned node js. Tell us a little bit about what that is because you've got to install out as well. Get this working.
Nolan Erck: 16:42 You do? Yeah. So on the coldfusion side, I'm going to compare it to cold fusion for a minute here on the coefficient side, in modern cfml development, one of the default tools everybody should just have installed at this point in their career is command box and command box among a bunch of other things. What it lets you do is it gives you a command line, coldfusion specific tools so you can do things from the command line, like turn on a coldfusion server running cf 11 with this particular patch installed, and then within one command in the command line, I can turn that off and turn on a lucee five engine with one particular patch installed and then I can test my code across multiple CFML engine that way. It also lets me talk to the package registry forge box, which is where a lot of open source reusable chunks of cfml code exists that other people in the community have written.
Nolan Erck: 17:38 You can download that code and use it for whatever the project is you're working on and no js is the same thing for the javascript community. It's command line javascript's type tools. It gives you various bits of functionality at the command line to do javascript ish things. Uh, one of them is just like in coldfusion, we have the forge box registry in javascript and node land. They have the NPM registry for node package management and that's the space where people have written lots of reasonable trunks of javascript. And using note I can type a few things at the command line and say please go get that package of javascript code and download it to my current project and, uh, make it available for use in the APP that I'm building. So one of the, one of the different packages that you can download from node is the angular to a tool set.
Nolan Erck: 18:25 So you would actually start the way you start using angular two and above is you download no js and then you'll type of node command to say no, go, please install angular. Let's save angular seven since that's a new one node. Go police installing your setting for me and it will go out to the NPM registry on the cloud. It will grab the particular files, copy them down to your machine and set them up ready for use, and once that's done, you will then have a couple of new command line tools. You can type on your laptop that turn on different angles or things you can do things like and Ge, which is how angular commands all begin. It's Ng for angular and then a space and whatever the command is so you can say n, g, m, create to create a new skeleton of a do a angular application.
Nolan Erck: 19:10 And when I went to compile that type script and turn it into Javascript, I can say Ng build and it will actually compile all of my typescript and turn it into the javascript forming. When I want to set up a very basic http web server to look at that angular code and see that it's running properly, I can type ng serve and it will actually turn on a very lightweight htp server on my laptop and load that code up into the local host web server so I can see the code and test it, make sure it works properly. And there are a few other uh, angular command you get with the command line. But yeah, to do angular two and above, you pretty much have to have installed a. But honestly that's becoming kind of a standard thing and development these days. Service just if you do any modern web development, whether it's angular view, I'm pretty much anything dealing with modern front end web development of some sort or another. It's kind of expected that you'll have node installed on your machine now to do package management to do in any number of things to run, Gulp and grunt tasks, all kinds of stuff.
Michaela Light: 20:17 So you don't have to write code and in no js it is just so you can run angular two.
Nolan Erck: 20:25 Exactly. Yeah. You don't have to, it just a thing you'll install and then you'll have to type, let's say a handful of node or angular commands on your command line to get things to install and start running. But beyond that, you know, you don't have to learn no js to to do those basic things.
Michaela Light: 20:42 And I know Jane, she's just wearing running javascript on your so, so, so.
Nolan Erck: 20:48 Exactly. Yeah.
Michaela Light: 20:50 So the, the, it's kind of the thing that hooks the gala from 10 to the back end and that was the asynchronous calls
Nolan Erck: 21:01 you could or you could use coldfusion to your back end calls and something like Taffy or cold box arrest to do that. The node thing, when you use no to build your angular apps, you don't actually have to put node on your server. You just have to have note on your laptop while you're writing code to build your angular APP. Yeah, I have, yeah. For instance, I have a cold fusion server that all my clients, um, have their websites on and it doesn't have note on it anywhere. My laptop however, has node installed on it. So when I make a new project, I run various node and angular commands on the laptop to build the angular application and then once that's done, I take whatever the output is from that project and move it up to the coldfusion server where it runs like a normal web application would. Sorry, go ahead.
Michaela Light: 21:49 Angela can talk to several back backends and we're going to use it with cold fusion, but it could do to the job of backend, php or node or anything really as long as they consent breast requests or whatever format you're sending.
Nolan Erck: 22:05 Exactly, yeah. In fact, it doesn't even have to be a rest request. It can be any url you have for any web server as long as that web server, hands back, Jason, the angular app can talk to it. It can be written in.net, php, coldfusion, Java. It could be a cobol back into if you had some way to do that and spit out Jason to be whatever you want as long as it's got a url that the angular app can connect to and that you are overturns. Jason, the angular app has everything he needs. I think technically it can also read xnl, but there's a couple of extra steps involved in getting the xml and inside the angular app you'll eventually turn the xml into angular or uh, excuse me into Jason Anyway. So most people, yeah, just have a url that pants back, Jason, whatever you were all, um, whatever backend technology you want to power that url cfml Java and the angular app doesn't, it doesn't know that the backend is written in coldfusion. It doesn't know that it's written in php or whatever else. It doesn't care. It just knows here's the url I'm going to talk to that, get back the data in the format that I want and the code continues running.
Michaela Light: 23:12 Okay. So of course we're going to want to use cold fusion for the back end, right? Um, so why did Angela work well together?
Nolan Erck: 23:23 We'll do, they do, they work really well together. Angular works pretty well with whatever you want to set up your backend to use. The nice thing about cold fusion is we've got several different easy options for building your backend Api. Um, if you've got what I'll call a modern CFML backend and you want to do things like a restful web service, there are a couple of options are really easy to go with. There are some bits of baked and functionality in coldfusion. I want to say 11 and above it might be 2016 and above. I think it's 11 and above. There are some features baked into adobe cf to turn on a rest back end. Uh, there's also, uh, the cold box folks have a, um, a tool that I've written called cold box rest that makes it really easy to build a rest api in cold box and have that return.
Nolan Erck: 24:12 I'm Jason Back to whatever app you have. There's also an open source package called Taffy that works on a variety of cold fusion engines and adobe cf. and that's a free open source thing. You can download it from taffy.io. There's a tiny bit of server configuration involved in getting Taffy to run. Uh, but that works just fine. And for people that are on maybe a little bit of an older cfml, a tech, a tech stack or their app is a little bit kind of long in the tooth. They've still got kind of some dot cfm files that are lingering around, uh, maybe a couple of cfcs, but it's not like a full structured well organized mvc APP. There are still things we can do in those situations to return. Jason Back to, uh, the angular APP too. You can just use functions like serialized Jason.
Nolan Erck: 25:04 You can basically tack that onto the bottom of any dot, CFM file, turn whatever variable you want into Jason and then output that at the bottom of your file. And that will output Jason. And as far as the angular APP is concerned, it got back to Jason at one. It, it talked to an API. The angular APP doesn't care that the [inaudible] might have been written 10 years ago. And maybe the code is still terrible in some spots. It will all work just fine. You can also do tricks like with, um, if you have cf components and you want to talk to a particular method inside of component, instead of going to site name.com/some cfm file, you can go to [inaudible] dot com slash whatever your CFC name is. Let's say user service dot CFC question mark method equals and then put the name of your cf function and that url will actually call that function and output.
Nolan Erck: 25:59 Whatever the results are right there on the screen, you can tack the second url parameter on there so you can say question mark. Method equals function name, ampersand, returned format equals Jason and whatever the output from that function is will automatically be turned into Jason and sent back that way too. So I can have urls that talk directly to cfcs in my app. Those urls will automatically return. Jason, I don't have to change any code at all in my cold fusion layer. It just magically does it based on that return for medicals, Jason being stuck in the url and then my angular APP has the API. It needs to do it is. It's really easy and it works for super well organized, modern CFML engines all the way over to. I wrote this out 10 years ago and I didn't know what I was doing and it's kind of funky in spots, but I need to make it as an api right now without changing a whole lot code, um, and everything in between.
Michaela Light: 26:52 Okay. So just stepping back and looking at the big picture here. Basically you've got the Ui that's collecting information. It wants to probably query the database or put into a database or do some kind of calculation and it's cooling the back end to, to give that information or make those calculations or the business logic and then that's being sent back to the, uh, angular front end to display it in a pretty way is not the gist of what's going on here.
Nolan Erck: 27:23 Pretty much. Yeah. I think the one change I might make to that statement will be the business logic that we used to historically think of as that has to happen in the coldfusion and um, for power and performance and such. A lot of that can now happen on the front end in the javascript angular side because modern browsers are so powerful and the MVC frameworks can do so much for us to. You can have a lot of business logic happened in the javascript player. Uh, but yeah, at the end of the day, javascript still cannot talk to a database directly. You have to push that up to the cloud somehow to get it into your database. And that's where the coldfusion API would come into play. So you can do like your validation, um, some of your validation anyway, and you can do various business rules in your app at the javascript layer if you want it to. And then when the user friendly hits, let's say the save user button, when the javascript is ready to say, okay, now I want to save this to a database, it can then make a call to the coldfusion API to push that data up to the server and say, okay, save this to the database. And then your cola fusion layer will actually do the cf query answered into table name a code state before you.
Michaela Light: 28:29 Okay, I'll make, makes sense. Um, how do you deal with security and, and this, I mean if the angular front end is writing directly to the cfcs, couldn't someone else kind of fight that out somehow?
Nolan Erck: 28:43 Uh, yeah, that's a good question. So yeah, you could, I guess you deal with it the same way you would deal with a modern CFML APP even if it wasn't anger there on the back end you have things like you would have to write some sort of code in your coldfusion APP. Let's pretend it's 10 years ago. We're not using angular and we just have a regular coldfusion APP. You'd still have function calls in your code that say, before I save this record into the database, make sure the user is logged in, make sure it's a valid user that's logged in and make sure they have their credentials to actually do whatever it is they're trying to do. And then if they pass all those rules and you say, okay, go ahead and run this, saved into the database and it's no different really with a modern web app, you'll have to do some sort of basically handshake between when people log into the angular app, the APP will do some sort of talking to the API saying I have a user that's logged in, give me some sort of token I can pass between the coldfusion side and the angular side so that, you know, this is me and not some random person on the other side of the planet trying to hack the website.
Nolan Erck: 29:42 Basically do that sort of handshake process between the two in, in one of several ways. You'll pass some sort of magic number of back and forth or use browser cookies or use whatever combination of things works for the application is doing. Um, yeah, you'll have to. There are some design concerns for sure in building an APP like this, but that's true of any, um, any web app really that has, has to have security around it. So it shouldn't be that different to web developers to worry about security than what they've dealt with before.
Michaela Light: 30:19 Right. That makes sense. I just think it's good to always be aware of security when doing a cold fusion or. Anyway, map.
Nolan Erck: 30:28 Yeah. So I'm kind of giving the, like five second answer of that now just because we could go on a whole tangent on different ways to secure up and we'd be here all night.
Michaela Light: 30:36 Well that can be a tool for another day. Exactly. Um, because, you know, sometimes recently, I mean, I think when British Airways got hacked and they, someone managed to inject some javascript front end, kind of faked out or recorded the credit cards being run through stripe will, you know, it was some weird stuff that someone managed to get in there. I think they injected it through some full go saved.
Nolan Erck: 31:02 That's possible. I don't remember the details of that particular attack, but yeah, that sounds like something that could have happened.
Michaela Light: 31:08 Three hundred thousand credit cards. So that all fine. Yeah. Probably wasn't that big a deal. Right. Um, so let's just talk a little bit about, you know, architecture here. Are there any design patterns that fit well for this or can you do it, you mentioned you could just take, you know, cfcs you've wrote 10 years ago and retrofit for this, but would it be better to use a particular design pattern?
Nolan Erck: 31:35 Yeah, there's a couple of different ways that are probably better than others to do it. Like if you're, if you're really in a bind and you have a legacy cff, you have to turn into an API now, the quick and dirty way to do it will be just at the bottom of your cfm file place. I call it a serialized Jason. Stick the variable in there. And then whatever that outputs you returned that to the browser. And that's essentially your Api. That's not a great design that will get you buy in a pinch if you have to. Really at this point, what I would recommend is either Taffy, if that looks like something people want to use, or probably even better at this point would be the cold box rest api. Um, they both do the same kind of thing. They're both a skeleton to use to build your API layer in coldfusion. They both provide a dashboard to show you what the different Api endpoints are in your app. They're both free. They're both open source. They both work on all the different web servers that are out there.
Speaker 3: 32:28 Um,
Nolan Erck: 32:31 the difference, I guess would be, uh, the or disguise. It's a team of the Taffy was written by one person, Adam, and he's awesome, knows epis and rest and all that sort of stuff backwards and forwards. He's written a great book about it called rest assured that I recommend everyone check out the artist product is just a shortened by a team of people. So there's, you know, I don't know how many people are on the team right now, let's say five, probably more than that. They're just more people there that can answer questions if you get stuck on something. Um, and they're a little bit more heavily involved in the cf community right now because they're, they're just kind of the juggernauts of people that contribute to cfml right now. So, not to sound like I'm talking bad about Adam and the work he did.
Nolan Erck: 33:10 I use taffy on a projects here and there, it just, it's a difference of one person being able to be reached versus you know, a team of five or six people on the order side that are able to be reached if you have a problem. Um, and the uh, yeah, they, they both worked pretty well. They both give you a nice structure. Actually, now that I'm saying it out loud and thinking about it, I would go with the [inaudible] that because it gives you more of an NBC structured approach to your Api. Whereas taffy gives you an easy way to build in points. Here we go. Let's, let's back up mckayla. I'm going to backup and revise my answer. If you have a legacy code base, old dot cfm files or maybe the odd cf component that you're not quite sure how to turn it into a full blown mvc app yet taffy might be the easier way to get an api up and running. That's got some API structure to it. If you're a little bit more well versed in NBC or you just know that you need to go that route anyway and see what it kind of head that direction with your Api as well. The coolbox rest project is probably a little bit better longterm solution for that sort of thing. My opinion.
Michaela Light: 34:14 Okay. Now you mentioned NBC. I've also read about and bb and do you know what that is or how that fits in
Nolan Erck: 34:23 or so and the, the um, it's more like, um, some mvc is model view controller. If you've got your model, it's like the data model part. That's where all your data is stored into your database stuff. Any code that talks to an xml file saved to a flat file, um, big chunks of your business logic that do validation before saving to those things. That's all your model stuff and your view code lives on the other side. And that's the code people actually view in their web browser at the buttons they see on the screen, the graphics, the links, paragraphs of text that your view. I'm a controller sits between the two and sort of manages those things. When the user clicks on a certain link, the control assist, ah, the user clicked on the list, new employees button, I need to go have the model, return me the list of new employees and hand that off the screen so it can be drawn in the view, um, with a model that's an MVC project.
Nolan Erck: 35:11 And angular one is an MVC type of project. You have a view layer, you have a model layer and you have a controller that sits between the two and sort of connects those together. Uh, if you look at the code in an MVC, a javascript app like angular one, it's real similar to the code in a job. I'm an MVC APP from something like framework one or cold box or even things like model glue. If people are familiar with that Mvvm m stands for model view, view model. And the idea there is there is no controller, you've got a model and you've got to view and they're connected together directly and whatever data and one of them changes the data automatically gets updated in the other side. So if I have a view where I'm typing things into a form field, if those fields on the webpage map up to data in my model as I'm typing it into that form field, it's automatically updated in the code, in the javascript model site.
Nolan Erck: 36:06 I don't have to press a save button, I don't have to reload the webpage. The two just are automatically always in sync. Um, so any changes I make here in the view automatically go into the model. And on the same side, if I have business logic running here that changes those values in the model, those values will automatically be reflected in the view over here too. Again, I don't have to hit save, refresh or anything to make those changes appear. Just the two sides are more directly linked together. There's no control or between the two passing data back and forth. So mvc and Mvvm are very similar data patterns, uh, mvc is used more in the angular one stuff and I'd say Mvvm is more the way angular two and above. Um, it's Kinda mapped out. There might be some purists out there that maybe want to split hairs with you on some of that, but that's generally how I would describe the code.
Michaela Light: 36:59 Okay. So if, if you're doing all this nice stuff on, on the front hand, down the back end, do you have to worry about dependency injection or tool or older things get instantiated too?
Nolan Erck: 37:13 Um, that's a good question. So on you basically on the angular two side, on the angular one or two side, I'm part of turning different functionality on in angular will be done through dependency injection. So on the coldfusion into things dependency injection is usually its own framework. You install and start using something like cold spring or wire box or diy and you actually download those things and installed them and configure them in your coldfusion app. And then you write lines of code that are specific to wire box or d, I want to say, hey, why are box go get me this library and make it available in my code or go turn this function on and make it available in my code. And the way it works in angular is much more simple than that. You basically have, um, I don't have code in front of me to show you, but essentially what we do is like at the top of your angular chunk of code, you'll have a variable that is just, it's an array of names of libraries and these are the libraries of javascript code that I want to have available in whatever the chunk of code as I'm writing with tenant could be a controller or a model, some function inside one of those sections of my angular app.
Nolan Erck: 38:25 You basically just have an array. You put the names of the different things you want to have available in there. And that makes it work in angular. So it's the equivalent to like I'm on the diy side, you have been call, you said get bean and then you pass it something like user service to get back to the user service component and turn that on and off and an angular. Instead of saying get being user service, you just have these brackets for an array. You type user service in the middle of there and then angular knows how to use that name and say, oh, I need to go find the use of service in whatever other dot js files I've loaded up or whatever other type script stuff I've compiled and make that a class available to the calling chunk of code. So short answer, yes, you'll use dependency injection. I'm on the javascript angular side. It's really, really seamless. It's just kind of baked into angular. You just. You have a, an array somewhere in your code. You put the name of the thing, you went in that array and then angular takes care of the rest for you.
Michaela Light: 39:24 Oh man, that sounds cool. Now, if you've got a really heavy judy APP was getting a lot of traffic, would you recommend using the adobe coldfusion api manager on the back end or
Nolan Erck: 39:39 um, you could, you could use api manager to keep track of what's going on. I guess before that I would, before I went to the point of installing a new thing like an api manager, let's assume like we hit were having problems with our APP. Let's go over that point like we're looking at possible solutions because we're having an issue with the APP. What I would probably first do is look at the performance of the server with something like fusion reactor. I figure out, okay, where is the actual performance problem happening? It could be something that the API manager helps resolve. Excuse me. Um, it could also be something that maybe is fixed by just turning it on better caching options within coldfusion or within some other layer of your server. Uh, but if it turns out yes, we're just getting a metric ton of API requests and we need something to manage that, or we have five or six different, um, entities managing or api or you know, that we need to kind of consolidate all together into one spot, then yeah, something like the API manager might be a solution worth checking out and that would help, uh, if not speed up the application, it might help just organize the application quite a bit and make it easier to track which Api end points are getting the most traffic, which ones might be causing the most bottlenecks, which places in our app we might want to introduce throttling and then charge customers more for, um, you'll get a lot of that sort of a analysis out of the API manager for sure.
Michaela Light: 41:10 Yeah. And you know, we'll provide security on your API and a versioning and a whole bunch of other. Exactly. If you're sharing it out, not just in the angular front end, but you're sharing it out to the audience. Exactly our own front end to it. So a lot of benefit to that. So, um, before we change gears and ask some questions about cold fusion, is there anything else on copd patient and ideally you want to share?
Nolan Erck: 41:40 Nothing comes to mind. I think I'm just a, I think a lot of people, there's a wide variety of coldfusion developers out there. Some are writing very modern CFML apps with lots of Apis and lots of front end heavy javascript applications, um, at other people that are writing more legacy CFML apps out there. And I just feel like people are often are getting. I'm bewildered by how fast angular comes out with new versions of code out there and the angular, I'm hardcore developers don't like to admit it, but angular one is still supported by Google and it will be supportive for two more years. So if you are brand new to that stuff and it still kind of freaks you out, check out angular one dot six and install that. It's much easier to start using so you can kind of check out what [inaudible] does and build your first single page application with less of a learning curve. And I'm not get scared quite so bad. So I think that's probably the best takeaway for people that are maybe not up on all the latest and greatest javascript stuff.
Michaela Light: 42:44 Right, right. And probably checking out Jeffrey's book as well. Yeah, exactly. I'll put that in the show notes on the terra tech site along with we have the resources you mentioned. Um, so let's just ask some questions about coldfusion, which is unfair. Why are you proud to use coldfusion? No, it's 2018. Some people think coldfusion is little old in the tooth, but obviously you're still excited about using it. Why are you so proud of you? Isn't it?
Nolan Erck: 43:12 I am. I still like using it. I. So I run a consultancy for a living. Clients will often come to me. I give the same answer every time I talk to clients, come to me and asked me to solve a problem for them. Here's the APP we want built. What do you think the best way is to build that? And I'll try to be really objective about what makes the most sense. And if I'm looking at the technology stack for what I'll call it, traditional web app, there are obviously exceptions to every rule, but for the standard web app, which is what most people really want built, nine times out of 10 CFML is the easiest way to go. I get the most bang for my buck per line of code. I get more done out of the box than I do with tools like.net or php. Um, it just works. It saves me. There's less code to type. There's fewer third party things I have to include. It just works really well. And in the spots where I do get stuck and have a question about something everyone I've met in the community has been really, really supportive. We've got a great CFML coldfusion community. It's easy to get questions answered. It's easy to find the solution you need and be productive.
Michaela Light: 44:20 Great. So, you know, I alluded to that, you know, corporations is 23 years old, I think it was originally created in 1995 by the Ilab rather before macromedia and adobe sequentially bought it. Um, so, and some people think that copd patients, you know, dying, which from what I've seen all the conferences this year, that doesn't seem to be the case and I just wrote a book on it and there's been a best seller for the last month. Um, so my question to you is, what would it take to make coldfusion even more alive this year?
Nolan Erck: 45:01 Um, I think it's, it does. Uh, I think you're right, it is, seems to be doing well. Uh, my opinion is rather than having a lot of junior middle and senior developers, I think what I'm seeing more of the senior developers are doing really, really well and there's more junior developers kind of checking it out for the first time. Uh, that Middle Group of people might be the group that's shrinking a little bit, but at the same time that shrinking. I think the people that are doing cold fusion at the senior level are doing leaps and bounds more stuff with it than they were five years ago. Um, to make it more alive. That's a great question. I think I would like to see somehow the mar, the perception that it is dying a lessened and I'm not sure if a great way to do that short of kind of rebooting the entire thing and giving it a new name, which has kind of a drastic measure of it. It'd be nice to see
Nolan Erck: 46:01 more. I'd like to see more CFML coldfusion apps. I'm behind some of the bigger projects at adobe, like powering more of the creative cloud stuff. Uh, I'm not sure why they've used a variety of technologies, um, that I'd like to. I know I've got a few CFML sites that are running over there. I'd like to see more of those. Um, as far as the community level, if things go, we could probably have more open source apps written that are useful for other people. Like in a, let's say 10, 15 years ago we had things like lighthouse, which was the bug tracking app that Rick and, and wrote and blog CFC. Uh, there was also, oh, there were one or two other blog engines I can't think of the names of right now. There've been a few of them men go blog, that was one. Um, we've had a few open source apps that have done a lot to power, you know, small blogs and websites and other cfml based things over the years.
Nolan Erck: 46:56 Personally, I'd like to see more of that sort of stuff, have more people contribute to open source projects of their own, not just fixing bugs and things like cold box or wire box, which is great. I'm not saying don't, don't do that, but come up with a pet project in CFML and build a website that does it. They don't have to be the next wordpress killer. If you have an idea for a web app that lists your favorite rock concerts, build that and put it on get hub so people can check it out. If you have an idea for building a blog powered by a blog software powered by cold box or something, then put that out there, share it with the community. Just show people like, look at how much I was able to do with such little amount of code, um, and share it with the rest of the world. I think things like that will help, uh, help with coldfusion forward.
Michaela Light: 47:42 I think those are great suggestions, Nolan and maybe on, you know, uh, an easier thing to people get started. Just social share about the cool thing you did this week with coldfusion or maybe share a code snippet or if you have a blog blog about it a and share, hey, is what I learned about this cool feature and it's what I did with it.
Nolan Erck: 48:03 Yeah, absolutely.
Michaela Light: 48:05 Or, or even just have a conversation with other people because I have conversations every week with coldfusion developers and Caucasian managers and some of them are like, they didn't even realize cold fusion was still around and, and thriving. So, um, you know, is by all of us having conversations that we can change that perception.
Nolan Erck: 48:27 Yeah. I always. So when I hear that part of it, the, I didn't rethink coffees were still around. I feel like that's not always,
Speaker 3: 48:34 um,
Nolan Erck: 48:35 a representation of where coefficient as is in the market space right now. As much as that's just a representation of that person doesn't keep up on what politician is doing. Like, I'm not the right person to
Nolan Erck: 48:47 express opinions about what other languages are doing that I don't keep up on. Like I'm, you know, I'm not as well versed in what the groovy on grails community does right now. So I couldn't, if, you know, someone asked me about that I might respond with, I don't know, are they still around because I don't keep up on it. Whereas they could have come up with a new version of something last week that does amazing things and because coldfusion started as a non open source platform and it was not open source for so long before we had options like lucee and Railo. Um, I think it has that reaction to it from a lot of people that don't look at that community very often. And it for a long time was it harder community to look into because it was so closed off. It's a little bit better now with things like lucy out there. I'm doing much better. But yeah, I think that's, I've, I've always felt like that's more just. I'm going to sound a little bit crass when I say this, but that's more like an example of ignorance on the part of the person making the comment that it is a representation of where CFML is at currently because it really is, it's great. It's modern. We got new versions of adobe and lucee within the last, you know, couple of months. They both do great things that the previous versions didn't.
Speaker 3: 49:57 Um,
Nolan Erck: 49:59 I, I still think I can get more done with one line of CFML, but I can with one line of pick your favorite other backend web language.
Michaela Light: 50:09 Well, you know, Rhino's started in 2002, so actually, you know, that's been around for, you know, there's been been an alternative noncommercial Bush or a longer than this been just only a promotional brochure, but I think that news some gold out there.
Nolan Erck: 50:28 Yeah, that's true.
Michaela Light: 50:30 It is out there and it's free open source version of coldfusion and they just released version six right at cf camp in.
Nolan Erck: 50:37 I think they announced it. They didn't release it. They said it's coming out.
Michaela Light: 50:39 Okay, well let's switch to talking about a competency. I know you were speaking recently at Adobe coldfusion summit in Las Vegas and then see if camp in Munich. Yeah. So tell us what you enjoyed about each of those.
Nolan Erck: 50:53 Um, so there were both, uh, let's say the Adobe Conference in Vegas was obviously very adobe cf, a centric. They focus a lot on the new version of coldfusion 2018 that just came out and for me as a developer, I really liked getting all of the new information about that. It's got lots of features that I as a developer will be able to benefit from, um, in the code new things like a approach for closures and run a saint because I can write a more asynchronous code, build a little bit more of a modern technology stack that matches modern drops, frameworks, things like the Gnocchi word are in there now. And for someone like me that has an [inaudible] background in C plus, plus they're adding several new object oriented features like a abstract and final that c plus plus and.net and Java have had for a long time.
Nolan Erck: 51:45 And now we have them in CFML as well. So, um, I liked that I can think more similar to how I would build a c plus plus or Java App in cfml if I need to go down to that level of specificity, I have more options to do that now in cfml than I did previously. Um, so things like that. Where were the big takeaways for me at, uh, the Vegas conference. Another favorite talk was at that conference was also a Brian Class, gave a talk on using coldfusion to power Amazon web services and build different bits of functionality off of aws into his apps and scheduling all of that, empowering some of that code in this APP with a CFL. So that's always really good to see. Brian does a great job presenting that information. Every time I see him. I'm in Germany at cf camp.
Nolan Erck: 52:35 It was a little more half and half. There was an adobe, a presence there. Rakshith was there and talked about a lot of the new stuff in CFA 10, 2018 a gave a similar talk to what the one that gave them Vegas and showed here's abstract and final. And Renee sank a lot of the new Oh, stuff that they've added into the, the later versions of cold fusion, the Lucy guys were also obviously there and showing some of the new features they've added into lucee five dot three, whatever the latest, uh, Lucy licenses and they talked about lucy six coming out as well.
Nolan Erck: 53:06 And just good to see both engines at the Germany conference talking about the new features that they've been adding. I, I feel like having the two cfml engines out there, I'm sort of quote unquote competing with each other. It helps move them both forward in really good directions. They're both looking at what the other one is doing and hopefully I'm trying to make sure that they add features that are similar to what the other platform is adding. And then also adding new things that are, you know, um, something to differentiate themselves from the other platform as well. Um, and the Germany community is just great. I've been to the CF camp in Germany, I think four times now. And they always have a great experience there. They have. That conference has actually grown several times in the last five years. They've had to change venues I think twice in five years because they keep outgrowing the space they had previously.
Nolan Erck: 54:00 Uh, I talked to Michael that runs the cf camp conference and I think you said last year they had attendance of about 1:30 and this year was up to like one 65 or something. So not as big as the 500 people at cf summit, but percentage wise that's a pretty decent jump from the previous year. The new, the new hotel and venue they have for cf camp in Germany is great to have a real like layout. I like where they're at now. Staff were super friendly food, the venue, the presentations were all really top notch. Uh, there's talk of this coming year, so 20, 19 cf camp, I think it's going to be the 10th cf camp and they're talking about stepping it up even more, trying to have bigger rooms and more people and more surprises for the 10th anniversary and some really looking forward to that. And hopefully going back to Germany again just because cf camp next year.
Michaela Light: 54:55 Yeah, no, it's exciting. You know, we were there interviewing people and um, it definitely seems to have wrong and you know, it really, I know it is located in, in Munich, Germany. A lot of people came from other countries in Europe as well. And even from the United States.
Nolan Erck: 55:17 Yeah, there were several of us from the US over there.
Michaela Light: 55:20 Yeah. So, um, and one of the things I did, I was at cf summit this year and you know, I released my new book, cf alive, making coldfusion modern, vibrant, insecure, and uh, I want to thank you for being one of the people I interviewed on that book.
Speaker 4: 55:39 Um,
Michaela Light: 55:40 so helping and all the things you do in cold fusion weld to help make things more modern.
Nolan Erck: 55:47 Well, thank you very much. I appreciate that. And it was my pleasure to be part of the book. Um, I'm flattered that you asked. It was great to be a part of that.
Michaela Light: 55:53 Yeah. Great. Well, hope to hope you have a great thanksgiving. And for those in America who celebrate Thanksgiving, hope you also have a great thanksgiving and maybe it's a good time to think about what are we grateful for in the coldfusion community with cold patient language as well.
Speaker 4: 56:13 Um,
Michaela Light: 56:15 I know I'm certainly very grateful for all the things I've been able to deal with it. So. Cool. Well, thanks. Being on the show today, uh, I'm going to go ahead and end the broadcast. Okay. Thanks for having me. And thanks everyone for watching and sharing with the broadcast with other people. You can subscribe on itunes or on Youtube.