Tuesday, June 18, 2013

Fiddler Testing.

Sending Post request through fiddler

GetToken


Method : POST
URL : http://localhost:53463/api/selfcare/gettoken/

Request Headers:
User-Agent: Fiddler
Host: localhost:53463
Content-Length: 22
Content-Type: application/json

Request Body :

{"Msisdn":"777482148"}

Login

Method : POST
URL : http://localhost:53463/api/selfcare/login/

Request Headers:
User-Agent: Fiddler
Host: localhost:53463
Content-Length: 22
Content-Type: application/json

Request Body :

{"Msisdn":"777482148", "Token":"xxxx"}

Sunday, June 16, 2013

OperatorMediator.Api

Operator Mediator services will be hosted on LGN ( Lanka Gate Network).

Operator Mediator's responsibility is to route service requests executed by the clients to its respective operator service.

When the request hits the Mediator API, the mediator look-up for the respective service endpoint base on the clients msisdn/phone number and the execute the operator's respective service and return the results to the clients.
All the communication between client-mediator, mediator-operator are synchronize.

Tuesday, June 11, 2013

Operator.Dto : Re-defined DTOs

New DTOs (Data Transfer Object) have been introduced and modified existing to be shared between
LGN, Operators and clients (web and mobile apps).
Purpose of the new DTOs apply uniformity over data between clients, lgn and operators.

Figure 1 shows the new Dtos listed in a separate project.

Figure 1

Saturday, June 8, 2013

Operator API : Exposing Operator API as REST service

While testing the REST API using fiddler, a strange issue pops up.
The method ( Login) receive live instance of the parameter object, but the properties of the object contains null values.


Figure 1 shows how the method being called via Fiddler.

Figure 1





Figure 2 shows how the method received input parameter instance with empty/null properties

Figure 2





Finally found a solution while googling the relevant issue.

Thursday, June 6, 2013

Android : Getting on with Andriod.

Some screens done in the Android as a result of following Android tutorials.


Figure 1 shows the Get token screen

Figure 1




Figure 2 shows the sing in with the token and the phone number.

Figure 2


Tuesday, June 4, 2013

Reading REST, ASP.NET WEB API

It is required to expose the Operator services to be access by the LGN as RESTful services.
From the LGN to other consumers like Mobile devices. and the web site hosting by the LGN will be consume REST service so gaining more knowledge of REST is required at this stage as well we how to create REST service using ASP.NET WEB API.

Selection of REST service over SOAP decision resulted over following reasons.

REST doesn't required fat stack like SOAP such as  SOAP require the consumer to create proxies in order access the services.

REST works over HTTP and inherit HTTP protocols disciplines.

NO require of WSDL

For the security it depends on HTTPS

Following Links are in the list of  "Currently reading...."

Learn REST
A Brief Introduction to REST
Introduction to ASP.NET Web API
Creating a REST service using ASP.NET Web API
ASP.NET WebAPI: Getting Started with MVC4 and WebAPI
Routing in ASP.NET Web API
Routing and Action Selection

Monday, June 3, 2013

Web GUI

In order come up with a good and creative concept for the mSelfCare web portal.
I requested one of my friends to help me as I'm not a creative and UI expert.

My friend has done the following web GUI concepts for me.

Figure 1 shows the login screen

Figure 1



Figure 2 shows the Topup screen

Figure 2


Figure 3 shows the services screen

Figure 3


Figure 4 shows the transaction screen

Figure 4


Figure 5 shows the overview screen

Figure 5

Saturday, June 1, 2013

Android : Refreshing and gain more android knowledge.

Following the Android tutorial series in the YouTube.




There are list of episodes to be followed.
Continuing with the android for couple of days.

 

Friday, May 31, 2013

Operator API : Domain services.

Base on the functionality would be provided by the operators, there are 3 major domain services have identify for the moment.
The are;
AuthorizationService, AccountService and TopupService. There would be more services added as the progress move on with the development.

Above 3 major domain services have split into their respective public contract and implementation.
The reason for having interfaces is to use IoC container to  resolve the dependencies ( Dependency Injection )

Figure 1 shows the AuthorizationService interface and its implementation.
Figure 1


Figure 2 shows the AccountService interface and its implementation
Figure 2


Figure 3 shows the TopupService interface and its implementation.
Figure 3





Note: Listed above interfaces are captures at the time of development in progress. There is a high chance them to be changed at a later stage of the project base on needing of the new requirements.

Thursday, May 30, 2013

Operator API : Analysing the DTOs to be shared with consumers.

Different Operators might have their own logic, Api implementations to support mSelfCare system.
It is required to have a contract between all operators how they represent the data to the LGN (Lanka Gate Network) as it will be hosting the mSelfcare service API to be consumed by the mobile consumers as well as the web site which will be hosted in the LGN.

It is identified that the domain entities will be the candidate for the DTOs to be shared between operators such as , Subscriber, AccountDetail, Services, Package, Topup Transaction and Other transactions.
So the analysis is to come up with all party acceptable DTOs.

Wednesday, May 29, 2013

Operator API : Operator.DataLayer

EF (Entity framework) facilitates quick and easy way of generating the database using the domain entities.
Having creating the initial database. start focusing on the data layer for the operator API.


Focus is to create a Generic Repository pattern to access underlying data storage.
Read on following articles on Repository pattern.

Introduction from Martin Fowler
The Repository Pattern in Msdn

My generic repository implementation

Figure 1 shows the interface.

Figure 1


Figure 2 shows the implementation of the above interface with EF DataContext.

Figure 2


Using the Generic repository. I was able to reduce the needing of individual repositories for entities.




Monday, May 27, 2013

Microsoft Entity framework (EF) Code First and Creating the DB using Domain entities.

Have been reading NHibernate fluent api and Microsoft Entity Framework EF.
Thought of using the Microsoft EF putting NHibernate fluent api aside.
I was able to find lot of help documents which relates to Microsoft EF also some good tutorials.
Having done the analysis of the domain model I was able to identify the domain concept which belongs to mobile operator's side.
Turn all the concepts into domain entities and create the data base using Microsoft EF code first.
without touching the MS Sql server.

Figure 1 shows the Domain Entities layout in the code

Figure 1



Figure 2 shows how the EF fluent API use to create the db using the entities.

Figure 2



Figure 3 shows how the Generated DB looks like using the EF fluent API.

Figure 3