May 02

Sevgili arkadasim Celiker, uzunca suredir uzerinde calistigi .NET Micro Framework'le ilgili tum bilgilerini bir site altinda toplamaya basladi. Ornek kodlar, uygulamalarin yani sira cihazlara da ulasabileceginiz bi site : 

http://www.micro-framework.com  adresinde.


GHI ve DeviceSolutions firmalarına ait tüm cihazlara ulaşabilirsiniz.

Apr 21
Microsoft has released the icons that will be used in its Windows Phone 7 OS. The download page explains that the pack is meant for application developers writing software for the OS. There are 64 icons in the pack, 32 light and 32 dark, in .png format, with a vector-graphics option for import into Microsoft Blend.
Dec 24

Couple of days ago Alex Yakhnin posted a nice brain storming article on RIAs and Mobile Devices, here. If you think about the Silverlight functionalities we have now and having them on a limited mobiel device....

That's explains a lot why we still don't know anything about Silverlight on mobile.

Oct 31

Looking for a quick way to get the basics of Windows Mobile development? Try the RampUp “Develop Windows Mobile 6 Applications” e-learning.  Whilst this focuses on Windows Mobile 6 using VS2008, a lot of the points covered actually apply to all versions of the Windows Mobile platform.  Topics include the following:

Level 1: Mobile Development Introduction
Level 2: Device Emulators
Level 3: Mobile Windows Forms Development
Level 4: Advanced Mobile Windows Forms Development
Level 5: SQL Server CE Introduction
Level 6: Security and Deployment
Level 7: Mobile Web Development

Tags:
Aug 02

Couple of days ago, in one of the communities I follow, a question was asked if there is a way to integrate a map into a  integrating the Bing Map (javascript) Control into a Windows Mobile Widget.  Whilst the javascript engine in Windows Mobile 6.5 has been given a massive injection of life, I was very skeptical that the javascript control would work out of the box. I was proven wrong with the map working with no modifications.  The following code is taken out of the online visual sdk, with the only change being the height and width of the map div to fit into the widget.

<html>
   <head>
      <title></title>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <script type="text/javascript" src="
http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.2"></script>
      <script type="text/javascript">
          var map = null;
          function GetMap() {
              map = new VEMap('myMap');
              map.LoadMap();
          }  
      </script>
   </head>
   <body onload="GetMap();">
      <div id='myMap' style="position:relative; width:240px; height:260px;"></div>
   </body>
</html>

The only issues I found with the javascript control relate to the gesture support within the widgets in Windows Mobile 6.5. When you pan your finger within a widget it attempts to scroll the widget itself.  Unfortunately this means that you can pan the map by dragging your finger across the map.  Instead you have to use the navigation control in the top left corner.

 
Jun 26

For an internal competition project here in Avanade, my colleagues and I implemented a location aware service works on the cloud. So I’ve many outcomes from that project and want to share them with you. Our aim was to go get the a location data, based on Latitude and Longitude but alas our HTC Touch devices don’t have GPS hardware installed in. So I decided to go for GSM CellID based location awareness and worked quite well. So here is the first step to demonstrate the basic structure on how to get GSM CellId with couple of lines C# code. I just referred to MSDN codebase the RIL_GetCellTowerInfo function in the Radio Interface Layer (RIL) API. 

 

        1.Call RIL_Initialize to get a RIL handle

        2. Call RIL_GetCellTowerInfo to get the information about the cell tower the phone is connected to

The “Cell” string that FindMe displays seems to be a combination of the dwCellID, dwLocationAreaCode and dwMobileCountryCode

       3. Call RIL_Deinitialize to release the RIL handle

 

You can find the code here. GetCellDetails.rar (24.03 kb)  I’ll add other steps to decode geo info (latitude and longitude data) from that cellID identifiers soon. Meanwhile you can check http://www.opencellid.org/ and similar services from other public or commercial vendors and get more info on GSM CellID.

 

May 18

Windows Mobile 6.5 is done and that’s a good opportunity to provide a quick jump-start to developers wishing to learn more about the OS.

