12.07.2015 Views

net developer's journal sneak peek - sys-con.com's archive of ...

net developer's journal sneak peek - sys-con.com's archive of ...

net developer's journal sneak peek - sys-con.com's archive of ...

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

What we’re trying to say is that ifyou want to build a successfulmobile solution, do your homework– document the business casebehind the solution. Most <strong>of</strong>ten, ifyou just spend some time thinkingit through, it’s not very hard.Technology OverviewSo, what is enterprise .NETdevelopment for smart devices? Ifwe look at the <strong>con</strong>nectivity optionsfor an application (see Figure 1), wesometimes want to build a thinbrowser-based Web application, inwhich case we would probably use atool like Micros<strong>of</strong>t Mobile Inter<strong>net</strong>Toolkit with ASP.NET. But for mostother <strong>con</strong>nectivity options, we needsomething that provides a soliddevelopment environment on thedevice. This is why the upcomingrelease <strong>of</strong> the .NET CompactFramework and Smart DeviceExtensions for Visual Studio .NET(VS.NET) becomes interesting..NET CF is a subset <strong>of</strong> the full.NET Framework. Careful thoughthas been put into selecting theclasses that make the most sense ona mobile device, taking into accountthe smaller footprint required ondevices and the accompanyingmemory and performance restrictions.It includes a CLR targeted forsmart devices.SDE is a set <strong>of</strong> extensions toVS.NET that enable you to buildapplications for the .NET CF. Theextensions include pr<strong>of</strong>iles that customizeVS.NET for smart devicedevelopment. For example, whentargeting the .NET CF, you getIntelliSense for the supported classesand only supported <strong>con</strong>trols areavailable in the toolbox.For enterprise developers, thismeans that we’ll now get back to theOfflineNeverConnectedf 1SeldomConnectedFigure 1: The <strong>of</strong>fline/online scaleOftenConnecteddot<strong>net</strong>developers<strong>journal</strong>.com • Preview Issuestate where there’s a single tool setfor building applications for PCsand smart devices like Pocket PCand the coming SmartPhone 2002.C# or VB.NET?There’s been much discussion onthe selection <strong>of</strong> a development languagefor VS.NET. As we’ve made achoice to implement our sampleapplication in C#, we’ve stated ourpremium choice <strong>of</strong> language.However, we think that all enterprise.NET developers will have tomanage development in both C#and VB.NET. Various projects will berun using each, and we think thatthe choice will most <strong>of</strong>ten be madein relation to historical issues ratherthan technical issues like performanceor productivity, or evenissues like speed <strong>of</strong> developmentand ease <strong>of</strong> maintenance.Traditional Visual C++ developersand even Java developers willprobably select C# as their premiumchoice, and we think that even Javadevelopers <strong>con</strong>verting to C# willhave a less painful migration thanVisual Basic 6 developers will have<strong>con</strong>verting to VB.NET.The interesting part <strong>of</strong> .NET isnot the languages, but the framework.Despite the excellent languageinteroperability in .NET, wedon’t recommend mixing languagesin the same project if youcan avoid it.Time Reporting ExampleTo show you what we mean,we’ve put together a sample applicationto report the time you spendon different activities. With this simpletool, you can report your timeanyplace and at any time.The opening screen <strong>of</strong> the sampleapplication (see Figure 2) showsAuto-ConnectedOnlineAlwaysConnectedf 2 Figure2: Time reporting applicationa list <strong>of</strong> times reported for differentactivities (usually projects), whichyou can manipulate with the Add,Edit, and Delete buttons. You usethe Save button to save all timesreported and exit the application.When you tap the Add or Editbutton, you’re presented with a newscreen (see Figure 3). Here you canreport or update an activity withdate, project, and hours spent.Obviously, you save with the OKbutton and abort with the Cancelbutton.The sample application allowsthe user to work <strong>of</strong>fline using XMLfiles. The Project ComboBox (seeFigure 3) is filled from an XML file(projects.xml) and the reportedtime is saved in (and retrieved onstartup from) an XML file (timereport.xml).Code WalkthroughLet’s have a look at the code forthe sample application. As we’vealready stated, our choice <strong>of</strong> languagefor the sample is C#, and wehope that most VB.NET developerswill be able to follow the logic anyway.(Authors’ Note: We built our sampleapplication using prerelease versions<strong>of</strong> Visual Studio .NET, .NETCompact Framework, and SmartDevice Extension, and therefore itmay not be compatible with thefinal release versions.)One <strong>of</strong> the core features <strong>of</strong> the.NET CF is native support for23

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!