JavaScript for Line of Business Applications
596.1K views | +0 today
Follow
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: 'PhantomJS'. Clear
Scoop.it!

Automating JavaScript tests with QUnit, PhantomJS and Grunt

Automating JavaScript tests with QUnit, PhantomJS and Grunt | JavaScript for Line of Business Applications | Scoop.it
QUnit’s setup is fairly simple and is easy to use. To get started, I will be using a simple boilerplate webpage. Notice that the two files required for QUnit (qunit-x.js and qunit-x.css) are included in the page source. Additionally, I have some inline JavaScript for which QUnit tests will be written. home.html Within tests.js, I …
No comment yet.
Scoop.it!

Single Page Application Done Right

Single Page Application Done Right | JavaScript for Line of Business Applications | Scoop.it

Not too long ago, FTBpro.com moved its website from classic web architecture (CWA) to a single-page application (SPA). For those who are less familiar with SPA, the major differences between the two are as follows...

To put it in simpler words – while in CWA the client gets a full HTML page on each request, in SPA the client gets all needed to be able to render the HTML by itself on the first page load so that subsequent requests might be carried in a very fluent and rich manner. It makes your website more of an application and less of a si

No comment yet.
Scoop.it!

Automated JavaScript Tests Using Grunt, Phantomjs, and QUnit

Many developers and development shops have embraced testing in their server side code – either using a TDD model, or sometimes just with unit or functional tests created on the fly – but very few developers I talk to test their front end code beyond eyeballing it in a few browsers (or if they’re lucky, with a service like BrowserStack). And even fewer of those use any kind of automation. In this post I’m going to try and help out that majority of you who aren’t testing – or maybe just aren’t automating.

Lately I’ve been converting a number of my jQuery plugins over to Github – something the new jQuery plugin site is requiring – and while doing so I’m refactoring and adding tests with QUnit(created by the same folks that write the jQuery core). I realized pretty quickly that having to go to the browser, hard refresh, and then run the tests again after every change was a time killer, but I didn’t want to write a whole bunch of tests and then go check the results, otherwise I could be tracking down bugs (in my code and the tests) for days. Instead I set up some automated testing using Grunt, PhantomJS, and a couple Grunt plugins. Here’s how.

No comment yet.
Scoop.it!

Using PhantomJS at scale

Using PhantomJS at scale | JavaScript for Line of Business Applications | Scoop.it

About a year ago SmugMug had a dilemma. Our upcoming site-wide redesign and refactor  (aka the new SmugMug) moved all of our rendering code into client-side JavaScript using YUI. We had a problem; SEO is critical for our customers and search engines couldn’t index the new site.

Possible solutions were thrown around: do we duplicate our code in PHP? Use an artificial DOM? What about PhantomJS? Duplicating code would be a monumental effort and a continued burden when writing new features. Initial tests of fake/artificial DOMs proved unreliable. A small prototype Node.js web server that hooked into PhantomJS proved promising. Node.js’ async model would be perfect for handling things that wait for I/O like rendering webpages. We came up with the project name ‘The Phantom Renderer’ soon after.

No comment yet.
Scoop.it!

pjscrape: A web-scraping framework written in Javascript, using PhantomJS and jQuery

pjscrape: A web-scraping framework written in Javascript, using PhantomJS and jQuery | JavaScript for Line of Business Applications | Scoop.it

pjscrape is a framework for anyone who's ever wanted a command-line tool for web scraping using Javascript and jQuery. Built to run with PhantomJS, it allows you to scrape pages in a fully rendered, Javascript-enabled context from the command line, no browser required.

Features:
* Client-side, Javascript-based scraping environment with full access to jQuery functions
* Easy, flexible syntax for setting up one or more scrapers
* Recursive/crawl scraping
* Delay scrape until a "ready" condition occurs
* Load your own scripts on the page before scraping
* Modular architecture for logging and writing/formatting scraped items
* Client-side utilities for common tasks
* Growing set of unit tests


No comment yet.
Scoop.it!

Buster.JS - A Browser and NodeJS JavaScript testing toolkit.

