Back our Angular 4 Book on Kickstarter.

Introduction to TypeScript - Part 1

I'm working on a longer series of articles about Typescript. This will be extra material to support my upcoming Angular 2 book. This is the first part of that series.

What is TypeScript?

TypeScript is a strongly typed language which can be used to build web applications. It come with a special compiler that converts the strongly typed language into JavaScript so it can run in a web browser. Since TypeScript is strongly typed, it can offer better tooling than can be used with simple JavaScript. Angular 2 was built using TypeScript and I use it heavily in my Angular 4 book. This article is intended to give you an introduction to TypeScript.

Setup the Project

The first step to creating a TypeScript application is to install the compiler. I'm going to use the Node compiler. First, you'll need to set up the node project. Run this command:


npm init

And follow the instructions. You'll see something like this:

This will create a package.json file that will look something like this:


{
"name": "01helloworld",
"version": "1.0.0",
"description": "Sample TypeScript Project",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "Jeffry Houser",
"license": "ISC"
}

Now install the TypeScript compiler:


npm install -g typescript

You'll see this:

With TypeScript installed, you're ready to write your first Typescript application.

Create Your First TypeScript File

Create a file named hello.ts:


function echo(message) {
return message;
}
document.body.innerHTML = echo("Hello World");

The purpose of this code is to echo a Hello Word message. The function accepts a string, and returns it. The innerHTML of the document's body tag is set to the results of the function call.

This file would be valid JavaScript, but it works fine since TypeScript is a Superset of JavaScript. We can use JavaScript inside of TypeScript easily. We'll improve on this throughout the article as we introduce more TypeScript specific concepts.

You can compile this file by running this command line:


tsc hello

You'll see something like this:

You aren't given a lot of feedback, but if you check the directory, you'll see a hello.js file:


function echo(message) {
return message;
}
document.body.innerHTML = echo("Hello World");

There isn't a lot of difference between the original file and the compiled file, that is because our main TypeScript file is primarily JavaScript. This is a place to start and over the series we'll expand our TypeScript knowledge.

Test the Application in a Browser

Now it is time to test the application in a browser. Create a page named Index.html:


<html>
<head><title>TypeScript Greeter</title></head>
<body>
<script src="hello.js"></script>
</body>
</html>

This index file loads the hello.js file, which will cause the document.body.innerHTML assignment to be called, which will run function and return the results:

Congratulations! You've created your first TypeScript application.

Keep up to date by reading DotComIt's Monthly Technical Newsletter

How do I Extend a Background Color the Full Height of a Div with CSS?

Last week I used CSS to tile a graphic across the whole width of a page. The purpose was to extend a header bar's color when the page scrolled right beyond the iniital viewport.

Now, with the same project I wanted to extend the left nav to the full height of the page. I couldn't use the same trick as you can't tile two separate background images.

This is still doable with some CSS. First, start the HTML Body:


<body>
</body>

We want the body to be the height of the view area:


body {
height : 100vh;
}

This sets the body to 100% height of the view area.

Now create our content wrapper div inside the body:


<div class="flex">
</div>

This code uses FlexBox for display:


.flex {
display : flex;
height : auto;
min-height : 100%;
}

It also contains a trick. The height is set to auto and the min-height is set to 100%. That, combined with the body's height of 100vh will extend this div through the full height of the page.

Finally, create our left nav bar inside our Flex div:


<div class="somebar">
Some Text and other things
</div>

This is styled with a specific width, but no specific height. I also specified the color


.somebar{
width : 150px;
background-color:blue;
color : white;
}

Check out the code here.

I've been doing a lot of HTML CSS work for a client, but I'm working on some longer programming based articles which will be coming out soon.

Can I create an HTML Background with an inline Image?

I'm working on a site for some clients, and one of their complaints was that the left nav bar was not extending the full height of the page. The nav div was set to expand to its content, which meant it stopped when it ran out of content. On some pages it looked fine, on others the nav bar ended too early. As a programmer, I don't often deal with design issues like this, so I pulled in the project's designer and we put our heads together to find a solution.

First, the problem was very generically like this:


<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
body {
margin : 0px;
}
.nav{
background-color : #0000FF;
width : 200px;
height : 50%;
color : #ffffff;
}
.nav a {
color : #ffffff;
}
</style>
</head>
<body>
<div class="nav">
Some info in the nav bar<br/>
<A href="">Some Link</A>
</div>
</body>
</html>

