<img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=1063935717132479&amp;ev=PageView&amp;noscript=1 https://www.facebook.com/tr?id=1063935717132479&amp;ev=PageView&amp;noscript=1 "> Bitovi Blog - UX and UI design, JavaScript and Frontend development
Loading

Premier Training Lessons Learned

Premier Training Lessons Learned

Justin Meyer

Justin Meyer

Twitter Reddit

Before the Thanksgiving holiday, I was lucky enough to spend 4 days training Premier on JavaScriptMVC. It went really well. But, with each training I learn invaluable lessons. Here's what I took away from this trip:

Get A Proper Development Environment

The first day of training was an exercise is frustration for most of the 12-15 people because they did not have a quality JavaScript development environment. In future trainings, I'll make sure they do before I get there.

I, like most of the IT world, typically runs on Windows, so Textmate isn't an option. I use Aptana RadRails. But at a minimum, to author JavaScript you need IDE that provides:

  • JavaScript code highlighting
  • Quality JavaScript Syntax Error warnings.

The next thing you MUST have is Firefox and Firebug. When you see something isn't working, the first thing you should do is make sure your console is turned on. If it's not, refresh the page. Then check the console for errors. More often than not, they will point you to the right file.

Finally, it's a best practice to run JS from a webserver instead of the filesystem. It's much easier to spot problems with files not loading. I suggest setting up Apache to serve your entire development folder.

Typos are a B

The vast majority of mistakes beginners make are simple spelling or syntax mistakes. I added warnings to a few places in JavaScriptMVC to alert people to potential problems. For example ...

this.callback - errors if you provide a name that doesn't exist: this.callback('shwo')

Model.setup - warns if you forget static properties: $.Model("Icecream",{})

But, the BIGGEST problem was jQuery swallowing incorrect CSS selectors like: $("elementID"), or misspelled ones: $("#elmentID"). I'm thinking in development mode logging warnings for these cases.

Conclusion

Although trainings are extremely hard work, they are immensely valuable because they are the best way for us to spot weaknesses in JavaScriptMVC. They are so valuable, that we even do them at a discounted rate. Fortunately, our phone is ringing off the hook, so JavaScriptMVC should keep getting easier and easier to use.