Posts Tagged ‘Embarcadero’

MVVM and MenialTasks : Why did I use TEnumerableBindSourceAdapter instead of TListBindSourceAdapter?

In the comments over on my old MVVM Resource List post Peter Rosario asked a great question. A question I thought I’d covered in my video but I suspect I might have edited it out in an attempt to fit into the CodeRage time limits. So I thought I’d answer it here.

The question was about my MenialTasks sample app, and why I’d used TEnumerableBindSourceAdapter to bind my collection of TTasks to the UI, rather than the more common TListBindSourceAdapter.

TListBindSourceAdapter has a lot going for it. It comes “in the box”, would certainly have been easier, and would work just fine. Given that, why didn’t I use it? Read On…

App Tethering Series Update

I’ve had a few questions from folks about the App Tethering articles I’ve been posting, specifically, when the next one is coming.

Between work and preparing for a grading I’ve been a bit busy, however I’ve now started writing the next post and have a few more planned. The next one should be up in a week or so.

Also, several people have asked if they can get them all combined into a single document. Once I have the remaining articles done I’ll combine them and post the details.

 

App Tethering : Remote Actions

After the last few posts, you should be getting comfortable sharing data between multiple apps. That leaves us the last of our original four conceptual areas to cover off : Actions.

Just as App Tethering allows you to share pieces of data out to remote applications, it also allows you to share TActions (strictly speaking, any TCustomAction descendant, but I’ll use TAction for short). Right now you’ve possibly got at least one button or menu item connected to a TAction somewhere in your app. More likely you have dozens of them. Shared Actions let you expose these TActions unchanged, so they can be triggered from remote apps as well. Read On…

App Tethering : Sharing Transient Resources

Now that we know how to work with Persistent Resources, Transient Resources are going to be a walk in the park.

Transient Resources have many things in common with Persistent Resources. They come in both Data and Stream types. They are one-way. Also their network behaviour is much the same as Persistent Resources. ie. Transient Data Resources are sent via UDP Point-to-Point whereas Transient Stream Resources are notified via UDP Point-to-Point but the value is actually transmitted via TCP.

Where they differ is mostly around the details of how they are sent, and how much work you have to do vs how much the framework does for you. Read On…

App Tethering : Sharing Persistent Resources Part 2

Last post we were introduced to sharing resources, in particular, persistent resources, and we wrote an example to share a persistent resource of type Data between two apps.

This time around let’s do the same with a resource of type Stream. On the surface it feels pretty similar, but we’ll look under the covers to understand a key difference between sharing Data and Stream resources, and why you might opt to use a Stream resource even if you are sharing a String.

Read On…

App Tethering : Sharing Persistent Resources Part 1

In the last post, we went through one method of discovery, AutoConnect, and then built a couple of apps that used AutoConnect to find, authenticate and pair with each other.

That’s fine, but there’s not a lot of point in having two apps connected to each other unless they can interact. In App Tethering, that interaction comes in two forms: sharing resources and sharing actions. In this article we’re going to start looking at sharing resources. Read On…

App Tethering : Discovery and Pairing

In the previous post, we covered an overview of what App Tethering is and how some customers have used it. We also covered the four conceptual areas of App Tethering:

  • Discovery – finding other apps, including whether you are looking for other apps over BlueTooth or IP Network
  • Pairing – connecting to other apps, once you’ve found them. This includes Authentication.
  • Resources – sharing data with connected apps
  • Actions – sharing Actions with connected apps

Let’s take each of these concepts and start looking in more detail. Read On…

App Tethering : Overview

One of the capabilities introduced in recent versions of RAD Studio and AppMethod is App Tethering. Over a number of posts I want to explore App Tethering further, starting from an overview of the technology and then going further down… down eventually to the network packet level. My aim is you’ll come out with a quite thorough understanding not just how to use App Tethering, but also what you might use it for.

In the absence of anywhere else to start, let’s start with a question.

What is App Tethering?

In its simplest terms, App Tethering makes it easy for apps to find and communicate with each other. Now, I accept that is so generic an explanation as to be almost useless. You could say something similar about DataSnap, or EMS, or plenty of other distributed systems. So let’s shed a bit more light.

Read On…

Updating the UI from a Task

While we’re talking things Parallel, the other part of the same demo from last post showed spawning a single task that slept for awhile and then called ShowMessage.

Note the comment. Read On…

“But what happens if…” : The Joy of Race Conditions

In my last post, I was trying to highlight the fact that just because you have done a WaitForAny and one of your Tasks has ended, the others don’t just all magically stop somehow. It’s good form for your Task to be checking if it has been Cancelled, and to quit as soon as possible, certainly before making any changes outside the context of the Task.

However, as I mentioned at the end of that post, we’re still not done. There is a window of time, albeit a small one, where things could go wrong, and in this post I want to explore what the problem is and how to resolve it. Read On…