JackHQ

1 note

AngularJS Contact Form Example

AngularJS is a powerful MV-Star framework from Google that has all kinds of neat features, focused on testability and automatic data-binding, it uses a declarative markup style and leverages the strength of the DOM. Yes, the dom is ok at some things. :D

The AngularJS team feels the future of the web is moving more to this declarative style, time will tell, but it definitely makes my life a little less painless.

This example does not really go into the power of AngularJS, but demostrates its simplicity and strong declarative features.

Check out:

https://gist.github.com/3629261

It is a fully functioning contact form that validates every field for being required and validates the the e-mail field for being an e-mail.

It is amazing the amount of functionality you get declaratively, to just do a simple form validation and post.

Filed under angularjs javascript

1 note

Added RevealJs to Bam 8.1

For more information on RevealJs check out:

http://lab.hakim.se/reveal-js/

Filed under Javascript

0 notes

mssqlx

pipe sql to mssqlx and get json out

should work great on all platforms, especially mac and unix, without any other drivers, just nodejs.

usage

echo 'select * from sysobjects' | mssqlx | prettyjson

source

https://github.com/twilson63/node-mssqlx

future

Currently, this only works on the command-line, the next version will work via stream api:

var mssqlx = require('mssqlx'),
  nconf = require('nconf'),
  fs = require('fs'),
  conf = nconf.get('production');

  fs.createFileReadStream('foo.sql').pipe(mssqlx(conf)).pipe(process.stdout);

Filed under nodejs mssql cli sqlserver

0 notes

w3

@akennedy and I were digging through angularjs, a new client mv* framework from google. When we evaluate new tech, it is nice to go through the examples, but we really need to quickly see how these frameworks will do at solving our needs. Our applications use a lot of autocompletes, dynamic selects and a lot of ajax. So we need to create small little spikes to test these concerns.

NodeJs is great for quickly building small web servers or we could fire up apache or nginx. But this does take time and most of the time we just open a file in the browser.

Today, I created a simple static web server called w3. The big win is that if you have nodejs and npm install w3 -g

Now you have a little web server you can bring up and down in any folder.

Its easy! Just go to a folder create index.html anything else and then run w3 in the folder and you are serving files.

I hope you find this utility as valuable as we do!