JavaScript for Line of Business Applications
596.1K views | +0 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...

Popular Tags - Filter using the Funnel

Current selected tag: 'asp.net'. Clear
Scoop.it!

Conventional HTML in ASP.NET MVC: Client-side templates

Conventional HTML in ASP.NET MVC: Client-side templates | JavaScript for Line of Business Applications | Scoop.it

In our last post, we brought everything together to build composable blocks of tags driven off of metadata. We did this to make sure that when a concept exists in our application, it’s only defined once and the rest of our system builds off of this concept. This reduces logic duplication across several layers, ensuring that we don’t have to “remember” to do repetitive tasks, like a required field needing an asterisk and data attributes.

All of this works great because we’ve got all the information at our disposal on the server-side, and we can push the completed product down to the client (browser). But what if we’re building a SPA, using Angular or Knockout or Ember or Backbone? Do we have to revert back to our old ways of duplication? Or can we have the best of both worlds?

There tend to be three general approaches:

  • Just hard code it and accept the duplication
  • Include metadata in your JSON API calls, through hypermedia or other means
  • Build intelligence into templates

I’ve done all three, and each have their benefits and drawbacks. Most teams I talk to go with #1, and some go with #2. Very few teams I meet even think about #3.

No comment yet.
Scoop.it!

Getting started with AngularJS and ASP.NET MVC

Getting started with AngularJS and ASP.NET MVC | JavaScript for Line of Business Applications | Scoop.it

Welcome to Part One of a series of articles regarding AngularJS and ASP.NET MVC, and utilizing and getting the most out of both


Client side MV* frameworks are all the rage at the moment, and my favourite by far is AngularJS. This article will show you how to hit the ground running with AngularJS while using my favourite server side MVC framework, ASP.NET MVC (5).

Jan Hesse's insight:

Part2: http://www.codeproject.com/Articles/806500/Getting-started-with-AngularJS-and-ASP-NET-MVC-P

No comment yet.
Scoop.it!

An introduction to JavaScript Unit Testing with qUnit and Sinon.js

An introduction to JavaScript Unit Testing with qUnit and Sinon.js | JavaScript for Line of Business Applications | Scoop.it

If you are developing for the web – apps or websites, then it is almost impossible to escape JavaScript. At some point, you will write some client-side code and as the application grows and the requirements become more complex, your JavaScript code is bound to grow with it. Like with every other complex piece of code, we need to be confident that the code behaves as expected. It doesn’t matter if you decide to use TDD or not, what’s important is to test your code. You can do this manually, very tedious and error prone, or programmatically. The choice is yours!

JavaScript is a different beast on its own, especially if you, like me, are used to doing server-side programming and testing. So how does one start with client-side unit tests?

No comment yet.
Scoop.it!

Angular JavaScript Jumpstart for ASP.NET MVC

Angular JavaScript Jumpstart for ASP.NET MVC | JavaScript for Line of Business Applications | Scoop.it

Rich-clients are back. But the new rich-client is the browser. No more plug-ins or ActiveX objects in sight. Instead you’ll find new, more powerful JavaScript libraries enabling you to more easily build large-scale applications directly in the browser. You’ll still need to be able to work with the disconnected nature of websites, but you no longer need to worry about a page-based model.

One of these libraries is AngularJS from Google. In this article, I hope to get you started by showing you how it works and hopefully why you should be using it.

No comment yet.
Scoop.it!

AngularJS Token Authentication using ASP.NET Web API 2, Owin, and Identity

AngularJS Token Authentication using ASP.NET Web API 2, Owin, and Identity | JavaScript for Line of Business Applications | Scoop.it

This is the second part of AngularJS Token Authentication using  ASP.NET Web API 2 and Owin middleware.

In this post we’ll build sample SPA using AngularJS, this application will allow the users to do the following:

  • Register in our system by providing username and password.
  • Secure certain views from viewing by authenticated users (Anonymous users).
  • Allow registered users to log-in and keep them logged in for 24 hours or until they log-out from the system, this should be done using tokens.
No comment yet.
Scoop.it!

AngularJS, Protractor, Visual Studio! SUPER DRY!!

AngularJS, Protractor, Visual Studio! SUPER DRY!! | JavaScript for Line of Business Applications | Scoop.it

I AM A .NET Developer. Visual Studio is the trench that I dig every day. AngularJS is the primary weapon that I use in the frontend. I want to have Protractor as my first aid kit which doesn’t play nicely without Node.js. But it’s all right, I can tame it!