Microsoft has a tendency to overload developers with abundant API of its various platforms and technologies. Windows Mobile is no different. Managed and native API, .Net, MFC, ATL, Win32… it’s all there for the confused developer. Luckily, Microsoft has recently published an article discussing APIs for Windows Mobile 6 and later, and how to select the best fit for your application needs. BTW, don’t be tempted to choose managed .Net API before fully understanding the functional requirements from your application and the devices it needs to run on. Win32 is better if you wish the application to run on as many devices as possible. 

A good place to learn Windows Mobile development is MSDN’s ramp up which is a community-based learning program, teaching various aspects in development for WM. Another excellent source for learning and help is blogs of mobile gurus. I recommend subscribing to the following blogs: Raffaele Limosaniblog, Alex Yakhnin, Christopher Fairbairn, Windows Mobile team blog, Reed and Steve blog, the Moth, and finally, Chris Craft (especially his 30 days of .Net series).

OK. You’ve done your reading and fill ready to start developing? hold on. Make sure you took into account globalization and localization issues. Simon Judge lists many of them.

Once done development, you need to QA your application. If your application aims for numerous devices in many countries, involving different networks, you should consider using DeviceAnywhere or maybe even Mob4Hire.

Finished the cycle? congratulation! Now you can go and publish your application on Windows Marketplace.

Mar 26

Chris Tacke shows in his blogpost, how to create a Screen Capture with less than 10 lines of code. Without any P/Invoke or any more hacking, it just uses managed code. Really and very simple, thanks Chris.

Jan 06

I heard many complains about slow startups of mobile applications and also got questions how to increase the startup performance. In most of the projects, the problem was a design issue, just like trying to connect a remote server on startup or populating big datasets etc.. But on the other hand, if you think your startup sequance is totaly clear and correct than you may find some more things to do in general.

Take a look at the article on how to optimize the your application's loading time.
http://blogs.msdn.com/raffael/archive/2009/01/05/netcf-improve-startup-performances.aspx

Dec 18

 Microsoft announced the general availability of the latest addition to the BizTalk Server RFID platform - BizTalk RFID Mobile, an RFID platform for mobile devices based on Windows CE and Windows Mobile. BizTalk RFID Mobile consists of a runtime engine as well as tools and components to develop, deploy, and manage RFID solutions on mobile devices.

Developers, independent software vendors and systems integrators can build device-agnostic mobile applications utilizing RFID and sensor data on devices running Windows CE or Windows Mobile 5.0, 6.0, and 6.1. Events and data can be stored on the mobile device using a SQL sink service, and then communicated to the BizTalk Server RFID platform for further analysis. Mobile devices can be discovered, queried, and managed from the BizTalk Server RFID platform. Support for industry-ratified standards like the Low-level Reader Protocol (LLRP) and the Tag Data Translation (TDT) library provides a standards-based approach to discover, provision and troubleshoot RFID devices, in addition to surfacing business-relevant attributes from RFID tags

For more information on the product, capabilities, and evaluation versions, browse to: http://www.microsoft.com/biztalk/en/us/rfid-mobile.aspx.

The documentation on how to build applications using the BizTalk RFID API can be found at: http://msdn.microsoft.com/en-us/library/dd351599.aspx.

Tags: | |
Dec 01
The Microsoft Patterns & Practices (p&p) team delivers applied engineering guidance that helps software architects, developers, and their teams take full advantage of Microsoft’s platform technologies in their custom application development efforts. Working with the Windows Mobile team the p&p team has updated their Mobile Architecture Pocket Guide, which provides real world information and best practices for mobile development. Definitely worth taking the time to give it a read.
Nov 28

Giorgio Sardo has an excellent post about tutorial on Building Graphically Advanced Applications with .NET Compact Framework 3.5.   He also has a link in his post to the source (bonus!).  Check it out.  

The article itself (linked in his post) is at: http://expression.microsoft.com/en-us/dd279543.aspx

Nov 28
Have you heard of the MSDN Code Gallery? Well here it is: http://code.msdn.microsoft.com/.

If you are a developer blogger or just want to make some code public for others to enjoy, this is an option to upload stuff without having to have a dedicated public server.
Tags: |
Oct 30

As some of you may have already heard, Enterprise Library 4.1 was released by the Patterns & Practices group at Microsoft. I used to implement application blocks from Enterprise Library’s previous versions in my previous projects. So I decided to take a quick look for personal update.

