Dicom Transportation Group

Dicom Transportation Group

Dicom Transportation Group

The Background

Dicom Transportation Group (DTG) is a business-to-business Delivery & Distribution company operating within the US and Canada. It provides express, freight and logistic services, fulfilling 75,000 shipments per day. Dicom Express is a small-package courier company offering both ground and air transportation services within Ontario, Quebec, and to all cities in Western Canada as well as the Atlantic Provinces. Dicom Express was the first of three subsidiaries of the Dicom Group transporting over 10-million packages per year.

The Client Challenge

Over the past year, DTG were in the process of creating new cross border partnerships and expanding their geographic reach. One major challenge they were faced with was how to effectively equip their expanding field-service workforce of 700+ drivers with the mobility tools required to capture Proof of Delivery and Proof of Pickup scan points. A legacy system built on the Microsoft Windows Mobile platform years prior was already deployed in the field. Users were equipped with ruggedized hand-held devices that were aging and in some cases past their end-of-life date. DTG was faced with excessive costs to replace the aging devices as well as the added cost of purchasing yet more devices for their expanding workforce. In addition, the Windows Mobile operating system that served as the foundation for their existing applications was designed in an era before consumer smartphones and as such the overall user experience lacks many features that users now expect in a software solution.

The Idea

Many of DTG’s mobile users (Courier Drivers in this case) are independent contractors and carry their own Smartphone devices. DTG decided to leverage the opportunity afforded by that fact and create a suite of Line of Business mobile applications that run on standard consumer devices running Google Android or Apple’s iOS operating Systems.

DTG tendered an RFP in early 2015, and it was awarded to PHD Solutions. PHD Solutions was selected for their extensive expertise in developing enterprise-grade mobility solutions for the Transportation and Logistics industry.

PHD Solutions reached out to Code Chemistry in order to leverage their extensive experience in architecting solid, scalable cross-platform mobility solutions. The two teams made an excellent pairing.

The Technical Challenge

The growth of DTG was rapidly outpacing the ability for its existing mobility solutions to meet their needs. The environment was one that called for a set of agile, flexible and easily adaptable solutions that would keep pace with their increasing demands.

The main challenges were:
1. Distill complex business requirements down to a set of functional application workflows that minimized user interaction and streamlined the process for maximum efficiency.
2. Conform to iOS and Android design patterns while ensuring consistent user flow and functionality across both platforms.
3. Design and implement the technical architecture for a complex multi-platform solution that would as much as possible share a common code base across all platforms.
4. Design application features as a set of pluggable modules that can be enabled/disabled or even replaced across differing target applications for the separate DTG Entities.
5. Create a sophisticated data storage and synchronization mechanism that allowed for each application to function correctly even while offline.
6. Design and implement a scalable API to send and receive data from connected devices.

The Solution

Together we have created four distinct mobility solutions in the DTG “Smart” series for DTG that address various challenges.

Project 1 – ‘DTG WorkSmart’ – Used directly by over 300 DTG courier drivers, this application provides operations with the ability to track individual parcels loaded into trucks, proof of delivery scans, delivery statuses for each package and proof of pickup scans. DTG Worksmart improves the efficiency and accuracy of driver operations, enabling drivers to accomplish more each day. It also provides greater visibility to the end customer as each scan point is made available via DTG’s customer portal, allowing customers to track the progress of their shipments.
iTunes App / Android App

Project 2 – ‘DTG ReceiveSmart’- This application is used by high-volume customers of DTG, granting them the ability to reconcile large palletized shipments delivered to them by DTG freight drivers. When a pallet of received freight is unpacked at the customers’ location, each piece is scanned by the application and the results are sent back to DTG immediately. The benefit for both parties is immediate visibility for pieces received, damaged, missing or mis-sorted. Deployment of this application has greatly reduced the effort required to reconcile these large shipments.
Android App

Project 3 – ‘EC WorkSmart’ – Similar in function to DTG Worksmart, EC Worksmart is used by courier drivers of Eastern Connection, a courier & logistics company acquired by DTG in 2015.
iTunes App / Android App 

Project 4 – ‘DTG Warehouse’ – A mobile application used by in-terminal staff, the primary focus of DTG Warehouse is to provide Track & Trace capabilities across all Dicom in-terminal operations. This includes the ability to apply status events to parcels on arrival and departure from terminals as well as allow users to containerize freight by associating individual parcels with larger containers in a hierarchal fashion.

