Categories

Archives

.NET Data Push to iPhone application

One of my most favorite features in the Communication Library for iOS is the support for server-side data push to iOS. We put together an example demonstrating the feature in action where a .NET server pushes real-time updates to an iPhone application. The example is demonstrated and reviewed in the video below. The instructions for running the example and the links for the source code are available below the video in this blog post. Enjoy!

Follow the steps below to deploy and run the example:

  1. Download and install the latest version of WebORB for .NET. (This post assumes the product is installed in the default installation directory. For the version 4.4, the installation directory is: c:/Program Files/WebORB for .NET/4.4.0.0/)
  2. Download the client-side project from:
    http://examples.themidnightcoders.com/blog/StockExchangeClient.zip
    (for additional examples, you can also  download the Communication Library for iOS).
  3. Download the server-side project from:
    http://examples.themidnightcoders.com/blog/StockExchange-server.zip
  4. Open the server-side project in Visual Studio. Compile the project and make sure the compiled assembly is copied into the /bin folder in the WebORB installation directory (c:/Program Files/WebORB for .NET/4.4.0.0/)
  5. Create “StockExchange” directory under the “Applications” folder located at: c:/Program Files/WebORB for .NET/4.4.0.0/Applications)
  6. Create the app.config file in the StockExchange directory with the following contents:
    <?xml version="1.0" encoding="utf-8"?>
    <configuration>
    <application-handler>StockExchange.AppHandler</application-handler>
    </configuration>
    
  7. Open the WebORB Management Console. Switch to the ‘Messaging Server’ tab and make sure the StockExchange application is listed under the Applications node in the tree.
  8. Run the iOS client application, enter the hostname for the server where WebORB for .NET is running and click Connect to establish a connection with the server-side application.

Cross Platform Mobile Development using Real Time Messaging

Cross platform application connectivity is to be a frequently requested and talked about feature. A lot of enterprise and consumer-facing applications require  robust data exchange mechanism between application instances running on mobile devices. On top of this, many applications depend on real-time updates and notifications pushed from the server to the clients. One of the approaches for cross platform data exchange is a feature called Remote Shared Objects. The video below provides an explanation of the feature as well as a demonstration of iPhone, iPad and Windows Mobile phone communicating with each other as well as a browser-based Flex application.

The demo was built using the latest version of WebORB for .NET (the Java version would work just as well), Communication Library for iOS and a client library for Windows Mobile included into the WebORB distribution. Enjoy!

Integrating Flex Applications with NHibernate

Are you using NHibernate as your object-relational mapper? If so, did you know that WebORB provides an easy integration between Flex clients and NHibernate models? Enterprise Architect Joseph Magley demonstrates how to use WebORB with NHibernate and Flex in a recent technical article he wrote for the Adobe Developer Connection. Here is an excerpt from this article:

“In this tutorial I demonstrate a particularly easy-to-use combination of technologies that do a very good job at allowing you to focus on developing your features rather than maintaining plumbing. Modern development tools coupled with WebORB for .NET and NHibernate make it easier to maintain integration points. Development frameworks for data access such a NHibernate eliminate much of the glue code that developers often need to write and maintain. This decreases complexity and creates a solid environment for rapid development of RIAs.”

The complete article with sample code can be viewed here: http://www.adobe.com/devnet/flex/articles/flex-nhibernate.html

New samples: WebORB Data Management (WDM) for Flex (WDMF)

Most of these samples are minor variations of our CEO Mark Piller’s previous WDMF samples, which were installed with WebORB 4.x for .NET. These new versions include minor bug fixes, additional comments, and (most importantly) they are hosted on our Internet server, so that anyone, anywhere, can run them. Each sample has a descriptive web page, including a list of pre-requisites, key points, things to try, references, and links to any related screencasts.

The new samples are:

All of the samples share the same FoodAndDrinks database on our Web server, and so do all users. That’s realistic, but it also means that if you add a record to the database, it’s there fore everyone else to see, too. Likewise, if you delete a record (or all of the records), it will be deleted from the common database. We expect to deal with this by refreshing the database daily, but still…please play nicely.