Installing this version of Enterprise Library is much better than previous installations, as this one gives you the choice to extract AND build the different application blocks at the same time, instead of using a different installer to extract and build the source codes.  The change log for this release is available here (highly recommended to read).  If you’re looking to upgrade your skills with Enterprise Library, I strongly suggest the Hands On Labs and the Getting Started tutorials for each of the application blocks. 

For more information about Enterprise Library (resources, tutorials, news, etc.) I strongly recommend you referring to these sites:
Pieter's Blog on Enterprise Development
Tom Hollander's blog
Patterns And Practices Guidance

Oct 16

Do you have questions regarding Windows Mobile application development that you need answers to?

Spend an hour with Microsoft employees and MVPs who are experts in Windows Mobile application development.

Join us for a live chat and bring on the questions!

This chat will cover your questions about the tools and technologies used to develop both native and managed applications using the Windows Mobile operating system.

Find our Events on the MSDN Chat calendar here: http://msdn.microsoft.com/en-us/chats/default.aspx

Sep 26

For the software, itself, it is easier to discuss its quality by measuring its performance, memory usage, number of the bugs etc. But what if we talk about the code file, how can we write code that we are proud of.

  • Clarity
  • Number of Lines
  • Performance
  • Comments
  • Exception Management

 

And many other topics can be added to this list for code quality measurement. But we will focus on these five now.


Clarity

Probably you have seen a really “smart” code like the one below:

   1:    public static int GetNextSize(int i)
   2:    {
   3:      //multiply it by four and make sure it is positive
   4:      return i > 0 ? i << 2 : ~(i << 2) + 1;
   5:    }


At least we have a comment line; well we will discuss the comments later on. But as you see you should really focus and evaluate the code before understanding what it is doing. So hiding the code in this way, especially if you work in a team, will create big headaches for your team members and after a while, for you, too. Code should always be clear and transparent for everyone just like the one below.

 

   1:    public static int GetNextSize(int i)
   2:    {
   3:      return Math.Abs(i * 4);  
   4:    }

Steve McConnell : "Good code is its own best documentation."
 

Number of Lines 

Some developers are proud of their big number of code lines. Because this is a proof to show how big the project is. But in the other hand, this is not true. Because more lines of code means more complex, harder to maintain code base or even worse; a sing to the wrong implementation of object orientation or code reuse.  

If you consider two software which function the same, the well structured one has always the less lines of code. The one has less lines of code is easier to maintain and fix the bugs. Which means the lighter is the better. Let me quote Bill Gates: “Measuring programming progress by lines of code is like measuring aircraft building progress by weight“. 

Performance  

Of course a fast functioning program is better than its slow versions and the performance considerations are always in the front lines of the development process. But changing a clearly readable code to its complicated and fast equivalent lines is not always the brilliant idea and there is always a way to implement the same algorithm in a clearer way.  

Well, I don’t mean don’t think about performance optimization but there is always bigger chance in the overall system to optimize. It is more important to focus on the big picture and solve performance problems that are system wide, or refactor code so that changes can be made much faster, than it is to solve a performance problem in a single line of code...unless of course that line of code is being called millions times. 

Comments 

Again I am pretty sure you have seen so many uncommented or not enough commented codes. Even code, itself, is readable or not, comments are important substances. You should always keep in mind to write clear comments like telling it to someone else. Don’t type them in your way but in a common language. 

Exception Management 

Although we are just focusing on the code quality (not the architecture or the software quality) still we need to discuss the exception management. Any unexpected situation can cause the exceptions. Normally the newly started developers go to the solution directly but prefer not to think about any abnormal situation can occur in their solution. So any missing control or a direct assumption can cause a crash in your application.  

In the worst case (probably the simplest) you can catch any exception on Application Domain level and show a common error message screen. But in any case, you shouldn’t let your software crash!  

As you already figured it out, it is not really easy to balance and find the most correct way of coding. If you don’t like the code you’ve written take a step back, review it, fix it, refactor it till you are proud of. Fixing the problems in early stage will have massive returns in the long term.  Searching for the perfect coding will lead you to a better understanding of what you are doing.  

And one more quote from Martin Fowler : “Any fool can write code that a computer can understand. Good programmers write code that humans can understand.”
 

