.net programming, computers and assorted technology rants

Posts tagged “.net

Google Releases .NET Framework API’s

Courtesy David Ramel, VisualStudioMagazine.com

The company announced general availability of theGoogle APIs Client Library for .NET version 1.8.1 in a blog post by Dan Ciruli of the Google Cloud Platform Team. "This library is an open source effort, hosted at NuGet, that lets developers building on the Microsoft .NET Framework to integrate their desktop or Windows Phone applications with Google’s services," he said.

He noted that the company tries to make its APIs accessible to developers working with any platform, from almost every language on nearly any hardware, with support for REST, HTTP and JSON. "However, to be truly useful on many platforms, it helps to have a client library–one that packs a lot of functionality like handling auth, streaming media uploads and downloads, and gives you native language idioms," he said.

That usefulness comes in the library’s integration with OAuth 2.0, the capability to stream media uploads and downloads, support of batching requests, and more. "Whether you are plugging Google Calendar into your .NET Framework-based application, translating text in a Windows Phone app or writing a PowerShell script to start Google Compute Engine instances, the Google APIs Client Library for .NET can save you tons of time," Ciruli said.

The library, hosted on NuGet, sports dozens of APIs, letting developers work with AdSense, Blogger, Cloud SQL database management, YouTube features and more. The new .NET library joins other client libraries for Java, JavaScript, Objective-C, PHP (in beta) and Python. Early-stage work is being done on libraries for Go, Node.js, Ruby and the Google Web Toolkit.

A Getting Started page and APIs Explorer are available for developers who want to dive into the new library.

Google said no major changes have been made from the release candidate version, but the documentation has been expanded.

Just one day after the .NET library announcement, Google on Tuesday announced a project to extend Android to the new breed of wearable computing devices, called Android Wear. The company is first focusing on computerized watches, which will provide all kinds of information at a glance, monitor your health and fitness, get answers to spoken questions as with Apple’s Siri and control other devices, among other capabilities. You can now sign up to gain access to a developer preview, intended only for development and testing, while an Android Wear SDK is promised "in the coming months." The preview focuses on notification APIs to help developers enhance their app notifications to create useful UXes. To aid in the development testing, Google is providing a Design Principles for Android Wear page.

Also this week, Google announced a paper to provide information on working with various existing configuration management tools on its Google Compute Engine, a "virtual datacenter" provided via a host of virtual machines (VMs).

"Over the last decade, a vibrant ecosystem of open source tools has emerged to manage the complexity of large-scale compute deployments," said solutions architect Matt Bookman in a blog post. "These tools allow you to deploy changes more rapidly, recover faster from failures, and take unused resources out of service, enabling you to keep your services’ uptime high and operational costs low."

He noted that an existing Compute Engine API and gcutil command-line tool are available for resource management, but technical leads and others might find it useful to also work with tools designed for software management.

"Puppet, Chef, Salt and Ansible are configuration management tools that provide software and resource management," Bookman said. "They are open source and support Google Compute Engine. If your organization already uses one of these tools for managing other systems, we hope to help you get started using it with Google Compute Engine."

This getting-started guidance is available in the recent paper, "Compute Engine Management with Puppet, Chef, Salt, and Ansible." It discusses working with the Puppet, Chef, Salt andAnsible configuration management tools.


.NET to iOS/Android? Microsoft Buying Xamarin?

Courtesy Keith Ward, VisualStudioMagazine.com

Mary Jo Foley’s reporting that Microsoft may be either buying tool-maker Xamarin outright, or making a big investment in the company. It’s all speculative at this point, but this is an idea that just makes too much sense.

Xamarin makes it possible for .NET/C#-focused developers to create apps for the two most popular mobile platforms — iOS and Android — without leaving the comfort of their favorite language  and IDE (that would be Visual Studio, of course). Xamarin has been making these products for a number of years now; they used to be called MonoTouch and Mono for Android, and have morphed into Xamarin.iOS and Xamarin.Android. Xamarin has been churning out frequent updates, and furtherintegrating the products with Visual Studio. I’ve felt for some time that Xamarin would be absorbed into Visual Studio, eventually becoming a transparent part of the IDE.

