Development on Various Platforms
12.8K views | +2 today
Follow
Development on Various Platforms
Your new post is loading...
Your new post is loading...
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Building Web Apps With Yeoman And Polymer: Scaffold your webapps with modern tooling

Building Web Apps With Yeoman And Polymer: Scaffold your webapps with modern tooling | Development on Various Platforms | Scoop.it

Tooling for scaffolding Polymer web apps

As I mentioned earlier, Polymer is a library of polyfills and sugar which enables the use of Web Components in modern browsers. The project allows developers to build apps using the platform of tomorrow and inform the W3C of places where in-flight specifications can be further improved.

generator-polymer is a new generator for Yeoman that helps you scaffold out Polymer apps using Yeoman, letting you easily create and customize Polymer (custom) elements via the command line, and import them using HTML Imports. This saves you time by writing the boilerplate code for you.


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Testable & Tested Client-side Code

Testable & Tested Client-side Code | Development on Various Platforms | Scoop.it

Testing (i.e. linting, unit tests, integration testing etc..) client-side code is not done as commonly as it should be. The reason it is so commonly not done, besides lack of know-how, is that it is presupposed that it will take time away from other more productive development tasks.

This fallacious notion is, of course, wrong. The repeatable successes in software engineering based on testable (i.e. modular, loosely coupled, small, simple units of code) and tested code has proven again and again to be a time-saver and part of creating maintainable and understandable code. At a minimum, if code is not unit tested it is only a matter of time before it is burnt down and re-written, or abandoned altogether because it becomes unmaintainable and incomprehensible.

In this article, I am going to defend and talk about testing client-side code. It is my intention that the information in this article will give those among us who do not test, the desire and some initial testing knowledge to test, along with the ability to defend its necessity from any agent that might deter testing.


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Turn that "Grunt" upside down!

Turn that "Grunt" upside down! | Development on Various Platforms | Scoop.it

Grunt is a build tool for JavaScript projects. It automate all the annoying tasks so you don't have to think about them. a few common examples are linting, assets minification, compiling stuff (coffeescript, stylus, etc) and running your tests on code change. 
It's open source and available on github. This is Grunt's website.

In this blog post I want to show you how to install it and how to automate a few common tasks. 
Hopefully it will convince you to drop everything you are doing and you'll find yourself adding grunt to your current project.

JavaScript is a wild language. you can twist and bend it to your needs but you can easily shoot yourself in the foot. 
Javascript Lint is a tool that checks for common mistake in your codebase. it will be nice to use lint and get errors from all the Javascript files in my project. In addition for lintinting, I want to concatenate the JavaScript files into a single file, and minimize that file.

* Installing Grunt
* Lint, concatenate and minimize our JavaScript files
* Compiling stylus files into css
* Minimize css files
* Watch for file changes and do stuff
* Summary

 

 


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Concurrently Testing JavaScript

Concurrently Testing JavaScript | Development on Various Platforms | Scoop.it

You’ve heard of nCrunch, right?  It’s a continuous integration plugin for Visual Studio that tracks changes to your code and then automatically builds and runs your unit tests in the background whilst you type.  Once the results are back it decorates every line of code with a red or green light to indicate whether the tests are passing or failing.

Where are you going with this?
Good question. nCrunch is fantastic…for .NET development. I do a fair bit of work in .NET but more and more I find myself working in JavaScript and desperately missing the constant feedback.

So how can we get something similar for our JavaScript tests? By using grunt of course!

GruntJS (which I’ve been playing around with recently) can be setup to run QUnit tests using the headless PhantomJS browser and to feedback the results.  In fact, this is all nicely packaged up in the grunt-contrib-qunit package for you, so it’s pretty simple to set up.


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Docular

Docular | Development on Various Platforms | Scoop.it
Similar to JSDoc and YUIDoc, Docular provides documentation generation. Docular and the grunt-docular plugin leverage the AngularJS documentation generation implementation.

performs documentation generation based on AngularJS's documentation generation implementation.

Docular will parse, manipulate, and render documentation embedded within yoru script files or within standlone non-script fiels. The documentation can be viewed within a webapp through NodeJS or can be moved to the root of an apache server.


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

AngularJS + TypeScript : Workflow

A introductory video on quickly creating AngularJS applications using TypeScript and how you can organize your project. 

This video shows you how you can organize your project so you can rapidly create new Controllers / Directives / Services / Filters with minimum dependency management and file path awareness. 


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

High-Quality JavaScript Code

JavaScript code is becoming ever more complex. How can we ensure a high level of code quality?

Some associated examples at: https://github.com/dennisodell/High-Quality-JavaScript-Code


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Yeoman, Express and AngularJS

Yeoman, Express and AngularJS | Development on Various Platforms | Scoop.it

I already used yeoman for AngularJS applications: now I want to build a NodeJS/Express application powered by AngularJS with all the goodies provided by yeoman.

And... before searching for and trying an existing express-angularjs yeoman generators I'd like to do it by hand, just for fun and for diving into NodeJS/grunt & co.

AngularJS setup with yoExpress initializationExpress integration with AngularJSFix grunt buildGrunt server and livereload



Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Complex Single Page Application Architecture with Backbone

Complex Single Page Application Architecture with Backbone | Development on Various Platforms | Scoop.it

