Skip to main content

Posts

Showing posts with the label windows 8

Shadows in a Windows 8 App

T his week I receive a question related to XAML and a Modern UI Windows 8 application (Metro Apps).   They need a method to draw shadows in a XAML application. When the design team port an application from iPad to Windows 8, they try to reuse a lot of things that were used on iPad. Because of this elements like shadow can appear very easily in the design of a Windows 8 application. In theory, a Windows 8 application should not contains shadows. Because an app for Windows 8 should have a clean and simple design, shadow is saw like an element that will only load the UI. Also, people that worked with UI effect already know that the shadow effect is one of the effects that use a lot of resources – especially video or processor resource. Having this kind of effects on a tablet could drain our battery very easily.    This is why the XAML don’t contains any kind of support for shadow. You can make some hacks, using lines with different bluer levels and thing like this, but...

Mobile Services from Windows Azure - Data Store and custom script(part 3)

Part 2 In last post we saw how we can create a table using Mobile Services to store GPS position. We discover how we can setup who can make each CRUD operation on our table. In this post we will continue to see how we can write data and retrieves data from our table. We already created an instance of MobileServiceClient. From this service we will need to retrieve an instance to our table using GetTable method. After we have a reference to our table (IMobileServiceTable) we will be able to execute any kind of request over our table: IMobileServiceTable tableService = mobileServiceClient.GetTable<Location>(); await tableService.InsertAsync(location); await tableService.Select(l=> { … }); await tableService.UpdateAsync(location); I think that you already notified that all the methods are async. Also, you don’t need to manual create a new instance of the IMobileServiceTable. This is handled by the Mobile Services component automatically. Do you remember how we setup our tabl...

Mobile Services from Windows Azure - Data Store (part 2)

Part 1 When we need a backed to store data for a mobile application Windows Azure Mobile Services can be a great solution. Let’s imagine that we need to develop a mobile application that need to store the GPS location of our client. For this purpose we can develop a complicated solution, with a backed that exposes this functionality as services. Also we will need an authentication mechanism that will add another layer of complexity. All this functionalities are already supported by Windows Azure Mobile Services. In this blog post we will see how we can configure. First step is to configure our Windows Azure account to have Mobile Services active. In this moment Mobile Services is in the preview, because of this before creating a Mobile Services you will need to sign up to this preview. From the new command of the portal you will find a link to the sign up page for the preview. The activation time period is very short. Each Mobile Services has a unique name, which will identify our...

Windows 8 Dev Camp Sibiu, 24.11.2012 - Postevent

This Saturday we had our first CodeCamp event in Sibiu . Even if it was the first event in Sibiu we had a lot of attenders – we were almost 100 people that stayed with us almost 7 hours. This event was dedicated to Windows 8 and was named “Windows 8 Dev Camp”. We tacked a lot about Windows 8 from different perspective and how can be integrated with different services like Mobile Services or Media Services from Windows Azure. Because this event was an event dedicated to developers and technical persons we tried to explain all the base thing that a develop need to know about Windows 8. One of our speakers (Mihai Tataran), brought in exclusivity a Windows Surface. This is a great device with a high potential. All the people that stayed until the end had the chance to win some software licenses. At this event I talked about the architecture of Windows 8, WinRT, native languages that are available on this new platform and what thing that a developer need to know. You can find my presenta...

Mobile Services from Windows Azure - Introduction

What do you think about Windows 8 and Windows Store? It has a great potential and is a place where people with good ideas can develop application. Usually when you develop an application you also need a backend. A place where authenticate users, to store data and so on. Windows Azure comes with a solution that can freaks out any kind of backend developer – Mobile Services Why is so great? A lot of backend stuff that you need in a normal mobile application is built in. Let me give you some example: Authentication infrastructure for Windows Live, FB, Twitter, Google and more coming soon Push notification Store data on the server Custom scripts on working with server data And this is not all. Imagine that you develop an application for iOS. Could you integrate Mobile Services from Windows Azure? YES, you can. In this moment, after you setup your mobile service you can download a sample application for Windows 8 App, Windows Phone or iOS that contains all the settings for your acc...

NetCamp 2012 - Windows 8 development experience

During this week I participate to NetCamp 2012.  This was the 6th NetCamp event and is organizing by Evensys. NetCamp is a dedicated event for online entrepreneur and how they can turn their ideas in reality. What I’m doing there? Well, I had a session where I presented how was the development process of Trip Journal on Windows 8 and what are the things that an entrepreneur should take into account when select the platform for their application. Any entrepreneur that would like to develop mobile application in Windows 8 should take into account the following thinks (these are the most important ideas from my presentation): Windows Store – a big opportunity for any person with ideas. It is place where your application can be visible to users Windows 8 Apps – one application for desktop and tablet version. You don’t need to write different applications for different devices 3 native languages that can be used to develop a Windows 8 App – C#, C++, JavaScript Windows Store App i...