Note that these reports are only substantial rumors at this point. But the rumors have credibility, at least in part, based on the natural fit of these parts. It’s not the type of head-scratcher that some other deals were. Xamarin and its founders, Miguel de Icaza and Nat Friedman, are serious software developers, and make a serious product that many developers think is the best way to write cross-platform code for the mobile platform (you may have noticed that we think it’s serious enough to have a column dedicated to the topic).

It would also be a forward-looking move for Microsoft. It needs to get iOS and Android developers to use both Visual Studio and Windows Azure, and integrating Xamarin into its core IDE would do that. It would also encourage more development in C# among the non-C# crowd, who may like what the language offers, but are wary of any Microsoft-branded stuff.

It’s hard to think of any downsides for developers of such a deal. One fear could be that the pace of innovation that Xamarin now shows could be slowed, once it’s absorbed in the Redmond behemoth. But, at least in the dev area, Microsoft has truly adopted a speedy release cycle of upgrades and fixes. After all, Visual Studio 2013 came just a year after the previous major version, and is now approaching Update 2. It’s hard to imagine that Xamarin wouldn’t be similarly upgraded, especially since it’ll be baked in.

Worth noting, too, is that new CEO Satya Nadella is a techie, so the potential acquisition might appeal to his geeky nature. He understands development in a way ex-CEO Steve Ballmer couldn’t hope to, and may be quicker to understand the benefits involved.

This is all speculation, of course, but it’s something I think should happen. What do you think?


Handle Many-to-Many Relationships in Entity Framework and ASP.NET MVC

Courtesy Peter Vogel, VisualStudioMagazine

It’s not unusual to have many-to-many relationships in an application. A recent project I worked on had multiple service technicians assigned to multiple locations, for instance. It’s also not unusual for there to be data that applies only to the relationship. In my client’s project, for example, at any location, a service technician has a specific position — and that position can be different from one location to another. (For instance, at one location, the tech might be the "responsible authority"; at another location, the tech might be the "support technician.") In addition, at each location, a tech is assigned a phone extension number where he can be reached.

In this column, I’ll work through this problem using Entity Framework Code First development, LINQ and (for the UI) ASP.NET MVC. By the end of the column you’ll have a roadmap for handling many-to-many relationships in your applications.

Read More:

http://visualstudiomagazine.com/articles/2013/06/01/handle-relationships-in-entity-framework.aspx


Windows Azure SDK 2.0 for .NET Released

Courtesy Keith Ward,  VisualStudioMagazine

Microsoft, which just days ago pushed out a Windows Azure SDK for Ruby developers, has released a substantially upgraded SDK for its army of .NET Framework developers.

Microsoft Corporate Vice President Scott Guthrie dropped the news on his blog today, calling Windows Azure SDK 2.0 for .NET "a major refresh of the Windows Azure SDK with some really great new features and enhancements."

The upgrades are concentrated in five categories, according to Guthrie:

  • Web sites
  • Cloud services
  • Storage
  • Service Bus
  • PowerShell

Guthrie started with the improved publishing capabilities through Visual Studio. Now, right-clicking on any ASP.NET Web Project or Web Site brings up a dialogue that enables developers to publish to Windows Azure. He pointed out a difference between the 2.0 SDK and previous versions:

"Starting with today’s release you can now associate your Windows Azure Subscription within Visual Studio – at which point you can browse the list of sites in Windows Azure associated with your subscription in real-time, and simply select the one you want to publish to (with no need to manually download anything). Then just select the Web Site on Windows Azure that you want to deploy your app to, hit ok, and your app will be live on Windows Azure in seconds.  You can then quickly republish again (also in seconds) without having to configure anything (all of the publish profile settings are persisted for later use)."

Web site management is also improved through Visual Studio Server Explorer. One new tool, for instance, allows streaming of an Azure-based Web site’s application logs directly into Visual Studio. This is handy for debugging issues that can only be discovered in a live Azure setting.

