Cloud Messaging

Ah, Cloud Messaging. What fun. I have gotten this to work in React Native on Android, and I thought well gee, I should use this in the web version too! But it doesn’t work in IE, and even in Chrome it only works over https (which I don’t have in my development environment), and you need a service worker, blah blah blah. This is starting to sound like a pain in the ass.

So then I thought OK, what do I do when I can’t do cloud messaging? Web sockets? Polling? Polling seems horrifyingly primitive, but it’s super simple, and it will always work if the server is working at all. So I’m going to need it as a fallback anyway in case whatever web socket garbage I’m going to need isn’t available. I’m not totally convinced that web sockets are more efficient anyway. I mean I’m supposed to have a socket connection open to every single person using the web app? At least with polling, not everyone is connected at once, and I can tell them to poll less frequently if things are getting out of hand. I could exert some control over how many web sockets I have too, by kicking out the idle ones as new ones come in… but then all the disconnected web sockets are going to be knocking on the door again when they become active, and it starts to look a lot like polling! So I may as well just do it.

Mostly Live

I have the web version of the app running, and while it is pretty gruesome, it seems to mostly work so far, after a few bug fixes. This is going to be a long process. But it is live! Nobody is going to see it yet, because I am not advertising it anywhere. I think the chances of someone stumbling upon it by typing in the URL randomly are pretty low. Once I have the mobile app ready, then maybe people will stumble across it in the play store.

But regardless, all the pieces are in place. I have found that the process of publishing from eclipse to tomcat is very “sticky”. As in, it is a cumbersome process just to publish a new version. I usually have to delete and regenerate things at several steps in the process, or else I end up still running the old version. So I need to figure out a better process for that. Other than that, though, things are going pretty well so far.

Going Live-ish

My dear old mac mini acted like it was dying this weekend, so I decided to take the leap and move to the “cloud”. It’s 5 bucks a month so I get to have one less Starbucks a month, and the domain name was a dollar. Hard to argue with that price. I have since found out you can get domain names for free, so I suppose I overpaid.

Anyway since my last post I wrote a mobile app for the dating site! I used react native, which is pretty easy to pick up except that my programmer-level graphic design skills are somehow even more on display. So things are going to be pretty ugly at first. But what are ya gonna do, you gotta start somewhere.

Spring Boot & React FTW!

Smashed a few tutorials together, threw spaghetti at the wall and got Spring Boot working with React, without any REST nonsense. This is the way forward.

RESTful snottiness

Good lord I tried a Spring Boot/React tutorial that also dealt with REST, and what a headache that is. It strikes me as very academic, with people arguing about what is proper and pointing fingers at others who aren’t “doing it right”. Just the notion of trying to implement a search on the server side opens this whole pandora’s box of whining and arguments. Sometimes it’s okay to just get something done! I think I am going to learn one thing at a time and leave RESTfulness for another day.

React

I did a React tutorial tonight, and this is definitely more my style. Two files! Multiple classes in a file! Way easier to keep track of what is going on, and I think it will be easier to build an app with so I may start with React and see if I can port it to Angular once I have an idea of what all the widgets are going to be and so forth.

Angular Cleverness

I started in on some Angular tutorials tonight. My first impression is that it is a “too clever by half” kind of deal. There’s a magical list of service singletons somewhere, and they get injected out of thin air! I suppose it is not really a huge deal, as making it explicit would only involve a few lines of code that nobody’s going to miss. It just struck me as odd and unnecessary.

Also, after more than an hour and a half of slogging through the second tutorial, I’ve got about thirty files open and I’m not done! That is a lot of verbiage to do not much. I might like it better if some of these files were combined in some way. But that is another detail, who knows maybe I will end up appreciating it.

All in all I am starting to see how I could write an app with this thing. I am going to have a little competition with my dating app – implement it in a few different technologies and see which one looks/works the best.

First Garbagey Version!

I decided to abandon my Ledger application (which works much better in desktop Java) and work on something that is dear to my heart… a dating app! I have just finished the first very ugly version. I am going to try to learn something about how to make an attractive web site… I have a lot to learn.

In technical news, I upgraded to Spring Boot, which was a complete non-event that didn’t work out of the box. But after some hacking, I got it to replicate the exact functionality I had before. Progress I guess?

I also started reading about Angular, React, and Vue, because apparently those are all the rage. Perhaps I will try one.

Other neat things I found: cropper.js for cropping images, and three.js for 3D graphics in WebGL. Both very fun and easy to use. I made a 3D “captcha” with a cube that you have to spin around, which I am sure provides no security whatsoever. But it was fun to make.

This Is Ridiculous

This Tomcat/Java/Spring stack is getting a little out of control. I look around the web for samples and they are like, “okay first here are the ten configuration files you need. Here is the folder structure with 17 different folders; Here are the 27 different classes you’ll need to write; and voila, Hello World!”

I am having to fight for every inch. With all the duct tape and bubblegum I am putting on the samples and configurations that don’t quite work out of the box, the whole thing feels a little rickety. But it seems to work, so far.

My Brain Hurts

As I develop this web site, I am being painfully reminded of how much work goes into a web site! And how much more difficult it is to learn new things at 45 than it was at 25. It seems like there is an ocean of new tools out there that all need to be configured and connected together. But I must learn them, if I want to keep up with the industry.

For the curious, I am using Apache httpd, Tomcat, and Java/Spring. And Bootstrap, and jQuery. That’s six things right there! And I have barely scratched the surface. None of these things are new to me, but it’s been a few years since I’ve used some of them and they are constantly changing.

Also, my brain hurts from blog spam comments, which are numerous.