credits goes to CodeThinked

kick it on DotNetKicks.com
 
Tags:
Sep 12

Are you on Facebook? Do you use Outlook and Windows Mobile? If you answered yes and yes, get OutSync, a free app to sync your Facebook friends' photos with Outlook! It's written by Mel Sampat on the Windows Mobile team, and is free to use. Watch the 7 minute video on Channel 10, or visit Mel's website to download it.

Aug 08

Microsoft has announced a free tool for Windows Mobile programmers that can take stock of what resources applications are using. The "Windows Mobile API Usage Tool" performs static analysis of selected binaries, then reports on their usage of APIs (application programming interfaces) and other resources, the company says.

As a new posting on Microsoft's Windows Mobile Team blog notes, some APIs in Windows Mobile have been deprecated and may not be present in future versions of the operating system. Therefore, it's important to be aware of all the APIs an application is using.

The Windows Mobile API Usage Tool is designed to run on desktop computers running Windows Vista or XP, and requires Visual Studio 2005 or 2008. It is a command-line utility that allows selecting either a Windows Mobile application (in .CAB or .MSI format), or a directory containing multiple applications, as input. It will examine the selected code, then create a report listing its system dependences, optionally including any deprecated APIs, says Microsoft.

The tool saves its output in a SQL Compact Edition database (.SDF) file, and is said to be capable of creating a collection of useful reports. The Windows Mobile Team is encouraging developers to examine their applications with the tool, then send in copies of its reports to the company. This will aid in planning the future evolution of Windows Mobile, according to Microsoft.

To read the Windows Mobile Team's posting about the Windows Mobile API Usage Tool, see its blog, here. To obtain further background and download the tool, go to the Microsoft website, here.

kick it on DotNetKicks.com
Aug 06

As you see on the right side I’ve many widgets and planning to add some more. But I think having so many widgets, especially if they are tall, is not visually so nice and effective. I searched for anyone who had the same problem and found Chris’s blog and his a brilliant solution,  Collapsible Widgets”.

The idea is really nice but on the other hand, setting the display style directly to none or block causes sharp and graceless transition. Hence there are many js codes for animated div transitions; I decided to go for another solution to collapse/expand the widgets with animation. After a quick search I found a handy animation on DynamicDrive.

The rest of work is just to place these js files correctly into BlogEngine and configure it. To do this, fist; add these two js files into js folder (create a new folder named as js in the webroot ) in your webapplication’s root.


Then we need to add these js files into the generated pages on runtime. BlogEngine has a nice page structure and so easy to add js files with the
AddJavaScriptInclude function in BlogEngine.Core/ Web /Controls/ BlogBasePage.cs file. Add the following lines to the BlogBasePage.cs in line 89.

 

   1:  //add JS files for animatedPanel
   2:  AddJavaScriptInclude(Utils.RelativeWebRoot + "js/jquery-1.2.2.pack.js");
   3:  AddJavaScriptInclude(Utils.RelativeWebRoot + "js/animatedcollapse.js");
   4:   
   5:  //and the original code goes on
   6:  AddJavaScriptInclude(Utils.RelativeWebRoot + "blog.js");
   7:  if (User.IsInRole(BlogSettings.Instance.AdministratorRole))


Then, we need to configure widgets to toggle theirselfs to collapse/expand. Editing App_Code/ Controls/ WidgetBase.cs as following will be enough to complate our changes.

 

   1:  if (ShowTitle)
   2:     //Change the title text to an active link to toggle collapse/expand toggle
   3:     sb.Append("<a href=\"javascript:animatedcollapse.toggle('widgetContent" + WidgetID + "')\"><h4>" + Title + "</h4></a>");
   4:          
   5:     //old title
   6:     //sb.Append("<h4>" + Title + "</h4>");
   7:  else
   8:     sb.Append("<br />");
   9:   
  10:     //Change the contentDiv and give the id starts with widgetContent
  11:     sb.Append("<div  id=\"widgetContent" + WidgetID + "\" class=\"content\">");
  12:   
  13:  writer.Write(sb.ToString());
  14:  base.Render(writer);
  15:  writer.Write("</div>");
  16:  writer.Write("</div>");
  17:   
  18:  //Initialize animatedcollapsepanel for widget.
  19:  writer.Write("<script type=\"text/javascript\"> animatedcollapse.addDiv('widgetContent" + WidgetID + "', 'fade=1'); animatedcollapse.init();</script>");