The results

Despite the complexity of the undertaking, all the applications were delivered on time and budget with full functionality. Since then, they have been integrated into DTG operations. The integrated apps have been well received by employees and management alike and are now contributing to delivering efficiencies across the business.

The Future

As DTG expands and evolves, new features and applications will be developed according to their needs, ensuring the company keeps up with new technologies and industry trends.


Technical Challenges

Project 1 – ‘DTG WorkSmart’ & Project 3 – ‘EC Worksmart’

These two applications are rooted in the same code base but distributed with different configuration settings. The ‘pluggable module’ design of the software allows for significant differences in the runtime experience with minimal effort from the development team. The applications provide very similar functionality for both DTG and its subsidiary formerly known as Eastern Connection.

Major features include:
1. Scan parcels as Loaded to a truck.
2. Scan parcels as Delivered and capture client signature data.
3. Capture COD (Cash on Delivery) information.
4. Scan parcels as Picked UP.
5. Update delivery & pickup manifest lists in real-time throughout their day as Dispatch is continually assigning new pickups as customers request them.
6. Other Tracking scans.

These applications provide operational visibility as to the user’s daily progress, and the scans captured are essential to providing DTG’s end customers with the visibility they need in tracking their shipments. Scans captured from the devices are synchronized with the server in a store-and-forward type mechanism, where they are processed and consumed into DTG backend tracking infrastructure. When connectivity between device and server is available, data captured by a device is available almost immediately in DTG’s Track & Trace & Billing systems.

Challenges presented in this solution included:
1. Implementing a complex data synchronization mechanism that must be resilient to occasionally connected devices that drop in and out of cellular coverage.
2. Design the application such that it works flawlessly both online and offline.
3. Distill complex business requirements down to a set of easy to follow screen workflows. Workflows varied in complexity, but the Delivery process was one that required a suite of at least 8 different screens, most of which are only displayed to the user under certain delivery conditions. Under some conditions a signature must be captured, under others some Cash would be collected. All data collected by the application must be persisted locally and synchronized to server via our API. A sophisticated workflow mechanism was designed to handle these various states to ensure a consistent experience under all circumstances.
4. Designing a user experience that was simple, intuitive and easy to understand. It is essential to conform to the target platform design guidelines as much as is possible in order to make the user feel immediately familiar with the visual design patterns employed.
5. Create a multi-platform solution architecture where any non-platform specific functionality would be shared across all platforms, allowing for much faster completion and feature turnaround.
6. Allow for multiple sources of data input. Nearly all information captured by users of the application is in the form of scanning a barcode. To allow maximum flexibility to users, scanning capability was provided using 4 possible means:
    – Use the device’s built-in camera for scanning
    – Use a separate Bluetooth peripheral hand scanner
    – Utilize a built-in barcode scanner for special purpose devices such as the XP7700 provided by Sonim.
    – Allow users to manually key a barcode
7. Design a scalable, secure backend API that would act as a broker between the devices on one side and DTG backend infrastructure on the other.
8. Construct a pluggable module framework whereby certain workflows could have slight or major differences between the DTG and EC variants of Worksmart. Workflows between the two versions of Worksmart were similar each had their own nuances that differed from the other. The goal was to share as much code as possible while at the same time allow for switching between the two build configurations seamlessly from a developer perspective. The result is a resilient code base where adjustments or code improvements in shared features were instantly available to both solutions.

Project 2 – ‘DTG ReceiveSmart’

DTG ReceiveSmart shared much of the Technical Challenges of DTG Worksmart, but many had already been solved.  DTG ReceiveSmart was built as an Android-only solution, but it was required to persist against a legacy api provided by DTG’s ERP system called PROGRESS. We needed to strictly comply with the rules it imposed when making the requests, then file uploads/downloads, as well as to ensure we properly define the complex data structures it used for all requests. The application also required Barcode scanner integration, using both bluetooth and the device camera on each screen, as well as a state based process flow.

Project 4 – ‘DTG Warehouse’

Armed with lessons learned from the building of previous application, the construction of DTG was quite smooth. The main challenge was that the application was being built in tandem with a large backend integration project. This backend project was responsible for providing the API for DTG Warehouse, and it was in a state of constant flux. The UI, the scanner libraries, the generic flow mechanism and the sync service were consistent with the previous applications. Having previously created a system that could be easily and cleanly modified, we were able to deliver this new application in just 90 days.

Technical Solutions

