Showing posts with label jQuery. Show all posts
Showing posts with label jQuery. Show all posts

C# Developer’s Anonymous (Defending C# in a JavaScript World)

Hi, My name is Ben and I am a C# developer.  It’s been 1 minute since I wrote a line of C# code.

Am I the only one that has noticed some negativity towards C# and .NET these days?  All this buzz and talk about HTML5, CSS3 and JavaScript has C# devs on the defensive.  Lately, I feel like I need to apologize for using C#, ASP.NET, XAML and\or Visual Studio.  Everyone wants to use JavaScript for everything.  It looks like this post by Jeff is 100% accurate.  In the article, Jeff says anything that can be written in JavaScript will be.

Node.js is a huge example of this.  Don’t get me wrong Node is a great way to build a fast, scalable cross platform web interface for FREE!  I get it, it’s FREE.  However, let’s discuss the word “free” for minute.  Is it free if it takes me twice as long to develop it?  Is it free if I have to import all these open source modules, libraries and frameworks, some of which have licensing that forbid commercial use?  Is it free if my application breaks due to a bug in a new version of one of these open source projects?  To me the productivity gains I get from using IIS, ASP.NET MVC (or Web Forms), C# and Visual Studio are well worth the licensing fees required to build applications with .NET.  Not to mention all the unbelievable productivity tools provided by 3rd party vendors like Telerik.  In the long run, my users and customers don’t care about the backend technology as long as the architecture performs and can be scaled.  They also want it done as soon as possible.

Most of the C# developers I know love developing using .NET and Visual Studio (VS).  Hardcore open source proponents might say VS is cheating.  It abstracts much of the low level details and plumbing so the developer can focus on just building the application.  Is that wrong?  Maybe if you are writing a hardcore application that needs control over some low level operations.  Most apps these days don’t need that.  Plus I would argue that 3rd party JavaScript frameworks like jQuery, backbone, knockout, etc. do the same thing in the JavaScript world.  To me the abstractions that VS provides are all that is right with software development.

Ever since Microsoft killed Silverlight and provided HTML5, CSS3 and JavaScript development for Windows Store Apps, C# developers get no love.  TypeScript is a perfect example of this.  I love TypeScript and use it to write large JavaScript based applications.  But TypeScript exists for one reason, because JavaScript development is painful for C# developers that have been spoiled by the most powerful language (C#) and IDE (VS) on the planet.  TypeScript is trying to bring all the features of these tools to JavaScript.  Eventually it will get there and we will all be writing applications that “compile” to JavaScript.

Visual Studio and C# produce software that runs on many different devices.  The apps created with these technologies might not always run on every device but they can target a large range of devices.  They might require some licensing fees, hosting fees or cloud fees.  My experiences is that these fees are a reasonable cost (or even a necessary cost) for writing and deploying good quality applications.

Finally, I want to say that I do not hate JavaScript.  I find it very similar to C#.  However, I miss all the value that the .NET framework and Visual Studio provides.  If I can ensure the environment my application runs in will have .NET installed I will use it every time.

My VS Live Las Vegas Session Contents for TypeScript and Touch Enabled Web Sites

Just a couple quick links to my slides and demos from my VS Live sessions.  I spoke on TypesScript and how to Build Touch Enabled Web Sites.  Attendees at both sessions where great.  Thanks for attending!  Please fill out the session evals to let us know how we are doing.

Type Script Slides and Demos

Touch Enabled Web Sites

Thanks again for attending.  More to come related to VS Live Vegas…

Telerik and KendoUI Phoenix User Group Tour 2013

Last week I had the honor of speaking at the North West Valley .NET User Group and the South East Valley .NET User Group in Phoenix.  As a Telerik Insider, Telerik sends me to different User Groups and Code Camps in the Western United States.  I am not required to speak on Telerik products but in this case I did discuss how to use KendoUI in both ASP.NET MVC and outside of MVC using the MVVM pattern.  The talk is a great talk that shows the “how to” as well as allows the group to compare and contrast the two different patterns.  The Phoenix area has some great developers and the discussions before, during and after the presentation were awesome!  As I said, I’m not required to talk about or promote Telerik products but I do because I love using their tools and software.  Whether you are a .NET, Android, IOS or JavaScript developer Telerik has something that will add value to your work.  Here are a couple pictures I took while in Phoenix:

WP_000630WP_000631

Here is a link to my slides and demos:

Slides and Completed Demo Code

Thanks to Telerik for sending me to Phoenix and thanks to the Phoenix Community for having me!  I’d also like to give a shout out to my company Aspenware for allowing me to work remotely from Phoenix for a couple days.  Aspenware get’s it.  I love working there!

VS Live October 17–21 in Redmond

We all know that PDC… I mean BUILD is coming up in a couple weeks in Anaheim, California.  Microsoft is keeping all the announcements (Including a real agenda) for BUILD really close to the vest.  One thing is for sure, there will be some fallout after BUILD.  Many questions, rumors and suspicions will be debated out there in cyberspace.  What better place to get the real answers than at Microsoft Headquarters in Redmond?  VS Live in Redmond includes sessions from some of the top names in the industry, including many Microsoft Product\Program Managers.  No one knows what will come out at BUILD (Or no one can talk about it until after BUILD).  In the short time between BUILD and VS Live the speakers will undoubtedly be up to speed on what is going on in the Microsoft world.  Join us at VS Live and have access to all the speakers to get your questions answered by real world software engineers.

