Wednesday, April 25, 2018

MyCause WPF App - One Step Closer to Mobile

In this article I describe the Prototype that I can now (if you let me explain) make available for what I referred to in a companion article as my vision for “Active Wallpaper”.

That vision articulates a solution that has two major pieces: (a) an actual App that runs native — be it on a Windows host (laptop, desktop, tablet) or native on a SmartPhone — and (b) a web-based "Configuration Tool" that is used only by someone who wants to create an instance of “Active Wallpaper” in order to make the App available to people in their MyCause community. I call this 2nd step "Creating the MyCause metadata" and it's done via the MyCause MVC Web-App.

So by design, the MyCause App is not standalone — it works like a template, meaning that it knows about the overall structure and basic event management, etc. of a WPF* App, but it knows nothing about what picture or Slogans you might have associated with your MyCause. Instead, the MyCause App must be given "an Access Code" or "a Ticket" when first invoked, and from that it gets all of the metadata via a protocol (an MVC Action with a Ticket ARG) that reaches into The Cloud where the metadata is stored for World-wide availability, returning it as Json to the WPF App. The same interface would apply if it were talking to a true Mobile App or to JavaScript in a Browser via AJAX; that's why I went with this architecture.

Click on the images below to see a slideshow of screen shot images from the MyCause WPF App.

Each of the images here is a link to a slide show of pictures that are screen shots of the MyCause WPF App invoked with different Tickets. These just happen to be the four Tickets (instances of a MyCause) that I have configured as part of my testing.

Hovering over the images will show you "the Ticket" or "Access Code" needed to get the associated metadata if you want to download and Install the WPF App and use it with these Access Codes. Once in the App, click "Start" if you want to enable "Previous" and "Next" navigation Icons at the top left- and right-hand sides of the App screen. Click "Go" when you want the App to run according to the configured wait time between Slogans (unattended).

Or just click on the image to watch the MyCause slide show associated with each of my "Testing Tickets".

*WPF is Microsoft's acronym for "Windows Presentation Foundation".

The intention of this portfolio is that I make my C# code available to others... so if you are interested in getting your hands on this WPF App, simply contact me and we'll have a conversation about that.

Monday, February 26, 2018

Microsoft MVC — .Net / C# Web Technology That's Simple and Intuitive

Recently I was looking for an excuse to create a Web App using Microsoft's MVC technology — not because I hadn't done this before, but it had been a while and I was looking to get hands-on with "something real". In particular, I wanted something "simple, but capable of interacting with a user, being based on a non-trivial data model with Business Objects, and therefore needing to have a database persistence layer". I rejected the idea of using an ORM — even though Entity Frameworks is now an open source object-relational mapping (ORM) framework for ADO.NET — simply because I wanted to get some practice writing a few Stored Procedures using Microsoft's T-Sql. From this came the idea for the MVC Web Application described herein and called “MyCause”.

The purpose of MyCause, as a Web App, is that it provide a globally-accessible mechanism for setting up the metadata for the Mobile App that I call Active Wallpaper. One instance of this App might look like what you see in the mock screen shot, below.

There are two Business Objects with a 0:many relationship between them. The MyCause BO represents the background picture, which is the main part of the App's content — it's just wallpaper — and the collection of Slogan BOs are the Phrases that the designer wants to have displayed in the Marquis area.

Changing the verbiage to reflect the sample shown on the left… “Unitarian Universalism” would be The Cause that this App is in support of, and shown in the graphic is just one of the Slogans (“The inherent worth and dignity of every person”), which according to this link would be referred to as “the Principle of Unitarian Universalism” that the App is currently displaying.

Aside from highlighting the MVC C# piece, the MyCause Web App also features a JavaScript part where AJAX is used to fetch information from the server (from the underlying database) without having to do a resubmit of the page. In the screen shot on the right, first you see only the UU MyCause metadata along with the button "LookUp the Slogans". When you click on that, AJAX (via JavaScript, in the browser) is used to request the Slogans data that is then returned and made visible (the blue background) along with the metadata. So immediately you can see the “Associated Slogans Table” for the MyCause instance you are editing.

The intention of this portfolio is that I make my C# code available to others... so if you are interested in getting your hands on this MVC App, simply contact me and we'll have a conversation about that.

Monday, July 24, 2017

My First Mobile App — Active Wallpaper

