Simple is Beautiful | Technology, Programming, Video Games
This blog is about technology, programming, video games, books and other related topics. It is published by Mark Papadakis.

Developing for Android and Windows Phone 7

I spent a few (no more than 2) hours on developing for Android, and the better half of a day building for Windows Phone 7 / Silverlight, mostly because I wanted to learn enough to understand the development model of both platforms, and compare said models to iOS's.

I went through Android source code when it was released ( spending most time on the 'Skia' 2d drawing component ) and figured out through the basic concepts. Its been a long time since then.

I was drawn to Windows Phone 7 because I really like the UI. Its clean, simple and elegant. Its also fresh and unlike iPhone's UI(everyone is copying Apple, left and right, as it has always been the case). When Silverlight was announced, I looked into it but was put off by the use of XAML files and some weird naming decisions in the classes tree. Other than building a trivial 'lets see what this is all about' application, I didn't spend more time on it.

As expected, Android and WP7/Silverlight also adopt the familiar views/controls paradigm. On Android, you got tasks (processes) and each holds a stack of Activities; an activity is more or less a page, that holds a content view. That content view is usually a container view that contains other views. Activities do not need to come from the task that owns the activities stack. They are popped out in a LIFO fashion, and its alls simple and nice. You also get services ( really, tasks with no front-facing UI, which are cool ), intents ( effectively, messages with action and payloads ) and other niceties.
It all more or less make sense - the one thing I don't like about Android is the UI of the controls. Everything is ugly. The emulator is also slow and, well, ugly, which makes things even worse than they probably are. Google is no Apple, sure, but they should have done something about it. It all reminds me of those Java Swing components (or even worse, AWT components used in Java Applets when applets were cool - which is a long, long time ago ). You get to use Java to build the applications. I am not fond of Java, but I don't really mind it ( a bit too high level for my taste, among other things). You also get to use Eclipse ( which makes it really easy to build stuff, with intellisense, on-the-fly compilation and all those nice things people expect nowadays from IDEs ), or use any other IDE or just use the tools on the terminal , if you don't like IDEs or for whatever other reason. That's what I did. The tools are easy to use and it takes very little amount of time to feel comfortable enough with the environment.

I spent an hour or so trying to find my way around Windows Phone 7 Silverlight concepts and paradigms. Those XAML files, that I hated on SL back in the day, were still here and I just didn't want to deal with them. It turns out, that unlike what the documentation may make you believe, you don't need to use them. You can delete them and do everything programmatically ( though its not straight forward, but it make sense once you do it once or twice ).
You need to decide if you want to build a Silverlight application, or an XNA application. If you want to build 'high performance' games, you need to build an XNA app. Otherwise you will want to build a Silverlight app. They are concepts and classes that are unique to each approach and it just doesn't feel right, having to restrict yourself to either of those as opposed to building an application that can access all facilities offered by the device. You are going to use C# to build Windows Phone 7 applications. C# is nice. Java on steroids. Visual Studio 2010 Express for Windows Phone is a free download from Microsoft, providing everything you need to build your applications.
So, you got your Application instance ( every WP7 application needs a class that derive from System.Windows.Application ). Every application instance has a RootVisual property. Its the main application UI ( a System.Windows.UIElement derived class instance ). The convention/requirement on Windows Phone is to have a special class instance set to RootView(PhoneApplicationFrame) and that should hold a PhoneApplicationPage derived class instance ). That page in turn holds a Content - which is the content view, etc. Similar concept to Android's activities and their content view, and iOS's Windows, Navigation controllers and their views. Again, simple stuff - just make sure you stay away from XAML documents.
By the way, there is no support for multitasking on Windows Phone 7, unlike Android and iOS. There is no supports for sockets, either, which is weird and rather sad ( Access over HTTP and 'web services' is not good enough ). Hopefully, this will change soon.

I am going to build a 'real' application for Windows Phone 7 in whatever spare time I have this week and submit it on their Market Place. It should be fun; if nothing else I will should learn enough to help our Mobile Unit folks at work with upcoming Windows Phone 7 projects.

Sunday, 17 October 2010 1:10 am


Gears of War VS Resistance: fall of man

The first episode of versus, a brand new ongoing segment from gametrailers.com .. which will pit two games against one another whereas users can select which is best in various categories in order for the 'best' game to come forward. The first episode deals with Xbox 360's masterpiece 'Gears of War' VS 'Resistance: fall of man', PS3's launch title marvel.

Saturday, 23 December 2006 12:45 am


Problems, gaming, and the mystery of the lost packets

Its been a whole long while since I last had the {time, will, chance} to blog, for various reasons - mostly because time didn't permit so neither the mood was aligned properly for scribing words here. The past two weeks ( I keep using this 'the past two weeks' sentence, its a recurring theme.. ) were - still are - crazy. We are suffering from multiple networking failures, whereas the actual source of the problem is still untraced for all three ISPs we utilize cannot get to the bottom of this. In addition to that, we are having some other problems ( of a similar nature ) of our own to battle with. All in all, its a binary chaos where the packets get routed to oblivion and bytes get morphed out of the blue. It can't get any worse than that ( actually, it can - but lets keep it sane ).

As if it wasn't enough to drive us crazy to the Nth degree, we are having various other issues related to software failures. However, software is usually something we can handle efficiently, and this is also the case. Those problems are almost gone.

Which brings us to the reason why I felt the need to blog in the first place. I HATE dealing with 3d party software or hardware. Be it routers, switches, web servers, database servers, you name it. Its about combinations of {lousy support, crappy implementation, bugs, lack of documentation, scalability limitations}. This is why I really dislike open source ( there are a few exceptions to the rule, Linux coming to mind ) and why I prefer building everything myself rather than relying on others. It may seem like a crazy idea, but doing everything in house has worked really well for us. Hopefully, someday soon I 'll be able to throw away Apache and sendmail, and even mySQL - dare I say - for our own solutions and be happy.

I picked up the Wii and my brother got my Zelda : the Twilight princess and the classic controller. The Wii is a bit of a unique system. Its really small, somewhat cool looking, can be used and set up in a snap, and feels very friendly, in a way. The new 'revolutionary' control scheme doesn't appeal to me that much - however my brother is crazy about it, given that he loves playing tennis and golf on Wii Sports, every chance he gets - however it seems at least interesting. The channels concept is pretty neat - I can't wait for the 'Internet channel' to become available so that I can browse the web on my TV with the Wiimote, and the shop has some lovely retro games to download/purchase.

Zelda is a magical, wonderful, beautiful, complete game. I 'd prefer using a classic controller for handling Link, but other than that this game is amazing. That game alone is worth buying the wii just to play it. EXTREMELY highly recommended.

Having said that, the 360 still seems like the ultimate game console to me. The future will tell how the PS3 and the Wii will fare against it.

On unrelated note, our team kicks ass. I am so proud to work with them. Go phaistonians!

Wednesday, 13 December 2006 0:57 am

« Older Posts  
Powered by Pathfinder Blogs