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.