Not sure if I understand your question correctly, but...
First, you will have to define, or probably decide, what the "Core" is? or what the Core should be - what will be the functionality that Core
will perform. Ideally, when we say Core, it essentially means, a layer that performs basic or atomic operations.
Over that Core you can spawn the device wrappers(IPhone, PC, etc) that builds a query to be sent to core, for instance.
You can use WCF Data Service to constitute a data layer. And your core can perform business operations/etc, and communicate with the Data Service.
For instance, what I instantly can think of is:
- a Core, that performs core operations - for isntance talking to Datalayer
DeviceWrapper
(DeviceAndriod, DeviceIPhone, DeviceWeb, etc), that wraps different devices. For example, a mixture of Factory/Builder pattern. Think about factory of Device
s, and Builder for types of views.
TextRenderer
, based upon the device settings, renders the text.
One way could be, lets decide:
The Core
, will be a "library" that will perform basic operations:
- Authentication
- Authorization
- Select records
- Perform Action 1
- Perform Action 2
Therefore,
STEP 1: Write a Controller that will provide authenticate/authorization; for instance, call the Core.Authenticate()
, and Authorize()
;
STEP 2: Based upon the user agent call ICore.RenderView(agentType), this may return you the view/html to be rendered.
User may perform an action, your Controller may call Core.PerformAction()
; which in turn may return the link to the page to be redirected, for instance.
--UPDATED--
This update is in response to your comment.
Now, in this(your comment) case, you are talking about client ends.
Lets clear up a bit. There is server and there are client sides.
Up till now, we were talking about Server side, which primarily is concerned with:
- How the requests from different user agents will be processed by the server.
- How the text will be rendered with respect to different devices.
Client ends could be:
- A web browser, in this case you don't need any client app to be developed
- A, lets say, Silverlight app for Windows Phone
- An android app for Android phone
- So on so forth.
Decide what this "client app" will do. For instance, in your case:
- User shall login via fb id.
- User shall be able to perform certain operations.
Note that, you may want to consider smart clients (using web services, rather than asp.net web pages).
Also, the type hinting in WCF can add a lot of unnecessary overhead in the JSON response for large collections. Therefore, if you even remotely believe that you might want multiple types of end-points (SOAP, etc.) at some point in the time, then WCF is the way to go.