That’s all, you can see the result on my widgets by clicking their titles.

I think having smooth UI transitions and animated stuff in your webpage is not bad :)


Download the codes
: AnimatedWidgets-BlogEngine.NET.rar (21.97 kb) 

kick it on DotNetKicks.com
 

Aug 04
Published by Microsoft: http://download.microsoft.com/download/3/B/D/3BDDC5D5-E8CF-4031-A12A-B072ECA27C42/VS2008PETopTenFSEMEA.doc
Tags: |
Jul 30
On Monday morning I found some spare time to work on my blog and here is the totally new BlogEngine. For many years I have used dasBlog successfully, but a brand new codebase, more features, better themes, better SEO and frequent releases are my main reasons for moving to BlogEngine. And here are some more from Mads’ release notes: 
  • BlogML import/export
  • Extension model
  • Code syntax highlighting
  • ASP.NET SiteMap provider for static pages
  • Support for a static page to be the front page
  • Full comment RSS/ATOM feed
  • Intelligent error 404 page
  • E-mail notifications for future comments
  • Role provider
  • Extended in-site search capabilities
  • SLUG – the URL doesn’t change with the title
  • User control injection
  • Attachments on the contact page
  • Comment moderation
  • Much better Mono support
 

So I downloaded and give it a try to import my old data from dasDlog. Here are my steps that resulted %100 successful:

  1. Setup BlogEngine on my local pc, just an easy pointing from IIS to the folder.
  2. Export dasBlog data to BlogML, hence dasBlog doesn’t have a BlogML export utility and has its own data model, I was planning to write some code for that conversion. But –for sure- it was already written by Paul and downloadable on this link.
    With this nice tool it was so easy to convert my dasBlog content to BlogML.
  3. My images from old posts were in content/binary/ folder in the dasBlog. I left them as they were on the server. So I didn’t change any links or mapping in my posts.
  4. I had some improvements and additions on widgets and comment mail sender extender, I will post these changes soon.
  5. I did all configuration, styling, tracking scripts and all other settings locally.
  6. I deleted everything except content\binary folder on my hosting server and uploaded my new BlogEngine codes and contents.
  7. After a small setup on permissions (write permission to App_Data folder) my new blog was up and running.
That’s all.!

kick it on DotNetKicks.com
Tags:
Mar 04

While Microsoft's Flash competitor Silverlight is still not available for Windows Mobile (except Microsoft internal Betas), Nokia today announced plans to make Microsoft Silverlight available for S60 on Symbian OS smartphones as well as for Series 40 devices and Nokia Internet tablets. Adding support for Silverlight will extend opportunities for developers to create rich, interactive applications that run on multiple platforms in a consistent and reliable way.
Silverlight is a cross-browser, cross-platform plug-in for delivering next-generation media experiences and rich interactive applications.

Silverlight is already powering thousands of applications around the world and organizations including Entertainment Tonight, the NBA and NBC Universal to deliver superior Web-based experiences to their customers. The arrangement with Nokia will substantially extend the reach of Silverlight by making the platform available for hundreds of millions of devices, including S60 on Symbian smartphones from a range of manufacturers, as well as Nokia Series 40 devices and Nokia Internet tablets.

Microsoft will demonstrate Silverlight on S60 during the opening keyote at Microsoft's MIX08 conference on March 5 in Las Vegas. Silverlight is intended to be available to S60 developers later this year with initial service delivery anticipated shortly thereafter for all S60 licensees. This will allow S60 application developers to use an even wider range of development environments for S60 on Symbian OS than today. Today S60 developers can use: C++ (using native Symbian OS APIs and Open C providing subset of standard POSIX libraries), S60 Web Run-time (supporting standards-based web technologies such as Ajax, JavaScript, CSS and HTML), the Java language, Flash Lite from Adobe, and Python.

Microsoft Silverlight availability for Nokia Series 40 devices and Nokia Internet tablets will be confirmed later. When will Microsoft announce Silverlight's Windows Mobile availability?

Jan 15

