Answer the question
In order to leave comments, you need to log in
How to implement a client-server mobile application for Windows Phone?
I have an idea for a mobile app. Of the available platforms, I chose windows phone, since I have been writing on asp.net mvc for more than a year, and c# as a language is somehow closer. The application will allow you to register, log in, and store all content on the server. Since I have no experience in developing mobile applications at all, I had some questions.
1) How to implement the server part?
I would just create a mvc site that would accept http requests from the application on the phone. For example, for registration, there would be a simple request like mysite.net/register?login={newlogin}&pass={newpass}. Further, all kinds of checks, if everything has grown together, the user has been created. Would that be right? Do they do that?
2) How to store the user session?
Web applications usually use session or cookies. In mobile, in my opinion, there is a key-value settings store. I think to store a sign that the user is authorized in this storage. It is right?
3) About Xaml (probably). Here I want to ask about markup. The application needs repeating identical elements, small dice, such are used in almost every mobile application. For example, in the recently released Habr application, these are used to display posts. How to implement these? Can be to use what that ready ? How to implement pagination on scroll?
That's all for now, thanks for the replies.
Answer the question
In order to leave comments, you need to log in
1. Currently, ASP.NET MVC supports the same Web API. Why not use it? It is very convenient just for developing an API for a client. ( www.asp.net/web-api);
2. It is recommended to store settings in Windows Phone applications in IsolatedStorageSettings.
An example of use and a helper class for implementing simple caching of any data was published on PasteBin ( pastebin.com/4p5j18u9). It's worth noting that storing the user's password in clear text in IsolatedStorageSettings is not recommended. For such cases, it is better to encrypt it. An example can be seen on SOF ( stackoverflow.com/questions/8985717/is-there-a-sta...
3. To use the same elements in different places of the application, it is advisable to add the UserControl to the project, define its design (+ logic) and use it anywhere in the application. If it is assumed that this is some element that is located on each page in the same place (some heading, for example), then you can create a new style and change the PhoneApplicationFrame template in it. PhoneApplicationFrame is the root element in the markup of a Windows Phone application, it already directly renders the pages of the PhoneApplicationPage application, in fact. An example of changing the template can be viewed on SOF ( stackoverflow.com/questions/17569403/phoneapplicat...
For pagination when scrolling, you need to consider a specific case. The easiest way is to use the built-in Pivot control, add PivotItems to it, the change of which will be carried out by swiping left-right.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question