Revisiting – Device Development

Technology is amazing and has changed itself and our life – significantly. We’ve seen computers filling entire room and heating up like hell. In this day and age, we call them Personal Computers (PC), sometimes which can be carried anywhere in a form of Laptop, Personal Digital Assistant (PDA) or even a small embedded ‘smart-device’. These devices also include mobile phones, PDAs, ATM machines, Kiosks, Tablet PCs, Robots, Electronic toys, Music systems, digital cameras and what not. And these small devices are capable of doing lots of things and that too within a fraction of a second. You just need to wish (or should I say ‘program them’) and these devices will obey the command.

Programming these smart-devices is exigent task. Developers don’t have that luxury of GBs of RAM OR TBs of hard-drive space OR GHz of Processing power with 32 OR 64 bit addressing space from a desktop OR even millions of pixels and thousands of colors hogging up screen OR even 24x7x365 broadband connectivity.

When it comes to smart-device programming, developers need to mull over many scenarios. Most of the today’s smart-devices still have 100-200 MHz processing power or even less with small addressing space like 8-bits OR 16 bits. These devices don’t have hard-drive and by and large they depend upon flash memory of MBs and termed as ROM. These devices also have a constraint on RAM. Mostly these devices don’t have a display screen (called as headless device) or if they do have, then it might be in a size of 240×320 with only selected color scheme. Even these specifications change from device to device and according to the position in which device is held like horizontally OR vertically. Sometimes, these devices have limited connectivity like Wi-Fi, Infrared, Bluetooth, GPRS, Cellular network or sometimes no connectivity at all. And as a developer, we need to think about how the application will behave in these scenarios.

There are lots of technologies out there to help us command these devices and address these scenarios. Depending on the type of device, its working process model, environment conditions, cost and risks associated, development process, time to market these devices and last but not least – interest of manufacturer, developers can choose any technology which suits and interests them.

These devices can be powered by technologies like Microsoft Windows Embedded family, Linux, Symbian, iPhone, Android, etc. and can be programmed by C, C++ and Java. And nowadays developers can choose VB.NET or C# as well – whichever is perfect for them.

There is subtle difference between writing applications for desktop/web and these devices. Developers build apps for desktop OR web and just deploy it. But in case of smart-device, if the device is a brand new custom made device, perhaps developers would need to have their own operating system running on it e.g. Kiosks, ATM machines have a custom made OS. And then, developers will write an application which will run on top of it. After all this, what if developers don’t have access to a real device?

Does it look pretty complicated? Well, it’s easy once we get our hands dirty with some practical stuff.

In next few blog-posts, I’m planning to share my understanding of Windows Mobile, Windows Embedded, Symbian, Android and iPhone with you.

So, stay tuned and keep looking for further updates on technological world.


Mayur Tendulkar

LINQ – Introduction to Language INtegrated Query

Envisage a situation where, there are 20 people in a room and all of them are from diverse places. They don’t understand any common language and now – you’ve to address them. Same ways, now visualize, there are many different platforms – which doesn’t have anything in common – and you need to build one solution which will run on all of these platforms. Well, there are many ways to handle these kind of scenarios. You can call translators/interpreters OR ask everyone in the room to learn, English. The second option looks logical. In case of different platforms – we already have solutions as Sun J2EE OR Microsoft .NET. These technologies provides an abstraction layer like mechanism, to write code on one platform, which can run on other platform.

Now, we have handled these 20 people scenario and different platform scenario – but world doesn’t end over here.