WOWZAPP2012 - Awesome Hackathon

 This weekend, all around the word we had WOWZAPP Hackathon .  This Windows 8 Hackathon was a 48 marathon of Windows 8 App development. Over 15.000 people were connected with Visual Studio 2012 and develop great application for the new operating system – Windows 8. I participate at this event with other 3 colleges and we develop an application that could help you to find location when you don’t have internet connection. We didn’t manage to finish it, we tried to apply MVVM pattern 100%. Our main focus was the code quality and not to finish in 48h. The team name was DOTNET Vampires and team member were: Costin Morariu, Iulia Gorcea, Alexandra Vunvulea and @me. This was a great event and we had a lot of fun. In Bucharest, we had almost 40 team. At this event I was not only as a percipient, I was part of the Windows 8 SWAT team. We were the persons that offered technical support for all teams. I think that almost all project had at least 3 lines of code written by me. It was ...

Windows 8 Dev Camp in Sibiu - 24 nov 2012

After the Windows 8 Dev Camp from Cluj-Napoca, we are preparing Windows 8 Dev Camp in Sibiu. To be able to register please follow this link: http://codecamp-sibiu-nov2012.eventbrite.com/   Here is the announcement message for Romanian guys: ÃŽn urmă cu aproape o luna, Microsoft a lansat un nou sistem de operare - Windows 8. Cu această ocazie Codecamp împreună cu ITSpark vă invită la “Windows 8 Dev Camp ”. ÃŽn cadrul acestui eveniment o să disecăm o parte din secretele pe care un dezvoltator trebuie să le cunoască despre Windows 8. Participarea la eveniment este gratuită . MulÈ›umim în special iQuest pentru susÈ›inere. Agendă 9:15-09:30 Sosirea participanÈ›ilor 09:30-10:20 What's new in Windows 8? Tudor Damian A brief overview of the new features and performance improvements in Windows 8. 10:30-11:20 Developing modern web applications: HTML 5, MVVM, Web Sockets Mihai Tătăran In this session you will see a modern approach to web application...

Caliburn.Micro + Windows 8 App - How to send parameter between ViewModel's

What do you think about the development process in a C#/XAML app for Windows 8. When we are starting developing an application for this platform we should never forget about MVVM. A great framework for this is Caliburn.Micro. It is a pretty simple and clean framework, with a lot of extensions points. When we will try to navigate between screens we will use INavigationService.NavigateToViewModel<TDestionViewModel>. This will work great. Navigation.NavigateToViewModel<MyFooPageViewModel>(); Each ViewModel need to implement the Screen class. This will give access to all the features that we need in the view mode. But what about sending data from one view to another. The method NavigateToViewModel can accept an parameter of type object. Navigation.NavigateToViewModel<MyFooPageViewModel>(“some data”); Looks good but you will be surprised when you will try to get this data in your destination ViewModel. You will not be able to find this data anywhere. To be able to ac...

How many fingers point can be tracked by Windows 8

Windows 8 brought to us a native support for touch screens. This is a great feature that opens the tablets world for us. For touch support, we have a lot of gestures that are built in. We need only to subscribe to the event that we want to listen. This can be very useful, because we don’t need any more to implement our custom gestures. Tap - one finger touches the screen and lifts up. Press and hold - one finger touches the screen and stays in place. Slide - one or more fingers touch the screen and move in the same direction. Swipe - one or more fingers touch the screen and move a short distance in the same direction. Turn - two or more fingers touch the screen and move in a clockwise or counter-clockwise arc. Pinch - two or more fingers touch the screen and move closer together. Stretch - two or more fingers touch the screen and move farther apart. If we need a custom gesture we can implement it without any kind of problem. This is not recommended because the user will need...

What should I do when I receive "4.1 Your app must comply with the following privacy-related requirements"

The most of us are developer; we are technical persons, which do their stuff better than anyone. But besides this, when we are developing a Windows Client application for Windows 8 (Metro App) we don’t need to forget about the legal stuff and similar things. We don’t like them, but we need to resolve them also. If you have an application that use internet connection, access a backend server, share data with another 3th party like Facebook, Twitter or another system than we should have a simple privacy policy in our application. From now one this is a MUST, even if in the past was optional. If you try to submit your application without privacy policy that you will receive a big reject with the following message: "Your app doesn't meet requirement 4.1" (Privacy) What I recommend, is to add a privacy policy even if you don’t thing that you store, share the user data. Why? Is safest for you and you don’t need to submit the application again if you will have this problem. ...

WOWZAPP 2012: Worldwide Global Hackathon for Windows -- Bucharest, Romania

Everyone on Earth already knows what will happen at the end of this month. Yes, you are right, Windows 8 will be launched. Not only this, Windows Phone 8 will be lunched in this month also. With this occasion Bucharest will be the host of WOWZAPP 2012: Worldwide Global Hackathon for Windows. Sounds good and it will be a great event. You will have 24h to develop a great Windows Client App for Windows 8. If you know C# and XAML or JavaScript and HTML5, than you should register NOW . If you have a great idea of an application for Windows 8, that you should register NOW . If you have a great idea of an application for Windows Phone that you should register NOW . In the case you need something in backend; you will receive a six month subscription for Windows Azure. What a great event! See you there.

