
Brisket – A new single-page application framework - apaprocki
http://www.bloomberg.com/company/2015-03-24/bloomberg-weve-made-brisket-can-make-anything/
======
andy_ppp
>>> We’ve been hard at work deploying Brisket to power three of the best and
fastest sites on the web — BloombergView.com, BloombergPolitics.com, and
BloombergBusiness.com.

Okay so after throwing up a bit at the hyperbole I played around with said
sites. They feel fairly slow and loading different sections seems to be random
how long it will take to register my click event. UX for showing page loading
seems very limited and the differences in times of load for things feels very
off.

Content sites like the ones Bloomberg mentions should not be done as single
page webapps! The problem of rendering pages that have HTML on them has been
solved - probably best to leave stuff like Brisket for apps that need it, like
stock exchanges or real time analytics.

~~~
aikah
And those 3 sites render with javascript off(I guess thanks to
"isomorphism")... which means they don't need to be single page apps at first
place.

~~~
xtrumanx
Which would you prefer, a full page refresh that will refetch a large portion
of the page that you're already looking at or an ajax call that will return
far less bytes than a full page refresh would have and then replacing only the
parts of the page that needs changing?

Also if its truly isomorphic, everything would still work as usual if
javascript is off.

~~~
DougWebb
I want the page I'm looking at to be mostly the content I'm interested in, so
when I follow a link to get more content most of the page _should_ be updated.
Under those conditions, a full page refresh is preferable because it works
nicely with the browser history, bookmarking, "Email this Link" feature, and
anything else I might want to do with the page of content.

~~~
xtrumanx
I should have prefaced my original question with "all other things being
equal...".

I believe you can have browser history, bookmarking, email this link any thing
else you might want to do with the page in a single page application and also
get the benefit of not doing a full page refresh.

Single page application are reletively new and kinks are being worked out but
if I could have my cake and eat it too, I wouldn't stand in the way of those
trying to make that a reality.

------
rdtsc
Btw, does "Isomorphic Javascript" rub anyone the wrong way or am I the only
one.

It seems like someone watched a Haskell tutorial and copied a smart sounding
word and just appended it to Javascript. This used to be called "code reuse".
But that doesn't sound as cool anymore.

~~~
toomim
Hear hear! It's even the wrong word. Isomorphic means "same shape", which that
means that the "shape" of the code is the same between client and server on
these apps.

Huh? What's the "shape" of code?

It's not actually the "shape" that's the same, it's the HTML that it produces.
It would be more accurate to call this Isohtml or Isoproduce or Isooutput
apps.

People say Isomorphic when they don't know what they are saying, and want to
sound smart in greek. Idiots.

~~~
masklinn
> Huh? What's the "shape" of code?

The code itself is the shape of the code, to an appoximation. Isomorphic
applications run the same code (or big swathes thereof) on the client and the
server, so that the common core exists only in one place.

> It's not actually the "shape" that's the same, it's the HTML that it
> produces. It would be more accurate to call this Isohtml or Isoproduce or
> Isooutput apps.

A port of an application would satisfy that criteria, but would not fall under
the moniker of isomorphic. If you have a better term to qualify applications
with extensive to almost complete code-sharing between the client and the
server, feel free to try and popularise it, but so far your demonstrations
have been sorely lacking.

> People say Isomorphic when they don't know what they are saying, and want to
> sound smart in greek. Idiots.

Heh.

------
eljimmy
Brisket also depends on the following libraries:

jQuery ~1.11.1 jsdom ~0.11.1 Underscore ~1.6.0 Backbone ~1.1.2 bluebird ~2.2.1
jquery-mockjax ~1.5.3 express ~4.0.0 qs 1.2.2

ಠ_ಠ

~~~
acjohnson55
Are you suggesting that's a lot? Or just making an observation?

------
wanda
Link to actual GitHub repo:

[https://github.com/bloomberg/brisket](https://github.com/bloomberg/brisket)

At a glance it looks unnecessarily heavy but nice to see more open sourcing.

------
127001brewer
What exactly is a "single-page application"?

Wikipedia states that it " _is a web application or web site that fits on a
single web page with the goal of providing a more fluid user experience akin
to a desktop application. In an SPA, either all necessary code – HTML,
JavaScript, and CSS – is retrieved with a single page load, or the appropriate
resources are dynamically loaded and added to the page as necessary, usually
in response to user actions._ " [1]

How is this any different from any other web application?

[1] [http://en.wikipedia.org/wiki/Single-
page_application](http://en.wikipedia.org/wiki/Single-page_application)

~~~
lbotos
It's different in that before you might have:

home.html profile.html group.html

and all of those pages are literally different views and you use ajax to grab
the data.

Now you build:

index.html

with subviews and essentially index is doing all of it. Picking your subviews,
handling making urls, rendering, making the requests.

I still haven't found a "class" of app that is "better" with SPAs. Just about
anything you would do with an SPA you can do another way. SPAs are just the
"cool new thing".

~~~
bduerst
This is a pretty good explanation, and I'd also add that SPAs move away from
the traditional server-structure URL path mentality, which wasn't very user
friendly and never really needed. Now URLs are kept mostly for sharing or
bookmarking.

i.e. www.domain.com/user/profile/update.html can just be handled in index.html

~~~
acjohnson55
By "traditional server-structure URL path mentality", do you mean the mapping
of URLs directly to static files on the filesystem? If so, I'd argue that's a
separate issue from SPA vs. MPA. After all, most MPA frameworks, like Django
and Rails, break that equivalence. URLs map to controllers, rather than
particular templates.

~~~
bduerst
I meant the mentality, which started with URL static file mapping and
continued with web routing. Not all URL path routing is bad, but with SPAs you
get more focus on what the customer uses URLs for (i.e. URL paths for sharing
a picture, etc.) rather than parsing page functionality out across different
paths.

It's my opinion this URL simplicity makes a better user experience, but that's
just my opinion.

------
rckrd
As an anecdote, the websites did seem to load slow for me. And as a previous
commenter has added, I'm not sure a news hub is best suited as a SPA.

~~~
bshimmin
How do we feel about USA Today
([http://www.usatoday.com/](http://www.usatoday.com/))? That's a Backbone SPA
and it seems to work quite well (though the adverts cause some loading
unpleasantness from time to time).

It's certainly highly debatable as to whether there is any genuine benefit in
presenting a text-heavy (in theory) site as a SPA. Bloomberg does the
moderately clever "one article follows another article" thing, which I
personally quite like but others here were fairly negative about.

~~~
jessaustin
_(though the adverts cause some loading unpleasantness from time to time)_

It seems most sites that have speed/responsiveness/usability problems, get
those problems mostly from their ads. It doesn't reflect well on the site or
on the ad. I suspect it's because the metrics ad networks are using don't
capture their crappy performance. I wish the original sites themselves would
track ad problems and thus drive SLA compliance.

------
bdcravens
I find it interesting that this is coming through their main news channel
(main website and Twitter), rather than a side channel, like an engineering
blog.

------
Dirlewanger
Feels like April Fool's Day reading this.

~~~
pdq
When I saw the trademark, I immediately thought the same: Brisket™

And since I live in Austin, I feel especially offended for Yankees
trademarking deliciousness.

~~~
dopamean
I'm also in Austin and thought, "this is the most Austin named framework."

~~~
fokinsean
I'm in Austin too, we need to hurry up and make the Breakfast Taco™ framework
before someone else does.

~~~
mrkipling
You joke, but I've heard worse names for frameworks.

------
1971genocide
I find Bloomberg an interesting company. The first start-up I worked for made
all their money selling software to Bloomberg. Now Bloomberg is recruiting
JavaScript programmers on my Uni campus offering salary on par with Twitter.
Maybe they want to be hip ? who knows.

------
fokinsean
At first glance this just looks like a Backbone wrapper.

------
bshimmin
Is "brewery" the new "factory"?
[https://github.com/bloomberg/brisket/blob/master/docs/briske...](https://github.com/bloomberg/brisket/blob/master/docs/brisket.routerbrewery.md)

~~~
huu
Brisket, breweries, and routers should never be mixed. The symbolism here is
so disquieting.

------
dataker
Although I loved the open-source initiative, I'd be wary while taking it as a
framework.

------
bandrami
Wait. Did I wake up in 1988? Isn't this Hypercard?

------
ndboost
greaaaat another front-end js framework, as if we didn't have enough already
-_-

~~~
duderific
I wouldn't get too worried about needing to add Brisket to your bag of tricks
anytime soon.

