Skip to content

Instantly share code, notes, and snippets.

View e-oz's full-sized avatar
🕊️

Evgeniy OZ e-oz

🕊️
View GitHub Profile
@e-oz
e-oz / folders_structure_idea.md
Last active December 20, 2015 22:38
Structuring an Angular Project

Author of quoted text: Colin Johnsun
Original: http://www.johnpapa.net/structuring-an-angular-project/#comment-142821

I agree with Joel, I found that dividing by functional area made more sense to my workflow.
I tend to work on a particular function in my application and having all related code in the same folder made it easy and quicker to locate them. In my Angular apps, I don’t have separate controller and views folders. Instead, I would have a folder for login, sales, shipping, etc which would contain my related controllers and views. Although I do group by types for services and directives.
Ward mentions about cross cutting concerns. For me, Angular feels more like an MVVM framework than MVC and in my apps, the controllers are the view-models. In the “Shipping” and “Sales” module example, I would have a shipping controller and a sales controllers for each of the respective modules. If the notion of “customer” is roughly the same in both modules then this notion of customer can be abstracted out i

@e-oz
e-oz / player.js
Created February 22, 2013 07:35
for webinar
// Host where all mp3 files are located
var musicHost = 'http://player.tupi.ca/webinar/music/';
// List of available files
var files = [
'Chris_de_Burgh_-_The_Snows_Of_New_York.mp3',
'Metallica_-_Nothing_Else_Matters.mp3',
'R.E.M._-_Losing_My_Religion.mp3',
'Scooter_-_How_much_is_the_fish.mp3',
'Skrillex_-_Scary_Monsters_and_Nice_Sprites.mp3'
@e-oz
e-oz / gist:1814226
Created February 13, 2012 06:22
old sypex geo with caching
<?php
namespace Sypex\Geo;
/***************************************************************************\
| Sypex Geo version 1.0.0 beta 2 |
| (c)2006 zapimir [email protected] http://sypex.net/ |
| (c)2006 BINOVATOR [email protected] |
|---------------------------------------------------------------------------|
| created: 2006.10.17 18:33 modified: 2006.10.26 22:07 |
|---------------------------------------------------------------------------|