Update: you might be interested in this sample project to dig in quickly. It contains a tiny AngularJS app and a few test cases.

No comment yet.
Scoop.it!

AngularJS & Kendo UI using Angular Kendo with ASP.NET MVC 5, Web API & OData

AngularJS & Kendo UI using Angular Kendo with ASP.NET MVC 5, Web API & OData | JavaScript for Line of Business Applications | Scoop.it

With AngularJS and ASP.NET MVC, we now have an MVC pattern and architecture for both on the client and server. What do we do and/or how do we approach this? Well one can argue we don’t use any of the MVC architecture on the server and build out a full-fledged AngularJS front-end application and only use make async calls to Web API for all things that absolutely need to be on the server e.g. CRUD, workflows, business logic, etc.

Now, there’s absolutely nothing wrong with this approach, and for the most part a lot of heavy front end SPA’s are built this way in ASP.NET MVC. However, with all the .NET, ASP.NET and AngularJS goodness, why not leverage the best of both worlds? Again, there’s absolutely nothing wrong with building a pure AngularJS application and only using Web API, but for this blog post we’ll go over patterns of using the best of both worlds along with integrating AngularJS with Kendo UI.

No comment yet.
Scoop.it!

Creating your first Angular program with Visual Studio | Tutorial series

Creating your first Angular program with Visual Studio | Tutorial series | JavaScript for Line of Business Applications | Scoop.it

Angular is hot. And with good reason. Angular is a complete framework for building client-side JavaScript applications and includes the features you look for in a framework, such as:

* Two way data binding
* Model-View-Whatever
* Testability
* Dependency Injection
* Templates
* Routing
* View Composition
* Animation
* Patterns and a robust eco-system
* Promises
* Extensibility
In this first in a series of Angular posts, I’ll review creating a simple Angular application that shows off some of Angular’s features without writing any JavaScript at all.

Jan Hesse's insight:

Part 2–Behavior Driven Development:
http://blog.falafel.com/blogs/jesseliberty/jesse-liberty/2014/04/01/angular-part-2-behavior-driven-development


Part 3–BDD With AngularJS:
http://blog.falafel.com/blogs/jesseliberty/jesse-liberty/2014/04/11/angular-part-3-bdd-with-angularjs


Part 4–Testing AngularJS:
http://blog.falafel.com/blogs/jesseliberty/jesse-liberty/2014/04/20/angular-part-4-testing-angularjs

No comment yet.
Scoop.it!

How to send live data from a C# Desktop Application to Web using Websockets

How to send live data from a C# Desktop Application to Web using Websockets | JavaScript for Line of Business Applications | Scoop.it

This is a step-by-step guide about how to expose live data from a C# console application to a web browser using WebSockets. The example has been implemented and tested on Windows7.

No comment yet.
Scoop.it!

Posting Data & AngularJS Custom Directives in an ASP.NET MVC application

Posting Data & AngularJS Custom Directives in an ASP.NET MVC application | JavaScript for Line of Business Applications | Scoop.it

In this article, we will explore how to use AngularJS to Post Data and use AngularJS Custom Directives in an ASP.NET MVC application.

So to post data, we need to simply call the save function on our resource instance. However there is a slight gotcha. The $resource object expects all the functions to post to the same URL. In MVC terms, this means posting to the same action method with different HttpGet/HttpPost/HttpPut etc attributes.

In our code, currently the HomeController uses GetTweets method to get the Data. Now Posting to a URL called GetTweets is semantically icky. So let’s update the Controller method to be called justTweetSo we will do GET, POST, PUT etc. requests to the url /Home/Tweet.

No comment yet.
Scoop.it!

Getting Started with Backbone.js and Rendering a Collection using View

Getting Started with Backbone.js and Rendering a Collection using View | JavaScript for Line of Business Applications | Scoop.it

In the current era of web application development, Single Page Applications (SPAs) are often demanded by customers. Currently there are lots of different frameworks available for developing web applications, most of these are server side frameworks e.g. ASP.NET MVC. But one of the important aspects for Web development is to provide a Rich user interface with UX (user experience). Thankfully there are several JavaScript client side frameworks available to get this thing done e.g. jQuery, Knockout, Backbone etc. Using these frameworks, a developer can develop Rich and better UX applications.

No comment yet.
Scoop.it!