Buster.JS - A Browser and NodeJS JavaScript testing toolkit. | JavaScript for Line of Business Applications | Scoop.it

Buster.JS is a JavaScript test framework for node and browsers.

It does browser testing with browser automation (think JsTestDriver), QUnit style static HTML page testing, testing in headless browsers (PhantomJS, jsdom), and more. Write your test case with Buster.JS and run it both in Node.js and in a real browser.

There’s a public API for almost everything. You can write reporters for customizing the output of buster test (we already have xUnit XML, traditional dots, specification, tap, TeamCity and more), write extensions that wrap other testing frameworks (we already have buster-jstestdriver), add your own testing syntax (we ship with xUnit and BDD), and much more. Again, the overview lists many of these things.


No comment yet.
Scoop.it!

Using PhantomJS WebServer

Using PhantomJS WebServer | JavaScript for Line of Business Applications | Scoop.it

The PhantomJS WebServer module lets you create self contained web applications that are easy to deploy to heroku using the PhantomJS build pack.

With phantomjs, you’re not limited to sending plain text back to the client - you can render images of the webpage and send that back (either by reading the file back with the File System Module, or using base 64 to send back an embeddable data-uri).

No comment yet.
Scoop.it!

Performance testing with PhantomJS

Performance testing with PhantomJS | JavaScript for Line of Business Applications | Scoop.it

Couple days ago I tried to parse something from one web site. But, guess what, it’s written with bunch of java scripts and tools like wget or curl which I usually use for this not worked at all. That is because those tools will just grab non-processed html. Then I found out PhantomJS. Really powerful tool, actually it’s headless web browser which you can use in shell. Even better you can run it on EC2 instance or any other Linux machine. I thought, if this tool can load whole web page like a real web browser, why not to use it for performance testing. There are a lot of tools for this purpose, but on newer webpages which are full of pictures and java scripts those are really useless. Let’t get started with simple setup on Linux machine:...

No comment yet.
Scoop.it!

A Journey Through Client-Side Testing with JavaScript

A Journey Through Client-Side Testing with JavaScript | JavaScript for Line of Business Applications | Scoop.it

Having tests is important. They allow us to extend and refactor our code with ease. Many developers follow test driven development as a workflow. I believe that writing tests makes software development much more interesting and generally leads to better code. Well-designed and tested systems are easier to maintain.

No comment yet.
Scoop.it!

How To Build A CLI Tool With Node.js And PhantomJS

How To Build A CLI Tool With Node.js And PhantomJS | JavaScript for Line of Business Applications | Scoop.it

In this article, we’ll go over the concepts and techniques required to build a command line tool using Node.js andPhantomJS. Building a command line tool enables you to automate a process that would otherwise take a lot longer.

Command line tools are built in a myriad of languages, but the one we’ll focus on is Node.js.

WHAT WE’LL COVER:
* Secret sauce
* Installing Node.js and npm
* Process
* Automation
* PhantomJS
* Squirrel
* How it works
* The code
* Packaging
* Publishing
* Conclusion

No comment yet.
Scoop.it!

Boilerplate web app using Backbone.js, ExpressJS, node.js, MongoDB

Boilerplate web app using Backbone.js, ExpressJS, node.js, MongoDB | JavaScript for Line of Business Applications | Scoop.it

A boilerplate project for a complete web application written using Backbone.js & Marionette, node.js & ExpressJS, MongoDB & Mongoose, Handlebars, Grunt.js, Bower, and Browserify!

I created a super basic single page application (SPA) that is a simple Contacts manager. While this app is pretty simple, there’s actually a lot that’s involved. My goal with this article is to cover the entire stack of the application including; back-end, data, front-end, tools and testing. The stack consists of the following core technologies:

* Back-end: node.js and ExpressJS
* Data Layer: MongoDB and Mongoose
* Tools: Grunt, Bower and Browserify
* Testing: Jasmine, Karma, and PhantomJS
* Front-end: Backbone.js and Marionette.js

 

