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:
Google has some good resources on Progressive Web Apps (PWA), including this Your First Progressive Web App tutorial.
iPhone 'user agent' FAQ: I'm trying to optimize my HTML/web app for the iPhone; how do I detect an iPhone, iPod, or iPad browser in my web application?
iPhone HTML app icon FAQ: I'm creating an iPhone HTML web app, and I want users to be able to save my HTML app icon to their iPhone home screen; how can I add a custom iPhone app icon to my web application?
The iPhone Mobile Safari web browser recognizes a special HTML tag that lets you add an iPhone app icon to your HTML application. Here's the syntax that lets you add an iPhone app icon to your web app:
iPhone HTML apps status bar FAQ: When creating an iPhone web app so it looks more like a native iPhone app, how can I control the iPhone status bar color?
Once you've removed the iPhone Safari browser URL bar, the next thing you can do to make your HTML web app look more like a native iPhone app is to control the iPhone status bar. The status bar is the bar at the top of the iPhone screen.
iPhone HTML web app FAQ: In an HTML web app optimized for the iPhone, how do I remove the URL bar on top of the iPhone Mobile Safari web browser so I can show my HTML app in full screen mode?
When you're creating an HTML/web app to look like a native iPhone app, one of the things you'll want to do is remove the URL bar in the Mobile Safari web browser. This is the URL bar on the top of the iPhone browser, and by getting rid of it, you can display your web app on the iPhone in full-screen mode.
iPhone HTML page size FAQ: In an HTML web app optimized for the iPhone, how do I set the page size to be the optimal iPhone page size (iPhone page pixel width)?
By default the iPhone assumes HTML pages are 980 pixels wide. When you're creating a custom iPhone HTML app, you really want to control this page size so your web app will look better.
The way you change the iPhone HTML page size (pixel width) is to use the special iPhone HTML "viewport" meta tag, like this:
Here's an example
web.xml configuration file where I show how to configure the Spring Framework to properly load for a Java web application. I'm intentionally trying to keep this Spring example simple, so my
web.xml file has almost the bare minimum configuration.
I show how to load the Spring
ContextLoaderListener class with the
listener-class tag, and also show how to load multiple Spring application context files using the
param-value XML tags.
You'll probably have to know a little bit about Java, Ant, and build files for this sample
build.xml file to be any use to you, but if you're looking for a sample Ant build script that can be used to create a
war file, or one that simple uses a
war task, this example might work for you.
I'm not going to provide any explanation of any of this right now, but if I have time in the future I'll come back here and add a few comments about how this build script works.