Our code was much more complicated, using Flexbox for complicated layouts, but this is simple enough example to demonstrate the problem. We were not able to use a simple height:100% in CSS because some parent containers used Flexbox styling and did not stretch the full height of the page.

My designer friend recommended tiling a background image. We can change the CSS for the body tag to something like this:


body {
margin : 0px;
background: top left url(blue1x200.png) repeat-y;
}

The blue1x200.png is an image with just the color blue in it which has a height of 1 pixel and a width of 200 pixels. The repeat-y clarification tells the browser to repeat this image on the y axis, meaning up and down.

This solved our issue, so whatever was happening to the page nav or the page content it would not prevent the left 200 pixels on the page from showing up the same color as the background.

Using the url attribute to the background CSS will force the page to spawn another HTTP request to load the image. My designer had a trick for that too. He converted the image to a Base64 string representation and replaced the URL:


background: top left url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAAABCAIAAAAU3Xa1AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCz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XbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAABhJREFUeNpiZGD4zzAKRgG1AQAAAP//AwBYegEBJ5aHWAAAAABJRU5ErkJggg==') repeat-y;

The encoded image looks like a lot of gobblygook, but the browser treats it as an image without having to make a new request to load something from the server. Check out the code.

You can use a site like this to convert your image toBase64.

If you've been doing Web Development for a long time, this sort of technique is probably not new to you, however I had never seen someone encode the images and include it in-line before. It's a cool technique.

Goodbye Flash

Adobe announced an End of Life for the Flash Player. I've written things in defense of Flash in the past and thought it would be worth it to revisit those statements today.

Who Am I?

If you came across this without knowing me, I am arguably one of the best Flex Developers in the world. I tied my business and professional life to the Flash Platform, and Flex, more than a decade ago. Here are some of my credentials:

  • I produced two Flex podcasts. a href="http://www.theflexshow.com">The Flex Show presented highly edited community interviews. and The Flextras Friday Lunch was a live demo with Q&A.
  • I created Flextras, a business selling Flex components.
  • I was editor in chief of the short-lived Flex Authority magazine.
  • I spoke at dozens of Flash based user groups and conferences.
  • I answered a ton of questions on StackOverflow and still retain the top spot in the Flex user charts.
  • I became an Adobe Community Professional due to my work in the Flash community.
  • I was one of the founding PMC members of the Apache Flex team.

Back then, I bet that Flex would provide a better application building experience than anything HTML could offer. I thought it would rule the world. I wanted to get in early and ride the wave to success. I took a calculated risk that turned out to be wrong.

Why Does Adobe's Decision Makes Sense?

Browsers have slowly been shutting down their plugin APIs and Flash Player was a plugin. Flash was able to get around this because it is widely used and Adobe was able to negotiate to add Flash directly into the browser. Both Microsoft Edge and Google Chrome are distributed with Flash. These APIS have slowly become more restrictive over time and the future of the web will be plugin-free.

Since HTML is finally adding a native form of DRM, the bulk of the major content providers no longer need Flash's proprietary nature to protect their content. This removes the last commercial obstacle which I suspect has been keeping the Flash player alive.

Jeffry, How does this Affect You?

Personally, I spent a couple hours last night playing Bloon Tower Defense one of my favorite casual browser games. I hadn't touched it in years, but I'll miss it when it is finally gone.

Professionally, this doesn't affect me all that much. I refactored my business more than five years ago to focus on alternate technologies. In the HTML world, I really like Angular, but I've touched on a lot of different technologies.

I never turn down the Flex work that comes my way, and people still find me based on my past history. But, I am not actively pursuing it. If you need help migrating your Flex applications to an HTML5 platform, I'd be glad to help, so reach out and we can discuss.

How does this Affect you?

Adobe will stop distributing the Flash Player in 2020, but the Adobe Flash Platform will live on through Adobe AIR. Given AIR's use as a cross platform mobile app development platform I expect that to be around for a long time.

If you still have Flash applications in production, now is the time to start planning a migration of sorts. You have, roughly, 2 years to plan your strategy.

What migration strategies can you use?

  • Distribute to the Desktop as an Adobe AIR application. You can use all your existing code and the migration will not take long.
  • Distribute as a Mobile Application with Adobe AIR. This has the benefit of using the same code base, but you'll probably need some UI rework to accommodate for the different screen sizes.
  • Rework to HTML5: You can rework your application into an HTML5 application. You should be able to reuse a lot of your services and database code, which means you'll just be writing a new UI. Some technologies such as FlexJS or Haxe allow you to use your ActionScript skills in the process

