browser

Scala.js tutorial: How to start building single-page web applications

Table of Contents1 - Single-page applications2 - 1. Getting started (dependencies)3 - 2. Create hello3.html4 - 3. Create Hello3.scala5 - 4. Run the code!6 - Summary/Discussion7 - Resources8 - More facades9 - Other tutorials in this series10 - Bonus!11 - Source code

In this final, third part of my three-part introductory series on Scala.js I’ll demonstrate a technique that can help you build single-page web applications with Scala.js. That is, the body of your HTML page will look like this:

<body>
    <div id="root"></div>          

    <script type="text/javascript" src="./target/scala-2.12/scala-js-hello-world-jsdeps.js"></script>
    <script type="text/javascript" src="./target/scala-2.12/scala-js-hello-world-fastopt.js"></script>
</body>

After that, your entire application will then be written in Scala/Scala.js, which is converted into JavaScript code in the scala-js-hello-world-fastopt.js file.

Getting a Mac/Java app ready for Apple’s Mac App Store

Over the last two days I’ve gotten a Mac/Java app ready for Apple’s Mac App Store, including bundling the application as a macOS “.app” application bundle, and signing it so it can be submitted to the Store.

A relatively quick look at my browser history shows that I needed to hit over 260 URLs to get that done. As a wise professor once told me, “Keep learning, keep learning.”

FLiB Home Page

Note: You’re welcome here, but this page isn’t intended for other people; I use it as the home page for my FLiB Android browser.

Android: How to go back to Google App stories after closing the Now card

I like the “Google” app on Android — the thing you see if you swipe right on the Android home screen. But a weakness of it is that you can’t get back to a story easily. For instance, this morning I followed a Google Now card to see a story about Tom Ricketts and the Cubs, closed the story, then thought, “Wait, I meant to look at XYZ in that web page.” Once you close a story like this the Now card disappears, and you can’t get back to it easily (which is the weakness).

Solution 1: Going back to Google Now app stories on Android 7

I don’t know if this is the only way to do it, but as a solution, one way to get back to the story on Android 7 is to follow these steps:

An RSS Reader written with Scala and JavaFX (the beginning)

I just started writing an RSS Reader application using JavaFX and Scala, and I thought I’d post the initial code here. This code shows several advanced Scala techniques that Scala developers might need to use when writing Scala code to interact with Java, and in this case, JavaFX.

A custom JavaFX web browser (to show stock quotes)

I’m currently doing something completely different, and writing a little custom web browser using JavaFX and its WebView component. I’m using it so I can easily look at stock quotes and charts. I just started on it, and the current UI looks like this:

A custom JavaFX WebView web browser