by

Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Jun 17 2015 17:47

    mikedevita on feature.item

    updating some documentation add fields to Item schema model… restructured how frontend handl… (compare)

  • Jun 17 2015 16:09

    mikedevita on feature.usermanagement

    (compare)

  • Jun 17 2015 16:09

    mikedevita on feature.tagdirective

    (compare)

  • Jun 17 2015 16:09

    mikedevita on feature.rack

    (compare)

  • Jun 17 2015 16:09

    mikedevita on feature.location

    (compare)

  • Jun 17 2015 16:08

    mikedevita on feature.item

    delete item (compare)

  • Jun 15 2015 20:18

    mikedevita on feature.item

    updates to item creation (compare)

  • Jun 15 2015 19:55

    mikedevita on feature.item

    beginnings to create a user tag updates rack detail view, and moved rac… and 1 more (compare)

  • Jun 09 2015 16:48

    mikedevita on development

    Update README.md (compare)

  • Jun 09 2015 16:43

    mikedevita on development

    update readme to include regist… (compare)

  • Jun 09 2015 16:40

    mikedevita on development

    removed ngPasswordStrength from… (compare)

  • Jun 09 2015 16:38

    mikedevita on feature-location

    (compare)

  • Jun 09 2015 16:35

    mikedevita on development

    c9 specific ignores user registration and login upd… Merge branch 'feature-registrat… (compare)

  • Jun 05 2015 16:20

    mikedevita on feature-location

    Merge branch 'master' into deve… removing $resource (compare)

  • Jun 04 2015 17:59

    mikedevita on master

    fix the god damn tests update the fixture to include p… (compare)

  • Jun 04 2015 15:55

    mikedevita on master

    added in demo (compare)

  • Jun 04 2015 15:51

    mikedevita on master

    forgot to track bootstrap bower… (compare)

  • Jun 04 2015 15:48

    mikedevita on master

    redirect to the dashboard if no… (compare)

  • Jun 04 2015 15:08

    mikedevita on development

    (compare)

  • Jun 04 2015 14:57

    mikedevita on master

    local config example updates to rack create form (compare)

Jim Bulkowski
@JimtotheB
Basically strip all noob friendliness out of the existing node frameworks and that is what you end up with.
The dependency injector is probably its killer feature though.
Mike DeVita
@mikedevita
Just noticed you're in Atlanta
Jim Bulkowski
@JimtotheB
Yep.
Mike DeVita
@mikedevita
I fly there twice a year
Jim Bulkowski
@JimtotheB
Well, the suburbs anyway
Mike DeVita
@mikedevita
Yeah I got to sap training in either Atlanta or philly
Jim Bulkowski
@JimtotheB
SAP? boo
A company I consult for is an Oracle partner.
Hey, so Im playing around with the rack.detail route.
Im going to write a directive to handle the editing, you should be able to reuse it in the create route.
Mike DeVita
@mikedevita
Sounds good.
Haha sap is a wonderful thing.
Jim Bulkowski
@JimtotheB
How are you storing the individual server details?
Mike DeVita
@mikedevita
As items
Basically an itemtype is a class like server switch etc
Then it has fields any number of them. And you create items from those itemtypes
Jim Bulkowski
@JimtotheB
You going to loop over them and store them all individually? No CouchDb or mongo in this project right?
Mike DeVita
@mikedevita
Json
Check out the itemtype model. Fields are stored as a Json array
Jim Bulkowski
@JimtotheB
So Json in a table?
Mike DeVita
@mikedevita
Yup
Allows you to yank themysql out and use mongo if you want.
Jim Bulkowski
@JimtotheB
Why not just use Mongo or Couch from the jump, if most of your data isnt relational?
Mike DeVita
@mikedevita
Most of it is heh
Locations to racks racks to items items to itemtypes
Jim Bulkowski
@JimtotheB
Right, but looking at it pragmatically, dump AWS entire inventory into this, and it seems like the biggest bit of data is going to be items and itemtypes?
Mike DeVita
@mikedevita
That's true
Jim Bulkowski
@JimtotheB
So you are storing 100 locations to relate to 1000 racks that relate to 10000 items, stored in a way you cant easily search, and they are the only thing you are going to be searching for.
To me this is absolutely the use case for NoSQL, you just store items, and duplicate the tiny bit of data that makes up its location, and rack.
Mike DeVita
@mikedevita
I've never thought about it that way
Jim Bulkowski
@JimtotheB
You could invert it in SQL, and relate everything to the item rather than the other way around.
Mike DeVita
@mikedevita
So sails does mongo associations
P
Jim Bulkowski
@JimtotheB
I think mongo kind of has that built in? Like you would create a location doc, and associate its key to the item doc.
I am a couchDB guy though, so I really dont know mongo inside and out.
Mike DeVita
@mikedevita
Yes it does have that
I'll look into dropping mongo in. Front end shouldn't even be touched in that case
Mike DeVita
@mikedevita
when you get this, ive got a question for you regarding how you laid out that example.. how would you do a create, and findById.. checkout this branch for how im doing things.. sails supports a ton of query params for searching for stuff.. mikedevita/rackcat@ece8d7c. so i wanted to make "params" dynamic .. this is the sails docs for find where.. http://sailsjs.org/#!/documentation/reference/blueprint-api/Find.html
Jim Bulkowski
@JimtotheB
Sorry I got busy with other things.
You can do it one of two ways, either add an additional method to get the data with whatever param you need, or just simply generate the params object you are passing into the $http call
the first one is better for stuff you are going to call a lot, ie getSortedbyName() or getSortedbyDate()
but as usual you have to make the trade off between complexity and repeating code.
In this case I would probably just create a generic find method that took an object for the params.
If you find you are using the same expression in multiple places, abstract it to the factory as its own method with that set of params hard coded.
Jim Bulkowski
@JimtotheB
Where this method really shines, and it isnt so apparent right now, because you are mostly just replicating the stuff that is in $resource...
Is when you add in a dedicated error handler, or start wanting to do some processing on the data that is returned before passing it on to the controller.
Im not sure what the error format Sails returns, but the idea is you would write a generic factory to return a method to consume those errors, and just pass that to every error handler in the dataHandler factories you are writing.
Mike DeVita
@mikedevita
Yeah could you draft up an example create ?
Mike DeVita
@mikedevita
@PaperElectron how do you typically like to do error handling?