I'll be more than happy to help you with any of these tasks, so give me a call.

What Next?

I had a fun ride with the Flex community and met some new lifetime friends. I'm sorry to see Flash go, but the world has moved on. This is just a last reminder that we all have to move on.

What do you think? What do you remember most about Flash or Flex?

How can I revert a Git directory without affecting all changes?

I have been working on a specific code change with a client for about two weeks. This included about a dozen commits to the git repository before making a pull request. The client reviewed the pull request before merging, and requested I roll back a few changes. I had made these commit 8 commits ago, and from the dozens of files changed I only had to roll back two.

How do you do it?

I didn't see an obvious way to roll back just those files using SmartGit, my tool of choice, so I had to drop back to the command line. This did it:


git checkout SHA-Value /c/path/to/repo/root/path/to/subdirectory/with/rejected/changes

The SHA is the unique identifier for each commit. I opened up SmartGit, viewed a change log, found out which commit I changed these files, went to the commit before that, clicked 'details' and the SHA value is listed right there. You can also get the SHA value from GitHub if you prefer. Go into the Pull Request, and select commits. The value is in the table, to the right of the commit message.

The path to the directory is your local system path. I had to use the absolute path. Since I'm a Windows user that started with the C drive, drilled down into my project folder, to the repository. And then I drilled down deeper into the repository to find the specific subdirectory I wanted to revert. Reverting the subdirectory is easier than reverting all the files individually.

I executed the line inside of GitShell. Everything worked.

I found a bunch of posts covering this topic, but most of them confused me. Hopefully this helps someone. Let me know!

How can I control the parameter order when doing a HTTP POST call from Flex?

I've been working on a legacy AIR application for a client. It integrates with a backend I have no control over. According to their documentation, we need to pass the form parameters in a specific order. This seems unusual for a form post, which contains key-value pairs and is probably not accessed in parameter order. But due to other problems integrating with this service, I decided to see what I could do to specify the parameter order and remove that as a possible point of failure. I wrote about my attempts in this StackOverflow question.

What Didn't Work

This is what we were doing. First, create an HTTPService:


<mx:HTTPService id="service"
showBusyCursor="false"
requestTimeout="240"
method="post" contentType="application/x-www-form-urlencoded"
url="yourURLHere" resultFormat="e4x"
/>

Then, create the parameter object in code:


var parameters : Object = new Object();
parameters.firstParameter = "firstOne";
parameters.amount = 100;
parameters.otherParameters = "Other Random Misc Data";
parameters.lastParameter = "LastOne";

When the parameter object is created for the service call, I added the parameters to the object in order.

Then make the call:


var call : Object = this.service.send(parameters);
call.addResponder( this.responder );

You may have already guessed why this won't work. Object parameters, or keys in a dictionary, are by definition, not in any specific sort order. When the Flex code looped over all parameters to add them to the outgoing service, it was accessing them in alphabetical order. However, that is not something I would bet my life on happening every single time due to the unordered nature of object properties. I also noticed that the outgoing request in the Flash Builder network monitor had the parameters in yet another order. Something with them changed between the Flex code and the server hit.

So, what am I to do?

Using Lower Level APIs to make this work

The final solution was to use lower level APIs. I created the request using URLRequest and URLLoader classes. Instead of passing an object to the request I also had to manually create the request body which is very similar to a URL parameter string.

First, create the parameter string:


var parameters : String = '';
parameters += "firstParameter=firstOne&";
parameters += "amount=100&";
parameters += "otherParameters=Other Random Misc Data&";
parameters+= "lastParameter=LastOne";

Then, create the URLRequest:


var r:URLRequest = new URLRequest(yourURLHere);
r.data = parameters;
r.method = URLRequestMethod.POST;
r.contentType = "application/x-www-form-urlencoded";

The data is set to the parameters string. The method is set to POST and the contentType is set to 'application/x-ww-form-urlencoded'.

And finally, create the URLLoader:


var l:URLLoader = new URLLoader();
l.addEventListener(Event.COMPLETE, myResultMethod);
l.addEventListener(IOErrorEvent.IO_ERROR, myFailureMethod );
l.addEventListener(SecurityErrorEvent.SECURITY_ERROR, myFailureMethod );
l.load(r);

After doing this I could see in the outgoing requests that the parameter order was retained. So, things were good and my issue was solved! This is a lot more tedious than using the HTTPService, but at least I eliminated it as a possible error.

How do I right align a div inside a div?

I was working with a client to create a specific layout on the page and I wanted to align a div inside another div. But, I couldn't use text-align because I didn't want to right align the text elements in the inner div. How do you do it?

