JavaScript for Li...
Follow
Find tag "TypeScript"
331.1K views | +386 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!

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!

Exploring TypeScript: TODO MVC Sample

This entry continues exploring TypeScript by examining the code from one of the samples.  Today, I’ll look at the TypeScript version of the MVC TODO sample. This sample is a TypeScript version of an MVC / JavaScript sample.

The samples are now getting longer, and have more features in them. I’ve also posted some samples and explained some of the basic syntax. From here on out, I’m only going to extract small bits of the code, and explain the features that I haven’t yet explained. As always, the samples are online both as a working example and as code.

This sample has a simple TODOD checked list.  You can see it running here. You can add new tasks. and mark any of those tasks as complete.

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

Angular with typescript architecture

Angular with typescript architecture | JavaScript for Line of Business Applications | Scoop.it

In general, I was really unhappy with a lot of the AngularJS examples I had found on the internet when researching how to structure the application, since they all looked flimsy and poorly constructed. While the examples found online were easy to read and follow, they clearly wouldn’t work with an actual large application.

I had several goals:
* I didn’t want to have to constantly register directives/filters/controllers/etc with Angular everytime I added something
* I didn’t want to have to update my main index.html page with any references to new files as I worked on them
* I wanted to avoid string typing as much as possible by centralizing all string references to angular components
* I wanted everything testable
* I didn’t want to inline directive html templates, I wanted them in in separate html components
* I wanted one file for each class
* I wanted everything strongly typed

Anything less than these requirements, I felt, would compromise maintainability and extensibility for the future, especially if the app had more than one developer working on it.

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

AngularJS with TypeScript and Windows Azure Mobile Services

AngularJS with TypeScript and Windows Azure Mobile Services | JavaScript for Line of Business Applications | Scoop.it
In the coming two weeks I will do a series of talks at various conferences in Austria and Germany. I will speak about AngularJS, TypeScript, and Windows Azure Mobile Services. In this blog post I publish the slides and the sample code.

 

Sample 1: The Basics
Sample 2: TypeScript Modules vs. AngularJS Modules
Sample 3: AngularJS Scopes
Sample 4: Dependency Injection
Sample 5: Accessing Backend Services
Accessing Azure Table Storage with AngularJS and TypeScript
Unit Test with HTTP Mocking
HTML View + TypeScript Controller

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

AngularJS + TypeScript : Controllers, Best Practice

Guidance around how you can write your Controllers when using AngularJS with TypeScript. 

--Things covered-- 
Dependency Injection 0:42 with minification 1:18
Using Class Members instead of Scope properties has following advantages: 
-Advantage: Class members : 3:50
-Advantage: Designer/Developer interaction contract 4:30 
-Advantage: Overcomming Scope inheritance 5:34
Summary 7:55

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.
Scoop.it!

Managing Client-Side Objects Using TypeScript: It's a Breeze

Managing Client-Side Objects Using TypeScript: It's a Breeze | JavaScript for Line of Business Applications | Scoop.it
Once you've delivered server-side objects to your client, you're going to need to manage them. Here's how to integrate a powerful client-side (and server-side) object manager into your application using TypeScript.
more...
No comment yet.
Scoop.it!

Client Side Web Application primer

Client Side Web Application primer | JavaScript for Line of Business Applications | Scoop.it

I plan to share my experiment with client side application and MVC backend. In this sample, as many other web site before I use many 3rd party libraries (hint: look at README / package list: EntityFramework (Extended), jQuery, Knockout, chosen, bootstrap,datatables). But I don’t plan to dwell much on them in this post. Instead I want to focus on how I use T4 Templates to generate strongly WebAPI server proxy in TypeScript and use Knockout to drive the UI. With a little bit extra on WebAPI and SQL.

This post is intended for web developer having basic to medium knowledge of MVC, Javascript, jQuery.ajax(), TypeScript. I am not going to explain the whole application but just the challenging parts and the solutions I implemented. For the rest there is the source code.

My sample application (largely inspired from work needs) is a 3 pages application. A first page manage dynamic questionnaire (with dynamic groups of dynamic questions), a second page can answer those questionnaires and a third can query them.

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

Visto JavaScript Library

Visto JavaScript Library integrates KnockoutJS, JQuery and RequireJS (and TypeScript) to provide the programming model known from .NET XAML and MVVM: It is possible to implement views with "code-behind" and bindings to view models, declaratively load subviews in HTML and navigate between pages - all in a single-page application. 

The main advantages of this library is that it allows to develop component-based and implement reusable views which are composed of predefined programming blocks (view, view model and HTML). These views can be reused as sub views, in dialogs or as page instances. The programming API and paradigm is very similar to the one found in Windows Phone XAML or Windows 8 Store Apps programming (MVVM pattern, view "code-behind", paging/navigation). 

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

JavaScript and Friends: CoffeeScript, Dart and TypeScript

JavaScript and Friends: CoffeeScript, Dart and TypeScript | JavaScript for Line of Business Applications | Scoop.it

This article assumes that the reader has a good knowledge of JavaScript and has done at least some development in it, but if this is not about you, you can just first refer to one of the beginner’s JavaScript books like Eloquent JavaScript.

JavaScript is an amazing, often underappreciated and misunderstood language. It has some really powerful concepts like functions as first-class citizens (see, for example, JavaScript: The World’s Most Misunderstood Programming Language), flexible prototypal inheritance and is a powerful generic programming language that can be used not only in browsers.

Despite all its power and flexibility the language has some well-known design shortcomings such as global variables, cumbersome emulation of lexical scoping, non-intuitive implicit conversions, etc. In fact, there are parts of the language that you better avoid using at all, as it is advised in JavaScript: The Good Parts. Let us also note that from the beginning JavaScript was not specifically designed for developing applications with large code bases and many developers involved.

Contents:
* Why JavaScript Isn’t Enough?
* Example JavaScript Program: Dijkstra’s Algorithm
* CoffeeScript
* TypeScript
* Dart
* Web Application Development
* ECMAScript 6
* Conclusions

more...
No comment yet.