JavaScript for Li...
Follow
Find tag "TypeScript"
379.9K views | +187 today
JavaScript for Line of Business Applications
Keeping track of current JavaScript Frameworks that help design your clientside Business Logic Layers.
Curated by Jan Hesse
Beam to my Inbox:
Your new post is loading...
Your new post is loading...
Scoop.it!

TypeScript AMD with RequireJS Tutorial

TypeScript AMD with RequireJS Tutorial | JavaScript for Line of Business Applications | Scoop.it

In this TypeScript RequireJS tutorial I will show you how to setup AMD classes, setup your config file and how to use RequireJS plugins with TypeScript.

more...
No comment yet.
Scoop.it!

TypeScript / ES6 classes for React components - without the hacks!

TypeScript / ES6 classes for React components - without the hacks! | JavaScript for Line of Business Applications | Scoop.it

React 0.13 has just been released into beta, a release I've been eagerly anticipating! This has been the release where finally they will be supporting ES6 classes to create React components. Fully supported, no messing about and jumping through hoops and hoping that breaking API changes don't drop in and catch you off guard.

more...
No comment yet.
Scoop.it!

Writing AngularJS directives as TypeScript classes

Writing AngularJS directives as TypeScript classes | JavaScript for Line of Business Applications | Scoop.it

TypeScript is a fantastic language that extends JavaScript by providing static typing syntax. Writing TypeScript to utilize AngularJS can be clunky at times, and one pain point for me was in writing directives.

AngularJS expects to be feed a factory function that returns an object that defines parameters and functionality for your directive.

In JavaScript, that looks like this.

more...
No comment yet.
Scoop.it!

Exploring Facebook Flow: First Impressions, Gotchas, and Tips

Exploring Facebook Flow: First Impressions, Gotchas, and Tips | JavaScript for Line of Business Applications | Scoop.it

This post will be part-commentary, part-resource. My goal is to give you, the reader, a better understanding of how to integrate Flow into your projects and avoid any undocumented pain points.

Flow is centered around a server architecture, which allows for online type checking. So, to start, Flow scans your entire project—or, at least, any files marked with the pragma, as Flow's type checking is opt-in. When you later change a file, Flow can intelligently type check the paths in the code that were affected by this change, rather than rescanning the entire project. This leads to big performance gains.

more...
No comment yet.
Scoop.it!

Statically typed JavaScript via Microsoft TypeScript, Facebook Flow and Google AtScript

Statically typed JavaScript via Microsoft TypeScript, Facebook Flow and Google AtScript | JavaScript for Line of Business Applications | Scoop.it

This blog post looks at three initiatives for adding static typing to JavaScript: Microsoft’s TypeScript, Facebook’s Flow and Google’s AtScript.


Contents:

* Typing
Microsoft TypeScript
Facebook Flow
Google AtScript
A common standard?
Further reading


more...
No comment yet.
Scoop.it!

Rendering the Page with Backbone and TypeScript

Rendering the Page with Backbone and TypeScript | JavaScript for Line of Business Applications | Scoop.it

his month, I'm going to show how to use a Backbone View to display the Customer objects I defined in that column. This time I'll also be showing off some useful features in TypeScript, including the ellipse (…) syntax for defining a method that accepts an indefinite number of parameters and the TypeScript equivalent of a lambda expression.

Backbone is designed with the expectation that you'll put your code that generates the HTML in the View's render method. Once you generate your HTML, you can, from within the View, append your HTML to the element set in the el/$el properties. You can also use the View's setElement method to set the View's el/$el properties to your generated HTML.

more...
No comment yet.
Scoop.it!

Mark Rendle - Angular TypeScript

The unholy pairing of the two bears fruit that is, quite possibly, the best data-bindy, view-modelly, uber-productively effective development system I've ever used (and I've used a lot). Come and learn how to splice the DNA of framework and language to create AngularTS, and get the joy back in your programming life.