Microsoft will soon release version 2.5 of its .NET Micro Framework platform for low-end embedded processors. The new release adds support for networking via a native TCP/IP stack, and for Web Services on Devices (WSD), according to postings on the .NET Micro Framework Team's blog.

Microsoft first released .NET Micro Framework (.NET MF) in 2006, aiming it at wireless remote controls, watches, and other cost-sensitive devices with constrained processor and memory resources. The .NET MF grew out of Microsoft's Smart Personal Objects Technology (SPOT) initiative, with embryonic versions variously dubbed .NET Embedded and TinyCLR.

According to Microsoft, .NET MF supports low-end embedded processors and doesn't require an MMU (memory management unit). A typical runtime image is only about 300 KB in size, the company says.


.NET MF grew out of Microsoft's work with SPOT Watches

 

Microsoft released .NET MF version 2.0 in February 2007, and .NET MF 2.0, Service Pack 1 in September. However, these releases still did not include a native TCP/IP stack, which was listed as "coming soon." Therefore, networking a .NET MF device has required calling through to an underlying operating system with sockets support, according to the company.

Version 2.5 of .NET MF will now offer a stack that is available even when running directly on the hardware. Device makers need only provide a driver for the network interface. This will result in a wider selection of network-capable hardware development platforms for developers to choose from, Microsoft says.

The company adds that the new version of .NET MF will also include client and server support for Web Services on Devices, also known as Device Profile for Web Services (DPWS). Already part of Windows Vista and Windows CE 6.0 Release 2, this "enables a USB-like level of plug-and-play for networked devices," in the company's words. DPWS-enabled devices on a network can discover one another, then invoke the functionality each device provides.

Further specifics of .NET MF, version 2.5, were not provided, nor has a release date been announced. However, according to the .NET MF team, the new version should appear in "early 2008."

For further information, see the blog posting, here.

Tags:
Jan 14

A post on Microsoft's .NET Compact Framework (.NET CF) blog brings word of some interesting new tools for programmers. Included in a download called "Power Toys for .NET Compact Framework 3.5," they're intended to evaluate performance, obtain diagnostic information, and help with configuration, according to the company.

The six tools said to be included in the package are:

  • Remote Performance Monitor and GC Heap Viewer
  • NETCF CLR Profiler
  • App Configuration Tool (NetCFcfg.exe)
  • NETCF ServiceModel Metadata Tool
  • Remote Logging Configuration Tool
  • NETCF Network Log Viewer

According to information provided on the PowerToys download page, the Remote Performance Monitor and GC Heap Viewer provides real-time counter data (ranging from Garbage Collector activity to type loading info) on a running .NET CF application. The GC Heap Viewer feature allows you to capture the managed heap at any moment your app is running to view live references, and allows you to compare multiple snapshots to find memory leak issues.

The NETCF CLR Profiler is said to be an instrumenting allocation profiler for .NET CF applications. It provides detailed allocation visualizations, allocation callstacks visualizations and useful for diagnosing memory management issues.

The App Configuration Tool (NetCFcfg.exe) is described as an on-device tool for specifying what version of the .NET CF runtime an application will run against, displaying installed versions of .NET CF and displaying info about DLLs.

The NETCF ServiceModel Metadata Tool (netcfsvcutil.exe) allows creation of a Windows Communication Foundation (WCF) client proxy to help developers consume WCF services on device, according to Microsoft. Like svcutil.exe, which is the desktop version of the utility, netcfsvcutil.exe is a command-line tool that generates service model code from metadata documents, and generates metadata documents from service model code.

Finally, the Remote Logging Configuration Tool enables users to easily configure logging options on a .NET CF device, including loader, interop, network, error and finalizer logs. The NETCF Network Log Viewer is described as a utility for viewing .NET CF network log data.

To read or comment upon the .NET Compact Framework Team's post, go here. To go directly to the download of the Power Toys for .NET Compact Framework 3.5, go here.

Tags:
Jan 13

  Facebook has become a huge phenomenon in social networking. The site exposes a developer API to support Web and desktop applications. In this article you will explore making use of this functionality from a smart device application. The source code to accompany this article demonstrates working with key aspects of the Facebook API and tightly integrating with Microsoft® Windows Mobile®–specific APIs.

Software Blogs TopOfBlogs