There are many issues with traditional systems and LINQ tries to surmount them. Lets understand those issues first, so we’ll know WHY we need LINQ.

  • As we all have some familiarity with software application development we comprehend that every software we develop, deals with data. This data can be in any form – it can be variables, array of variables, files OR file system, databases OR data-stores, Windows Management Instrumentation (WMI) Store, web services and what not. Now, even this can become more finicky like, whether its NTFS File System OR FAT32? Whether its SQL, Oracle, MySQL database? Whether its XML or a simple Access File or flat file? And as we know, dealing with different technologies means learning it from scratch – once again. If we want to access data from files, we need to learn file system APIs. If we want to access data from SQL Database, we need to learn data access APIs contained within ADO.NET. Likewise, different APIs for different technologies. So the first annoyance with dealing with software development is – learn different data access APIs related to different data access technologies.
  • Even though, we have ADO.NET, to access data from various data-sources, the APIs deals with connections , tables, rows, columns, records, but languages that we use deals with Objects. So, both database systems and programming languages have different paradigm of programming. This in short means a lot of niggling stuff between database and programming languages.
  • Developers, by default, are master in a particular language. It can be C/C++, C# or someone will be like me who simply loves VB. All of these languages have different syntax. Many times, it’s not possible for developers to learn all these languages OR master their syntax. And learning a new language is a big task. It becomes tedious to learn different languages which deals with data like T-SQL in general and learn another language which deals with objects.
  • Now, as we deal with different data sources, we need to deal with data-type mismatch. The length of string in SQL Server will be different than that of in C# likewise there are many more different data types and suppose we change database server (from Oracle to SQL Server) then it becomes more hectic as we might need to change almost all portion of Data Access Layer (if system architecture is not designed to deal with it) hence many data sources and object oriented languages have different set of data-types.

Like these, there are many issues with existing systems when we talk about accessing OR manipulating data. LINQ tries to overcome all these limitations by providing

  • Uniform mechanism for dealing with any data source – whether its Array, SQL Server Database, XML Dataset, XML file, or any other data source
  • Object-Relationship Mapping – which maps tables in database with Objects in applications
  • Language Integrated Support – syntax for accessing/manipulating data is integrated with your favourite language.

There can be numerous advantages to LINQ – but as per my point of view (OR as developer point of view because I’m also a developer J) these three are the major advantages of LINQ.

In next few posts – I’ll explain how we can use LINQ in our applications i.e. a practical approach.

Happy Coding | Mayur Tendulkar

Pune User Group DevCon 2008


Hi there,

We’re pleased to announce that we’re organizing an event called DevCon 2008 on 30th and 31st August 2008. For more information please visit :

Probably, if my topics are selected, I’ll be talking on Silverlight 2.0 and Windows Mobile 6.0 Application Development.

Happy Coding :)

Mayur Tendulkar | Microsoft India

Pune User Group – Community Day (19th June)


I’ll be delivering a session on Managed Application Development for Windows Mobile at our monthly Community Day. In this presentation, I’ll cover basics of .NET Compact Framework 3.5, it’s new features and using .NET based APIs on Windows Mobile devices.

For this month, we’re having following schedule:


Developing SilverLight 2.0 based Web Applications


Mr. Vikram Pendse (Programmer Analyst, zCon Solutions Pvt. Ltd.)

Time : 3:00 to 4:00 PM

Lap Around Expression Blend


Miss. Pradnya Naik (Microsoft Student Partner – MIT)

Time : 4:10 to 5:10 PM

Managed App Development For Windows Mobile


Mr. Mayur Tendulkar (Microsoft Technology Intern)

Time : 4:10 to 5:10 PM

Date: Saturday, 19th July 2008

– Venue –

Microsoft India Pvt. Ltd.

For more information click here

Namaste :)

Mayur Tendulkar | Microsoft India

Web Service On Windows Mobile


I’ve seen many people, who are facing issues while accessing Web Service on Windows Mobile enabled devices. Although there are lot of posts on blogs and forums, sometimes, it doesn’t work. Why? Because there are lot of issues.

Let’s see all those issues and solve them. I hope that readers of this blog are aware of creating Web Services in C# / VB.NET using Visual Studio 2005 or 2008.

If not, lets create a simple Hello World web service i.e. a web method, when called will return a Hello World string. By default, when you create any web service in Visual Studio it gives you “Hello World” method as a web method which can be consumed (or used) as web service.

Now, lets see how we can access this web service in Windows Mobile based applications.

1. Create a Windows Mobile based Windows Forms Application

2. Add a Web Reference to your web-service. Now, here is the glitch. While adding a reference it uses your system as a localhost (in some cases port no attached) but when you deploy your application on Windows Mobile, actually your web-service is still running on your development machine and not on your device. Hence, change this localhost with your development machine name OR machine name on which your web service is hosted. Don’t use IP address. Why? Because, when you attach your mobile device to the machine, using DHCP it gets automatic IP address. So, don’t set any IP address rather use machine name.

