Showing posts with label XAML. Show all posts
Showing posts with label XAML. 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.

Space Shuttle Coding - SoCal Code Camp a Huge Success

Last weekend I spoke at the SoCal Code Camp in LA.  The event was held on the University of Southern California campus.  As a C# MVP and Telerik Insider, this code camp was a great opportunity for me to discuss geek stuff with my peers.  Here are a few pictures from the event:

WP_000526 WP_000521 100_2850100_2851 100_2853100_2852

I had two sessions during the weekend.  One on Windows 8 Development for the Enterprise and the other on Tips For Building Fast Multi-Touch Web Sites.  I got tons of positive feedback so I think the talks went well.  Below are links to the slide decks and code samples:

Windows 8 Apps for the Enterprise Links:

Initech Dashboard

Initech TPS Coversheet

Windows 8 Apps For the Enterprise Slides

Side Loading Install Scripts

Tips For Building Fast Multi-Touch Web Sites Links:

Fast Multi-Touch Web Site Slides

Finally, when I signed up for the code camp I was unaware the the Space Shuttle Endeavor was being moved to it’s permanent home at the LA Science museum.  When I landed in LA the shuttle was just leaving the airport on a 48+ hour journey to the museum.  Here are a few shots of the shuttle heading down the streets of LA:

100_2826 100_2828 100_2834 100_2838 

I had a great time and enjoyed meeting fellow geeks and discussing all things related to code and space travel!

Code in the Sun! (Silicon Valley Code Camp, SoCal Code Camp, Desert Code Camp and VS Live Orlando)

Thanks to my employer Aspenware, the Telerik Insider program and VS Live 360 I’m getting ready to embark on an adventure to sunny Arizona, California and Florida.

First, I will be in the San Francisco area this weekend (Oct. 6 and 7) to speak and represent Telerik at the Silicon Valley Code Camp.  I’m doing two sessions: the first on speeding up your websites and enabling them for touch browsing (Session Details).  My second session is on ASP.NET MVC and using the Kendo UI MVVM (Session Details).  Click here for more details about the code camp and to register for the event.

The next weekend (Oct. 13 and 14) I will be in LA for the SoCal Code Camp.  I am also representing Telerik and doing two talks at this code camp as well.  The first is the same talk on speeding up your websites and enabling them for touch browsing (Session Details).  My second session is on Windows 8 for the Enterprise (Session Details).   The Win 8 sessions will detail how to install your Windows Store apps without using an actual “Store”.  This is handy for testing and also for deploying apps inside your enterprise.  To see the other sessions and register for the event click here.

Next I will be representing Telerik in Chandler, Arizona for the Desert Code Camp on Nov. 17.  I will be presenting all three of the presentations I mentioned above (speeding up your websites and enabling them for touch browsing, Windows 8 for the Enterprise and ASP.NET MVC and using the Kendo UI MVVM).  You can see my sessions for this camp here.  You can see all the sessions and register here.

And for the grand finale I’ll be speaking at Visual Studio Live! December 10-14 in Orlando, FL http://bit.ly/VOSPK12.  Providing expert solutions for .NET Developers, Visual Studio Live! is great for developers, software architects, programmers and designers who are looking for hard-hitting, practical training from both industry experts and Microsoft insiders.

I’ll be presenting the following sessions:

· Expression Blend 5 For Developers: Design Your XAML or HTML5\CSS3 UI Faster

· Windows 8 Metro Style Apps for the Enterprise

SPECIAL OFFER: As a speaker, I can extend $500 savings on the 5-day package. Register here: http://bit.ly/VOSPK12Reg  and use code VOSPK12.

The extra-cool part about Visual Studio Live!: four events in one! This year, the event will be co-located with SQL Server Live!, SharePoint Live!, and Cloud & Virtualization Live!. You can customize your conference agenda and attend ANY sessions from all four events. Register now: http://bit.ly/VOSPK12Reg

Many thanks to Telerik for sponsoring me as an Insider.  I love their tools and the people that work there.  They are passionate about helping developers do their job.  I’m also very thankful to the folks at VS Live for selecting me to speak at their conferences as well.  VS Live conferences are the best conferences for the price out there period!