First, create the outer div and inner div:


<div class="outerDiv">
<div class="innerDiv">
This is Text in the inner div<br/>
Some other Text
</div>
</div>

A simple div is inside another div, and the inner div has some text. The outer div's only purpose is a wrapper for positioning purposes. Both the outerDiv and innerDiv have CSS Styles attached.

This is the CSS for the outerDiv:


.outerDiv {
display: flex;
float : right;
}

It enables the outerDiv to use flexbox styling and floats the content to the right. Flexbox is an advanced way to position CSS elements.

The innerDiv doesn't need any special CSS styling to make this work, but let's give it a background color:


.innerDiv{
background: #e6e6e6;
}

Play with the code here.

The implementation is really simple once you figure it out; but sometimes getting there is a stumble.

How do I fix "Filename too long' error on SmartGit on Windows?

I've been working with a client on a project that uses AEM and ran into a problem committing code changes to their git repository. The error told me that the filename was too long.

The error was something like this:

error: unable to create file 'really long path to file' Filename too long

I banged my head on this for a bit, but eventually found a solution.

I had to change a flag with the version of Git that was included with SmartGit. Open up a console window. Move to your SmartGit install directory. For me that was:

C:\Program Files (x86)\SmartGit\

You should have a git subdirectory in there. Switch to it, and drill down into the bin directory. My full path would be this:


C:\Program Files (x86)\SmartGit\git\bin

Now run this command:


git config --system core.longpaths true

And try the commit again. Things should work fine.

Why does reloading my Angular 2 App return a 404 error?

I've been having some issues with Angular 2 [now Angular 4] and the RouterModule. I put together this screencast to demonstrate the problem and how I fixed it:

How do I move ColdFusion Configuration to Another machine without Exporting Settings?

I've written in the past about migrating ColdFusion instances from one machine to another. Most of the time when I have to do this it is because of a hardware failure and I'm setting up a machine from scratch. This seems to happen every 4-6 years. Despite it's impending immediate death, 20 years running, I still do a quite bit of ColdFusion development. It's the devil that I know on the server side.

Without a working machine, I can't sign into the CF Administrator and export CF Admin settings, so I have to go to other methods to get my config up and running. I've written about similar experiences with ColdFusion 8 and migrating from ColdFusion 8 to 9. But, time moves on and most of my production clients use CF10, so that is the version I have installed on my local.

How do I get the old CF configuration set up the new machine when all I have access to is the old CF installation directory? this is how I did it.

  1. Install Apache: ColdFusion is useless without a web server, so first I installed and configured the Apache web server.
  2. Install ColdFusion 10: Get ColdFusion 10 from the cfmlRepo site. More specifically, go here. be sure to download app the patches. And send thanks to whomever takes care of that site.
  3. Install CF Hotfixes: Next, install all the ColdFusion hotfixes. You'll have to install the first few manually before you can use the update feature inside the ColdFusion administrator. Uses these instructions, but basically do this:


    C:\ColdFusion10\jre\bin\java -jar hotfix_008.jar

    I installed hotfixes 7-13. The rest I updated through the ColdFusion administrator.

  4. Compare Directories: Now compare your old ColdFusion install directory to the new ColdFusion install directory. You'll be surprised at how many of the files will be flagged as identical. Those aren't the ones you need to worry about. I focused on the config files in cfusion\lib\*.xml, and copied them over from the old directory to the new one. These are the configurations I moved:
    • new-cron.xml: Not sure what this one is for.
    • neo-datasource.xml: this file contains DSN configuration information.
    • neo-debug.xml: This contains CF Debugging settings.
    • neo-logging: This contains log related settings.
    • neo-mail.xml: This contains mail server settings.
    • neo-metric.xml: I couldn't figure out which settings this one contains, but I copied it anyway.
    • neo-runtime.xml: This file contains misc settings.
    I was making some educated guesses here. I think Neo was the code name for ColdFusion MX, so it is funny to see the name still kicking around.
  5. Restart ColdFusion: After the restart, you should find all your CF settings restored.
  6. Change DNS Passwords: I did notice that I had to reenter the passwords for all my data sources.

Overall, the process worked a lot better than I would have hoped.

Keep up to date by reading DotComIt's Monthly Technical Newsletter

More Entries

All Content Copyright 2005, 2006, 2007, 2008, 2009 Jeffry Houser. May not be reused without permission
BlogCFC was created by Raymond Camden. This blog is running version 5.9.2.002.