As with all of our mobile solutions, the applications were built on our internally developed CC Framework. The CC Framework is the foundation that enables us to build mobile applications that are easy to extend and modify. Within the planning phase, we defined the models and services needed, then proceeded to completely abstract the web API calls from the Business layer. By using Async APIs, it made no difference whether we accessed the web or local storage. We decided that in order to implement a proper sync mechanism we should go with a database-first approach. That meant that everything goes in and out from the local database first, and only then is submitted to the web endpoints through a set of services we called ‘sync services’.

Traditionally we use a hybrid Creational pattern for our applications that consists of Factory on the front end and ICO as the Factory backend. This method proved to be the most flexible way of handling object instantiation within a cross platform environment. Furthermore, the Factory singleton instance is passed as a constructor parameter to all non data object types such as Services, ViewModels, Controllers and Activities. This model closely resembles how the Context class is used in Android.

Seeing as we were using the same source code base to create multiple applications, the navigation implemented needed to be well thought out. One click of a button could take an end user to several different screens depending on the state of the application and its variance. This complexity was why we took the opportunity to embed the routing logic into the ViewModels, fully sharing it between both platforms. Having put this extra effort in, we were able to publish a unique routing mechanism that is platform independent and works flawlessly on both Android and iOS. The mechanism consisted of only two methods GoTo (screen) and GoBack. It was stack based routing, making it a perfect fit for a mobile solution like ours.

Working with the system described above we were able to centralize the Sync service. By using the Factory we were able to retrieve all the objects in need of syncing simply by calling their corresponding services eg. LoadingsService, PickupsService, DeliveriesService, MessagesService…etc. Doing this meant we did not break the SRP and were able to implement a high level service solely dedicated to syncing the data and managing conflicts. This service used the Factory context to retrieve the corresponding services to push and pull data from them based on their state.

Our planning and hard work at the beginning of the project proved to be a worthwhile investment. We organized a proper model for the mobile application, fully independent of the DTO objects provided by the API. This allowed us to be flexible enough to apply various interesting patterns such as composite and command pattern. These patterns helped us to be very elegant in the way we defined the business model, yet also be generic enough to use the same code base to build not one, but four applications using the same business layer.

No matter the API or DTOs we received from the client for each new application request, making the adjustments was a simple matter of changing the services layer. There was no need to intervene to define how the domain objects were persisted, or how the ViewModels functioned, resulting in minor UI changes, or none at all.

Project Challenge Solution

Both Code Chemistry and PHD Solutions worked closely together to analyze and layout the project objectives. Daily meetings and commitment to constant collaboration made sure all features, changes and testing was done to the highest level. Time was invested into internal organization of the projects to ensure work was carried out in an efficient and transparent manner.

Conclusion

When we initially began working on the system architecture and structure, we didn’t know the source code would evolve into a micro platform supporting an entire suite of apps. The evolution of this product and its development highlights why we invest so much of our time, effort and commitment to create applications built with clean code and sound architecture. Without our dedication to clean code and sound architecture we would not have been able to produce this number of apps as quickly and efficiently. This saved DTG considerable time and cost rolling out these applications into their business.

PHD Solutions CEO, Paul Driegen, had this to say: Working together with Code Chemistry was a great experience. Together we were able to design and implement a suite of cross-platform mobile applications that drove incredible business value for Dicom Transportation Group. Code Chemistry consistently demonstrated a solid understanding of the necessary technical and business requirements in their approach and the end result is an extremely solid and versatile multi-platform mobile framework that proved to be easily adaptable to our client’s evolving business needs.”

Technical information

Xamarin, CC Framework (Our own  MVVM framework for building native mobile apps on top of Xamarin), ASP.Net Web API, Android, iOS, Java, Objective C, Progress Integration, Google Maps e.t.c

 

0_fixed
DTG WorkSmart – Dashboard
1_fixed
DTG WorkSmart – Side Menu
2_fixed
DTG WorkSmart – InBox
3_fixed
DTG WorkSmart – Package Scanning
5_fixed
DTG WorkSmart – Delivery Details
6_fixed
DTG WorkSmart – Batch Summery
1_fixed
EC Worksmart – Scan Screen
2_fixed
EC Worksmart – Shipment Details
5_fixed
EC Worksmart – Confirmation Screen
6_fixed
EC Worksmart – Log Error
3_fixed
EC Worksmart – Batch Screen
4_fixed
EC Worksmart – Multi Item