Early bird rates are available until Sept. 7th.  Click on the image below to register for VS Live in Redmond and get a special speaker discount.

By the way I will be presenting on HTML 5 and MEF at VS Live in Redmond.  I sincerely hope to see you there.

HTML 5 vs. Silverlight

Ever since PDC 2010 there has been tons of controversy and debate swirling around HTML 5 and what it means for Silverlight.  About a week ago Scott Guthrie wrote a post that I found on the Silverlight Team Blog (here) that addresses this issue.  I recommend reading that post and the comments as well.  When all the buzz came out about HTML 5 I saw a bunch of angry posts from Silverlight developers.  Many of the comments on Scott’s post fall along the same lines.  However, it has been months since PDC and people are starting to calm down and realize that HTML 5 is just another tool in the tool box.  I compare this to the ASP.NET MVC release and how it affected Web forms developers.  At first you feel threatened.  You think that all the hard work you put into mastering Web forms or Silverlight will be irrelevant.  After awhile you realize that new technologies simply give you more options when solving problems for your clients.

My opinion is that HTML 5 and Silverlight will co-exist for a very long time.  The reason is they have different usages and solve different problems.  Especially in the mobile space.  No matter how you slice it users like the native experience of apps on their mobile devices.  I know with HTML 5 you can make websites look and feel like native mobile apps, but the experience is still just a bit off.  So Silverlight will be around as a mobile development story for some time.

I also believe Silverlight will remain for awhile because of the fact that HTML 5 is JavaScript intensive.  In my opinion JavaScript is still not as friendly to work with as managed code, even with all the new libraries like JQuery and Dojo.  Maybe someday the libraries and tooling will make developing JavaScript easier.  Again that is not going to happen for some time.

So, let’s review our UI choices for developing new .NET applications.  There is ASP.NET, ASP.MVC, Silverlight and don’t forget WPF.  I know that is simplifying things quite a bit, but in general that is what we have from a .NET perspective.  Each one of these technologies have there pros and cons.  The best advice I can give you is to design your applications with services and business layers so your UI is as thin as possible.  If you do that, it is not really that hard to create a UI layer for every one of these technologies.

Rocky Mountain Tech Trifecta - .NET Beginner’s Track

Last Saturday was the 2nd annual Rocky Mountain Tech Trifecta.  Just like last year it was a great event.  For a list of the speakers and topics go to the site for the event here.  Julie Yack organized the event this year and it was awesome once again.  Kathleen Dollard put together a beginners track and Jeff Certain, Drew Devault and myself where lucky enough to do the presentations.  Jeff did a great job going over the best practices related to architecting an application.  His main point was that coding furiously with no design in a bad idea.  Instead use UML and other technologies to design the architecture first.  It might take a bit longer at the start, but it will save time in refactoring and backtracking later.

The topic of my talk was beginning ASP.NET.  It is almost impossible to decide on how to talk about ASP.NET in a 75 minute session.  Most of the audience was familiar with HTML and JavaScript concepts.  So, I decided to focus on how to utilize ASP.NET to help extend the concepts and languages you already know.  I talked about code behind and how it automatically wired up events and some state management.  We also talked a bit about master pages and themes.  At the end I showed a bit more advanced stuff like AJAX and the AJAX Control Toolkit to display some of the power of ASP.NET.  After my session I created a basic media player to fit in the application using Silverlight.  Drew also created a media player that worked outside the browser and was not integrated into ASP.NET.

In the end I think it was a great day.  Below are the slides and demos from my session.  The demos do not include the final version of Jeff’s code or Drew’s Media player.  They are my web application and the architecture as it was when I started.  Thanks to those that attended and let me know if you have any questions.

PowerPoint Zip

Demos

Microsoft AJAX CDN (Plus jQuery)

I just saw this today and it looks cool.  Let me give you the high level overview and then you can go to Scott Guthrie’s detailed post.  A while back I started to use jQuery to help with all my JavaScript coding.  I really like it.  Even if you don’t use the really advanced features it is a huge help just selecting and operating on elements client side.  If you want some more info on jQuery just search the web and you will find tons of good documentation out there on the blogosphere.

So, one of the hassles with jQuery is that you have to include the libraries in script tags on your page in order to use them.  This is not a huge deal, but it can be a pain if you want to use the libraries in multiple projects and maintain one central version of the jQuery libraries.  That is were the Microsoft AJAX CDN comes into play.  It is a Microsoft hosted version of both the AJAX libraries and the jQuery libraries.  So, you can point to a Microsoft URL and bring in these libraries.  This will find the location that is closest to your user and bring down the libraries from the cache on that server.  Should be a much faster solution for everyone.  Check out the details on Scott Guthrie’s blog here.

Posted in Labels: , , , , | 0 comments