So I was working on my ubuntu servers this weekend.
Trying to get some extra work in. Work that shouldn’t feel like work. I was thinking about how natural/intuitive asynchronous event driven applications design might be with a language like JavaScript. I was sort of redesigning the BPM we worked on at Disney in my head.
Defacto server side engine for JS right now is node, so with a few commands I had my first web app launched.
sudo apt-get install nodejs
sudo apt-get install npm
npm install -g express
express --sessions --css stylus --ejs myapp
cd myapp && npm install
node app
So if you point your browser at http://localhost:3000/ you will see the hello word app.
Now one of the first things I noticed is there is a templating system at work here called EJS.
The good news is that, at first glance, it looks pretty much like PHP!
/routes/index.js
/* * GET home page. */ exports.index = function(req, res){ res.render('index', { title: 'Express' }); };
/views/index.ejs
<title> <%= title %> </title> <ul> <% for(var i=0; i<supplies.length; i++) {%> <li><%= supplies[i] %></li> <% } %> </ul>
Okay so the templating system looks easy enough, next thing is I need a way to do job scheduling functionality. Basically need a nodejs clone of the quartz job scheduler in grails.
I did a quick google and saw there is a github project for this.
And this pretty much where I ran out of steam in my investigation.
And I concluded that “I will look into https://github.com/ncb000gt/node-cron later.”
Honestly, I think a technology solution presented on this platform can be rather elagent!
I’ve been pushing unified front and back end language and synchronization for long time in my casual conversations here and there. None of my employers have had a project like this for me in the past.
If I can find a decent IDE, I just may try something out.