Setting Up GitHub to work with Visual Studio 2013 Step-by-Step

Setting Up GitHub to work with Visual Studio 2013 Step-by-Step | JavaScript for Line of Business Applications | Scoop.it
This post will show you how to setup Visual Studio 2013 to work with Github
No comment yet.
Scoop.it!

Consuming ASP.NET Web API OData Batch Update From JavaScript

Consuming ASP.NET Web API OData Batch Update From JavaScript | JavaScript for Line of Business Applications | Scoop.it

Consuming OData with plain JavaScript is a bit painful, as we would require handling some of the low-level conversions. datajs is a JavaScript library that simplifies this task.

datajs converts data of any format that it receives from the server to an easily readable format. The batch request sent is a POST request to the path /odata/$batch, which is made available if batch update option is enabled in the OData route configuration.

As seen in the last post, a batch update request bundles of a number of create put and patch requests. These operations have to be specified in an object literal. Following snippet demonstrates it with a create, an update and a patch request...

No comment yet.
Scoop.it!

A smart way to fit SignalR with AngularJS

A smart way to fit SignalR with AngularJS | JavaScript for Line of Business Applications | Scoop.it
Fine, I hope you all you have more or less knowledge of both and you want to see how they fit together side by side?  
Ok, then you are in right place. We will implement SinglaR hub and then we will implement client hub factory using AngularJS and then we will consume server hub from controller. So, in nutshell, we will take help of AngularJS to create SignalR proxy and to call hub method using the proxy.
No comment yet.
Scoop.it!

A Stroll Through Node: Building a Recipe Website with Express

A Stroll Through Node: Building a Recipe Website with Express | JavaScript for Line of Business Applications | Scoop.it

Ever wanted to a create real website but don’t know anything about back-end programming? Are you still writing websites with raw HTML files? Try this guide out which uses the Express Web (3.x) framework, Jade HTML templates and Twitter-Bootstrap to make a Simple (and delicious) recipes website.

Note: This walkthrough uses Node tools for Visual Studio.

No comment yet.
Scoop.it!

ASP.NET Boilerplate

ASP.NET Boilerplate | JavaScript for Line of Business Applications | Scoop.it

ASP.NET Boilerplate is a starting point for new modern web applications using best practices and most popular tools. It's aimed to be a solid model, a general-purpose application framework and a project template.

 includes most used framework and libraries by default. Also allows you to choice Single-Page (Angularjs or Durandaljs) or Multi-Page architecture, EntityFramework or NHibernate as ORM.