more...
No comment yet.
Scoop.it!

Retrieving Data with Backbone and TypeScript

Retrieving Data with Backbone and TypeScript | JavaScript for Line of Business Applications | Scoop.it
Peter creates an AJAX-enabled application using TypeScript with Backbone that talks to a Web API service. He also upgrades to the latest version of Backbone TypeScript support, causing several things to break -- but it does result in better, simpler code.
more...
No comment yet.
Scoop.it!

ASP.NET MVC Bundling/minification with angularjs and Typescript

ASP.NET MVC Bundling/minification with angularjs and Typescript | JavaScript for Line of Business Applications | Scoop.it

‘P@Yogesh’ takes a look at how you can minifiy your Angular Code, and introduce type safety using TypeScript, along with sharing some of the common gotchas which cause problems

more...
No comment yet.
Scoop.it!

The JavaScript Minefield

The JavaScript Minefield | JavaScript for Line of Business Applications | Scoop.it

How is JavaScript a minefield? Well, JavaScript has all sorts of pitfalls lurking for the developer. Each pitfall is like a mine in the minefield, silently waiting for you to accidentally step on it. Just like the minefield, JavaScript’s mines are hidden in plain sight. Entire books have been written about all the mines present in JavaScript. Maybe I’ll get into what some of those are in future blog posts. Now, if you are going to venture into a minefield, you need a way to avoid stepping on a mine. You need either a safe path through the minefield or a detailed map of all the mine locations.

Douglas Crockford was trying to provide a safe path through the JavaScript minefield when he wrote JavaScript: The Good Parts. He did an admirable job at laying out a subset of the language that was sufficient but avoided many of the mines. However, the problem with any safe path through a minefield is that if you ever stray from the path, it doesn’t help at all.


This article is Part 1 in a 6-Part Series.

more...
No comment yet.
Scoop.it!

Combining WinJS, TypeScript, jQuery and Knockout

Combining WinJS, TypeScript, jQuery and Knockout | JavaScript for Line of Business Applications | Scoop.it
A tutorial on getting started with building Windows Store apps using TypeScript. It shows you how to use frameworks you already know, like jQuery and Knockout.

In this tutorial we’re going to build a very simple Windows Store application that uses jQuery and Knockout to get some data from the internet and show this in a GridView. I’ll show you how you create a new project, get all the the TypeScript definitions you need, get data from a web service and bind that to the GridView control. I’m assuming you have at least a little TypeScript knowledge. 

more...
No comment yet.
Scoop.it!

Integrating the Client and the Server with TypeScript

Integrating the Client and the Server with TypeScript | JavaScript for Line of Business Applications | Scoop.it

Peter walks through a simple Web page that retrieves and updates data on the server to summarize his best practices for creating the client-side portion of an ASP.NET application.

more...
No comment yet.
Scoop.it!

TypeScript: A New Language for .NET and JavaScript Developers

JavaScript is quite possibly the world's most popular programming language. It's nearly impossible to have a website without it. Despite its wild popularity, JavaScript does play some tricks on unsuspecting developers and sometimes does not work as expected, especially from a C# coder's point of view. It's also easy for JavaScript to run amok throughout a project, especially if it is not organized well, both in files and via patterns. This is where TypeScript comes into the picture. TypeScript works excellently as a shim for C# developers who must write JavaScript. In addition to that, JavaScript developers will enjoy TypeScript's implementations of ES6 proposed features (i.e., classes) that put it on syntax parity with OOP languages. That's not to mention while many hardened JavaScripters out there already know how to do all the things TypeScript provides, it still has much nicer syntax than JavaScript's prototypal way of doing it. (of course, the look of syntax is always an opinion; which is better, vanilla or chocolate?)

