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.
Related
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!
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.
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
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.
What Windows Phone 7 demo/reference applications have you seen which really made you interested in developing for the platform?
I know of Scott Gu's Twitter example and Foursquare. Also see here for MIX10 demo apps.
Other than developing games and re-creating functionality already present on other mobile platforms (iPhone, BlackBerry, Android), is there any good reference material and business benefits of developing for Windows Phone 7? Does the Silverlight dev environment really offer an advantage over what is already out there? My gut feeling is that this is definitely the case, but it will take some time for the platform to establish itself, if it does.
You can find a lot of examples and reference applications here www.reddit.com/r/wp7dev/ or search using the hashtag #wp7dev on twitter (full disclosure - some of my examples appear there).
There a examples of what people are openly working on, but one can assume it is a lot more - hopefully this is useful, as it shows what can be done, or is being done on the platform.
As a novice developer, other phone platforms came with a lot of overhead required to build even the simplest application. The fact that XNA will be available for game development is a huge thing for me, it means I can create simple games for me and my friends without having to spend time learning a new language or setting up awkward SDK's and deployment settings.
More advanced developers may scoff at that, but development tools that are already being used that can work right out of the box for the intended platform is important for the hobbyists. I think this will open up a huge arena for homemade games and apps just like XNA did for 360 development.
It should also help sales. I will buy a Windows 7 phone because of this, and I can imagine others will do the same. As it stands, I am going to port my existing XNA games over so I can play them on the go. It will be cool to show people at the office, airport, etc. projects I have made right on the spot, and even give them the option to play if they have the right hardware.