Tuesday, May 14, 2013

Day 14: Preparation of other project types and Web Service contracts

Created the WCF service, and Branch Application UI screens. The identified service contracts methods for the common web service are as below:


    [ServiceContract]
    public interface IService1
    {
        // TODO: Add your service operations here

        [OperationContract]
        Int64 SaveOrder(Models.Order order);

        [OperationContract]
        void NotifyArrivalForOtherBranch(Int64 orderID,int currentBranchID,int tableNo);

        [OperationContract]
        void NotifyArrival(Int64 orderID, int tableID);

        [OperationContract]
        void NotifyArrival(Int64 orderID);

        [OperationContract]
        DataSet GetOrderDetails(Int64 orderID);

        [OperationContract]
        int GetTimeForConfiguration(string configuration);

        [OperationContract]
        string GetBranchName(int branchID);

        [OperationContract]
        double GetTotal(int orderID);
       
    }

The methods are yet to be implemented. Planning to create another class to handle the business logic between operations. Have to investigate on how to trigger notifications from the web service to the branch application whenever a user has made a notification of arrival.

Read an article on IsolatedStorage on Windows Phone 7 from the following link:
http://www.jeffblankenburg.com/2010/10/15/31-days-of-windows-phone-day-15-isolated-storage/

The article nicely details the Isolated storage options on a Windows Phone. There are basically two ways:
  1. Using name-value pairs and storing them as IsolatedSettings, where we can save as Custom objects, given the fact that we retrieve them using an explicit cast.
  2. Storing it in the file system of the phone.
Isolated storage means the data resides within the phone, and the storage doesn't allow you to share information externally. I felt that option 1 would suit well to store the Order as an object instead of an XML file. 
Yet needed a way to retrieve initial data for the application such as menu details, location details from the SQL Server CE. Windows Phone 7.1.1 update seems to have LINQ to SQL functionality. Need to get this update.



No comments:

Post a Comment