TypeScript is not a new language as it is a superset of JavaScript that compiles to plain JavaScript. This isn't "compile" in the traditional sense of the word, but that TypeScript is JavaScript that generates more JavaScript. The TypeScript compiler, tsc.exe, creates the prototypal syntactical code as well as the implementation of classes, namespaces, and types. There are no TypeScript designers in Visual Studio (good) and the JavaScript outputted is generally clean and lightweight.  

- See more at: http://rachelappel.com/typescript-a-new-language-for-.net-and-javascript-developers#sthash.M29wWjSi.dpuf

more...
No comment yet.
Scoop.it!

Classical.js - A Base Class Library for TypeScript

Classical.js - A Base Class Library for TypeScript | JavaScript for Line of Business Applications | Scoop.it

The JavaScript APIs just don't make use of the great features of classical object-oriented programming. If TypeScript is going to produce frameworks and applications that go above and beyond, we need a set of tools that make use of the power of TypeScript, which includes techniques from OOP, functional programming, and APIs with public interfaces that provide static typing even if they use the awesome dynamic flexibility of JavaScript behind the scenes.

Our goal with Classical is to provide a base class library for TypeScript that is browser agnostic, and provides you with the tools you need to truly use JavaScript for application scale development.

more...
No comment yet.
Scoop.it!

From ActionScript3 to TypeScript

From ActionScript3 to TypeScript | JavaScript for Line of Business Applications | Scoop.it

If you’ve got existing ActionScript assets but want to migrate them to another language, what do you do? One possibility is to convert AS3 to TypeScript. They share similar language features, but are different enough that the process isn’t trivial.

more...
No comment yet.
Scoop.it!

Integrating JavaScript with TypeScript (and Backbone and Knockout)

Integrating JavaScript with TypeScript (and Backbone and Knockout) | JavaScript for Line of Business Applications | Scoop.it
Peter looks at how to call a JavaScript function from your TypeScript code and do it in a type-safe way. Along the way, he dramatically simplifies a Backbone application by integrating Knockout.
more...
No comment yet.
Scoop.it!

Creating a Master/Detail Page with Backbone and TypeScript

Creating a Master/Detail Page with Backbone and TypeScript | JavaScript for Line of Business Applications | Scoop.it

In this column, I'm going to go beyond creating a basic Backbone application with TypeScript that retrieves data and show how to create a master/detail page where the user selects a single entry which triggers a display of related data that includes multiple rows. In this application, after the user selects a customer from a dropdown list, the top of my page will display that single customer while the bottom of the page will display all of the sales orders for that customer.

more...
No comment yet.
Scoop.it!

Responding to Events with TypeScript and Backbone

Responding to Events with TypeScript and Backbone | JavaScript for Line of Business Applications | Scoop.it

In this column, I'll show how to respond to a user selecting a customer from the dropdown list and display the related customer data. When I display that data, I'll also move the page to a new state that the browser will treat as if it were a different page.

more...
No comment yet.
Scoop.it!

Managing Your Page States with Backbone Routers

Managing Your Page States with Backbone Routers | JavaScript for Line of Business Applications | Scoop.it

In my last few columns, I've looked at building a Backbone application with TypeScript and shown how to create a client-side Backbone Model that corresponds to a Customer object on my server (which, in turn, is created from data managed by Entity Framework). To bridge the gap from my server to the client, I use a Web API Web Service that returns several Customer objects when synced with the Backbone Collection that manages my Customer Models. I pass that Backbone Collection of Customers to two Backbone Views that work together to generate an HTML dropdown list

more...
No comment yet.
Scoop.it!

AngularJS + TypeScript: how to implement validation

AngularJS + TypeScript: how to implement validation | JavaScript for Line of Business Applications | Scoop.it

AngularJs supports all kinds of simple client-side validation. The simplest is data-ng-required which basically says a UI element must be filled in before the form is valid. I am going to make the the phone input screen have validation.

Jan Hesse's insight:

AngularJS + TypeScript – using $resource to talk to a WebApi backend:

http://dotnetbyexample.blogspot.de/2014/07/angularjs-typescript-using-resource-to.html

AngularJS + TypeScript – how to setup a watch (and 2 ways to do it wrong):

http://dotnetbyexample.blogspot.de/2014/07/angularjs-typescript-how-to-setup-watch.html

Angularjs + TypeScript – setting up a basic application with Visual Studio 2013:

http://dotnetbyexample.blogspot.de/2014/07/angularjs-typescript-setting-up-basic.html

more...
No comment yet.
Scoop.it!

TypeScript - An Introduction

TypeScript - An Introduction | JavaScript for Line of Business Applications | Scoop.it

TypeScript might not be as popular as CoffeeScript, but it seems to be catching on with a highly productive niche of developers that are building interesting open source projects. TypeScript is very much of the new school of Microsoft developers: it embraces Node, open standards, open source, while building on interesting influences from Microsoft Research and .NET.

If you’re excited by technologies like C# 5.0’s asynchronous support and ReactiveUI, then TypeScript will help you to be more productive with JavaScript. There’s even Visual Studio support! If you’re from a JavaScript client-side or server-side background, however, then it might be harder to appreciate why TypeScript is interesting.

The first thing to consider is that TypeScript adopts ideas from ECMAScript 6, while compiling down to ES3. This includes features like classes, modules, and a succinct lambda syntax:

more...
No comment yet.
Scoop.it!

Using AngularJS and TypeScript to Build Single Page Applications (SPA)

Using AngularJS and TypeScript to Build Single Page Applications (SPA) | JavaScript for Line of Business Applications | Scoop.it

This article shows how to build Single Page Applications (SPA) using AngularJS and TypeScript and aims at providing a good understanding on implementing Angular components using TypeScript. You will create a sample video based training application which consumes its data using ASP.NET Web API

more...
No comment yet.
Scoop.it!

Hubs.tt will save your life by generating TypeScript out of your SignalR Hubs

Hubs.tt will save your life by generating TypeScript out of your SignalR Hubs | JavaScript for Line of Business Applications | Scoop.it

Recently I started playing with SignalR using TypeScript, one of the things that very quickly made it's way into my project is the Hubs.tt T4 template file

Hubs.tt is a "T4 template that creates Typescript type definitions for all your Signalr hubs. If you have C# interface named "I<hubName>Client", a TS interface will be generated for the hub's client too. If you turn on XML documentation in your build, XMLDoc comments will be picked up. 

more...
No comment yet.
Scoop.it!

TypeScript: To Be or Not To Be

TypeScript: To Be or Not To Be | JavaScript for Line of Business Applications | Scoop.it

Let me start by saying that Microsoft wins the overall dev productivity competition hands down. Visual Studio is an absolutely top-notch, amazing IDE, and there really is nothing that can compete with it in the overall category. On top of that, Microsoft has produced some top shelf Web dev tooling over the years. There really is no doubt about that, but there is always room for improvement.

The Web, in particular, presents a very challenging, wild-west environment for tooling. The technologies in themselves don’t lend themselves well to that, and there are all sorts of hacks and workarounds to address the problem, including some produced by Microsoft. To be a guru in Web dev requires mastery of so many different moving pieces and nuances, multiple, not-very-well-defined languages, innumerable libraries and frameworks, and a vast number of potential runtime environments. It’s a hard egg to crack when it comes to productivity tools, not to mention just general dev productivity, defined as time spent actively producing value-adding software assets.

more...
No comment yet.
Scoop.it!

Kendo Typescript: DropDownList control with MVVM

Kendo Typescript: DropDownList control with MVVM | JavaScript for Line of Business Applications | Scoop.it

This article give a example of use of it with the WEB drop-down list  from Telerik Kendo. The example made use of typescript to programming the Kendo drop-down list and it uses kendo MVVM to operate the control and a WEB API to get the information from a remote source.

more...
No comment yet.