Skip to content

Instantly share code, notes, and snippets.

View ddluc's full-sized avatar
👨‍💻
working on client projects!

Daniel Lucas ddluc

👨‍💻
working on client projects!
View GitHub Profile
@ddluc
ddluc / app.js
Last active March 20, 2018 11:42
OOP in AngularJS
/**
* OOP in AngularJS
*
* The following implements some pseudo code for a Video Blog Application using both AngularJS'
* Dependency Injection and 'Classical' Javascript Prototypal Inheritance.
*
* Recently I've decided to use a more 'Classical' Javascript design pattern. My reasoning for this
* decision was based mostly on 2 factors:
*
* 1. Using classes allows you to create code that is reusable and DRY. This is especially helpful
@ddluc
ddluc / car.js
Last active November 23, 2016 18:32
Simple ORM
class Car extends Model {
/**
* @constructor
* @description instantiates a snapshot model
*/
constructor(make="", model="", mpg=0) {
super();
// the name of the table mapped to this object
this.name = 'car';
@ddluc
ddluc / slideshow.js
Created February 2, 2017 22:53
Slideshow
/**
* @file components/global/slideshow.js
*/
import React, { Component } from 'react';
import { Link, hashHistory } from 'react-router';
import {
Button as Button,
Carousel as OnsCarousel,
CarouselItem as OnsCarouselItem
} from 'react-onsenui';