implements NLayer architecture(Domain, Application, Infrastructure and Presentation Layers) and Domain Driven Design (Entities, Repositories, Domain/Application Services, DTO's...). Also implements and provides a good infrastructure to implement best practices such as Dependency Injection.

Jan Hesse's insight:

http://www.codeproject.com/Articles/768664/Introduction-to-ASP-NET-Boilerplate

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

No comment yet.
Scoop.it!

Defining AngularJS Routing in an ASP.NET MVC application

Defining AngularJS Routing in an ASP.NET MVC application | JavaScript for Line of Business Applications | Scoop.it

In this article, we will explore Routing in AngularJS as well as how to make Angular Directives self-contained.

If you are familiar with MVC routing, you are wondering, err… routing is a server side thing, how does it matter to a client side framework. Well you are not alone, even I had the same thoughts when I heard of Routing in JS frameworks. But as you will see, routing is real and it works rather nicely on Angular JS.

So far the application consists of one view with a single ng-controller. As a next step, we would like to implement a details view of the Tweet that will show us more information and if there are any embedded images, show the image as well.


We built a Twitter reader over the course of the article, highlighting how well AngularJS was suited to interact with HTTP APIs. Combined with its routing capabilities, AngularJS provides a nice platform for the category of web applications that is now termed as SPAs or Single Page Applications.

No comment yet.
Scoop.it!

Script Node.js from .NET using Edge.js

Script Node.js from .NET using Edge.js | JavaScript for Line of Business Applications | Scoop.it

The Edge.js project existed for a while, but until now it only allowed scripting CLR code from a Node.js process on Windows, MacOS, and Linux. With the latest release, you can also script Node.js code from a CLR process.

You can call .NET functions from Node.js and Node.js functions from .NET. Edge.js takes care of marshalling data between CLR and V8. Edge.js also reconciles threading models of single threaded V8 and multi-threaded CLR, and ensures correct lifetime of objects on V8 and CLR heaps.

The most powerful aspect of the Node.js scripting capability that Edge.js just enabled is that you can tap onto the many thousands of Node.js modules available both in the Node.js runtime as well as on NPM. For example, you can now create a websocket server in Node.js with a message handler in C#, all running within a single CLR process.

No comment yet.
Scoop.it!

React integration for ASP.NET MVC - ReactJS.NET

React integration for ASP.NET MVC - ReactJS.NET | JavaScript for Line of Business Applications | Scoop.it

ReactJS.NET makes it easier to use Facebook's React and JSX from C# and other .NET languages, focusing specifically on ASP.NET MVC (although it also works in other environments). It assumes you already have some basic knowledge about React. It is cross-platform and can run on Linux via Mono.

Pre-render the initial state of your React components server-side to make the initial load feel faster.

No comment yet.
Scoop.it!

Building a Single Page Application with ASP.NET and AngularJS

Building a Single Page Application with ASP.NET and AngularJS | JavaScript for Line of Business Applications | Scoop.it

We’ll see how to power an AngularJS Single Page Application using both ASP.NET Web API and SignalR for back-end data services. You’ll learn how to get started building web applications with AngularJS, how to leverage HTML5 features like local storage and pushState, providing efficient server resources via HTTP and web sockets (sing SignalR), important routing configuration concerns, testing and deployment.

No comment yet.
Scoop.it!

Integrating Node.js with a C# DLL

Integrating Node.js with a C# DLL | JavaScript for Line of Business Applications | Scoop.it

Recently I had to integrate a Node.js based server application with a C# DLL. Our software (a web-app) offers the possibility to execute payments over a POS terminal. This latter one is controllable through a dedicated DLL which exposes interfaces like ExecutePayment(operation, amount) and so on. As I mentioned, there is the Node.js server that somehow exposes the functionality of the POS (and some more) as a REST api. (The choice for using Node.js had specific reasons which I wouldn't want to outline right now).

When you start with such an undertaking, then there are different possibilities. One is to use Edge.js which allows you to embed, reference and invoke .Net CLR objects from within your Node.js based applications.

No comment yet.
Scoop.it!

Handling DOM events in Backbone.js and working with Collections

Handling DOM events in Backbone.js and working with Collections | JavaScript for Line of Business Applications | Scoop.it
The Backbone.js library allows you to develop responsive web applications with clear separation of Model and View. DOM Events associated with Collection helps to notify the UI elements about Updates and accordingly to display refreshed data

In Backbone, the View (UI) is generally rendered using HTML Templates, and elements declared in this Template are accessible to View, but it might be possible that the HTML page (or MVC view or .aspx) already contains HTML elements and you need to handle the DOM events for these elements. The question then is how to handle them? In the following implementation, we will see that the ‘click’ event for the html button element is handled inside the View object. The method which gets executed for the click event is used to add the model object into the collection and then the collection is rendered using HTML Table.

No comment yet.
Scoop.it!

Single Page Application performing database CRUD operations using Backbone and ASP.NET WebAPI

Single Page Application performing database CRUD operations using Backbone and ASP.NET WebAPI | JavaScript for Line of Business Applications | Scoop.it

This tutorial is about creating a Single Page Application using Backbone and performing database CRUD (Create, Read, Update and Delete) operations using ASP.NET Web API as a RESTful service.

Contents list of this article:

  1. Short description of Single Page Application.
  2. Short description of Backbone.
  3. Short description of ASP.NET Web API.
  4. Sample Single Page Application using Backbone and Web API.
No comment yet.
Scoop.it!

Creating Single Page Application using Hot Towel Template

Creating Single Page Application using Hot Towel Template | JavaScript for Line of Business Applications | Scoop.it

Single-Page Applications (SPAs) are Rich, Responsive Web apps that load a single HTML page and dynamically update that page as the user interacts with the app.

This code sample gives the demo application for creating Single Page Application using Hot Towel SPA Template (Knockout, Durandal, Breeze).

This application will be useful for understanding the basics of Single Page Application in some extend. If you follow and create the application your own, it will give great experience on SPA. 


This code sample describes step by step creation of My Contact project using MVC 4 - Hot Towel Single Page Application Template.

I am explaining the step by step creation of My Contact project using MVC 4 Hot Towel SPA and I have written inline comment in the source code for better understanding the code. In this web page I am concentrating on steps for creating this application. 

No comment yet.