On the cloud side, the main change was a big increase in the size of the virtual machines (VMs) that Azure now supports. VMs as large as 8 cores and 56 GB of RAM can be utilized for cloud services.

The new SDK also adds more storage management within Visual Studio, including the ability to create and delete Windows Azure Tables, and add/edit/delete table entities in them from the Visual Studio Server Explorer.

The big news for the Service Bus is an updated client library that adds message browse support and a new message pump programming model that moves to an event-driven processing style.

The PowerShell updates are focused on new automation commands for things like streaming logs, cloud services, VMs, the Windows Azure Store and storage.

Similar to all the Windows Azure SDKs (including those for Ruby, Java, Python and PHP), the .NET 2.0 SDK is completely open source and hosted on GitHub.


Facebook SDK for .NET Released

Courtesy Keith Ward, Visual Studio Magazine

Facebook today released the Facebook SDK for .NET, to enable Windows-focused developers to integrate their applications with Facebook.

The SDK was announced on the Windows Phone Developer Blog. The open-source SDK is C#/XAML based, and can be found at the Outercurve Web site. Most developers will want to install the SDK using NuGet (this page recommends having the latest version of NuGet; some features of the SDK won’t work with older versions.)

Before you do any of that, however, you’ll need to create a Facebook app. Once that’s done, you can build any type Windows Phone 8 or Windows 8 app. Since the provided APIs for both Windows Phone 8 and Windows 8 are "very similar", reports Microsoft, code sharing between the platforms should be simple.

The two critical reasons to develop suing the Facebook SDK for .NET are spelled out in the Windows Phone Developer blog:

  1. It takes away all of the complexity of logging on with Facebook. Based on the provided samples, all you need to do is use a bit of boilerplate code, add your Facebook app ID to the mix, and voila! You can have people logging on to your app with Facebook.
  2. It allows you to focus on your Facebook-related scenarios by abstracting away the low-level details such as HTTP connections and query parameters. This way you can plan and develop around Open Graph APIs and objects, which is where you want to spend your development resources.

The SDK is supported as far back as .NET 3.5. Also supported is Silverlight 5 and Windows Phone 7.1, so you don’t have to be building only for Windows 8/Windows Phone 8.

Outercurve is a foundation dedicated to bridging the gap between software companies and the open-source community by "providing software IP management and project development governance,"according to the organization.


2013 .NET Developer Salary Survey

courtesy Kathleen Richards, VisualStudio Magazine

When we conducted our first Salary Survey in November 2011, the results were encouraging. Our data indicated that software development in Visual Studio offered great pay, reasonable perks and fairly high career satisfaction despite an uncer­tain economy that showed only muted signs of recovery. This year’s survey, which took place in mid-November, showed similar results.

The economy hasn’t improved, and momentous changes are roiling the technology industry as consumers embrace tablets and mobile devices. The release of Windows 8 in late October didn’t have an immediate positive impact, and available hardware from fewer manufacturers than first announced threatened the holiday selling season. Still, in the wake of the challenges facing Redmond, .NET software development remains one of the best careers in 2013, according to our polling and other surveys.

We polled software development professionals who subscribe to Visual Studio Magazine and related eNewsletters. More than 1,000 U.S.-based developers participated in the survey and filled out the online questionnaire.

Similar to last year’s findings, almost three-quarters (73 percent) of VSM Salary Survey respondents are college graduates with a four-year degree or higher level of education. The majority of respondents are software veterans; 70 percent have worked in application development or programming for at least a decade, with 49.3 percent logging 15 years or more. More than 96 percent of respondents are at least 30 years old.

Survey respondents also report lengthy careers working with Microsoft technologies, although many are involved in cross-platform development, according to our findings. Indeed, 78.5 percent of those surveyed have held a job that involves working with Microsoft products and technologies for a decade or more. On average, survey respondents have worked for 12.5 years with the Microsoft technology stack. Only 10.6 percent have developed software using Microsoft products and technologies for five years or less.

