A bit late getting this out, but I published a new course for Pluralsight.
This course was really fun to create. I got to use several of my favorite technologies.
Here is the course description:
It can be very difficult to build a cross platform application that will work on the web as well as popular mobile platforms like Android and iOS.
In this course, I’ll take you through the complete process of creating an application that works on each of the platforms and uses a REST based backend API to share data and business logic—all using C#.
We’ll start off this course by learning how to build a REST based API using the popular open source framework ServiceStack. I’ll show you how easy it is to get ServiceStack set up and even how to store data for the API using a Redis database.
Next, I’ll show you how to create an ASP.NET MVC 4 application that uses the REST service we built to display it’s data and implement it’s logic. We’ll learn how to use JQuery to make AJAX calls to a REST based API from within our MVC 4 application.
Then, we’ll learn how we can use C# and the .NET framework to build an Android application using the Xamarin tools. We’ll use the same REST API, we created earlier and build a real native Android application that is able to consume that API for implementing its logic and displaying data.
Finally, I’ll show you how to do the same thing for an iOS application. We’ll again use C# to build a real native iOS application with the Xamarin tools and learn how to consume REST based web services from iOS.
So, if you are a C# developer and don’t want to have to learn several other programming languages to build cross platform applications; you’ll definitely want to check out this course. By the end of this course, you’ll have the skills you need to be able to implement an end-to-end cross platform solution complete with a REST based API backend all in C#.
Just like the housing bubble.
Just like the .COM bubble.
Then how did this ugly wart of a language become so popular?
I’ve tried many things. I’ve put some butter and brown sugar on a freshly baked sweet potato. I’ve doused it with hot sauce. I’ve even pretended it was a regular potato and dressed it up like one. But, the fact remains, I just don’t like sweet potatoes. It’s something in their very nature that I despise.
Before you pitchfork me, I want to clear a few things up.
And if you are smart and want to have a good career in software development, you’ll take everything I am saying with a grain of salt, knowing that I could be completely wrong.
No one gets up in the morning and says, I want to have bamboo shoots shoved under my fingernails. (Ok, well maybe some people do, but those guys are still writing object-oriented Perl.)
This is the part where I tell you what is not to love
Ever seen a movie star without her makeup? Makes you realize that any halfway decent looking woman could be a movie star, with the proper styling.
You can only build so much on top of something else, before you have to wipe the slate clean and start over.
By the way, check out my new experiment on YouTube, going to release a short video each week. Let me know what you think.
You may be wondering what happened to my usual Monday post.
Well, I was having my head rearranged by JQuery. I have to admit, I am pretty late to the party. I haven’t really been using JQuery at all the past few years.
I missed a lot.
Goodbye type safety
This part scares me a little bit. I already made a few typos that were pretty hard to detect.
But, the trade-off just might be worth it.
What we are losing in type safety, we are making up for in productivity and speed. It is really fast to manipulate a page using JQuery and to hook up events.
Perhaps some kind of Script# / JQuery bastard child?
I like the functional thinking paradigm. One of my co-workers was saying that he likes JQuery because it helps him to write Lamba expressions and LINQ queries. I tend to agree with him.
I’ve said it before, but I believe the next high abstraction of programming is thinking functionally.
So many pieces of code that I would have used code generation to produce in the past, I can now produce with Lambda expressions.
It’s not all roses
Bleeding all the way through the stack
The downfall of this is that it is a very leaky abstraction. Abstractions are good because they allow us to think at a higher level.
Leaky abstractions are bad because they force us to context switch from a higher level of thinking down to a lower level.
Think for a second about all the “languages” or technologies you have to know to develop an ASP.NET web page using JQuery and MVC.
- ASP.NET MVC
- C# or Visual Basic
- Web Services / Rest
- HTTP (You need to be able to debug all the coolness you are flinging back and forth.)
When you have it all working, it is pretty slick. Very slick indeed, but it is not a sustainable model. It is complex and sprinkled with errors and gotchas.
Debugging / readability
When I am writing JQuery, although I feel like it is magical and cool, I also feel a little bit dirty.
Well, as clean as you try to write JQuery code, it can be pretty nasty. There is a lot of magic going on and it is not very easily understandable.
Perhaps I’ll get better at expressing my intent clearly in JQuery code, but I am pretty sure it has to due in part with the leakiness of the abstraction layer, and that can’t really be cleaned up easily.
Debugging is also hell. I tried debugging through the validation library to see why my error messages weren’t showing up, and it was no picnic.
One of the things I really enjoyed while writing JQuery code was putting the view logic where it really belongs. It is nice to have a language and a server separating the view logic from the model and presentation.
JQuery really allows you to put all the code that manipulates the view in one place, and on the client side, where it really belongs.
JQuery will make your HTML code so much cleaner and helps to actually plug the leaks in the HTML abstraction layer. (Although it isn’t perfect, especially when working with ASP.NET Web Forms.)
Better late then never at all
So I know I’m really late to the JQuery party, but I’m here now and I am liking it.
Overall, I’d recommend taking a look at JQuery if you are like me and hadn’t really used it until now. It definitely is a valuable skill to develop and is growing at an extremely rapid pace.