SoCal Code Camp San Diego 2013

Are you a developer looking to learn new skills? Are you interested in , Best Practices, JavaScript, Web Development, ASP.NET or Ruby? Then come to SoCal Code Camp in San Diego on July 27 & July 28th! We have sessions covering these topics and more!  It’s also 100% free, you can’t beat that deal.

Code has sessions for all levels including many beginner, intermediate, and advanced presentations. 

I will presenting the following 5 sessions :

Here is a complete list of topics. I’ve gone through all the sessions and grouped them together by technology and specialization. I hope this helps you find sessions you would like to attend!


Topics:
Web Dev      Best Practices     JavaScript     ASP.NET
Databases     Agile & Project Management     Misc     Career
Ruby & Python     C# / .NET     Hardware     Testing
Windows8    |Android      Git     NuGet


Web Development
Responsive Web Design, an Introduction Part 1
Responsive Web Design, an Introduction Part 2
Bootstrap your web site with Twitter Bootstrap
Build a WordPress Blog and Photo Gallery Site in 60 Minutes
WordPress Workshop 101
Creating HTML5 Pages Using Visual Studio LightSwitch
Debugging, Troubleshooting & Monitoring Distributed Web & Cloud Applications
Introduction to Amazon Web Services
NancyFX – A lightweight web framework you didn’t know you should be using.
Simplify your services with OData
Voice Enable Mobile and Web Applications
What is Parrot?
Put your website in the cloud
Windows Azure in real life
Windows Azure Mobile Services Introduction


Best Practices
Architecting for Multiple User Interfaces
Clean Code I – Design Patterns and Best Practices
Clean Code II – Cut your Dependencies with Dependency Injection
Clean Code III – Software Craftsmanship
Clean Code with SOLID principles
Clean Code: Homicidal Maniacs Read Code, Too
Creating Collections of Entity Classes
Data Flow Architectures in Software Development Life-Cycle
Dependency Injection: A Practical Introduction
Learn the Lingo: Design Patterns
Power of Patterns: Refactoring to (or away from) Patterns
10 things Every Developer Must Know
Rock Your .NET Coding Standards (Part 1)
Rock Your .NET Coding Standards (Part 2)
Super-Charged Debugging for the New Developer


JavaScript
An Introduction to MVVM featuring Knockout JS
Angular JS with ASP.NET MVC and WebAPI
Beginning HTML5 Mobile Game Programming
Building a simple Glass app with Node.js and the Mirror API
Building for the real-time web with Node.js
Getting started with TypeScript
HTML5 Media APIs : Let’s build a camera web app in ASP.NET MVC!
Node, Mongo, Backbone, and Kendo UI – Oh My!
Node.js: A gentle introduction
PhoneGap in 60 Minutes or Less
Ten Groovy Little JavaScript Tips
Writing Maintainable JavaScript


ASP.NET
25 Tips and Tricks for the ASP.NET Developer
ASP.NET MVC – What a View!
Async your IIS app like a champ!
Building a Business Application in ASP.NET MVC
Creating an Orchard website on Azure in 60 minutes
Customizing Orchard websites without limit
Hack Proofing Your ASP.NET Web Forms and MVC Applications
IIS for Developers: Choose Your Own Adventure
Introduction to WCF Routing Service
What’s new in ASP.NET 4.5


Databases
10 things Every Developer Must Know
Continuous Integration for the Database
Discover SQL# (SQL CLR library)
Introduction to Big Data & Cassandra
Computing with Network/Graph Data
Introduction to Graph Databases with Neo4j
MongoDB first steps – Getting started by example
New T-SQL Features in SQL 2012
Tour of Big Data


Agile & Project Management
Agile Games: Games with Cards and Dice
Agile Success Metrics!
Best Practices for Agile Work Management
Best Practices for Estimating Projects
Best Practices for Requirements Gathering
Managing Self-Organizing Teams – An Old School Management Dilemma
Moving Your Organization into the Fast Lane – Delighting Your Customers
Moving Your Organization into the Fast Lane – Making Scrum Stick
Project Manager’s Survival Guide