What’s Changed in a Year
The average base salary in the November 2012 survey is $94,381, not including bonuses and additional compensation. That’s a bit higher than the average salary ($92,754) reported in November 2011. Male respondents, who account for 86.6 percent of those surveyed in 2012, report a higher base salary on average — $96,079 — than females ($85,035).

Half of the reported salaries in 2012 fall below $90,000, down from the $92,000 median salary derived from our November 2011 survey results. The median salary for respondents working with Microsoft products and technologies that have five years or less of experience is $76,000. Software development professionals with 10 or more years under their belts earn a median salary of $92,700. The national median for software developers in the United States in December, according to self-reported data from glassdoor.com, was $75,000.

About one-third (33.8 percent) of VSM survey respondents say their annual base salaries, not including bonuses, fall into the six-figure range ($100,000 or more). Almost 7 percent (6.9 percent) report base salaries of $150,000 or more. On the other end of the scale, 10.3 percent indicate annual base salaries of $54,999 or less.

The biggest takeaway in our first annual salary survey was that 59 percent of respondents reported higher salaries in the last 12 months. For 2012, that number remains fairly steady at 60.3 percent. This could be interpreted as good news that higher wages have continued for the majority of survey respondents despite uncertainty in the economic climate and a looming fiscal cliff (at the time of the survey) that may have caused some companies to reduce capital spending. The rise in pay is expected to continue — 62.8 percent of those surveyed predict their base salaries will increase in the next 12 months.

The news wasn’t all good, however. Almost 30 percent (29.7 percent) of those surveyed saw no change in their average base salaries in 2012, and roughly 10 percent (9.7 percent) indicated a salary decrease compared to the previous year.

As our November 2011 survey clearly showed — the results of which were published in January 2012 — the type of organization that developers work for influences average base salaries. Those findings were verified in the most-recent poll. Survey respondents who work for an independent software vendor (11.2 percent) report the highest average salary, at $103,553. Those who work for consulting firms, training companies and systems integrators (17.5 percent) also fall into the six-figure range on average, with a comparable $103,216, not including bonuses and additional compensation. The majority of survey respondents, however, work for corporate IT/IS (43.3 percent), with an average base salary of $93,422. Those employed by state and federal government, the education sector and nonprofits (17.9 percent) earn less, reporting $78,685 on average.

In addition to the type of organization, compensation ranges are affected by industry, location, and company size and annual revenue. About one-quarter of VSM survey respondents work in organizations with $10 million or less in annual revenues. Another 21 percent are employed by billion-dollar companies with annual revenues of $1 billion or more. The rest fall somewhere in between (see the chart, "Where You Work Based on Business Income").

The average salaries presented here more accurately reflect urban pay scales; some 22.5 percent of survey respondents work in cities (200,000 to 500,000 residents), and 41.7 percent are based in major metropolitan areas (more than 500,000 residents).

Our survey data also indicates a direct correlation between hours worked and higher base salaries. The 29 percent of survey respondents who estimate that they work 30 to 40 hours per week have an average base salary of $87,600. Another 29 percent, who say they work 41 to 45 hours per week, have an average base salary of $90,212. The 40 percent of respondents who work 46 hours or more per week move into the six-figure range. The top 4.8 percent, who clock 61 hours or more during an average workweek, have an average base salary of $111,238.

Moonlighting isn’t a huge source of income for the majority of our survey respondents; only 9.6 percent earn $10,000 or more outside their primary employment. Close to 70 percent (67.7) report no dollar compensation for work outside of their primary employment. Of the rest, 6.4 percent earn up to $1,000; another 10 percent earn $1,000 to $4,999; and 6.3 percent fall in the range of $5,000 to $9,999.

Job titles don’t always offer an accurate description of what a role entails, but after our second annual survey, we’re seeing clear correlations between job titles and compensation. Like last year, a little more than one-quarter of those surveyed (25.7 percent) list their primary job function as programming, software engineering or appli­cation development. The programmer/analysts report an average base salary of $74,682, and software engineer/application developers earn more on average, with a base salary of $86,868. Salaries move into the six-figure range when senior status is achieved; the 15.6 percent of respondents who say their primary role is senior software engineer/senior developer have an average base salary of $102,030.