Over the past few months we've been developing the 2nd (and much improved) generation of the SOOMLA dashboard.  Though we use myriad front-side technologies, the jewel in the crown is Backbone.js.  Much has been written about Backbone, though still I find that most articles focus on HOW-TOs of models, views and events.  In this post, I’ll describe our dashboard’s Backbone architecture, with an attempt to zoom out a bit and understand the fundamentals of building complex, heavy single page applications (hereinafter SPA) with Backbone.  Disclaimer: this post is not about code, but about architecture concepts.  Therefore, the code examples won't be detailed to the bits and bytes, but they are all documented sufficiently to understand the idea.

We use:
* Require.js for dependency management and modular code.
* Backbone.js - for basic application structure and separation of concerns.
* Marionette.js - for composite application architecture and saving lots of Backbone boilerplate.
* underscore.js for general object, array and function utilities.
* undescore.string for extended string manipulation functionality.
* Handlebars.js - for client side templating.
* jQuery for DOM manipulation, AJAX, promises, and much more.
* These jQuery plugins: Qtip, SlimScroll, Isotope, jQuery UI sortable and jQuery validations.
* imagesloaded - for capturing and synchronizing image load events.
* Less - for CSS pre-processing.
* grunt.js - for build automation (tasks like pre-compilation, minifying and concatenating code).

 


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Automating Complex Workflows with Grunt Custom Tasks

Automating Complex Workflows with Grunt Custom Tasks | Development on Various Platforms | Scoop.it

Fast-forward to this month, and it seemed worthwhile to get my Node.js service for Blastanova caught up to speed with the newly crowned and beloved taskrunner, Grunt.js. It’s a relief to offload the task-running glue of my project to a massively used and iterated open-source project. I can use a bunch of convenience features that already exist like copying files, FTPing, reading JSON configurations, et cetera…and I can also build on them and create custom tasks unique to my project.

Now I have a new project for which I’m using Grunt.js. I’ll take this opportunity to share a task Grunt.js can perform that I find pretty darn awe-inspiring because of the awesomeness of the most well-known, cross-platform, free video utility available today. FFMPEG is used all over the place to convert a piece of audio or video from one format to another and/or inject metadata into them. Some folks will use it to transform video on the fly for you to watch if your platform doesn’t support a specific format. Me? I’m running a radio show, so my Grunt task needs to be the sort of thing where I send video in and get audio out.

So there it is, my current project problem set-up. Let’s talk about how to get it done!


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

How To Unit Test An Angular App.

How To Unit Test An Angular App. | Development on Various Platforms | Scoop.it

AngularJS has a great testing story - it’s all based on Dependency Injection, the Karma test runner was written by one of its core developers Vojta Jina and it ships with a variety of mocks like the $httpBackend for unit testing requests to remote services.

What I haven’t been able to find much of are examples showing how to take advantage of these features when testing an application that does more than just expose objects connected via a rest api.

Today we’re going to build a simple Tic-Tac-Toe game writing unit tests along the way.


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Simplifying Grunt Jasmine tests for Ext.js

Simplifying Grunt Jasmine tests for Ext.js | Development on Various Platforms | Scoop.it

Are you wanting to unit test you Ext.js code but not sure where to start? Do you feel frustrated that everytime you get a bug raised you don’t know how to apply TDD techniques to your JavaScript because it’s just “not the same kind of code” as your Java, Ruby, .Net?

Since I’ve worked with Ext.js and Sencha Touch, testing has long been an issue that I’ve fought with. Initially I did no testing other than opening the browser hitting refresh and retracing my steps. However last year I went to Full Frontal and attended Rebecca Murphy’s talk (video & slides) and workshop on how to write testable JavaScript. Since then I’ve been cranking out test, after test, after test, and it’s improved the quality of code and it’s stability drastically.

However it did take me a while to understand how to setup Jasmine for an Ext.js project, so I thought something could be done about this to make life simpler. So I created a new Grunt plugin...


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Kickstart Your AngularJS Development with Yeoman, Grunt and Bower

Kickstart Your AngularJS Development with Yeoman, Grunt and Bower | Development on Various Platforms | Scoop.it

Whether you love or hate it, there’s no denying that AngularJS is the framework on every developer’s lips. It may not be for everybody, but AngularJS has a quirky, efficient and powerful feature set. Couple that with a few useful development tools like Yeoman, Grunt and Bower and you’ve got yourself an incredibly fast rapid prototyping process.

 

This AngularJS tutorial will cover:

* Generating a bare bones AngularJS app with Yeoman

* Using Grunt to speed up development and help perform repetitive tasks

* Using Bower to add third party plugins/frameworks

* Making minor changes to your AngularJS app


Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

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

Incredibly convenient testing of front-end Javascript with Node.js | Development on Various Platforms | 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.



Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Yeoman, Express and AngularJS

Yeoman, Express and AngularJS | Development on Various Platforms | Scoop.it

I already used yeoman for AngularJS applications: now I want to build a NodeJS/Express application powered by AngularJS with all the goodies provided by yeoman.

And... before searching for and trying an existing express-angularjs yeoman generators I'd like to do it by hand, just for fun and for diving into NodeJS/grunt & co.

AngularJS setup with yoExpress initializationExpress integration with AngularJSFix grunt buildGrunt server and livereload



Via Jan Hesse
more...
No comment yet.
Rescooped by Ertunç Efeoğlu from JavaScript for Line of Business Applications
Scoop.it!

Building Apps With the Yeoman Workflow

Building Apps With the Yeoman Workflow | Development on Various Platforms | Scoop.it

What Is Yeoman? Trick question. It's not a thing. It's this guy: Basically, he wears a top hat, lives in your computer, and waits for you to create. As an example, scaffolding a web application would look something like this: ...


Via Jan Hesse
more...
No comment yet.