The picture on the right gave me the idea for my first Mobile App, so consider this as me just “planting a seed”…
The idea came to me after I bought my first Android SmartPhone. I wanted to come up with a fitting wallpaper for my Pixel, so I did a little graphics editing to put the name of my men's team on a favorite ice climbing picture. And then there was a little whitespace on the cloud, so I wrote in one of our team standards that really speaks to me (and which also goes well with the picture itself) — "Quitting Is Not An Option". Alas, this also was me editing the graphics, so what you see on the right is really just an annotated photo  — your typical Still Wallpaper.
But like most men's teams, we have more than one phrase that describes how we want to be, so I lamented the 'fact' that you can only put one such phrase on a graphic, and that led me to ask: Why can't we change that to be a more Active space — put an App behind it, and have the App cycle thru a set of Phrases … ? — So in the same picture the Phrase changes and you would see e.g. :
The App is very much like ordinary wallpaper except that it wakes up every once in a while to change the picture slightly — by over-writing a different Phrase on a pre-determined Marquis space on the picture…

So this suggests to me a WPF or Xamarin App that (somehow?) gets all the metadata it needs to come up with the picture — along with the collection of Phrases, placement, fonts, and etc. And then when you run the App, what you see is  “Active Wallpaper”.

Details about when and how this might materialize for Mobile are TBS … but click here for details about an “Active Wallpaper” prototype that I created using MVC, JavaScript and AJAX, Sql, WPF (Windows Presentation Foundation), and The Cloud — as a first step towards the Mobile App. (The WPF version runs only on Windows.)

Monday, March 14, 2016

Using C# on Windows to Create Clipboard Cut & Paste Extensions

This article documents a C#/.NET program that I created to provide “a Windows Clipboard Cut & Paste Extension” mechanism. The idea for “Text Transformations” (TT) is simple: (a) you put some text into your Windows Clipboard in any of the ways you can do this, (b) invoke “TT -Flag”, usually by having a ShortCut that encapsulates the details about how to do this — including which “TT -Flag” you want, and (c) after TT runs, it leaves its results in the clipboard so you just “Paste” the text to wherever you want it.

For example, when I do a regular expression search (e.g.“lhsChars.*rhsString”) and it fails, often the very next thing I want is what “TT -Swap” would do: It returns “rhsString.*lhsChars”. The tool is nothing more than a convenience, but for things you do a lot it can be well worth it. Another example that I use when working with Sql starts with selecting a column of strings or numbers from a SELECT grid; after a “TT -InSql_S”, a Paste might return e.g. the Sql snippet: IN ( '3423', '329', '44993', '21812' ) or “TT -InSql_N” would see that all the strings are numeric so it would produce the same thing but without any quotes. If you spend a lot of time editing Sql or C# (or anything), such TTransformations can be very convenient.

A more significant example provides something like Windows File versioning. Using the Windows Explorer right-mouse convenience called “Copy Path”, I can point to a file (put its path into the Paste buffer) and then invoke “TT -Version”. This operation makes a copy of the file, coming up with a variation on the file name so that nothing gets overwritten. e.g. If I started out with a file name like myFile.txt, “TT -Version” would look in the folder where that file resides and the first time I did this it would create: myFile_00.txt   If I already had an “_012” version, the next “TT -Version” file copy would create myFile_013.txt ... and etc.

Some of the other TT transformations read template files and do substitutions on place-holder markers for things like DateTime strings. A specific one of these that I use every day as part of the Agile methodology is “TT -Scrum” — it analyses a fragment of yesterday's scrum sheet and creates a new one, for today!

The intention of this portfolio is that I make my C# code available to others... so if you are interested in getting your hands on TT, simply contact me and we'll have a conversation about that.

Tuesday, April 14, 2015

The WPF Evolution of my Multimedia Flash Cards App

In a previous post I wrote about an MVVM model that I called “Factoids” and used in an App that I created for learning to speak Italian (before a trip that we took to Italy in 2012). This post is a follow-on to that since a lot of things have changed — most importantly, I switched from Silverlight to WPF to gain access to .NET classes that were not available in Silverlight 5. This has led to a much more powerful and general-purpose tool that runs on a touch screen (Windows 8.1 — not my cell yet) where you can do everything without having to click a mouse.

In the screen shot on the left you can see a number of conceptual & usability improvements — starting with the name: Now it's “Flash And Learn”, as you see in the title bar. Below that is a title that shows you the foreign language that your flash cards are for, since I've realized my original vision of making the Word-of-the-Day eMail parser be table-driven and have done this for Italian, French, Dutch and Spanish. What I formerly called “Context” is now “Learning Objective”, and the name of the current objective, “Understand The Phrase”, appears on that title line. At the bottom of the screen a new Status Line tells you what's going on.