Please visit the websites for these great events and attend as many of them as you can!

Windows 8 Development For The Enterprise Using Side Loading

Last week I spoke at the Denver Visual Studio User Group meeting on developing Windows 8 Metro (Windows Store) Style application for the Enterprise.  The main purpose of the talk was to inform developers that these types of applications can be useful for an Enterprise.  I also want the world to know that these Windows Store applications can be installed without going through the actual Windows Store using a technique called “side loading”.  When you side load an app on Windows 8 you can bypass some of the rules and regulations in place for these apps and build apps that might be more useful for internal line of business apps.  The details on how this is done and some links to online references are included in the slides.  The Demos demonstrate some of the techniques discussed in the slides.  Please download all the content and let me know if you have any questions.

Initech Dashboard

Initech TPS Coversheet

Windows 8 Apps For the Enterprise Slides

Side Loading Install Scripts

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.

Server Side and Client Side Caching with .NET and the Microsoft Sync Framework

I recently presented at the Denver Visual Studio User Group on this topic.  The approach I took was to start with an out of the box working Silverlight application and then tweak to using caching for performance reasons.  The next step is to persist that cache on the client side to make it even faster and not even require a round trip to the server.  After that I took it even further by saving the entire data structure to isolated storage to allow offline use of the application using the out of browser option of Silverlight.  Finally I expanded it even further by turning it into a WPF application that stored the data in a local SQL Server data base that was synced back to the server using the Microsoft Sync Framework.  To me this is a pretty natural progression of an application.  Build the prototype and then tweak it through different phases to expand it’s capability.

While building these demos I had to refactor a bunch of things through the progression of the changes.  This again to me is very natural.  I find that if I start by simply solving the problem the pieces of the system that need to be refactored and extend become crystal clear in the end.  Where as if I try to architect the application for every possible future change I tend to end up with an over architected system.  Again keep it simple and refactor later.

I think we all know caching is an essential part of almost every web based application.  That was the gist of the first part of the presentation.  The last part showed some of the pros and cons of the Microsoft Sync Framework.  There is some great documentation around this framework here.  If you are new to the sync framework I suggest taking the time to read through a couple of these docs to understand how it works.  My slides also contain some of information regarding the sync framework.  My personal take on it is it is pretty easy to get started with.  The issue I have is what happens when you get errors.  Synchronizing two data sources is by nature a difficult process and errors will occur.  Using this framework is kind of like using a black box.  You sometimes want more control than you are going to get.  Bottom line if I was looking to sync multiple data sources I would start with this framework.  It is a no brainer to get started with and provides a ton a cool functionality.  However, if I started having issues I might revert back to my old ways of just building a sync tool for my own need.

I had a great time presenting and putting together this talk.  Below is a link to the slides and the completed solution if you are interested.

Demos and Slides

Building a Multi-Page Silverlight Application

I also finished taping my Silverlight session.  In this session we start from scratch with building a Silverlight navigation application.  We walk through setting up the URI mapping to provide deep linking.  We also wire up some data that the deep linking will use to look up data based on the link.  This is a great session for anyone thinking about using Silverlight to build a multiple page applications.  If you are interested in watching this session please sign up to attend the virtual conference.  The cost is minimal ($190) and the ROI will be huge.  Check out a list of all the great sessions and register at www.vconferenceonline.com.  You can get a $30 discount if you use my VIP code of BHOELTINGSPVC10.  Enjoy!

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

Silverlight 3 Jumpstart Book

Just wanted to let everyone know that my employers and friends Dave and Julie Yack have done it again.  They have published another book.  This one is a 200 page jumpstart to the recently released Silverlight 3.  I helped do some tech editing of the book the last couple weeks and I can say it is really good for getting started with Silverlight.  Read more about the release on Julie’s blog here.  You can also get some more details about the book at the books website http://silverlightjumpstart.com/Default.aspx or on Amazon.

Happy reading….

SQL Server and .NET Virtual Conferences

