The Programming Connection – Meteor.js

I have always thought that the Holy Grail of web development would be to write all of my code in one language.  The main problem with this is that browsers only accept Javascript. Why is that a problem? Two reasons: the language is ugly, and back in the day javascript didn’t run on the server side. While there has always been the option of other languages being cross compiled into browser compatible javascript such as Coffee Script, Dart, and even Rails had a DSL at one point. That always seemed like it was just an extra step in the build process and another place that you could have to debug code. Today there have been some changes that seem to be bring this closer to a reality.

Why does it matter that Javascript is ugly? What else do you like to use that is ugly?  Nobody wants to buy an ugly car if they don’t have have to. Does an ugly house inspire you to do home improvement? I completely believe that ugly code leads to less productivity.  Even with the best syntax highlighting and linting you still find yourself struggling to find mistakes. Back in the day, I worked with a team of creatives and we needed a ticket system.  I went out and found the most functional system I could find with the best features and showed it to the Creative Director, my boss, and he said, “We can’t use that, it is ugly”. We found another system that was not as feature complete but had a much better design and we used it. A system is only good if people like using it.  I use an Apple computer partially because of the great design and clean looking applications. I think users these days put a high value on aesthetics and choose products based on that.  Javascript, as with many languages have adopted C-like syntax and that is not bad, but Javascript has added some interesting additions that have not helped clarify or beautify the syntax. Nested callbacks and anonymous functions have added solid functionality to the language, but have not improved the readability.  We are starting to see some improvement coming in ES6 and ES7 changes.

Likewise, the server side has always left me wanting. Node.js has been the main player in this space and has been adopted by many and it used in production by some large companies like Walmart and Netflix.  It is also intended to be more then a web frame work, being use in embedded applications such as robots and is one of the main tool kits for the Arm based Beagle Bone single board computer. When I would look at frameworks like Express.js I would feel like I was back in my early PHP days were you really rolled your own data layer and build tooling. Node has had success working with modern web features like Web-sockets which has been a bit of a challenge for tool kits like Rails. When looking for solutions to some of these issues, I found Meteor.js.

Meteor is a new framework that takes a different track then other Javascript frameworks that I have looked at. It has a few key features that caught my attention like real time data push, clients and server side coding support with a common API, as well as a solid set of tooling. This was the first JS framework that I reviewed that I didn’t have to spend time learning multiple different frameworks/components to make a complete web application. Every time I would get started on a new project I would have to figure out the data layer, service side language, client framework, and how to maintain build versions/database changes.  This was something that was daunting when getting started and Meteor has a clear story on how that can be handled. Meteor is opinionated and does have some limitations which won’t make it a ‘be all’ framework, but if it does fit your requirements, it could be a great tool.  We will get into more details in later posts.

LiveQuestions Open Source Application

Today I published a web application that I have worked on for a while and we have used LQHeaderImagethree or four times at Seacoast Church to take live questions during a message.  This allows the people attending the event to text in or use a web page to submit anonymous questions.

For more information see the Github page.

Features:

  •  Submit questions from a ebpage or over SMS (using Twilio)
  • Password protected pages for review, editing, approving, and displaying the submitted questions
  • Built on a Meteor.js providing real time updates to all of the pages viewing the questions
  • Responsive to desktop and mobile clients
  • Screen display is customizable using CSS and HTML

The application is built so that the attenders post questions and they show up on an incoming questions tab in the admin section.  You can have one or many editors monitoring this page, editing and approving questions.  Once a question is approved, it is then cued on a approvals page that can be monitored by the moderator on stage.  The moderator then just clicks on a question for it to be displayed on the screen.

All clients need web browsers and internet access including the device used to feed the screen. LiveQuestions can be easily deployed to Meteor’s free basic hosting for testing or even production for events.

 

The Programming Connection

I have been working in the area of audio/video production for the last nine years, but in the past my focus was on IT and programming. Over the past year or so I have been feeling the itch to do some development again and it is a great distraction from my day to day production work.

I have developed in many different languages and environments.C/C++, Visual Basic, C#/.Net, RPG, Perl, Python, PHP, Objective C, Javascript, and Ruby just to name a few. Recently I have had some ideas for a few new projects, some just to scratch an itch and others to solve work needs. I could just jump into the tools that I have used in the past. For example if I was going to work on a web project I would lean torwards Rails, or if I needed to do a small utility app Ruby or Python might get the call. These are the tools that were productive for me in the past.

Being that some time has passed and I’m really not under any deadlines, I thought it would be fun to check out new languages/frameworks. I have always loved developing my skills and maybe some of it is just to see what all the fuss is about. So I have looked at many new to me languages and frameworks, such as Go, Scala, Erlang, Angular, Rust, Swift, and Ember. All of them have some intereseting ideas and yes I know they all cover many different development needs, but I really haven’t connected with any of them in the way that I did with frameworks like Rails.

It is strange to say that you “connect” with a programming language, but you do. I guess it is like how I like to play Fender Jazz basses, but can’t seem to get comforable with a Fender P bass. Maybe a little closer to this topic Vim vs Emacs, but I don’t want to start a editor flame war. That connection seems to lead to you wanting to dig deaper and continue to build your skill.

Recently I have come across a few new framworks and languages that I have
started to “connect” with. I thought that I might do a few posts on them: and try to
explain what has caught my attention. The two that I’m going to start with are
Meteor.js and Elixir/Phoenix.