New Windows Phone 8.1 Silverlight App - model-view-controller

I am writing a new Windows Phone 8.1 Silverlight App BUT WITHOUT MVVM/MVC.
I have to implement Push notifications to this app sooner.
This app must run in the background
Will this be possible without MVVM/MVC?
Also, please tell me where from to learn MVVM/MVC from beginning?

It's definitely possible to develop apps that do not follow the MVVM or MVC patterns. You can develop your apps however you like; these are merely architectural patterns that many programmers follow when developing Windows Phone apps. MVVM, in particular, is suited to Windows Phone app development (and WPF) because of the data binding mechanism provided by XAML.
For example, you might choose to write your code entirely in code-behind (*.xaml.cs) files and subscribe to events directly on the view. This might be fine for small apps, but may not be suitable for larger apps, especially when there are multiple people working on different parts of the app (e.g. a designer working in XAML and a coder working in C#) and when testability is extremely important.
I won't provide links to learning materials for MVVM/MVC; a mere bing search results in an abundant amount of information at your fingertips. Good luck!

Related

Designing WP7 App

I have made one windows phone based application. i want some designing ideas from you wp7 people.how can we apply styles,transparent background or the design which suits wp7 app. may i have some links which provides snaps for good designed apps. please help
One app that jumps to my mind when talking about great use and adaption to the metro design, it's "Cocktail Flow". It has very well done implementations of many design cues for WP7. As special treats it has features like parallax effects controled via gyroscope.
You can find a free version on the marketplace. Definitely worth a look.
MSDN user experience guidelines are pretty good, User Experience Design Guidelines for Windows Phone.
Also, it helps to install some popular apps from the marketplace and study their design.
The BEST thing you can possibly do to get a good idea of how to build a great WP7 app is to own a Windows Phone, and use it as your primary phone.
Get used to the way the operating system flows. Download cool apps. As time goes on you begin to understand from the user's perspective what a "good" app looks (and more importantly) feels like. It's a hard thing to nail down in a "user experience" spec. I find that a lot of people who set off to build a WP7 app do so before understanding how apps are supposed to behave on the platform. It is vital that you understand how users expect applications on the windows phone to operate. If you use a windows phone for a good 3-4 months, and really make an effort of butting it through the steps, it will be hard to walk away from that experience without a very clear idea of what a "good" application looks like for the windows phone.
That being said, and while I honestly don't believe that there are any short cuts to good design for the windows phone, I highly recommend downloading the following apps, and playing around with them to get a feel for "good" UI:
Wordament
Cocktail Flow (previously mentioned)
Twitter
Spotify
Yelp
Any of the built in applications (Office, Zune, Internet Explorer)
The above are good to start with, but again, you're really not going to understand it unless you live and breath it everyday for at least a few months.

Is it possible to develop the same application for Windows Phone 7 and Windows Mobile 6.x without much additional effort?

I have to develop an application for Windows Mobile 6.x and version 7 and my skillset is .net and web based. Since version 7 is not backwards compatible I am thinking that I will end up with a lot of duplicate work.
I had a look at Rhomobile and Phonegap but the later does not support windows mobile 6.x and the former would require ruby knowledge.
I thought that I could have as much logic in class libraries as possible and then "include as link" the classes into projects so that they can be compiled for the specific platform. I feel like I may end up with a lot of #if PHONE7 style logic in that case and also the user interface code would have to be implemented for each platform.
What is the most efficient way to solve this problem?
If you can separate the UI from the logic you can begin to multi-target. The other consideration is the runtime of the phone (Silverlight 4?) and the phone sandboxing giving you limitations.
MVVM Light is multi-targeted and is open source, you could use this to review how they tackled it:
http://mvvmlight.codeplex.com/SourceControl/changeset/view/d546dc69fffd
In short though, your "add as link" idea is pretty much the basis of it.
The other question to ask is will the application fit on both platforms? The usage style from mobile to metro is a big change. People expect things to behave a certain way and look a certain way on metro. If you can confine this to the UI and move as much logic out as possible, then you should be ok. But there will come a point where it isn't worth sharing, it is simply easier to duplicate.
Sorry for a lack of detail in this answer, to be honest it is heavily app specific. I would personally start with separate applications and refactor as commonalities appear, using a combination of linked code files and hash defines.
A cute trick... you can always make the classes partial and have a partial code file for each hash define:
MyBusinessClass.CF.cs
MyBusinessClass.Silverlight.cs

Best way to approach WP7 app development?

I have some knowledge of basic PHP developing however right now I am thinking about developing a phone app. I do however have a bit of a conundrum in that I love WP7 and I have so many ideas for features which can't be done on iOS and Android, however at the same time I am completely aware that my target users (filmmakers) generally have iOS or android phones.
Is there a way I can develop the app, which I will get a developer to do rather than myself, with WP7 as the lead platform and then make a relatively simple conversion to the other platforms or do apps generally have to be completely reworked for each platform?
Also, just to though it out there, any idea of where to go to find a freelance app developer?
Thanks
James
I think you have a few options, but the first question I would have is: where comes the data from. Are you the owner of the data, and do you already have a datasource from where you can get the data from? If not I would suggest take some time to write a decent 'backend' from which the different platforms easily can get the data from.
Also all different platforms have their own pro/cons which you cannot share that easily. If you build a WP7 app in silverlight/xna, you cannot directly port it to a ios/android variant, also functionality will probably look/react different. You will need different solutions foreach platform with this approach.
Another option would be to use an platform like phonegap which can create a solution that will work on multiple platforms. (It uses HTML5 to get it work on the different platforms)
Build your app on iOS and android first, and when you have an app to base WP7 development then contact a developer that has made similar apps to yours.

Windows Phone 7 : developing UI without xml

We are developing an Windows Phone 7 mobile application. We are new to this platform. In our application, screen will be dynamically generated. So we would like to render the UI
programmatically - without using any xmls. Please share some example code or resource or links, wherein UI is rendered programatically. In case of iPhone development, we referred "UICatalog" example. We are looking for similar type of example
It is possible to render the UI in code, though the examples of doing so are few and far between because it's a rare thing to do with XAML-based technologies like Silverlight and WPF. Instead, you tend to find that developers use to databinding and data templates to present generated content.
If you are porting an application from iPhone to Windows Phone (or even if you're just starting from scratch), the best thing to do is to firstly make sure that you understand the development platform. There are some great resources for this on MSDN here: http://msdn.microsoft.com/en-us/wp7trainingcourse_wp7gettingstarted_unit.aspx
The next thing to do is to make sure that you understand the Metro design language that Windows Phone is built upon. Here are some great resources in that respect:
Metro Design Language for Windows Phone 7
Microsoft design .toolbox
From Transportation to Pixels
Once you've reached this point, you will most likely realise that your current approach isn't the right one and switch to a databinding and data templates approach :)
If you are doing an iPhone port, it's important to realise that the design approach is different for Windows Phone applications. Content is King, so work out what that is, put it "front and centre", and trim away every thing else.
I hope this helps.
You may want to investigate the XNA path for Windows Phone development.
Developing with SilverLight but choosing not to use the most useful features of the platform is probably not going to be fun.

Why to use UriMapping in WP7?

Can someone explain me the meaning of UriMappings in Windows Phone 7 and why to use them? I mean why I will need user friendly uri's in a phone app?
UriMappings are part of the Silverlight 3 navigation framework and since WP7 is a Silverlight 3+ port is supports the same API. You don't "have" to use UriMappings if that doesn't jive with your programmatic zen.
A lot of Silverlight developers come from a web background (ASP, PHP, ASP.Net, et al) and as such a very comfortable with the idea of short, hackable, persistent and structured URLs for navigation. Navigation is really an odd thing on any UI platform (even on Silverlight) and as such enabling developers to be successful in it is really all about giving as many options as possible.
Personally, I choose not to use UriMappings in WP7 apps but have my own mini-navigation framework which resolves page names to XAML URLs. There's an example in my open source NavigationService.GetParseUrlString() method and Pages class.
As a side-note, In future releases of WP7 operating systems and WP7 developer tools it might be possible for the emulator/phone to show a full history of Pages in the Back stack. In Mix10 that was demoed as an internal Microsoft capability. Which means that if you have a meaningful page UriMapping it'll be easier to debug.

Resources