How to write unit tests in JavaScript for a Windows Store Application

Did you ever tried to write a Windows Store Application for Windows 8 in JavaScript? If yes than I hope that you started working on unit tests also. If no, than in this post we discover how we can write unit test for JavaScript and how we can integrate them in Test Explorer. First of all why we need to write unit test for JavaScript? Because is like any other programming language that we used until now. When we write code in any language we need to test it. The framework and steps that are describe in this post can be used to write unit tests for JavaScript for a ASP.NET application of for any other project written in JavaScript. To be able to write test in JavaScript we need to define our test methods that contains a collection of checks. We can write this from scratch or we can use a framework. For this purpose I recommend qunit.  This is a great framework that can be used to write unit tests. We have different version of qunit for Windows Store Application and ASP.NET. After y...

Mixing UI controllers in a Windows Store App (Metro App) for Windows 8

More and more people (especially developer) are very excited about Windows 8 and the new features that come with him. As you already know we have free native languages that can be used to write Windows Store Applications (Metro Apps): C++ using DirectX or XAML C# using XAML JavaScript using HTML5 Also we can use Visual Basic and XAML. One interesting feature is the mixing components support. We can use components written in C# or C++ and use them in project written in JavaScript, C++ or C#. This is what WinMD and WinRT offer to us. Because of this we can imagine a lot of scenarios developing a part of the application in C# and the UI part in JavaScript for example. Sounds great and this is possible and also recommended. We can develop great application in this way. Also, WinRT API is not 100% available in any language. Even if JavaScript, C# and C++ are native languages and WinRT is native for all of them, there are things that can be done only from a specific language. For examp...

[Post Event] Windows 8 Dev Camp, Cluj-Napoca - September 29

Last Saturday we have the pleasure to organize in Cluj-Napoca, Windows 8 Dev Camp . In this great event we talked about the new operating system from Microsoft, Windows 8.  Almost 100 people attended to this event. Different subject were approached from the developer perspective. Two sessions talked about the new functionalities of Windows 8 and also about how a Windows Store Application should look like and interact with the user. In another session we looked over the new HTML 5 and JavaScript support and how we can build native Windows Store Applications using them. My session was the last one of Windows 8 Dev Camp and I talked about WinRT and the architecture of Windows 8 looks like. Different subject as components mixing, WinMD, JavaScript testing and automatic build were touched.  In the last part of the session I presented what a Windows Store Application package contains and how it should be build and validate. Here are my slides from my session: Some images from t...

ListView - make selected item visible don't work in all cases

Did you ever try to use the ListView for Windows 8 Applications? If you had a more complicated scenario where you need to ensure that the selected item from your code is visible maybe you had the following problem… How can I make the selected item visible? If I have a lot of items in my scroll list than the selected item will not be visible when we select it. listView.set(i).done(); In this way we select the ‘i’ element of the list. Also the set() method unselect the rest of the items that were selected already. To be able to show it in the visible part of the list we need to call the ensureVisible() method after we set it. listView.set(i).done(); listView.ensureVisible(i); But in more complicated cased you will notify that this will not work. Even if the ensureVisible() method is called nothing will happen. Usually this case appears when the method is called in a “callback” or in a complete, error or progress of a promise. Even if you try o the ensureVisible in a msSetImmediate it w...

updateLayout method of WinJS.Page – what we should be aware of

If you already created a Windows 8 Application in HTML 5 and JavaScript maybe you already used a page control. Every page control has a Java Script file behind this, like in ASPX and WinForms. In this blog post I want to talk about some methods that we can define in this page control – especially one. If we create a page control from Visual Studio (Add New) you will observe that 3 defaults method are automatically added: ready unload load init processed render error updateLayout The “ready” method is called after all the controllers were loaded to the page and the DOM element was created. In this moment the element was already rendered to the screen. The “unload” method is used when we have some resources that we want to free (for example some binding). “updateLayout” method is called when the page layout is change. A case when this method is called by the system is when the layout is changed from landscape to portrait. What we should know about this method is what happens...

Windows 8 Dev Camp, Cluj-Napoca - September 29

A great Windows 8 Dev Camp will be organized in September 29 by Codecamp and ITSpark. This event is 100% free. We will have 6 great sessions. See you there! http://codecamp-cluj-sept2012.eventbrite.com/ ---------------------------------------------------------------------------------------------- Nu a mai rămas mult până la lansarea oficială a Windows 8. Cu această ocazie Codecamp împreună cu ITSpark vă invită la “Windows 8 Dev Camp ”. ÃŽn cadrul acestui eveniment o să disecăm o parte din secretele pe care un dezvoltator trebuie să le cunoască despre Windows 8. Participarea la eveniment este gratuită . MulÈ›umim în special sponsorilor pentru susÈ›inere. Agendă 9:15-9:30 Sosirea participanÈ›ilor 9:30-10:20 What's new in Windows 8? Tudor Damian A brief overview of the new features and performance improvements in Windows 8. 10:30-11:20 Integrating the Windows 8 Experience with Contracts Tiberiu Covaci Windows 8 introduces a new sys...