Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Asshole Masonanie
Oct 27, 2009

by vyelkin
he's a dumb question probably: my boss wants me to migrate the content (online manual) from a lovely old VB.NET app to an angular app with a treeview nav. i got the treeview working but i'm wondering about the best way to store all the data. i'm thinking maybe some kind of small database, mysql or something, but maybe just jamming everything into a huge static json file and recalling it that way will be good enough.

Adbot
ADBOT LOVES YOU

my homie dhall
Dec 9, 2010

honey, oh please, it's just a machine
can you use SQLite?

Asshole Masonanie
Oct 27, 2009

by vyelkin
yeah i probably could though ive never used sqlite before

power botton
Nov 2, 2011

mysql is never the answer

power botton
Nov 2, 2011

especially when you want a database

Shaggar
Apr 26, 2006

Power Ambient posted:

he's a dumb question probably: my boss wants me to migrate the content (online manual) from a lovely old VB.NET app to an angular app with a treeview nav. i got the treeview working but i'm wondering about the best way to store all the data. i'm thinking maybe some kind of small database, mysql or something, but maybe just jamming everything into a huge static json file and recalling it that way will be good enough.

if theres nothing dynamic json would probably be the easiest.

hobbesmaster
Jan 28, 2008

Power Ambient posted:

yeah i probably could though ive never used sqlite before

sqlite is a life saver if you're using it for small data sets for a small program

PleasureKevin
Jan 2, 2011


thank you, i found this super enlightening

personally i'm a very competitive person. but i also feel the whole everything should be social-darwinist level competitive is bullshit. so this supports my world-view, thanks.

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'

PleasureKevin posted:

thank you, i found this super enlightening

personally i'm a very competitive person. but i also feel the whole everything should be social-darwinist level competitive is bullshit. so this supports my world-view, thanks.

it sounds like his post gave you pleasure, kevin

Necc0
Jun 30, 2005

by exmarx
Broken Cake
if anyone wants a good set of problems that are both useful and will make you feel dumb as bricks the matasono crypto challenge is p. legit

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison
I don't think I understand maven at all

Shaggar
Apr 26, 2006
maven rules

kitten emergency
Jan 13, 2008

get meow this wack-ass crystal prison
specifically i dont understand why i have an application that requires bootstrapping the db schema but for some reason you do that through maven

why not just give me a big rear end sql file

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

uncurable mlady posted:

I don't think I understand maven at all

yeah me neither

like in ant as awful as it is you could at least see the commands in the XML. where is that stuff in the pom? gently caress if I know I'm just like mvn run:jetty and ~magic happens~ and jetty runs

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

uncurable mlady posted:

specifically i dont understand why i have an application that requires bootstrapping the db schema but for some reason you do that through maven

why not just give me a big rear end sql file

just write your builds in shell or python or whatever scripting language you like because you'll end up doing it eventually so you might as well start it out cleanly instead of having 10 different build systems knit together with shell scripts

JewKiller 3000
Nov 28, 2006

by Lowtax
if you write the whole thing in shell script then it doesn't feel so dirty to knit the parts together with more shell scripts!

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

rotor posted:

just write your builds in shell or python or whatever scripting language you like because you'll end up doing it eventually so you might as well start it out cleanly instead of having 10 different build systems knit together with shell scripts

TBH this is probably fine if your project is small enough that you don't care about being able to do incremental builds

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

Jabor posted:

TBH this is probably fine if your project is small enough that you don't care about being able to do incremental builds

there's nothing that prevents you from doing incremental builds in shell

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
actually compiling things is like the smallest, easiest, simplest part of a build

FamDav
Mar 29, 2008

rotor posted:

actually compiling things is like the smallest, easiest, simplest part of a build

the hard part is actually codifying how dependencies should get consumed and how i should output the results of my build to make it consumable.


rotor posted:

yeah me neither

like in ant as awful as it is you could at least see the commands in the XML. where is that stuff in the pom? gently caress if I know I'm just like mvn run:jetty and ~magic happens~ and jetty runs

so there's a package called jetty-plugin out there, and in that package is a class with an annotation that says its name is run. when you type mvn jetty:run and you have a dependency on the jetty-plugin, maven is saying "hey, lets pass these parameters to this here class in this here plugin and call its execute method!" and then that class spins up the jetty instance. everything ends up in the right place because maven assumes certain conventions on directory structure, kind of like ant (or at least the heavily modified version of ant im used to working with).

like its literally all here: http://eclipse.org/jetty/documentation/current/jetty-maven-plugin.html#jetty-run-goal

maven is actually a p decent build system for p decent language we all deserve, which is much better than most of the other options.

FamDav
Mar 29, 2008
ant is to spring xml as maven is to spring annotations

while you might never have a need for either of them, one is obviously superior to the other.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

rotor posted:

there's nothing that prevents you from doing incremental builds in shell

you're going to write your shell script to check which dependencies need to be recompiled and only rebuild the things that do?

if you gently caress that up even once, someone wastes a bunch of time dealing with an "impossible" bug caused by not recompiling something that needed to be recompiled, and then no-one trusts your incremental builds anymore and wastes a whole bunch of time doing full builds because they at least know they'll be correct.

FamDav
Mar 29, 2008

Jabor posted:

you're going to write your shell script to check which dependencies need to be recompiled and only rebuild the things that do?

if you gently caress that up even once, someone wastes a bunch of time dealing with an "impossible" bug caused by not recompiling something that needed to be recompiled, and then no-one trusts your incremental builds anymore and wastes a whole bunch of time doing full builds because they at least know they'll be correct.