Another finding from our 2012 survey: senior software engineers and developers earn more on average than team leaders and IT managers. The 5.6 percent who describe their job as development manager/team lead earn $95,579 on average. The 12.8 percent of respondents who classify their primary function as IT management report an average base salary of $97,458.

The anomaly is the drop in salary for the 4.2 percent who categorize their role as database administrator/developer. The average base salary for database administrator/developer is $80,213 in 2012, compared to $91,276 in 2011.

VSM Salary Survey respondents who characterize their primary role as software architect (11.5 percent) earn on average $118,971. In our 2011 survey CIOs accounted for 2 percent of respondents (2.5), with a reported average salary of $109,117. In our 2012 survey, CIOs represent 2.1 percent of respondents, with an average base salary of $118,804. Job titles that had so few takers that we couldn’t analyze the salary data include UI/UX specialist, mobile developer and game developer.

More Money
As we noted last year, by and large it’s a good time to be a developer. Average base salaries for Visual Studio-focused developers in the $90,000 range — including increases for 60 percent of respondents — were encouraging.

Well more than half of our survey respondents (60.3 percent) received salary increases in the last 12 months. Almost one-quarter of those respondents (23.5 percent) report asking for more money. More than 10 percent (15.3 percent) were offered a salary hike as an incentive to remain with their employers. The majority of salary increases were less than $10,000, however. Only 10 percent (9.7 percent) received salary increases of $10,000 or more, with 3 percent (2.6 percent) reporting raises of $20,000 or more. And 20 percent (20.2 percent) received increases of $1,999 or less. Not surprisingly, 6.4 percent of respondents whose salary decreased over the last 12 months indicate that their base pay was cut as a result of budget reductions.

In spite of the relatively high paychecks, many developers still believe that they lag behind their peers when it comes to salary. Almost half (49.3 percent) think they have lower gross earnings than others in the same field, and 34.9 percent believe wages are about the same.

About 15.9 percent of respondents feel they have higher salaries than their peers. Of those who indicate higher salaries, roughly 10 percent (9.6) believe the higher wages are likely linked to certification titles. The uncertainty — or pessimism — has increased slightly when comparing this data with the responses in our 2011 survey. In that poll, one-fifth of respondents (20.8 percent) percent believed that their salaries or gross earnings were higher compared to others in the same field; 45.6 percent thought they earned less; and 33.5 percent viewed their wages as comparable to their fellow developers.

Additional Compensation
Developers’ monetary compensation packages often extend beyond base salaries. More than half of those surveyed (52.7 percent) received bonuses during the last 12 months, up from 48.8 percent in our 2011 findings. About 19 percent of the bonuses are estimated in the $1,000 to $4,999 range. Roughly 11 percent fall into the $5,000 to $9,999 range, and 13 percent of respondents earned bonuses of $10,000 or more.

How are those bonuses calculated? Roughly one-third of survey respondents indicate that their monetary bonuses are the result of a combination of factors, typically company profitability and personal performance. However, 28.2 percent of the bonuses are based on company profitability only — up from 23.6 percent in 2011. And 14.3 percent are based strictly on personal performance. Other ways bonuses are calculated, according to respondents, include years of service, project overtime, one week’s salary, attendance, Christmas bonuses, company politics and even "whims." Local, state and federal government employees rely on their respective committees and legislative bodies for bonuses and wage increases. "Local government typically feels IT makes more than it should," gripes one respondent.

While raises and bonuses remained steady year-over-year for the majority of developers, according to our findings, the benefits offered by primary employers show a downward trend. Retirement programs appear to have tightened up, with 65 percent of companies offering 401(k) programs in 2012 compared to 67.2 percent in 2011. Similarly, 15.8 percent of employers offer 401(k) benefits without company contribution, down from 17.5 percent in last year’s survey. College education reimbursement also appears to have dropped, with 33.2 percent reporting it as a benefit in 2012 compared to 36.2 percent the previous year. However, 13.1 percent of respondents report profit sharing in November 2012, compared with 10.7 percent the previous year. Stock options (8.7 percent) and stock purchase programs (14.1 percent) also show an upward trend.