I’ll go into detail on each of the above components comprising the “full” stack. Again, because its such a simple app, not a whole lot of time will be spent covering the bells and whistles of the user interface or how the app works because that’s fairly obvious (nor did I spend a whole lot of time on the actual implementation, as I didn’t want it to distract from the core of the app). Instead, I’ll go into detail covering every aspect of how the app was built and the workflow process using the various tools.

The end goal is to have a code base to act as a boilerplate starter for any new projects down the road. The code should be fully functional and complete, yet easily digestible. Ultimately, after you read this article and have a solid understand of everything under the hood, you should be able to simply clone the repo and start building your app!

No comment yet.
Scoop.it!

End to End Testing with CasperJS

End to End Testing with CasperJS | JavaScript for Line of Business Applications | Scoop.it

This pro tip will guide you through the steps of implementing an end to end test using CasperJS. Although there's no code specific to Backbone in this tutorial, I do make assumptions on how an app will operate within the context of a Backbone app. This tutorial is therefore suitable for anyone who would like a 0 - 20 getting started guide to CasperJS.

CasperJS has its own handy test runner. Let's begin by writing a quick little script to get used to the boilerplate.

No comment yet.
Scoop.it!

TrifleJS - Automated Browser Testing with IE based on PhantomJS

TrifleJS - Automated Browser Testing with IE based on PhantomJS | JavaScript for Line of Business Applications | Scoop.it

A headless Internet Explorer browser using the .NET WebBrowser Class with a Javascript API running on the V8 JavaScript engine.

The API is coded as a port of PhantomJS. Basically, if you have used phantom before then you already know how to use TrifleJS.

Emil Mądry's curator insight, November 10, 2013 7:38 AM

Most of more demanding users uses browsers other than IE, but in most of the corporations IE even outdated 6 & 7 are still in use so even if our page looks great on webkit it doesn't mean it's bugfree on IE. (well, you can bet, that something will look not that good as you wish for).

Here's article to help testers and developers in struggle against IE

Scoop.it!

Incredibly convenient testing of front-end Javascript with Node.js

Incredibly convenient testing of front-end Javascript with Node.js | JavaScript for Line of Business Applications | Scoop.it

You do have automated testing for your front-end Javascript application / library / framework don’t you? And tests work equally well at console, browsers and Travis aren’t they? And you run them in every possible browser on each release (or even push) right? If the answer is no, you might be doing it wrong. Let’s see if we can do something about it!

This article briefly describes a little piece of theory behind testing of standalone front-end projects, issues that you are likely to meet and the solution I came up with.

When it comes to testing, the first question is — which framework are we going to use? There are numerous articles on the Internet that describe pros and cons of those.

I personally prefer Jasmine and Mocha (coupled with CoffeeScript and Chai they feel so much like RSpec). But it’s only a matter of taste in fact. Their capabilities are more or less equal.

Let’s say we have a framework. Then we can manually create HTML file, include JS we want to test, open it in a browser and, well, test. It’s certainly a kind of automatic testing already but still so far away from something reasonable. And the first thing to think about is Continuous Integration. You can only run such tests manually and see the results with your eyes. No “on-commit runs”, no Travis integration. Sadness.


No comment yet.
Scoop.it!

Testing Javascript with QUnit, PhantomJS and JSCover

Testing Javascript with QUnit, PhantomJS and JSCover | JavaScript for Line of Business Applications | Scoop.it

Javascript is often the part of an application that's most difficult to test. There are several pieces that fit together to give a framework for running the tests in an automated build system.

No comment yet.
Scoop.it!

Easily index your Single Page Application thanks to PhantomJS

Easily index your Single Page Application thanks to PhantomJS | JavaScript for Line of Business Applications | Scoop.it

Google provides a way to index your Single Page Application (SPA), built with Angular.js, Backbone.js, or other Javascript framework (ember.js, knockout.js, and others). In this article, we will first see together how it proceeds, the amount of work that the webmaster has to do, and then we will come up with an automatic solution.

All along this article, I will introduce tools and examples of this website, vickev.com (which is built with Angular.js and Node.js), to prove the relevance of the method.

No comment yet.