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.
 
  • Post
  • Reply
piratepilates
Mar 28, 2004

So I will learn to live with it. Because I can live with it. I can live with it.



LiveReload is also pretty great for CSS changes (although I don't know if Webpack would interact the same way) because it just has to reload the stylesheet and not refresh the page.

edit: For posterity you can do the concatenating and live reloading with any build system at this point (Grunt, Gulp, Webpack, Browserify, JSPM, Broccoli *shudders*), Webpack just does a pretty great job of it all IMO.

Adbot
ADBOT LOVES YOU

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
what's the difference between brunch.io and webpack and browserify

piratepilates
Mar 28, 2004

So I will learn to live with it. Because I can live with it. I can live with it.



Never heard of Brunch, I'm sure it's stupid.

Difference between Webpack and Browersify, at this point honestly it's probably just that Webpack is designed around letting you require all dependencies in your code instead of just JS dependencies, while Browserify is probably just about the concatenating and plugins part.

Also Browserify lets you include some node.js libraries as part of your front-end code I believe, which Webpack may not by default.

At some point it's just about picking one because you'll probably be dissatisfied with whichever one you pick in some respect, and they all do the same basic important things you need.

But choose Webpack.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
brunch looks p cool ngl

Skandranon
Sep 6, 2008
fucking stupid, dont listen to me

Suspicious Dish posted:

what's the difference between brunch.io and webpack and browserify

They come from different places. Browserify was never really intended as a tool to actually bundle your normal web assets. As it's name implies, it's function was to wrap around Node.js libraries and make them available in the browser, ie, to 'browserify' the library. It is a side effect this also allows bundling together the rest of your JS code. It's been around for awhile now, so has a lot of tooling built around it, and is built around allowing plugins, so it can be very flexible.

Webpack is newer, and specifically designed for packaging web assets. However, it attempts to be a somewhat all-in-one solution, and using it feels like Grunt (setting up a giant config file). It is probably where the future is for bundling assets.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Skandranon posted:


Webpack is newer, and specifically designed for packaging web assets. However, it attempts to be a somewhat all-in-one solution, and using it feels like Grunt (setting up a giant config file). It is probably where the future is for bundling assets.

My webpack config for hot reloading a React app is 15 lines. Is that giant these days? :v:

Skandranon
Sep 6, 2008
fucking stupid, dont listen to me

Lumpy posted:

My webpack config for hot reloading a React app is 15 lines. Is that giant these days? :v:

More than 1 line of Grunt is too many. :colbert:


I've not had the chance to use Webpack yet, but I don't like Grunt so I'm putting it off. I've heard good things, aside from the config style

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

Skandranon posted:

More than 1 line of Grunt is too many. :colbert:


I've not had the chance to use Webpack yet, but I don't like Grunt so I'm putting it off. I've heard good things, aside from the config style

I tried Grunt once. It was not a good experience. Webpack config is pretty simple for basic stuff, and it's just javascript.

Huzanko
Aug 4, 2015

by FactsAreUseless

Odette posted:

Is node.js really that bad?

Just wondering cause I'm trying to learn the MEAN stack as opposed to a standard LAMP stack.

Nah, people just hate on JS because they're babies. Lots of the frameworks built on node are young but the MEAN stack is pretty solid.

Impotence
Nov 8, 2010
Lipstick Apathy

Noam Chomsky posted:

Nah, people just hate on JS because they're babies. Lots of the frameworks built on node are young but the MEAN stack is pretty solid.

I wish people would stop trying to force things like relational user<>content tables into something like mongodb though. It has its place, but arguably doing things like running a forum with category, posts, and users should not be done totally into mongo (at least two exist)

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
Choosing the technologies you're using based on whether the first letters can be made into a word is really dumb, hth.

Chances are high that anyone using MEAN has made completely the wrong decision for at least one of the components, and since everything's relatively new tech you don't even have the advantage of heaps of people treading the same road in the past to help you work through issues.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

Jabor posted:

Choosing the technologies you're using based on whether the first letters can be made into a word is really dumb, hth.

Chances are high that anyone using MEAN has made completely the wrong decision for at least one of the components, and since everything's relatively new tech you don't even have the advantage of heaps of people treading the same road in the past to help you work through issues.
I agree with your main thesis here in the sense that MongoDB is almost never a good decision, but the "relatively new tech" angle is super-weird. The V8 engine has been around since 2008 and tested on literally hundreds of millions of installations, and all four of MongoDB, Express, Angular and Node.js have been in wide use since 2009. Angular is quite probably the least mature of these components, with people only picking it up around 2011, but having around 43,000 stars on GitHub suggests that "heaps of people" may have, in fact, tread that same road. at worst you're still talking about 4 years of solid dev time with heavy user exposure, which is way different than using someone's open-source hobby framework that hasn't seen a commit in 10 months.

Huzanko
Aug 4, 2015

by FactsAreUseless
MongoDB seems very popular and well-used for something that gets so much hate on reddit and a comedy site subforum...

It seems pretty neat to me. Sure, I wouldn't use it for everything but I can see it could have a lot of uses.

Skandranon
Sep 6, 2008
fucking stupid, dont listen to me

Noam Chomsky posted:

MongoDB seems very popular and well-used for something that gets so much hate on reddit and a comedy site subforum...

It seems pretty neat to me. Sure, I wouldn't use it for everything but I can see it could have a lot of uses.

NoSQL databases have a very specific use case where it is actually beneficial. However, a lot of people have jumped on the bandwagon of NoSQL replacing relational databases, which doesn't make any actual sense, but people are trying anyways.

Huzanko
Aug 4, 2015

by FactsAreUseless

Skandranon posted:

NoSQL databases have a very specific use case where it is actually beneficial. However, a lot of people have jumped on the bandwagon of NoSQL replacing relational databases, which doesn't make any actual sense, but people are trying anyways.

Which is?

(I'm genuinely asking.)

Huzanko fucked around with this message at 17:42 on Sep 18, 2015

Impotence
Nov 8, 2010
Lipstick Apathy

Noam Chomsky posted:

Whichs is?

(I'm genuinely asking.)

I store documents in my mongo/rethink. Occasionally I aggregate/run analytics on them. I don't know the schema of the documents at insertion time and they can change without warning.

Huzanko
Aug 4, 2015

by FactsAreUseless
As an aside, I really enjoy working with API driven architecture.

Does anyone see anything wrong with setting up a Rails JSON API on one server and then throwing the front-end code in an S3 bucket and then configuring CORS on the Rails server to make it all work? I'm interested in hearing about the issue that might surround that architecture.

Huzanko
Aug 4, 2015

by FactsAreUseless

Biowarfare posted:

I store documents in my mongo/rethink. Occasionally I aggregate/run analytics on them. I don't know the schema of the documents at insertion time and they can change without warning.

Yeah, that's one of the ways the company I work for used Mongo for a client project.

Skandranon
Sep 6, 2008
fucking stupid, dont listen to me

Noam Chomsky posted:

Which is?

(I'm genuinely asking.)

Well, think of NoSQL databases as giant, persisted hashtables. Usually does well for things that don't need to be broken up, or have differing structures, or will only ever have one way of accessing (via the hash key). But if you ever want to start combining objects (header data + rows), you want a relational database.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Noam Chomsky posted:

As an aside, I really enjoy working with API driven architecture.

what the gently caress does this mean

Huzanko
Aug 4, 2015

by FactsAreUseless

Suspicious Dish posted:

what the gently caress does this mean

I enjoy writing SPAs that interact with the server via a JSON API.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
i have no idea what a spa is

piratepilates
Mar 28, 2004

So I will learn to live with it. Because I can live with it. I can live with it.



Suspicious Dish posted:

i have no idea what a spa is

Single page application, like angular, ember, etc.

Basically he's making a website with a JavaScript framework in 2015 in other terms.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
so your website won't have any seo. gj

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

Suspicious Dish posted:

so your website won't have any seo. gj
literally every application must be search engine crawlable, even internal ones or ones that don't display search engine-relevant content, and there is no way to provide any content to a search engine in a single-page application

-suspicious dish

Impotence
Nov 8, 2010
Lipstick Apathy

Suspicious Dish posted:

so your website won't have any seo. gj

this is horribly wrong, wtf? google crawlers can most definitely run js, angular, and cache them like you'd render a server side view for them

Wheany
Mar 17, 2006

Spinyahahahahahahahahahahahaha!

Doctor Rope

Vulture Culture posted:

I'm a stupid moron with an ugly face and a big butt and my butt smells and I like to kiss my own butt.

Impotence
Nov 8, 2010
Lipstick Apathy
im pretty sure a large part of the world would never leave their bedroom if it was possible to kiss their own butt

bartkusa
Sep 25, 2005

Air, Fire, Earth, Hope

Suspicious Dish posted:

so your website won't have any seo. gj

Isomorphic JS (using the same JS on the client and server) is a Thing. Almost. Soon.

We've got it working. Big perf win, dev win, SEO win.

Lumpy
Apr 26, 2002

La! La! La! Laaaa!



College Slice

bartkusa posted:

Isomorphic JS (using the same JS on the client and server) is a Thing. Almost. Soon.

We've got it working. Big perf win, dev win, SEO win.

They renamed it "Universal JS", btw. (Because it's JS land, so things must change every month or else)

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.
One of these things is untrue (guess which?)

geeves
Sep 16, 2004

Noam Chomsky posted:

Which is?

(I'm genuinely asking.)

Free-form content. One of the best examples (regardless of if you think it's good) is Adobe CQ. It runs on a Java Content Repository JSR-283 is the current implementation off the top of my head (I may be wrong). While the content is structured by type (String, Integer, Date...), it's not bound by a DB structure and is stored in a nodal way so it is very conducive (and CQ has this built in) to simply exporting objects straight to JSON or XML or even HTML.

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

Vulture Culture posted:

literally every application must be search engine crawlable, even internal ones or ones that don't display search engine-relevant content, and there is no way to provide any content to a search engine in a single-page application

-suspicious dish

yes, all of these things are true

Skandranon
Sep 6, 2008
fucking stupid, dont listen to me

Suspicious Dish posted:

yes, all of these things are true

Aside from the fact that the Google crawler can execute Javascript so it can read SPAs just fine.

http://searchengineland.com/tested-googlebot-crawls-javascript-heres-learned-220157

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
google is not the only search engine.

Subjunctive
Sep 12, 2006

✨sparkle and shine✨

And Google's JS execution is somewhat limited. It doesn't do XHR, or timeouts, both of which are pretty common in building SPAs.

Impotence
Nov 8, 2010
Lipstick Apathy

Subjunctive posted:

And Google's JS execution is somewhat limited. It doesn't do XHR, or timeouts, both of which are pretty common in building SPAs.

I definitely had webpages indexed on google with content in the description only visible by executing a setTimeout(eval($.ajax())) blob, this was in late 2013.

Thermopyle
Jul 1, 2003

...the stupid are cocksure while the intelligent are full of doubt. —Bertrand Russell

Regardless of the specifics, having a SPA does not mean you don't or can't do SEO.

Kobayashi
Aug 13, 2004

by Nyc_Tattoo
Yeah Ember's whole schtick was a URL-based router that makes webapps behave like normal web pages.

Adbot
ADBOT LOVES YOU

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe
it makes it a whole lot harder. yes, i know about the crazy #! thing

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply