Stories Tagged with 'javascript'


Why Should You Care About NodeJS?

javascriptI know that many of my readers are .NET guys and a core constituency actively hate JavaScript so bear with me and let’s talk about NodeJS for a minute.

Just to be clear, I am not advocating anything by this post. What I think is important is that as you mature as a developer that you look at whatever is happening in the community and be open to why something is new  and what new ideas are being proffered by the new technology. My hope is that this post will show some of that.

Bootstrap 3 Grid System Explained

Are you starting to work with Bootstrap 3? If so, maybe I can help. I’ve recently released a Bootstrap 3 course on Pluralsight that covers many of the new features including how to migrate from Bootstrap 2 to 3.

Here is an excerpt from the course where I explain how the new grid system works in Bootstrap 3:

JavaScript Function Scopes

As some of you know, I authored a Pluralsight course on JavaScript for C# Developers. We’ve released an excerpt from that course covering how JavaScript function scopes work.

If you’re just getting started learning JavaScript, it can be easy to bring your C# biases to the language since they both have curly braces. Hopefully this excerpt will help:

Getting Ready for AngularJS 1.2

AngularJS is going through their release cycle now and that means that AngularJS 1.2 is going to be released soon with some specific changes that you'll need to address. I'll be updating my Pluralsight Course with the 1.2 changes as soon as the new version ships.

The biggest change for most people is the routing support is now packaged separately. To use routing you'll need to do two things:

Need LINQ but Writing JavaScript?

sketchArchOne of the tasks that I found cumbersome when writing JavaScript is simple collection manipulation. I have gotten spoiled in C# with LINQ. Sorting, filtering, shaping and more is easy with LINQ but what about in JavaScript? Underscore.js to the rescue.

Underscore.js is a small utility library that can help in collection manipulation (as well as other great features). I first started using Underscore.js to replace jQuery's (and AngularJS's) for-each implementations. I find underscore's simple and quick. Like much of JavaScript, the magic is happening in a callback function (think Lambda):

My New Web Development Course is Live

Are you getting ready to build a new website? Are you interested in shortening your development by using Bootstrap, AngularJS, Azure and ASP.NET? If so, my new course might be just for you.

In this new course I build a new web site from scratch. I start out with a Bootstrap template (since my design skills suck) and move through creating content, building a database, exposing a REST-ful API and building a Single Page Application. I wrap it up by publishing the site to Azure Web Sites showing you how to not only get your application up an running in the cloud, but also how to monitor it and handle standard tasks like using your own domain in Azure.

My AngularJS Talk at Atlanta .NET UG

Thanks to all who showed up to see me talk about AngularJS at the recent Atlanta .NET User's Group. At the talk, I wrote the client-side code for an AngularJS app by hand. The slides are pretty thin, but the code includes all the functionality I showed. I promised the slides and code so here they are!

If you have questions about any of this, feel free to comment and I'll help as much as I can!

JavaScript Promises

pinky-promiseNo I am not talking the promise that JavaScript will fix everything if you use it. I don't even believe that ;) I am talking about the concept of a promise object that several JavaScript libraries use (including AngularJS, jQuery, Dojo and WinJS).

A promise is a pattern for handling asynchronous operations. The problem is that essentially when you start an asynchronous operation, you need to execute some code as the operation is completed. Asynchronous code is so common that most libraries have found a solution for passing in callbacks. But there is little commonality to how each libraries does this. Let's take jQuery as an example:

Building Atlanta Code Camp Website

I recently helped the Atlanta Code Camp effort by building them a new website. You can see it here: Atlanta Code Camp.  I am pretty proud of what I was able to accomplish in the scant number of hours I had to build it. It's not done as we need to improve it when we have the speakers chosen and set up the schedule, but so far I am pretty happy with it.

I had a number of goals for the project:

Debugging PhoneGap with the Android Console

facepalm4If you build PhoneGap apps and test with the browser, moving to phones sometimes causes a boatload of problems. Because there isn't a great debugging story, being able to see the console window would be of great help.

My particular problem was that my JavaScript and CSS links weren't cased correctly. And it seems that the Android implementation is case sensitive (like most Linux implementations) but I couldn't even see what was wrong. Unfortunately the PhoneGap Build tools let's you use the console and interrogate the DOM but console log messages are lost. So I simply dropped down to the Android SDK.

My Practical PhoneGap Course is now Live!

If you're interested in cross-platform mobile apps, I like the solution that PhoneGap has. It uses HTML5/CSS/JS as the UI stack and I find it compelling to build apps for iOS, Android, Kindle, Windows Phone and Windows 8 Store. I've just released a new course on PhoneGap that attempts to fill in some of the holes in building apps.  The course includes:

Hope you enjoy the course. You can view it here:

PhoneGap and Windows 8

Traffic accident and to drivers fightingI've created a new example of a PhoneGap app for my talk at the Atlanta Windows Apps meeting. The talk I did tonight didn't go all that well, but I got it working and the result is something you can download and see how to use a minimum of WinJS to build your Windows 8 apps.

The example PhoneGap app sourcecode can be found on GitHub:

Building Cross-Platform Apps with HTML: Part 1 of 4

mobiledevices_clipOne of the things that I’ve been spending a lot of time working with lately is the ability to be able to build cross-platform apps. While I spend a lot of time in the Microsoft space (especially Windows 8 and Windows Phone 8), I need to be able to create and deploy apps to iOS and Android platforms. I've decided to do a series on building one of these using Single Page Application for the web, then deploying it to devices via PhoneGap:

There are a number of solutions for cross platform apps (e.g. MonoTouch/Droid, et al.)  The types of apps I am building are just consuming or displaying information from a standard web back-end (e.g. REST services).  Because I typically need to build a responsive website for the solution as well, using a solution that could share some or all of it’s code with the website is a good match.

Clarifying Windows Phone 8 HTML5 Apps

If you made it to build or spent much time watching the videos one of the stories many heard from Microsoft revolved about creating HTML5/JS applications for the Windows Phone 8. Unfortunately the story confused a lot of people (at least by the questions I've been getting lately.

Let me be clear...you *can* create HTML5/JS/CSS applications for Windows Phone 8. Yup. In fact, you could do it with Windows Phone 7 and 7.5. This is how PhoneGap works. The XAML page simply hosts a WebBrowser control and loads all of the assets locally in the XAP. What you can't do is create WinJS application. Let's step back a little and explain that better.

ReMIX South 2012

_0012_Logo-Yellow-onWhiteI had a great time at ReMIX South this year! It's been great to meet developers and designers and learn how they are using design tools of all sorts.

If you attended my "Modern Web Development" workshop, here is where you can get the slides and code. If you have questions about the workshop, please just add a comment and i'll respond as soon as I can:

JavaScript for C# Developers Live!

If you're in the Atlanta, I am holding a one-day JavaScript for the C# Developer course. The course will cover:

This is the perfect course for existing .NET developers who are trying to get up to speed with JavaScript for web development or Windows 8 App development. The course will take place on November 14th and costs $299.99. You can register for the event here:

TypeScript (or the obligatory post about it)

Like many of you, I've been itching to see what Anders had up his sleeve and I wasn't disappointed yesterday when they announced TypeScript. After teaching all day, I took a quick look at TypeScript (and I do mean quick).

There was a lot of buzz yesterday and the response seemed to be in one of two camps (for the most part):

When to Not Use Observable in KnockoutJS

javascriptI've been really busy lately and my list of things to blog on has been getting backed up. One thing that occurred to me while building my new JavaScript course was about how KnockoutJS and Observables actually work. Here's the deal.

KnockoutJS supports the idea of an observable object. This is similar to WPF/XAML concept of INotifyPropertyChanged interface. Most KnockoutJS dev's I've talked with use KnockoutJS's observable everywhere. But there are cases when you don't need it.

My New Course: JavaScript for C# Devs

If you are a C# developer who is ready to take on JavaScript, I have the course for you. The goal of the new course is to help C# developers understand the nature of JavaScript so you can write JavaScript like a native speaker. This is for developers who need JavaScript for any of the popular places to use JavaScript including:

The course aims to map C# features directly to JavaScript features so you can understand many key topics including:

aspConf was fun!

I had a good time doing a couple of talks today. If you joined me online, thanks for coming. For those who missed my talks, they will be posting the videos on Channel 9. As promised you can get the slides and examples here for my talks:

I hope you enjoyed the talks!

New Pluralsight Course on Debugging Web Sites

After a long gestation, I finally completed my Web Debugging course for Pluralsight. This new course covers the details of using the tools in the browsers to debug layout, JavaScript, CSS and networking. While the course shows you how to find the tools in all the major browsers, the focus is using Firefox and Firebug. Though the techniques shown in Firebug apply pretty seamlessly to all the browser tools. This course is not .NET specific, but should be useful to any web developers.

The course is broken up into four sections:

JavaScript for the C# Guy: The confusion about 'this'

As a C# guy I am comfortable with the idea of 'this' in the scope of a class (or 'Me' for your VB'ers). It's a relatively simple idea that allows you to access the instance of the class that you're a part of to call members.

In JavaScript that have a similar idea but because of the nature of JavaScript it can cause some odd behavior. Let's look at the standard behavior first.

JavaScript for the C# Guy: The Global Object

codeThis is another in my series about (hopefully) interesting JavaScript constructs that might surprise most C# developers. You can see others here: JavaScript for the C# Guy.

Back in the day I was doing some scripting in classic ASP sites (no, not classic ASP.NET) and we screamed and yelled about putting too much in the global scope. We wanted encapsulation and such and that is true today. In my C# work pretty much everything is in a class (static or otherwise) so I don't have to concern myself with it much.  But in JavaScript I know there is an easily accessible global object...but it occurred to me that I don't see the "Global" object accessed much; even though it is used a bit (to hold other containers that have encapsulated code). "Why not?" I wondered.

Modern Web Development - Part 8

shawnsouthparkThis is the eighth of ten parts of this blog post. The topics will be:

Oh Facebook…how do you becoming so insistent on integrating you into every website? Well anyway, let’s show you how it actually works. In this post, I’ll show you how to authenticate an app using Facebook.

When you want to integrate with Facebook, you’ll need the Facebook SDK. Unlike other JavaScript APIs, the Facebook API isn’t a download. The API has some specific peculiar patterns that it requires. But if you obey Facebook, it will (usually) bend to your will. To get started you’ll want to visit the Facebook developer site:

JavaScript for the C# Guy: Scopes

roach

Another day in JavaScript land for this  C# guy. I am reading the excellent Professional JavaScript for Web Developers and I am finding more and more that separates the two languages. I know everyone will mention it, but I did read JavaScript: The Good Parts and I liked it but it isn’t as comprehensive as this book.

Shawn
Shawn Wildermuth
Author, Teacher, and Coach




My Courses

Wilder Minds Training
Vue.js by Example
Bootstrap 4 by Example
Intro to Font Awesome 5 (Free Course)
Pluralsight
Designing RESTful Web APIs (new)
Building an API with ASP.NET Web API
Building an API with ASP.NET Core
Building a Web App with ASP.NET Core, MVC6, EF Core, Bootstrap and Angular
Less: Getting Started

Application Name WilderBlog Environment Name Development
Application Ver v4.0.30319 Runtime Framework x86
App Path D:\home\site\wwwroot\ Runtime Version .NET Core 3.0.0
Operating System Microsoft Windows 10.0.14393 Runtime Arch X86