Tuesday, September 19, 2017

iOS 11 for iPhone

Today is the annual update all your iOS devices day, thanks to the release of iOS 11, watchOS 4 and tvOS 11.  I have been running the public beta of iOS 11 on my iPad for over a month and on my iPhone for about 2 weeks.  Here is a quick review of the biggest changes in iOS 11 for iPhone, because the scale of the changes on the iPad is too big for anything quick.

Control Center

The most dramatic change for the iPhone is the new Control Center.  You may not know its name, but  if you have an iPhone it is likely that you swiped up from the bottom of the screen to reveal a set of controls for turning on airplane mode, or most likely to use the flashlight.  It is the same area where you may have seen music controls when you were trying to find the flashlight and only after trial and error realized you could swipe right to find the page with the flashlight.

In iOS 11 the multi page Control Center is being replaced with a single page that is now much larger and contains lots of buttons of different shapes and sizes.  
It takes a while getting used to all the new controls and what they do, but after a week or so it becomes second nature.  Simply tapping on the controls will perform the expected action, but if you long press or 3D Touch on some of they will reveal a more detailed control.  For example, long pressing on the flashlight will give you three options for brightness.  


Not a lot has changed in the Messages app, but since it is used by a lot of people I wanted to point them out.  In iOS 10, the introduction of apps in Messages was a tent pole feature and they invaded the Messages app.  One downside to this was you had to do an extra tap to attach or take a pictures.  I know it doesn't seem like much, but it really annoyed me.  In iOS 11 apps in Messages are featured differently and as a result the camera is now only a single tap away.
Now instead of using an arrow button to reveal the camera, the text input field is a little smaller and the icons for the camera and app store are always displayed.  A new row of apps is always displayed to help encourage their use, but in a nice and subtle way.  My only gripe about this new interface is once you type a certain number of characters the input field grows and it always "startles" me as the display changes.

Live Photos

One of my favorite features on my iPhone 6S is Live Photos.  I almost always forget to record video of different events and it is so nice to be able to see a brief snippet of video that I "accidentally" captures.  I generally leave Live Photos turned on, because why not.  In iOS 11, Live Photos is getting a couple upgrades.  My favorite is the new Live Photo Effects: Loop, Bounce or Long Exposure.  I know these already exist in apps like Instagram and Snapchat, but it is nice to be able to apply these effects after they are taken.  
To access the Effects just slide the Live Photo up to reveal a live running example of what it will look like.  There is a slight delay as the effects are applied so be patient, but once they have loaded you can tap on the effect you like and the photo will be updated.  The first option is Loop, which tries to create a looping video that repeats over and over again.  The second option is Bounce, which will play the video forward for a certain amount of time and then reverse it for the same amount of time.  The last one is Long Exposure, which will basically overlay all the different frames together as if you left the shutter on your camera open for a long exposure photo, this works best for things like waterfalls or night shots.

Other Random Changes

Above are the changes I found to be most notable on the iPhone, but here are some more quick things you may notice.
  • Taking a screenshot will now show a thumbnail in the bottom right corner of your screen for a few seconds.  You can tap on it to mark up the thumbnail and choose to share it, save to Photos or delete it.
  • Screen recording is a control that is available in the new Control Center.  It is not in Control Center by default, but you can add it in Settings.  Once it is on you can record what you are doing on the screen and it will be saved to Photos.
  • Swiping down from the top will show the lock screen.
  • iCloud Family Sharing of data!!!  Now you can share your iCloud storage data with your entire family, so just spend $2 a month for 200GB and everybody will have plenty of space.
  • The App Store is completely redesigned.
UPDATE: Forgot to include Do Not Disturb While Driving, which will automatically turn on whenever your iPhone detects you are driving.  Any messages you receive will auto reply with a message that you are driving and the ability for the sender to resend with the word URGENT to bypass it.

Friday, September 15, 2017

Installing Apache HTTP Server on Windows and Proxying to Tomcat

I have been working on Tomcat web applications and have always just accessed the pages directly on the port that Tomcat is serving.  Now I want to put an Apache HTTP server in front of Tomcat so I can access this page next to other pages that aren't served by Tomcat.  Here are the instructions.

Since the Apache site doesn't provide Windows binaries of the Apache HTTP server they must be downloaded from a third party site, I used Apache Haus HTTP Server Windows Binary Download page. After downloading the zip file I unzipped it and put it into a directory on my system.  The first thing you need to do is open up the conf/httpd.conf file to modify the configuration of the server.  The only required change is to update the SRVROOT definition, which basically is the pointer to where the unzipped folder is defined.  Make sure to use forward slashes instead of backslashes in the path.  Save the conf file and then run bin/httpd.exe.  If it started up correctly you can go to localhost:80 in your browser and an example page should load.

By default the server will look in the htdocs folder of the Apache Server installation for the pages in the site, but if you want to store them in a separate location for easy upgrade of the server then you can update the DocumentRoot and also the Directory elements of the httpd.conf file to point to any other folder on your system.

As for pointing to Tomcat you will need to do the following:
1. In the httpd.conf file make sure to include the load the proxy_module and the proxy_http_module.  They should be included in the file, but may be commented out.  Just uncomment them and they will load.
2. Next in the httpd.conf file add you need to add a ProxyPass and ProxyPassReverse, which will map specific web applications to the URL of the Tomcat applications. These will look like: ProxyPass /theApp http://localhost:8080/theApp
ProxyPassReverse /theApp http://localhost:8080/theApp
3. Update the Tomcat server.xml file so the connector element includes a proxyPort attribute specifying that requests from port 80 are proxied.

Start both servers up and you should be able to access your Tomcat web applications on port 80 now.