In the beginning there was Netscape Navigator interpreting HTML
and simple forms with simple server scripting languages running on Apache web
servers. For advanced websites you might have a relational database. Soon after
came Java and JavaScript. Then Applets and Servlets. Next CSS, XML, XSD, XSLT, CSS2,
AJAX and JSON. Php, python, Rails, Grails, EJB, GWT, GXT, ORBs, ORMs, GORMS, CSS3,
HTML5, REST, Cloud computing, NoSQL databases, and mobile devices.
Throw enough monkeys in with typewrites and they’ll write
Shakespeare. Eventually.
Give enough programmers enough computers and eventually
they’ll write something coherent and consistent? Maybe.
- Bootstrap, aka Twitter Bootstrap, a simple way to write responsive and mobile web interfaces.
- Express, a package that runs under Node.js, a simple server to implement RESTful routing.
- AngularJS – an easy way to generate HTML using JSON and tie it all to client side controllers via client side routing.
- MongoDB – an easy to install and easy to use NoSQL database that stores data in an extended version of JSON.
Maybe the monkeys have finally produced Shakespeare?
Simple - a consistent theme of maintaining an underlying
simplicity
- REST with hard linking (both AngularJS and Express
under Node.js)
- Speak a common language - JavaScript and JSON.
Both Express and AngularJS use "routes" to
route REST like requests to the appropriate bit of code.
All the way from MongoDB -> Express -> AngularJS
you can pass JSON formatted data structures.
And of course the JavaScript is used throughout, love it
or hate it. This makes it easier to share code across a client and server as
well as allowing a single programming language. Even MongoDB uses JavaScript in
its map reduce function.
There are some "gotchas" along the way. It's still
a lot to learn and absorb - even if each piece is fairly simple. It is JavaScript,
for better or for worse, and a lot might initially think for worse. It lacks
some of the goodness of more static object oriented programming languages,
though used correctly JavaScript can still provide much of the utility of
object oriented and functional programming.
Over the course of these blogs we’ll be developing an
application to allow display and update of data from a MongoDB. The application
will eventually be quite functional, but we’ll be building it up one
piece at a time. For now, all you’ll need to know is that we’ll be starting
with the simplest possible application and adding to the application as we
illustrate a new point about the BEAM stack.