Within a Learning Objective you can categorize every word in the Vocabulary by assigning it a “Proficiency”, and one of the most useful new additions to the App is that it can draw a Pie Chart, shown on the right, so you can see exactly how much progress you've made on that objective. Since everything in this App is data-driven, you can have as many Learning Objectives as you want, and you can freely make up the names you want for the Proficiencies.

The primary paradigm for this App is that you use Viewing Rules to pare down and specialize which cards are visible, and then via simple Navigation within those cards you use the multimedia information derived from the cards to help you learn. For example, on the left a small deck has been specialized via rules that say: Only cards which are for Adjectives where the Proficiency is “New”. Appropriate to a Learning Objective such as “English Word Listening to Audio”, the right-hand panel is set up to show the Foreign Language card without any English. Typically, the drill would be (a) spin — do a (random) navigation, (b) click the Icon to listen to the audio, (c) update the Proficiency for that card and (d) spin again.

There are several ways to introduce new Vocabulary. The one on the right called “Create Vocabulary Alias”, shows you the currently-selected flash card and lets you create a new one with the only constraint being that the two must share the same audio and phrases. This is very useful when you get a sentence that has a word you don't know — you can just make a card for it directly. Another way to get more Vocabulary is a new command that gets the Word-of-the-Day for Today so you don't need to deal with eMail at all.

The future: My goal all along has been to make this App run on my Windows Phone, so I've looked into Microsoft's new “Universal App” model for which I at least get to keep my Xaml UI — but no Silverlight, WPF, or ActiveX controls. At least my understanding is that if I target WinRT it's more likely that in the future this can be not only a Windows 8.1 Metro App, but also deployed on iPhone and Android mobile devices.

Tuesday, January 31, 2012

Flash Cards & Factoids — Learning To Speak a Foreign Language

Factoid (Italian) - Full Vocabulary
A while ago I stumbled upon a way to receive a daily eMail delivering a Word Of The Day in various languages — as a learning tool — and I soon realized that without any way to manipulate these "Factoids", they were soon going to go the way of all my other by-gone eMail. Yet I had a burning desire to make use of this rich source of information and training — because it actually speaks the language — so I decided to use my favorite set of Microsoft technologies to provide this "deck of cards" in a way that I felt would best suite my personal learning style — hence "Factoids".

In this article I'm going to talk about a .Net prototype I've created using the MVVM design pattern, called Factoids. This Silverlight tool is aimed at helping ordinary people create and organize multi-media Flash Cards and to then use them for anything that fits the familiar paradigm such as — in the case of my prototype — learning to speak Italian. You use the cards (The Factoids App)  in a wide variety of workflows all aimed at helping you to (a) see one side of "the card", and then (b) recall what's on the other side of the card.

Thursday, March 17, 2011

Pure WPF — What a Joy!

Having worked a lot with Silverlight, I recently decided to take one of my favorite applications (pixRename) and convert it from Silverlight to “Pure Windows Presentation Foundation” or “WPF ”, as it's called... and what a huge relief it is to be freed up from the constraints of an OOB application. Since this application is all about managing the reNaming of picture files stored on your local computer, I guess the bottom line is that it was a mistake to have used Silverlight for that in the first place. But I did it because I really wanted to get my feet wet with Silverlight, and from that perspective it was a really great exercise. But for end users — as I quickly discovered — the constraint of only being able to reference files in "My Documents" or "My Pictures" was just NOT justified; I found that people didn't want to use pixRename solely for that reason. And they were right.

So this article announces the availability of “pixRename (WPF) ” which you can download here. Most people will find this install very simple because I used Microsoft's ClickOnce (software publishing) Technology.

The screen shot on the left shows the main page of the app with one of the things that's new for the WPF version - tailor made .Xaml windows that are used to display the "Help Topics" that, in the Silverlight version, were pretty ugly Message Boxes. Look at all of these help screens (via a Flickr slide show) or scan them individually: “Save Settings”, “Composition”, “Date/Time Adjust”, “Folder Location”, “Event Description”, “Change Settings Dialog”, “Naming Pattern” or “reName Semantics”… to get a sense of how pixRename (WPF) works.

There are a number of other User Interface improvements made in this version, but its main claim to fame is simply that you can access picture files that reside anywhere on any of your computer's hard drive(s) because WPF frees you up from the Silverlight restrictions detailed in that link. For more details, visit the FAQ (Frequently-Asked Questions) page — http://bit.ly/pixRenameFAQ — which, for now, describes both the Silverlight and the WPF versions of this .NET Desktop application.