I am happy to say I am presenting at the Spring ‘09 SSWUG.ORG .NET vConference on April 22, 23, 24.  I recorded my sessions earlier and I’m please with the results.  If you are not familiar with the vConference format you can get a 10 minute sample of one of my presentations here.  The cost of the conference is only $125 and since it is a virtual conference there are no additional expenses.  There really is some great content presented by outstanding presenters.  Here is the link to check out all the SSWUG vConferences going on:

https://www.vconferenceonline.com/upcoming.asp

I also wanted to point out a free event that is going on Friday, April 17th.  Here is the link to the free event:

https://www.vconferenceonline.com/shows/spring09/sql/s09event.asp

I will keep this blog updated with my content and slides once the conference begins.

.NET Events in Colorado

I know January is almost over, but to me the year is still new.  I wanted to inform everyone about all the awesome User Groups and Community events in Colorado.

One of the most exciting upcoming events is the first ever Rocky Mountain Tech Tri-Fecta on Saturday, Feb. 21.  I cannot explain how cool this event is going to be!  It’s basically an all day geek fix.  There will be sessions related to .NET development, SQL Server and Windows Server.  So, if you work with MS products or know someone who does this is the event for you.  We have tons of speakers (Scott Hanselman is coming!) from all over the country and many who work for Microsoft and have inside info you cannot get anywhere else.  If you like what you are hearing please be sure visit the www.rmtechtrifecta.com site to register for the event to reserve your spot.

Next I wanted to let people know about the South Colorado .NET User Group.  I have taken over the leadership of this group from Julie Yack.  Julie Yack, David Yack and David Milner round out the leadership team for this group.  Next Tuesday we have Kathleen Dollard coming down from Ft. Collins to talk about rethinking Object Orientation.  SHould be great!  Please check out the link above to get more details.

Here are the links to all the MS related user groups I can think of in Colorado.

Denver Visual Studio User Group

North Colorado .NET User Group

Boulder .Net User Group

Colorado Springs SQL Server User Group

Denver SQL Server User Group

Colorado Springs Windows User Group

Rocky Mountain Windows Technology User Group

Please let me know if I missed a group.

Silverlight Path Resolution

First let me explain path resolution.  I have an image I want to use as my XAML button.  Easy enough I add an Image control to my Control Template for the button and set the source to the path of that image.  Path resolution is how the compiler determines where that image is.  I could hard code it to a directory on my hard drive, but that is never good because that path could change between environments or client machines.  So, most times we use relative paths.  Combinations of  ".." and slashes help us navigate the application structure to find the files.

Path resolution in XAML can be hard to understand.  It get's even more complicated once you add Silverlight to the mix.  Then on top of that when you are using User Controls from a Silverlight User Control Library things get down right nasty!  Then add in some shared Control Templates and things get darn near impossible.  That is the scenario I'm in.  I ran across this article which helped me get it working.  Check it out.

http://community.irritatedvowel.com/blogs/pete_browns_blog/archive/2008/03/09/Silverlight-2-Beta-1-Path-and-File-Resolution.aspx

One important thing to note is how you must mark the properties on the images.  Depending on how you are going to access the files you have to either set the Build Action property as "Content" or "Resource".  You might also need to set the Copy To Output Directory property to "Copy Always".

Another thing to note in my case is that if the Control Template is a shared\application level template, the images must reside in the application project, not the control library.  The path used in the shared Control Template is related to the application not the control library.

The most important thing is to pick a one way and stick to that throughout the application.

Posted in Labels: , , | 1 comments

XAML Data Binding Slides and Demos

Last night I presented at the South Colorado .NET User Group.  The discussion started with XAML data binding basics and then went into some more advanced topics.  I basically covered how to bind to any back end data source I could think of including the ADO.NET Entity Framework.  I also covered some style and UI topics.  It was a fun discussion and I think my point regarding the power of data binding in XAML and WPF was made.  I have uploaded a zip file of the slides and demos.  The link is below:

http://www.htechinc.com/files/XAML%20Data%20Binding%20With%20WPF.zip

I also mentioned a cool add in for Visual Studio called XAML Power Toys developed by Karl Shifflett.  Here is the link to XAML Power Toys:

http://karlshifflett.wordpress.com/xaml-power-toys/

If you have any questions regarding either of these links please let me know.