Getting Started with Meteor Javascript Framework– A Review

As you might have seen from my last post I started poking around Meteor. Meteor has decent getting started guide and videos. I was looking for some decent place for me to start as a total newbie and found Getting Started with Meteor Javascript Framework by Packt publishing. I went through the sample chapter and looked interesting so I ended up buying the book and read the whole book in single sitting (5 hours).  I am going to use this blog to write about my experience with this book as I started learning Meteor.

For starters, there are very few items specific to 0.8 changes are missing in the book Like Handlebar to Blaze, {{login to {{> login etc., nothing major but I am sure they will update Errata with those changes soon. Since the framework is still not in production there might be more changes coming along the way. Also if you are going to try in Windows, I am not sure it is going to work, I tried few times but ended up switching to Mac and then everything just worked. I used webstorm as the editor. Since I have bee using it to develop my Angualr Apps. Back to the book, Version specific things aside, my over all experience with the book is outstanding. Let me tell you why.

The whole book is arranged in such a way, you learn the basic building blocks progressively and then put them together to build a decent application. I would strongly recommend learn by doing and this book is written with that intention. Fire up your mac and start reading the book, by the time you finish chapter 4, you will have a working application build with Meteor and as a side effect now you understand the fundamentals of Meteor.

This book is short and sweet. This does not go into the internal working of Meteor that much, rather focus on as a developer how do you go about building an application. That is exactly what I expected from this book. This book has only 7 chapters and that’s all you need to learn and get your self running in Meteor, each chapter is well thought out and has an excellent flow. On the side note, it is also testament to the beauty of Meteor framework, it is easy to learn and hit the ground running fast.

The whole book was like a conversation between the author and the reader. The first chapter get to you setup Meteor and create simple application to showcase the components of Meteor and get you acquainted with their basic structure. It shows, with simple example, where does the view, controller and model go.

From chapter 2 to chapter 4, author walks us through building Lending library application step by step. This where he explains the meat of Meteor why it shines and why Meteor could change the way we think about web development altogether.  One of the core feature or its shining light is ‘Reactive Programming’.  In this model, client and server are aware of data and meteor automatically pushes the model changes to client and server with out us writing ton of code and learning another new protocol. It just happen. Like I said, since it is one of the core things of Meteor, the author explains this idea very clearly with very less code so that as a reader we can appreciate the power with out walking through too much code.

Chapter 3 started out with some theory on MVC, MVVM to explain how Meteor fit into MVVM model. Even though it make sense, I was not completely sold on the idea Meter falls in to MV* pattern. When I think about MVVM (Silverlight/Angular) though, VM was pure code and which is not aware of anything about View. The underlying silverlight framework glued the view model properties to view. But in Meteor, when I look at the controller code, there was so much of view bleeding to it. Again, I am still a newbie so there might be better way to do it so that view is totally isolated from controller. But do not skip this theory part since the section titled ‘Cached and Synchronized data’ is crucial to understand how Meteor keep the data in sync with client and server.

Chapter 4 is where we put lot of meat to the code to make it like an decent application. This chapter covers lot of ground and I did not like the flow on this chapter though. This is the only chapter I had some heartburn. In this chapter as you make changes, you have to wait till end of the chapter to see the fruit of your labor. So I ended skipping the author’s flow and start implementing view/controller at small yet complete so that I can see I am making progress. Even then I was making lot of mistakes (like missing . or _ or missing semi colons) so if I was going to put all together and then debug the code, it would have been miserable. Oh by the way, I was writing every line of code instead of copy pasting. I did on purpose so that I get used to what ad why am I typing? So as I said before, I jumped between this chapter to identify each feature associated in template/model and javascript code so that I can see my progress and debug the code in small chunks.

By the time you come to chapter 5, you already have a decent size application running. From here on out, next three chapters are required for you to understand, as we start building public facing website, how do we control our ‘Reactive Programming’ so that only the users who need to see the changes see the changes and also how to fine tune the data flow between client and server. They were explained very well and stayed at a level it made perfect sense. Also the additional links in the book for anyone interested to learn more also helped.

Chapter 6 and 7 closes the book explaining more about how to setup your project directory structure and how to deploy your application. Meteor deployment was really pleasant surprise. Author explained the three models how to deploy and what are the things to watch out for really helped as well.

Overall I really enjoyed the book and in 5 hours I was able to develop a good application and learned the basic fundamentals of Meteor and starting to love the new way to develop web application. The book highlighted the core features very well and as I developed the application, I really started to appreciate the simplicity of Meteor.

On the flip side, I thought one very important aspect was missing in the whole book. There was no mention of how to go about doing TDD or to write end to end testing. As a software developer I start to enjoy TDD and if it is not supported as first class citizen in the framework, we will be missing out a lot. I did search and found couple of videos on the testing but did not watch them yet.

But over all it is an great book for anyone new coming into Meteor, it is worth the money and time well spend.  I really looking forward to develop more application in Meteor.

Silverlight to Angular JS

With heavy and broken heart finally it is time for me to say good bye to one of the best technology that I worked with,  ‘Silverlight’. There is always people argue about the validity and are so happy about the Silverlight demise. In my opinion as a developer, I really enjoyed developing apps in Silverlight. The best part of course was data binding. So simple concept that made the coding very easy and also the separation of view and view model so clean. XAML was so easy to create view without getting too much business and so on. Now we are not talking about Silverlight but the next big thing. It is without doubt HTML5, Microsoft was very quick and wise to adopt it. As the technology progress, it is time for me to make the switch as well. So lately I started poking at various options available today to make the transition into HTML5.

As a silverlight developer, I follow John Papa and he is been promoting Knockout JS. I saw couple of videos and did some coding with it and it looks good. From Silverlight,  it is a natural transition. While Knockout is pretty good, there is another cool kid in the block and is Angular JS. Similar to Knockout, Angular also have great tutorials, decent following in forums. One of the things I was looking for when I started learning Angular of course is data binding and it is rich. I fell in love with it on my second data binding exercise. So I am going to head into HTML5 with Angular for client side development. I have not decided on the server side technologies yet. If any one have any good comments or suggestions please feel free to send me a note or command.

Some good references for Angular:

Home – http://angularjs.org/

Screencasts – http://www.egghead.io/

Blogs – http://blog.angularjs.org/

As I move from Silverlight to Angular I found a better IDE to go with it. Webstrom is so far the best IDE I found for angular development.

So my friend ‘Silverlight’ Good Bye.