python vs. swift

Comparison of Python and Apple’s Swift Programming Language Syntax

python vs. swiftAs a Python and C# developer, I have been intrigued ever since Apple announced the Swift programming language to cheering crowds at WWDC 2014.

This post will explore the syntax of Python 3 vs Swift. I was inspired by Chris Pietschmann’s post Basic Comparison of C# and Apple Swift Programming Language Syntax for C# and Swift. So here is the Python version.

Continue reading

Improve perceived performance of ASP.NET MVC websites with asynchronous partial views

github_icon

[Note: The code for this project is available on GitHub.]

Imagine you’re building an ASP.NET MVC website which has some performance problems. I’m sure this would never actually happen to you, but imagine you’re facing this problem just for the sake of exploring the possibilities. :-)

Now, your web app is mostly fast and responsive, but there are certain types of data that just bring the whole thing to a grind. This article will cover a technique using ASP.NET MVC partial views, along with just a sprinkle of jQuery, JavaScript, and HTML5 to make your site feel nice and responsive even if you cannot increase the speed of certain operations. Continue reading

Preventing JavaScript Files from Loading Multiple Times

This post is about ensuring that you do not execute a particular JavaScript file more than one time. Let’s start by asking:

What happens if you link to a js file twice in your page?

Here is a contrived example.

Notice that we are including bad-example.js twice. Do modern browsers somehow realize they loaded this file already and skip this? Not yet, as we’ll see!

Imagine bad-example.js had this code in it. Continue reading

No, You Don’t Need A Windows App

[This project is available on GitHub.]

Do you think you need a Window’s app for your next project? Here’s a thought: No you don’t.

Let me give you one less reason choose the rocky-road of desktop apps today. You’ll hear people tell you that if you build applications for business users (so-called LOB apps) that are input heavy or have complex navigation, your only choice is to build a Windows application.

Why? Because your power users will want hot-keys. They don’t want to use the mouse and navigation and all that stuff that makes the web less usable. They’ll just want to hit a few keystrokes and jump from place to place and do that quick look-up or data entry.

If you haven’t looked carefully around the web lately, here’s a revelation:

Real web apps have hot-keys too.

Continue reading

9 Ways Your Brand New ASP.NET MVC Project Can Be Better

So you’re ready to start that new and ambitious ASP.NET MVC project. Maybe you’re kicking off a new startup or just finally moving that old-and-crusty webforms project into modern development world. Either way, here are a few very simple things you can do immediately after creating that new MVC project that you will thank yourself for as your project grows in complexity.

1. First of all, even MVC 3 has old-and-crusty aspects lurking in its projects. There are old MicrosoftMvc*.js AJAX and validation libraries that have be replaced with new jQuery hotness. These *.js files aren’t used so just delete them.

2. Many of the dependencies of your MVC project are out-of-date as soon as you create your project. You have an old version of jQuery, Entity Framework, etc. Luckily Phil Haack and crew had the brilliant insight to link these to NuGet. So the next thing you do is just run NuGet and choose the Updates tab.

Continue reading

Managing Cumbersome Shared Views Folder for Large Projects in MVC

While ASP.NET MVC promotes clean separation-of-concerns for your web applications, there are some short comings. A problem you’ll run into on large ASP.NET MVC projects is the Views section of your web application becomes completely crowded with hundreds or thousands of files.

Usually, these view files are organized into sections by controller which keeps this manageable. For example, your solution might look like:
Continue reading

Building a Cloud OS for .NET Developers – Part 2

In Part 1 of my Building a Cloud OS for .NET Developers series, I talked about setting up a pure cloud OS focused on developers. But the one crucial aspect I left out was the developer tools.

In this second installment, we’ll be covering exactly that. How do we manage having Visual Studio and associated tools and servers universally accessible in the cloud, even on mobile devices such as iPads?

Continue reading