Medical and dental benefits remain largely unchanged. Half of the survey respondents (50.5 percent) receive medical and dental benefits, compared with 51.8 percent in 2011.

About 70 percent (69.6 percent) of survey respondents indicate they’re eligible for three weeks or more of paid vacation in 2012 and close to that number (65.9 percent) plan to use 75 percent or more of their paid vacation.

Hiring Trends
The majority of VSM Salary Survey respondents have been developing with Microsoft products and technologies for more than 10 years. And a large percentage have remained with the same employer: 42.9 percent indicate primary employment with their current organizations for a decade or more, and 23.8 percent of that group have been working for the same organization for more than 15 years.

About 16 percent (15.7 percent) of those surveyed expect to change employers in the next 12 months. If you’re planning to switch jobs, the 2012 survey indicates some positive trends. Almost 40 percent (38.7 percent) of survey respondents indicate that their primary employers expect to hire developers in the next 12 months. About 60 percent (58.4 percent) of survey respondents have some role in managing their organization’s IT budget. Of that group, 26.3 percent are influential decision makers, and 11.6 percent make the final decisions. IT budgets also remained steady. According to survey respondents, 43.5 percent of IT budgets remained the same year-over-year, 29.3 percent increased and 27.2 percent faced cuts.

At the same time, 31.9 percent of respondents indicate that their primary employers are using more contractors in place of full-time hires. Most people aren’t worried, however; 86.5 percent expect outsourcing and contractors to have no impact on their jobs in 2013. Indeed, job security doesn’t appear to be an issue for the majority of respondents. Only 4.3 percent have been laid off in the last 12 months, although 7.7 percent anticipate losing their jobs to outsourcing or contractors in the next year.

Five-Year Outlook
Almost 90 percent of respondents indicate that they anticipate working in Visual Studio and .NET development in five years. Last year’s survey produced similar results (89.7 percent). Career satisfaction with the Microsoft development profession remains high among those surveyed — 26.1 percent say they wouldn’t do anything else, and 50.9 percent are generally satisfied with their careers. The other 20.3 percent of respondents are largely neutral about their career, but just 2.7 percent are unfulfilled or wish they were doing something else.

Concerns about the future of .NET development weren’t really raised by survey respondents this year. Compared to other industries, software development in Visual Studio offers opportunities for continued financial gain and career satisfaction. Optimism for the future remains bright: 62.8 percent of survey respondents expect their salaries to increase this year, and 34.2 percent expect them to stay the same. Just 3 percent think they’ll make less in 2013.

Methodology

We invited subscribers to Visual Studio Magazine, as well as the .NET Insight and Redmond Developer eNewsletters, to participate in our second annual Salary Survey of Microsoft professional software developers. The online survey was opened to qualified participants on Nov. 16 and closed on Nov. 23, with participation from 1,031 readers.

—K.R.


Tutorial: Getting Started with SignalR (C#)

signalR

Courtesy www.asp.net

By Tim Teebken

Introduction to SignalR

SignalR is an open-source .NET library for building web applications that require live user interaction or real-time data updates. Examples include social applications, multiuser games, business collaboration, and news, weather, or financial update applications. These are often called real-time applications.

SignalR simplifies the process of building real-time applications. It includes an ASP.NET server library and a JavaScript client library to make it easier to manage client-server connections and push content updates to clients. You can add the SignalR library to an existing ASP.NET application to gain real-time functionality.

This tutorial introduces SignalR development by showing how to build a simple browser-based chat application. It walks through the following developer tasks:

  • Adding the SignalR library to an ASP.NET web application.
  • Creating a hub class to push content to clients.
  • Using the SignalR jQuery library in a web page to send messages and display updates from the hub.

Read More…http://www.asp.net/signalr/overview/getting-started/tutorial-getting-started-with-signalr