Thursday, 7 June 2012

Movie Catalog Manager with WPF

Designing a WPF based Movie Catalog Manager

Like lots of readers here, I too had heard the great buzz about Windows Presentation Foundation (avalon) coming with .Net 3.5. Several personal & professional commitments have been restraining me from exploring that area for a long time. Today, .NET 4.0 stands with head held high, while others are awaiting official release of .NET 4.5 (with metro).
This article is targeted to those who collect/download numerous video data from the web. All your data is probably scattered on your storage devices. What follows is how I approached to tackle the Catalog management of my movie collection.

First lets have a look at some of the screen shots of this (under development) application which I call Multiplex.


  • Launch Screen

  • Add Movies

  • Show list of added Movies

  • Details of selected Movie

  • Add Movies (Lite version)

  • Statistics about your Collection

Work in Progress

  1. On click of a group/category in statistic graph filter/show qualifying movies
  2. Auto download subtitles (in preferred language)
  3. Show movie file details like File size, CD/DVD count
  4. Manage User ratings
  5. Omni-Search bar to query catalog by any criteria

Tuesday, 5 June 2012

Middleware between a Client-Server

Middleware Architecture Designing
I have been fortunate enough to get opportunities to work of some real time and performance critical applications. I felt the need of sharing my ideas and approaches to design applications that fit to expectations. Whatever follows is completely based on my understanding and perception of a good design. I I agree that this could have been designed better, as designs are evolutionary. There is nothing like the ‘Perfect Design’. As you will see, the design went through several iterations and evaluations (evolution's)  before getting finalized.

Scenario:
  • The Server is Java based, on a Solaris machine
  • The Clients are .NET based, on windows PC’s
  • Communication Message format between frontend and backend is standard (3rd partylibrary)
  • Client and Server may be on different Networks

        Design: (Iteration 1)
    Details:
  • This component will be built with Java (JDK v1.6.0.26)
  • There are 2 basic layers in this design namely
    • Network Layer - Handles communication over network (TCP/IP in this case) and message           format conversion (bytes to objects and vice versa)
    • Business Layer - Handles all business logic and processing that is to be done on the data
  • These layers are loosely coupled because of use of Queues between them.
  • Basically, every layer gets its input, does some processing over it and writes the output
  • For Network Layer (at the top, in design; this layer is connected to Client)
    • Input comes on the network in form of bytes (this layer is connected to Client)
    • Processing includes validating and translating bytes to business objects
    • Output is written to a Queue (which acts as input for Business Layer)
  • For Business Layer (includes Business Manager & Transaction Manager)
    • Input comes from the Queue (which was Network Layer's output)
    • Processing includes businessvalidating and translating bytes to application objects
    • Output is written to a Queue (which acts as input for Business Layer)
  • For Network Layer (at the bottom, in design; this layer is connected to Server)
    • Input comes from the Queue (which was Business Layer's output)
    • Processing includes translating business objects to bytes
    • Output is written to a network