3. Now, create a proxy class and use that web service in your application.

4. To test the application, run it in emulator or on device. Now, if you’re running your application on real physical device then it should work properly. But, if you’re running it on emulator, then make sure that…

a. In ActiveSync -> File -> Connection Settings, you have allowed DMA connections.

b. When Device Emulator is running, in Device Emulator Manager, Cradle your device. That means, it’ll connect your device emulator to your machine.

This ways you should be able to consume web service hosted on your machine onto your mobile device (whether real-physical device OR emulator).

I hope, this clarifies and solves most of the issues.

Soon, I will create a Screen Cast and host it on my blog.


Mayur Tendulkar | Microsoft India

Heroes Happen Here Launch Presentations


As part of Microsoft Heroes Happen Here Launch – we launched Microsoft Windows Server 2008, Microsoft Visual Studio 2008 and Microsoft SQL Server 2008 at various Microsoft Partner locations.

For that reason, I used PowerPoint presentations that I would like to share with all of us. Please click on the below link which will redirect you to my shared MSN SkyDrive Folder.

Also, if you want to try out your hands on latest Microsoft Products, then you can download OR order the trial versions from following links. Click on the product name to go to the Product home page.

Microsoft Windows Server 2008

Microsoft Visual Studio 2008

Microsoft SQL Server 2008 (CTP)


Mayur Tendulkar | Microsoft India

Language Enhancements In C# 3.0 and VB 9

There are so many new features added as Language Enhancement for C# 3.0 and VB 9.0 in Visual Studio 2008 (along with .NET Framework 3.5). Here, I’m compiling a quick list of important ones and will share some resources from where you can learn more about the same.

  1. Local Type Inference
    Visual Studio uses type inference to determine the data types of local variables declared without data-type. The compiler infers the type of the variable from the type of the initialization expression. This enables you to declare variables without explicitly stating a type, as shown in the following example.
    String str1 = "Mayur Tendulkar";
    var str2 = "Mayur Tendulkar";

    For more information visit following links:

  2. Object and Collection Initializers
    Object and Collection Initializers let you assign values to any accessible fields or properties of an object at creation time without having to explicitly invoke a constructor
    class Person
    String Name { get; set; }
    String EMailID { get; set; }
    class PersonImplementation
    static void CreatePerson()
    //Object Initializer Used
    Person p = new Person { Name = "Mayur Tendulkar", EMailID = "" };
    //Collection Initializer (with Object Initializer) Used
    List per = new List
    new Person() { Name = "ABC", EMailID = ""},
    new Person() { Name = "XYZ", EMailID = ""}

    For more information, visit following link:

  3. Anonymous Types
    Anonymous types enable you to create objects without writing a class definition for the data type. Instead, the compiler generates a class for you. The class has no usable name, inherits directly from Object, and contains the properties you specify in declaring the object. Because the name of the data type is not specified, it is referred to as an anonymous type.
    var Student = new { Name = "Mayur", LastName = "Tendulkar"};

    For more information, visit following link:

  4. Auto Implemented Properties
    Auto-implemented properties make property-declaration more concise when no additional logic is required in the property accessors. When you declare a property as shown in the following example, the compiler creates a private, anonymous backing field can only be accessed through the property’s get and set accessors.
    class Female
    string Name { get; set; }
    int Age { private get; set; } //Write only
    int Mobile { get; private set; } //Read only

    For more information visit following link:

  5. Partial Method
    Partial methods enable the implementer of one part of a class to define a method, similar to an event. The implementer of the other part of the class can decide whether to implement the method or not. If the method is not implemented, then the compiler removes the method signature and all calls to the method. Therefore, any code in the partial class can freely use a partial method, even if the implementation is not supplied. No compile-time or run-time errors will result if the method is called but not implemented.
    // Definition in file1.cs
    partial void onNameChanged();

    // Implementation in file2.cs
    partial void onNameChanged()
    // method body

    For more information visit following link:

In this blog post we seen 5 new concepts that are included in VS2008 (.NET 3.5) and in next post, we’ll see some more of them.