Misc
BizTalk Server Best Practices
Building an IT support team people like!
Building xRM solutions with Microsoft Dynamics CRM
Intro To Not Sucking At Presentations
Machine learning made simple
Search Engine-Building with Lucene and Solr
Team Build In TFS 2012
Video Streaming on iOS: The Gory Details


Career
Raising your first $1M from angel investors and VCs for your startup
Screen casting 101 – Become a millionaire!
From CodeMonkey to CEO: Breaking out of the cubicle farm
Rock Your Technical Interview (Part 1)
Rock Your Technical Interview (Part 2)


Ruby & Python
A Hands-On Introduction to Ruby
Getting started with Python
Getting Started with Ruby on Rails
Introduction to Flask


C# / .NET
Serialization and Formatting in .NET
F# for the C# developer
T, Earl Grey, Hot: Generics in .NET
Aspect Oriented Programming and You


Hardware
Getting Started with Raspberry Pi
OPEN SOURCE HARDWARE HACKING


Git
Git & GitHub for Distributed Development
Intro to Git Concepts (for SVN users, and DVCS noobs)


Testing
For those about to Mock
Transformation Priority Premise: TDD Test Order Matters


Windows8
10 Things I learned from building a Windows 8 App
Windows 8 (Windows Store) HTML/JavaScript Apps for the ASP.NET Developer


Android
Android talks to .Net via ksoap2
Build a cross-platform app for iOS, Android, and Windows by leveraging useful frameworks


NuGet
Getting Groovy With Nuget

Advertisements

Loading Client Side Templates in Angular JS

One of the features of Angular JS is client routing. This enables us to create single page applications (SPA) by which our site loads an initial html page and every subsequent page is brought in dynamically without triggering a full page refresh.

I was giving a presentation on Angular recently and someone in the audience asked if the templates where downloaded when the web app started, or dynamically as the user navigates to a specific page. This is a great question because on a complex multi-page site, you don’t want to load the templates upfront.

So I decided to investigate. Fortunately, this was an easy thing to do using the Chrome Dev Tools. As part of my talk I built a small sample app called Tweet Save. This web app allows you to search twitter and then bookmark tweets you like. You can see it’s source on github.

The saved tweets page relies on a template called “SavedTweets.html.” Inspecting the network tab on initial load doesn’t show any reference to SavedTweets.html. After clicking the link to the saved tweets page I see the following in my dev tools:

Dev tools

The template is only loaded when the user requests that route from my route provider. If navigate back to the initial search page, then again to saved tweets the two files above will not be downloaded again. That’s because at this point, angular already has the template it needs for that route.

so there we have it. Angular only loads html templates on demand when a user requests that specific route.

Nested Directive Virtual Groups in Angular JS

In my last post I went over a new unreleased feature of Angular JS, Directive Virtual Groups. This allows you to append -start to a directive allowing it to span multiple DOM elements. You can terminate the multi-DOM element by applying -end to the same directive. For example:

<tr ng-repeat-start="order in orders">
  <td>{{order.description}}</td>
</tr>
<tr ng-repeat-end>
  <td>{{order.number}}</td>
  <td>{{order.price}}</td>
</tr>

This would iterate over a series of orders and render two TR tags for each order. The ng-repeat-start indicates the ng-repeat condition as well as a starting flag for angular. Everything following that (including it’s TR tag) is part of the template, until it reaches a ng-repeat-end. That element is then included and is considered the terminating element.

Well what about multiple -start and -end tags nested? I decided to try to play around with ng-click in addition to ng-repeat. Imagine if we wanted to make only the number and price table cells clickable. We want those cells to call a function named ‘calculate’. I could easily modify the above example to be:

<tr ng-repeat-start="order in orders">
  <td>{{order.description}}</td>
