St. Louis Days of .NET 2014

My notes from the 2014 edition of St. Louis Days of .NET.  I was only able to attend the first day of the conference this year.

Front-End Design Patterns: SOLID CSS + JS for Backend Developers

Presenter: https://twitter.com/anthony_vdh
Session Materials:  http://vimeo.com/97315940

Use namespaced, unambiguous classes.   For example, use “.product_list_item” instead of “.product_list li” , and “.h1” instead of “h1”.

No cascading

Limit overriding

CSS Specificity – Specificity is the means by which a browser decides which property values are the most relevant to an element and get to be applied.
    Each CSS rule is assigned a specificity value
    Plot specificity values on a graph where the x-axis represents the line number in the CSS
    Line should be relatively flat, and only trend toward high specificity towards the end of the CSS
    Specificity graph generator: http://jonassebastianohlsson.com/specificity-graph/
    Another option of what a graph should look like: http://snook.ca/archives/html_and_css/specificity-graphs

Important CSS patterns and concepts
    Namespaces
    Modules
    Prototype
    Revealing Module
    Revealing Prototype

Optimizing Your Website’s Performance (End-To-End Diagnostics)

Presenter: http://mitchelsellers.com/
Session Materials: http://mitchelsellers.com/blogs/2014/11/17/2014-st-louis-days-of-net-presentations.aspx

If your test environment is different that your production environment, look for linear differences in order to estimate the differences between the servers.  For example, if the production server is a quad-core server and the test server is a dual-core server, measure the performance of the test server twice: once with one core active and once with both cores.  The difference between running with one core vs. two cores should allow you to estimate the difference between the dual-core server and the quad-core server.  Obviously, this will not be perfect, but does provide some baseline for estimating the differences between servers.

Different browsers have different limits on how many simultaneous requests can be made to a single domain (varies from 4 to 10).

Simple stuff to look at when optimizing a web site:
    Large images
    Long-running javascript
    Large viewstate

Make sure cache-expiration is set correctly for static content.  This is done in the web.config file.

TOOLS

Google PageSpeed
    Provides mobile and desktop scores
    Used in Google search rankings!
    Not useful for internal sites
    Similar to YSlow
    Blocked by pages requiring a login

Google Analytics (or similar)
    Useful for investigating daily loads (determine why site is slow at certain times)
    Use to investigate traffic patterns

Loader.IO
    Reasonably priced and free options available
    Use to simulate traffic load on your site
    Only tests static html

LoadStorm
    More expensive
    Use to simulate traffic load
    Tests everything; not just static content

New Relic
    Internal server monitoring

Hadoop For The SQL Ninja

Presenter: https://twitter.com/mwinkle

Hive is a SQL-like query language for Hadoop.
    Originated at Facebook
    Compiles to Map/Reduce jobs
    Queries tables/catalogs defined on top of underlying data stores
    Data stores can be text files, Mongo, etc
    Data stores just need to provide rows and columns of data
    Custom data provides can be created to provide rows/columns of data

Hive is good for:
    Large scale queries
    A variety of formats
    UDF extensibility

Hive is NOT good for:
    Interactive querying
    Small tables
    OLTP

Hive connectivity
    ODBC/JDBC – responsive queries
    Oozie – job-based workflows
    Powershell
    Azure Toolkit/API – now includes Visual Studio integration for viewing/executing queries

Angular for .NET Developers

Presenter: https://twitter.com/jamesbender
Session Materials: https://github.com/JamesBender/AngularDemos

AngularJS is a Javascript MVC framework
    Model-View-Controller are all on the client
    Data is exchanged via AJAX calls to REST web services
    Makes use of dependency injection

Benefits of AngularJS
    Unobtrusive Javascript
    Clean HTML
    Limits the need for third party libraries (like jQuery)
    Works well with ASP.NET MVC
    Easy Single-Page Applications (SPA)
    Testing is easy.  Jasmine is the test framework of choice.

HTML attributes provide AngularJS “hooks”.  For example, notice the attributes on the elements <html ng-app=”AngularApp”> and <input ng-model=”user.name” />

Data binding example:

    <input ng-model=”user.name”/>
    <p>Hello {{user.name}}</p>

    In this example, data entered into the input text box is echoed in the paragraph below the input element.

Making Rich, Interactive, Multi-Platform Applications with SignalR

Presenter: http://mitchelsellers.com/
Session Materials: http://mitchelsellers.com/blogs/2014/11/17/2014-st-louis-days-of-net-presentations.aspx

Use cases for SignalR
    Any application that involves polling
    Chat applications
    Real-time score updates
    Voting results
    Real-time stock prices

The Smooth Transition to TypeScript

Presenter: https://twitter.com/pottereric

TypeScript provides compile-time errors in Visual Studio.

TypeScript has type-checking
    Optional types on variables and parameters
    Primitive types are number, string, boolean, and any
    The “any” type tells the compiler to treat the variable like Javascript would

Intellisense for TypeScript is very good, and other typical Visual Studio tooling works as well.

TypeScript files compile to javascript (example.ts –> example.js), and the javascript is what gets referenced in your web applications.

TypeScript class definitions become javascript types.

The usual Visual Studio design and compile-time errors are available when working with classes.

A NuGet package exists that provides “jQuery typing files” that enable working with jQuery in TypeScript.

TypeScript supports generics and lambdas.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: