Coffeehouse Thread

44 posts

Forum Read Only

This forum has been made read only by the site admins. No new threads or comments can be added.

Windows 8 Xaml/C# Apps

Back to Forum: Coffeehouse
  • User profile image
    Harlequin

    Has anyone built Windows 8 Xaml/C# apps, or played around with them a bit?

    Asking because these HTML5/WinJS Windows 8 apps...are just not fun to build...at all. And I'm the senior front-end guy here, not a SQL dev thrown into the fire Smiley

  • User profile image
    Ian2

    I'm currently working on getting an App into the store in the UK.  It's not a complex app but the ingestion process as it currently stands means that everything is under close scrutiny EG tests for Metro compatibility require pixel perfect placement.

    I managed to get things 95% there pretty easily, but as ever it is the final 5% that is always a bit problematical.

     

    What kind of issues are you seeing?

  • User profile image
    Bas

    I'm building an app for an online retailer in C#/XAML. It's pretty doable thanks to some WPF experience in the past. The codebehind stuff is easy, the biggest pitfalls you'll see that you didn't have to deal with in desktop applications are the fact that a lot of methods won't take file paths anymore (you can't just access any file in the file system anymore in Metro apps) which leads to problems when, for instance, trying to read an XML file using LINQ to SQL. It's surmountable, but not immediately obvious as it should be. Also some stuff, like System.Cryptography, is no longer there. There are alternatives, but the documentation is well hidden.

    I've tried to build some stuff in HTML/JS but it's just too painful. JavaScript is horrendous. What's worse some of Microsoft's samples (for the share charm for instance) are only available in JS.

  • User profile image
    contextfree`

    @Harlequin: Haven't tried it yet but I'm curious if the problems you're having are specific to the Windows 8 HTML/JS runtime, or more due to the fact that you're writing a web application that is all client-side and doesn't have any server-side rendering like most web sites do.

    That's an interesting point I haven't seen mentioned - the HTML/JS option for Metro style apps is there to appeal to web developers, but while there are certainly a lot of web developers, I think the large majority of them are probably still used to server/client applications with a lot of server-side logic written in a different language. The sort of pure client-side HTML/JS application that Win8 supports is still kind of avant-garde in the web world.

  • User profile image
    vesuvius

    Played around with Metro a little, the steep learning part is mostly the fact that everything is asynchronous, once you get over that, it means that developing your apps becomes easier.

    You pay the price for being an early adopter i.e. no help in blogs and incomplete documentation, but that should get paid back by being the first to hit the market

     

  • User profile image
    Maddus Mattus

    @Bas: wouldnt happen to be a retailer in Huizen and the project located in Hilversum?

  • User profile image
    Bas

    It's Bol.com if that's what you're asking. Wink I have no idea about a project in Hilversum, I'm doing this on my own initiative using their public API. Figured it'd be a good first project for Metro development.

  • User profile image
    Harlequin

    @Ian - Weird things, here's a few:
    1) You bind a ListView to a data source...works fine. If that ListView has display:none; on it...nothing binds. Have the size of a ListView set to 0px x 0px? No binding.

    2) You have a default.html page with a default.css. Now, all pages use that default.html, their contents get injected, so your category.html page, and category.css get injected into default.html. Fine. Now go back to your default.html, and your category.css is still in the head. In fact all pages you visit, all the css files are now referenced everywhere. Not a big issue, but web devs like myself, I assumed that category.css would be on the category.html page...not that it would follow me around to all the pages. So now you have to write CSS for each page so it won't collide with other pages DOM objects...not a pain, just not expected.

     

    @Bas - Agreed the WinJS is horrendous. The point of having Windows 8 HTML5 apps was so they could pull web devs into building apps. But the complexity of it is too much of a learning curve....big FAIL.

     

    Here's some of my thread titles on MSDN forums:

    • Should app bar icons automatically have a circle?
    • What's the best way to resize/recalculate win-surface in a ListView, if you use CSS to modify the items inside?
    • Why does a ListView with display:none or 0px size not get populated with itemDataSource?
    • Scaling Imagery (100%, 140%, 180%)
    • What Segoe UI variations are available?
    • Text - Display issue binding to itemTemplate in a fragment

    ...to name a few.

    Now I'm not horn-tootin...but I've been doing this front-end stuff for 14 years(HTML/Silverlight/etc), if I'm having huge struggles just to make a div scroll God knows how we'll be able to get web devs to build Windows 8 apps in HTML5.

  • User profile image
    Bass

    You might want to try out CoffeeScript. It makes JavaScript more succinct and familiar, I use it to great success in my current project.

    Also, I don't see why you need to use any "Metro-specific" features to make a Windows 8 app. I would stick with just standard tried and tested web technology as much as possible. That also makes your app portable.

  • User profile image
    PaoloM

    , Bass wrote

    Also, I don't see why you need to use any "Metro-specific" features to make a Windows 8 app. I would stick with just standard tried and tested web technology as much as possible. That also makes your app portable.

    Calls to WinJS are portable?

  • User profile image
    Maddus Mattus

    @Bas:My old company is doing a W8 project for an online/offline retailer, thought maybe they hired you Smiley

    As all the excellent developers left the company Smiley Smiley they have to hire outside the company now!

  • User profile image
    Ian2

    Yay! First Windows 8 App 'passed muster'*. Just got my GB store token! 

    Chuffed! 

  • User profile image
    Maddus Mattus

    @Ian2:Grats man! That's very awesome!

  • User profile image
    DeathBy​VisualStudio

    While this is just a single experience in the new Metro stack I think it speaks volumes about the "skills transfer" that isn't that Microsoft touted at Build. Thanks for sharing Harlequin.

    Ian, is your app written in XAML? Congrats on your success.

    If we all believed in unicorns and fairies the world would be a better place.
    Last modified
  • User profile image
    Ian2

    @DeathByVisualStudio:Yes, XAML/C#.  It's not a complex app so a great intro to WinRT and a straightforward skills transfer from Silverlight. 

    Feature based blog post in the works http;//WebSurfaces.co.uk

     

     

  • User profile image
    Auxon0

    Broken URL ... FTFY:  http://websurfaces.co.uk

  • User profile image
    Charles

    @Ian2: Way to go, Ian!
    C

  • User profile image
    Charles

    @DeathByVisualStudio: That's not true... If you know SL or WPF and C# or VB.NET, then it's not terribly difficult to apply these skills in Metro. Also, if you know how to program web applications in HTML5, then applying these skills to Metro development is also not rocket science...
    C

Conversation locked

This conversation has been locked by the site admins. No new comments can be made.