If you’re using WebORB for .NET, but you’re not yet using WDM for Flex despite needing to access server-side data, then I encourage you to check out the first sample (at least). Watch its screencast and see what you’re missing.

Whee! :)

WebORB for .NET Remoting: even more samples

Here are six new samples, each describing a single aspect of Remoting (that is, the use of remote procedure calls) from a Flex client to a .NET service using WebORB 4.x for .NET. The name of each sample, below, links to a descriptive Web page, in which the running sample is embedded, and from which code (for both client and server) can be downloaded.

Custom serializer

Binding data grid to array result

Collection mapping with WebORBArrayCollection (class)

Collection mapping with IWebORBArrayCollection (interface)

ReturnType of DataTable’s records*

ReturnType of DataSet’s records*

With these basic Remoting samples out of the way, I’m going to switch my focus over to creating more WDMF samples.

Happy coding!   :)

— Jim

* At the time I posted these samples, the samples marked with an asterisk didn’t work, because I couldn’t update a DLL on the Midnight Coders’ “examples” server. When I can update the DLL, I’ll verify that the samples are working, and remove this comment.

WebORB for .NET Remoting: more samples

Gentlepersons,

I’ve recently posted nine more new samples on basic remoting (that is, making remote procedure calls) from Flex clients to .NET services using WebORB for .NET 4.x.

Each sample is accompanied by a web page that

  • describes the sample,
  • lists its key points,
  • lists things to try for yourself,
  • provides links to that sample’s code,
  • provides references to relevant documentation and supporting information,
  • embeds the running sample, and
  • embeds any screencasts that walk through the sample.

I have not yet made screencasts for these new samples, however.

These nine new samples, while still very basic, should be studied only after the four “Hello, World!” samples are understood, because those samples present the most basic fundamentals of using WebORB.

Here are the nine new samples:

Each sample’s web page has a section labeled “Errata,” describing known problems with the samples…so please let me know if you find any errors in them (jim@themidnightcoders.com).

BTW, a previous blog post, announcing the first of our new samples/screencasts, have emerged as a top result when using Google to search for “WebORB”. That’s encouraging.

Thanks!

— Jim :)

New WebORB for .NET samples and screencasts on remoting

Gentlepersons,

I am happy to announce four new samples that address the absolute basics of Flex Remoting with WebORB:

Each new sample is accompanied by one (or more) screencasts.

To maximize the usefulness of the samples/screencasts, we wanted each sample to be a tightly-focused as possible, and yet to present as complete a solution as possible. These objectives are, clearly, in conflict. That presents an engineering problem: how can we keep each one simple, yet complete?

To address this problem, we’ve:

  • modularized the samples into tiny little conceptual chunks, and
  • linked them together by listing, for each sample, its prerequisite samples — that is, samples that you need to understand before you try to understand this one.

This encapsulation allows us to follow the DRY principle (Don’t Repeat Yourself). For example, although each of the above samples’ client-side code differs, they all implement the same client-side functionality, and they all reuse exactly the same server-side service (not just the same server-side code, mind you, but the exact same server-side DLL that is presented and deployed in the first sample).

These four samples/screencasts are just the first set of what we expect to be a VERY extensive new set of samples/screencasts…more than a 50 new samples/screencasts for Flex Remoting (to .NET) alone, for example.

Each sample is described by a web page (see links above) which includes an errata section. Please tell me about any errors you find in the code, project settings, screencasts, etc., so I can update the errata section accordingly (which is sooooo much easier than actually fixing the problem!).

Producing all of these samples/screencasts is, of course, going to take quite a while, and I’m going to try to produce them in a logical order (to maximize their DRY-ness). Therefore, while I’m happy to add your suggested sample-topics to my “to-do” list, I probably won’t be able to put them at the top of the list.  Please be patient.   :)

WebORB already gets high marks for the quality of its documentation and support…but there’s is certainly room for improvement. With this new sample/screencast series, we expect to raise the bar even higher, thereby making WebORB even more obviously the right choice for internet application development.