i mean, this part isn't all that hard.

1) declare some schema for declaring dependencies in a package. i dunno use json or something.
2) build dependency graph.
3) remove all nodes in the dependency graph which are neither dirty nor have a (transitive) dependency on a dirty node
4) build the graph. you could probably just have a shell script in the package which is a convenient name like build.sh that gets invoked. you'll probably want the calling shell script to set up ENV variables for outputdir and make some directions that are good convention, but dont think too hard about that maybe?

you could bang this bit out pretty quickly. you probably also want the ability to declare custom targets (dev-build, unit-test, etc.) and convention-based build tools (so i can just use the my-build-system-jar-builder to build everything with my company's convention) but other than that you're pretty much good to go.

then again why would you waste dev time on this when you have maven and the entirety of the maven package library at your disposal.

FamDav
Mar 29, 2008
the point when your build system starts getting really interesting? when you start adding package semver to dependencies.

but you won't need this until you're at the point where either updating dependent packages in one fell swoop is cost prohibitive OR you can have multiple HEAD/tips for however you're managing your code.

Jabor
Jul 16, 2010

#1 Loser at SpaceChem

FamDav posted:

then again why would you waste dev time on this

yeah that's kind of what I'm getting at. having a shell script that runs cc on all your source files is trivial, having one that does proper dependency tracking and incremental builds is basically reinventing <insert build tool here> except in a lovely bespoke form.

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

Jabor posted:

you're going to write your shell script to check which dependencies need to be recompiled and only rebuild the things that do?

if you gently caress that up even once, someone wastes a bunch of time dealing with an "impossible" bug caused by not recompiling something that needed to be recompiled, and then no-one trusts your incremental builds anymore and wastes a whole bunch of time doing full builds because they at least know they'll be correct.

no, I'll just use make like a normal human being. if you only ask make to do simple things it's pretty bulletproof and it's warts are well-known and easy to avoid.

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome
or don't, I mean poo poo, most of the code that's being written today either isn't compiled at all or compiles super fast.

all the hosed up awkward poo poo is shuffling files around before and after the fact and spitting out configs and archiving poo poo and the nine million corner cases that every build has to contend with.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

use buck

Stringent
Dec 22, 2004


image text goes here
use node and fuckitjs

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

FamDav posted:

the hard part is actually codifying how dependencies should get consumed and how i should output the results of my build to make it consumable.


so there's a package called jetty-plugin out there, and in that package is a class with an annotation that says its name is run. when you type mvn jetty:run and you have a dependency on the jetty-plugin, maven is saying "hey, lets pass these parameters to this here class in this here plugin and call its execute method!" and then that class spins up the jetty instance. everything ends up in the right place because maven assumes certain conventions on directory structure, kind of like ant (or at least the heavily modified version of ant im used to working with).

like its literally all here: http://eclipse.org/jetty/documentation/current/jetty-maven-plugin.html#jetty-run-goal

maven is actually a p decent build system for p decent language we all deserve, which is much better than most of the other options.

btw I did not mean to imply that ant was better than mvn - ant suuuuuuuuuucks - I just don't find it as Immediately approachable

FamDav
Mar 29, 2008

rotor posted:

btw I did not mean to imply that ant was better than mvn - ant suuuuuuuuuucks - I just don't find it as Immediately approachable

again, spring xml vs spring annotation

also my iPhone wanted to correct mvc to mvvm lolllll

Valeyard
Mar 30, 2012


Grimey Drawer

btw i got somewhere north of 95% for that haskell assignment :toot:

Brain Candy
May 18, 2006

rotor posted:

btw I did not mean to imply that ant was better than mvn - ant suuuuuuuuuucks - I just don't find it as Immediately approachable

ya, mvn is fully of mystery initially. but each time you need to do a thing you'll find 'oh, somebody thought of that' if you look hard enough

instead of mucking around in a pile of scripts like some filthy cj

gonadic io
Feb 16, 2011

>>=

Valeyard posted:

btw i got somewhere north of 95% for that haskell assignment :toot:

i'm being a teaching assistant for first year beginner haskell again this term! another semester of saying "yes that's how you'd do it in c but haskell is different" and 50% of them them saying "it's different? it sucks!"

power botton
Nov 2, 2011

gonadic io posted:

i'm being a teaching assistant for first year beginner haskell again this term! another semester of saying "yes that's how you'd do it in c but haskell is different" and 50% of them them saying "it's different? it sucks!"

well theyre right but for the wrong reasons

Captain Foo
May 11, 2004

we vibin'
we slidin'
we breathin'
we dyin'


buck if u ???

rotor
Jun 11, 2001

classic case of pineapple derangement syndrome

Brain Candy posted:

instead of mucking around in a pile of scripts like some filthy cj

which you will eventually do anyway, so you might as well lay back and try to enjoy it

Space Whale
Nov 6, 2014

rotor posted:

which you will eventually do anyway, so you might as well lay back and try to enjoy it

powerbottom users have more fun

Shaggar
Apr 26, 2006

rotor posted:

yeah me neither

like in ant as awful as it is you could at least see the commands in the XML. where is that stuff in the pom? gently caress if I know I'm just like mvn run:jetty and ~magic happens~ and jetty runs

ant is total poo poo piss trash. nobody should be using ant ever.

Adbot
ADBOT LOVES YOU

Shaggar
Apr 26, 2006
a pom defines what you want your project to be and maven makes that happen.

ant is shell scripts in xml that may or may not have anything to do with your projects.

ant is garbage.

  • Locked thread