</tr>
<tr ng-repeat-end>
  <td ng-click-start="calculate(order)">{{order.number}}</td>
  <td ng-click-end>{{order.price}}</td>
</tr>

While this may seem complicated, the syntax basically says

  1. start the repeat process at the first TR tag
  2. terminate the template at the second tag (where ng-repeat-end) comes in
  3. In the second TR tag, start defining a clickable region ng-click-start
  4. Apply click region to first and second TD until ng-click-end is found

Notice how I only defined the target of the ng-click once, but both elements are now clickable and will call the calculate method. Pretty cool and DRY!

As a reminder, this feature is in the code base but has NOT made it to the stable release of Angular. So it might not work for you unless you have the latest build form their Github repository.
works on my machine

Angular JS Directives – Repeating over multiple elements

I was watching a video from NDC featuring a cage match between Ember JS and Angular JS. Tom Dale and Rob Connery both did a good job of representing Ember and Angular respectively. At one point, Tom showed a feature of handlebars (which Ember uses for templating) that allowed him to iterate over a javascript array and for each element render out two html TR (table row) tags. This is easy to do in Ember because handlerbars uses a #each template and you can basically put anything you want between #each and /each like so (tom’s code from the talk follows):

{{#each orders}}
  <tr>
    <td>{{description}}</td>
  </tr>
 
  <tr>
    <td>{{number}}</td>
    <td>{{currency price}}</td>
  </tr>
{{/each}}

The result is something that looks like this (screenshot from the video):

Ember JS each example

So for each item, show the description on one line and the number and price (formatted as currency) on the next line. Pretty standard stuff for simple tabular data.

When it came time for Rob to offer rebuttal and duplicate this with Angular, he struggled and I don’t blame him. Even though I’ve done a bit of Angular and given presentations on the topic, while watching this I was stumped. You see Angular has an ng-repeat directive that allows you to iterate over a collection, much like #each. However, ng-repeat is applied to a DOM element and that element itself is used as the template for every item. To illustrate, check out this simple ng-repeat example:

<tr ng-repeat="order in orders">
  <td>{{order.description}}</td>
  <td>{{order.number}}</td>
  <td>{{order.price}}</td>
</tr>

Here we ask angular to iterate over all “orders” and for each iteration place the current item in a variable called “order”. The TR tag itself will be used as a template and anything inside of it will be part of that template also. The problem now is how do you extend this to multiple TR tags like Tom did in the Ember example? It’s not something I had seen before. So I decided to do some research and see if there was in fact a way to do this in Angular.

I came across a few posts that talked about adding the ability to use ng-repeat in an html comment (similar to how Knockout JS bindings can be used in comments), but the Angular lead turned that proposal down. I then found this page on Angular’s Git hub Page. It talks about a new feature of Angular, Directive Virtual Groups. This exactly what I needed ! 🙂

So how does it work? In a nutshell it’s a way to have a directive span over multiple elements by indicating a start and end. This is done by simply appending -start and -end to the directive itself. It’s actually a very nice way of doing this as it extends existing directives.

Unfortunately this isn’t the stable release of Angular, but it’s good to know that this feature is in the code base and is coming. So to play around with it I had to download the  Angular source code and build it on my machine. After that I used the newly built angular.min.js file in a sample application and I was able to write code like this:

 <tr ng-repeat-start="order in orders">
    <td>{{order.description}}</td>
  </tr>
  <tr ng-repeat-end>
    <td>{{order.number}}</td>
    <td>{{order.price}}</td>
  </tr>

This new sytax allows us to take the repeat binding and extend it over two html elements, or any number of elements between -start and -end. If I included a 3rd row in between those TR’s, it would rendered as well.

I think this is a great addition to the framework and I love how it’s implemented as an extension to directives and really highlights the good architecture and separation of concerns you can get. Directives are complicated, but what they do offer is a clean way to isolate functionality and to build reusable components that can be composed on a page, giving the application developer greater power and flexibility