Тёмный
No video :(

Hacker Way: Rethinking Web App Development at Facebook 

Meta Developers
Подписаться 164 тыс.
Просмотров 888 тыс.
50% 1

Delivering reliable, high-performance web experiences at Facebook's scale has required us to challenge some long-held assumptions about software development. Join us to learn how we abandoned the traditional MVC paradigm in favor of a more functional application architecture.

Опубликовано:

 

28 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 288   
@robb-eadsfamily
@robb-eadsfamily 6 лет назад
Still completely relevant and a good watch. Doesn't matter to me if the problems described were a result of doing something the wrong way, as many of the comments have pointed out. Millions of developers, including really good ones, do bad things every day. Adding Flux or anything else that enforces doing something the right way is valuable.
@VictorMartinez-zf6dt
@VictorMartinez-zf6dt 5 лет назад
I love how everyone here is an expert in MVC.
@magne6049
@magne6049 3 года назад
11:15 I think it's helpful to know that this is _client side_ MVC, where Action is a user action, like clicking on a button in a view, which then gets directed directly to a controller (which updates a model, which may again update views, i.e. you get two-way data flow)
@tomcanham9218
@tomcanham9218 9 лет назад
Oh, thank goodness! I thought I was the only one who was so dense that he couldn't "get" this. She kept saying "the arrows only go in one direction!" when even her own diagram showed that not to be true. The core problem is that they were "doing" MVC wrong. Then they fixed it, but decided to rebrand it and say they'd invented the pattern of decoupling data, view, and event handling.
@FW7737
@FW7737 8 лет назад
+Tom Canham yes, they sucked :)
@chanthien99
@chanthien99 8 лет назад
+Tom Canham Yeah. Model updates the View? Shouldn't that be the controller's job? And that's what their "dispatcher" really is. A controller. Facepalm...
@wyattarent156
@wyattarent156 8 лет назад
+chanthien99 I can definitely see where where you're coming from. Often times this is the case when using something like jQuery. However, this isn't quite how things work for large production-scale applications. If you interact with the view directly via the controller, generally that means you're modifying the DOM in an unsafe way. Interacting with the model and then using data-binding keeps the data safe and the view protected. The dispatcher basically stops controller collision when you have bi-directional binding or what would otherwise become deadly circular events. I've written AngularJS applications with dozens of controllers and thousands of lines of code. When you accidentally cause a circular process, the errors are... cryptic.
@wyattarent156
@wyattarent156 8 лет назад
+Tom Canham So in the video it shows Action -> Dispatcher -> Store -> View, and then view goes pointing back to action and then dispatcher. Because the way view modules are re-rendered with each update, what she's actually implying here is that the arrows go forward indefinitely. i.e. Before the action in her list, there was a View, before that there was a Store. And After the view there's an action, Dispatcher, Store, View, Action, Dispatcher, Store, View, etc, etc. Not technically circular, but forward indefinitely
@007KrausBean
@007KrausBean 7 лет назад
Exactly. It was a rebranding of MVC. This was silly how they presented this. Really this was related to AJAX work and not really all of MVC. They wanted real-time rerendering without a page flicker...big deal, it is still MVC all the way with some JS magic to redraw things.
@rdean400
@rdean400 10 лет назад
It seems like the assertion that "MVC doesn't scale" is borne more out of their spectacular misapplication of it than from a scholarly analysis of the pattern.
@Przepoczwarzenie
@Przepoczwarzenie 9 лет назад
Robert Dean Yeah, I was terrified, when I saw this MVC image...
@CollMomo1
@CollMomo1 8 лет назад
+Robert Dean exactly, who the fuck are they to question the most original and fundamental idea of software engineering
@freeedom22
@freeedom22 7 лет назад
Well, to be fair, you have to admit they are, you know, Facebook, the most heavily trafficked web "app" (ie not only search) on the planet.
@wrightclick
@wrightclick 4 года назад
Yeah, Github's MVC architecture sure isn't scaling well, AMIRIGHT?! Forreal, this talk made me wonder if Facebook engineers were just afraid to tell their bosses that their legacy code sucked lol
@jakubrpawlowski
@jakubrpawlowski 6 лет назад
I don't understand why so many hateful comments. Personally I really enjoyed the talk. Keep up a good work!
@marciomafideju1775
@marciomafideju1775 6 лет назад
Envy. They have tried to work at Facebook but got rejected, now they hate the company.
@mfpears
@mfpears 11 месяцев назад
0:00 Intro 3:00 The chairs are nice 3:25 Quality software adds value but takes time 6:00 Can we produce quality faster? 7:18 MVC got really complicated, really quickly 9:02 Increasing predictability was the key 9:30 Flux and React increase predictability "An architecture and a framework" 10:20 Jing Chen 10:29 The problems with MVC 10:55 Explosion of arrows, infinite loops? 11:42 Flux 12:30 "please improve chat system." 13:18 How Chat got buggy 14:16 Problems: No structure, imperative, lost intent 14:42 Imperative code led to most annoying bug 15:15 The problem kept coming back 15:31 External control 16:03 Internal control (colocation) 16:21 Explicit data 17:31 Separate data from view state 17:56 One action at a time Downstream doesn't dispatch actions, so there aren't arrows going in the other direction 18:29 Unidirectional is easier to understand 20:37 Consistent 20:50 Easier to debug: The thing that's wrong is the thing that's wrong 21:16 More meaningful unit tests 21:47 The bug went away, finally 22:30 Imperative rendering was fragile 24:18 React
@PeteSchirmer
@PeteSchirmer 10 лет назад
am I missing something?? it seems like they were just doing MVC wrong in the first place... they had views and models intertwined... and flux sounds more and more like they are just doing MVC with some good event signal control and calling it something different.... unless I'm missing something.. 'action' = 'event', 'dispatcher' = 'controller', 'store' = 'model', & 'view' = 'view'
@blueshifter
@blueshifter 10 лет назад
That's exactly what I felt - their models were too thin and were not properly maintaining their own state, so they went and fixed it, but decided to act like they just invented sliced bread!
@aiboy88
@aiboy88 10 лет назад
They tottaly got MVC wrong.. and becouse of that created another pattern - witch is not too far away from MVC -.-
@SimpleMindD
@SimpleMindD 10 лет назад
Completely agree. Their problem was that they got their model layer designed wrong in the first place. This kind of complex state can be modeled easily with relational data structure or object graph. Apple even had released CoreData framework for this like 10+ years ago! There's nothing wrong even if you choose to write you own model layer instead of using framework to handle this kind of data. To me this is still a strictly MVC.
@mtzaldo
@mtzaldo 10 лет назад
I felt the same way. I was checking the examples and comparing stuff, and it seems that they were doing mvc the wrong way and tried to minimized the "side effects" of how they were using it. To me is more like MVP.
@dmg46664
@dmg46664 10 лет назад
The difference that I can tell is that usually when a controller processes event A and during processing needs to fire off event B then update the view, event B is fired off immediately which cascades. Here event B isn't acted apon until controller is finished updating the view. If the controller acting on event B fired off events C, D and E, none of this would happen until their views were finished updating. The dispatcher is what is unique here.
@pablocacaster
@pablocacaster 10 лет назад
anyone felt like the first 7 minutes are just cliches?
@bichitomax
@bichitomax 10 лет назад
More like a Deja Vu
@rektal6741
@rektal6741 10 лет назад
I noticed that in first minute. So thanks, I just skipped the first 7.
@IdoSchacham
@IdoSchacham 4 года назад
Hooli - making the world a better place
@abc3631
@abc3631 3 года назад
It screams of the attitude "hey I work for Facebook, i am so much better than you ordinary souls"
@TBadalov
@TBadalov 3 года назад
well, most of the engineers are like this, welcome :D
@franleplant
@franleplant 9 лет назад
This video, independently of what you think of Flux arch, is really thorough and clear. Thanks you for this!
@EricNguyenntd
@EricNguyenntd 9 лет назад
Am I the only one who thought that the MVC diagram Jing showed is wrong? Where is the arrow from Controller to Model? The arrow from Model to View is not supposed to there right (Unless this is part of two-way data binding framework which I don't know about)?
@MichalZalecki
@MichalZalecki 9 лет назад
Eric Nguyen I totally agree. Now, especialy in Angular, we have one controller per view (possibly nested). Lets say that sth like 4 (for CRUD) controllers per one model. Routing and cache're in front of that. I'm disappointed with the questions at the end.
@jimmyjimbo72
@jimmyjimbo72 9 лет назад
Eric Nguyen I was thinking the same thing!
@steinybot6709
@steinybot6709 9 лет назад
Eric Nguyen I just asked my workmate the same question and came here to see if there were any comments and low and behold here it is. If you ask me the Dispatcher is just a special implementation of a Controller where it only processes new actions when all the Models have been updated. Nothing special.
9 лет назад
Eric Nguyen Jason Steenstra-Pickens, totally right. This sounds like a blocking system... How this blocking thing behaves in Node's non-blocking world??
@mykedev4377
@mykedev4377 6 лет назад
Searching around the internet, you can find different diagrams about the MCV structure and flow, It would be nice to check the source info of this model, idk where to find it though.
@glialcell6455
@glialcell6455 9 лет назад
Flux is just another MV* in disguise, but it sure is a well thought-out and well implemented one.
@magne6049
@magne6049 3 года назад
12:16 Yes, Dispatcher = Controller, Store = Model, and View only gets to talk to the Dispatcher/Controller, instead of talking directly to the Store/Model (as opposed to what they had in their buggy MVC implementation; which was based on observables, as heard at 37:13).
@Chris-fu9hr
@Chris-fu9hr 3 года назад
People don't see the benefits of it is either because they don't have a large enough system or performance is not a concern. It's really easy to do MVC wrong if you have a large team or application. You can argue it's because it's doing MVC wrong rather than the problem of the MVC itself. But with the "rebranded MVC" pattern, we have strict rules to avoid doing some wrong things. So, I think it still worth a new name for it.
@l3p3
@l3p3 4 года назад
I agree that this issue with the mess off arrows should not happen if you implement controllers cleanly but still, using controllers is somewhat procedural programming. What the presented concept is doing is advising functional programming which is a lot easier to understand which also makes it much more stable. I agree with the core message and I like using react a lot!
@pauljessica971
@pauljessica971 4 года назад
Perfect and legit hacks service with this pro on Instagram andrewhack4 really impressed me with his fast and reliable hacks
@shuangshuangliu
@shuangshuangliu 5 лет назад
This video and Redux saved my life 3 times at different companies. I just bookmark the timeline and share to different people.
@soflyjunk8306
@soflyjunk8306 6 лет назад
it's been 4 years and i am still having that new message bug. sigh.
@sincitycyclops
@sincitycyclops 4 года назад
Six years now and still...
@livenews3544
@livenews3544 4 года назад
@@sincitycyclops was scrolling just to see this comment , it still bugs here hahaha
@BenJaminLDN
@BenJaminLDN 6 лет назад
The most frustrating thing about this video is it's 4 years old and the chat icon bug is happening right now on the Android app.
@joeespindola6574
@joeespindola6574 6 лет назад
People saying that her MVC graph is wrong dont think outside the box, my impression for the arrows that went back from the views are because that most MVC has to refresh their view after an update that was triggered from inside the view and needs new data. Its all about data flow and automatic data refresh without having to update views all the time.
@cheesebusiness
@cheesebusiness 8 лет назад
10:51 it is not MVC. In the real MVC View doesn't send anything to model. It only sends something to User and User triggers Action.
@despirithium
@despirithium 8 лет назад
View doesn't send anything : view is called/rendered by the controller and usually looks for Model's events to read and update itself.
@bassRDS
@bassRDS 7 лет назад
I think what she actually means is a situation, when doing something in one view, should change a state of another view. For example, let's say you hover on a new message in chat, that will update chatModel to highlight a new message. But also it should update the statusModel, where you have a counter of unread messages. And they have implemented MVC for chat first and then MVC for status bar, and have problems how to keep them in sync. The problem here is not in MVC, MVC would perfectly work if you just add some kind of event bus, which controllers will subscribe (receive messages from). And user will trigger an action on event bus, that's basically exactly their implementation, which they called FLUX (for some reason). Looks like, this lady doesn't fully understand what she is talking about, that picture on 11:28 is really, really weird. Her presentation skills is also quite poor, I don't want to offend anyone, but looks like they just need to introduce a non-European woman, to show how progressive they are.
@MrRazorronin
@MrRazorronin 7 лет назад
exactly.
@user-ed2yh9kp7d
@user-ed2yh9kp7d 7 лет назад
What a dumbass. MVC does not define any rules forbidding your view to interact with model. You're confusing MVC with MVA.
@flisboac
@flisboac 7 лет назад
@El Keegi In fact, for both MVC and MVA, the data flow is always unidirectional, from Model to View. View is explicitly stated to be an OUTPUT, and outputs do not generate data. What happens, though, is that the Controller generates that data through components of the View technology, and people always confuses one for another (e.g. a Javascript callback generating data from a text field in a web application). It may be confusing, but the user "controls" the Controller, and it is from this act of controlling that data is generated. If anything, you may be talking about MVVM or something similar, where an intermediate layer (ViewModel) makes data bindings with the View and Model, so that data flows naturally between those layers through this intermediate abstraction.
@yuriyhorobey2609
@yuriyhorobey2609 7 лет назад
She misunderstands what MVC is. Arrows between View and Model are wrong. There is always controller in between, only sometimes, in really simple cases you may skip it.
@rsjrx
@rsjrx 10 лет назад
Skip Tom's bullshit: 10:21
@tangoabcdelta1112
@tangoabcdelta1112 8 лет назад
+rsjrx the most useful, yet under-rated comment ever
@dangel962
@dangel962 7 лет назад
Over performing, idiot who isn't appealing to listen to. I feel your pain.
@13TrafalgarLaw
@13TrafalgarLaw 9 лет назад
Intriguing and challenging speech,info and presentation,very good
@T1mm0s
@T1mm0s 8 лет назад
The MVC part is quite weird. A view should not update the model. Did they think about having one central model for the chat thing on which multiple views are registered? Why wouldn't this work?
@b.k.williams1577
@b.k.williams1577 5 лет назад
Ironically I still encounter the same error Jing mentions here (~15m mark) about having an unseen message count with no unseen messages...
@neaumusic
@neaumusic 8 лет назад
hell yea, this video is dope. funny when people ask him to compare with angular and jquery "ajax" lolll, this is exactly what i needed to see, thank you very much for the awesome framework and good docs
@vsanzsanz
@vsanzsanz 9 лет назад
What's wrong with MVC & the Observer pattern? I believe you were doing it wrongly in the first place.
@jpratt8676
@jpratt8676 8 лет назад
+Virgilio Sanz TRUTH! Talk could be summed up with "Plan your functions!"
@moistbrownypoints
@moistbrownypoints 7 лет назад
I also enjoy the observer pattern. I implemented this pattern in Angular2 and it is turning out to be a blast!
@JoshKemmerer
@JoshKemmerer 6 лет назад
How is your testing going with that pattern?
@jonyzhu6531
@jonyzhu6531 7 лет назад
"moving related codes right next to each other" touches me :)
@avatarOfDave
@avatarOfDave 9 лет назад
Anyone else hear the reapers from Mass Effect attacking the convention center at 30:50?
@MichaelMattheakis
@MichaelMattheakis 10 лет назад
flux looks like it's just solving wrong mvc, but react looks really interesting/useful
@alessandromeyer4888
@alessandromeyer4888 9 лет назад
I don't see why you wouldn't implement things more decoupled anyway even without fancy new frameworks. Its all there in basic JS...
@FilipBocse
@FilipBocse 9 лет назад
+alessandro meyer because "implementing things more decoupled" on a regular basis by most of the engineers... would eventually give birth to... a framework :). Basic JS is ok, programming against it however, being an imperative language, is very difficult. The abstraction React offers is great, it pushes out that dreadful complexity of managing both intent, flow of execution and actual feature code (which is difficult not only because the language is shit :)) out of the way of the engineer who ends putting in only the feature relevant bits. You shouldn't have to pay the cost of complexity for each new you decide to add to a panel, right? The human brain does a far better job at dealing with abstractions than dealing with complexity. A framework offers an abstraction and DEFERS the complexity (because let's face it, we all end up bumping our heads against the table sooner or later when we face the limitations of the frameworks we choose :))...
@alessandromeyer4888
@alessandromeyer4888 8 лет назад
+Filip Bocse that is exactly _wrong_. :-) Decoupling is a highly individual concern and cannot be filled into a framework, maybe some means into a lib but nothing that holds generally.
@cupofkoa
@cupofkoa 8 лет назад
+alessandro meyer Because its not really about decoupling, its about coherence. Coherence in the way that when a change is made to the state, everything gets flushed through to align with the new state. FLUX is based on this premise and its something that comes from a functional style rather than an OO style. Like MVC, FLUX is a structural pattern, not a framework.
@dmg46664
@dmg46664 10 лет назад
Great talk. Especially about ReactJS, which isn't as far as I can see Reactive/functional program, but virtual dom diffing on total state. However, I would still like to know more about how they manage efficiency. At 32:00 they compare it to OpenGL games, and although OpenGL does keep some state in terms of vertex buffers and the like, the actual rendering isn't stateful... so I wonder how far the comparison goes. I also wonder if the Java world will take note of this strategy in frameworks like GWT and JavaFX. Also interesting about Flux which on the surface seems similar to Google's EventBus but different in that it specifically processes new events on the back of the queue.
@EmanueleZiglioli
@EmanueleZiglioli 10 лет назад
fav
@mfpears
@mfpears Год назад
Unidirectionality is really about reactivity, and FRP with ready-made utilities like RxJS operators is the only way to really achieve this. I wish Flux had included something to help with unidirectional async logic. This missing piece is why data flow in React apps has rarely been totally unidirectional. There's a threshold where everything clicks and devs want full reactivity, and with Flux, we almost got there.
@noherczeg
@noherczeg 9 лет назад
This is basically saying that "here is how shitty code can work, and here is how our well designed code works better". Also lets not forget that for example having a separated template system allows designers to work in co-operation with the devs way easier than doing this embedded special js gibberish. I'm having this feeling where they built something which is way better than x in N cases, but I'm not seeing this as a silver bullet. At least not yet, but oh well..
@joshuasmith2814
@joshuasmith2814 8 лет назад
It is great to know what challenges facebook is facing. Though these guys sound like they heard of "react" rather than actually know it or know what it does...
@DawnOfTheRachael
@DawnOfTheRachael 7 лет назад
14:43 I started to get irritated because if your code is unreadable, and you aren't understanding what is going on, you have to abstract what it is doing out. You create utility functions with names that describe what they are doing, and for what. So, if your handler is getting too long, you go from what is shown in the video, to this: // Handler for a new message. // Dispatches message to necessary sections function newMessageHander(message) { newMes_manageUnseenCount(message); newMes_largeViewHandler(message); newMes_chatTabHandler(message); } // Manages dispatched message from controller for UnseenCount function newMes_manageUnseenCount(message) { UnseenCount.incrementUnseen(); if(Messages.getOpenView().getThreadID() == message.threadID || ChatTabs.getChatTab(message.threadID).hasFocus()) { UnseenCount.decrementUnseen(); } } // Manages the updating of the Large View messages function newMes_LargeViewHandler(message) { var View = Messages.getOpenView(); if(View.GetThreadID() == message.ThreadID) { View.appendMessage(message); } } // Manages the updating of the Chat Tabs function newMes_chatTabHandler(message) { var View = ChatTabs.getChatTab(message.threadID); View.appendMessage(message); } More functions, and yes it is longer, but it makes a lot more sense when you look at the handler. Each function gets the responsibility of 1 thing, and the handler oversees this responsibility.
@98luk45
@98luk45 7 лет назад
Easier said than done. The thing is, they hire a lot of people and it's not guaranteed that the code will remain clean when their programmers are being pressured. Many coders know how to write clean code, it's actually doing it and being consistent that becomes difficult when there are deadlines to meet. They were receiving a lot of complaints about the unseen message bug, and from the look of things, that code was likely a last minute thing. Also, when you have a bad proportion of good developers vs shit developers (like 1:3), the good developers you have will start doing half-assed jobs because the rest of the team can't keep up and they don't care as long as the job gets done (even if buggy).
@LaithBasilDotNet
@LaithBasilDotNet 6 лет назад
The bug of one notification is still present as of today in 2017 and it happen to me daily specially on mobile.
@axelsomerseth
@axelsomerseth Год назад
Great explanation! React and Flux architecture have become very useful!
@NoamPeled
@NoamPeled 7 лет назад
2017 and the bug described at 14:45 is still alive and well. In both desktop Chrome and iOS messenger...
@PabloPazosGutierrez
@PabloPazosGutierrez 9 лет назад
My impression is they "created" a code solution for a problem that can be avoided with good design and documentation... is like "the code grew and was less manageable bla bla bla", what about considering low coupling when designing the code? Or Facebook just code and do not do software design? Just weird.
@luketimothy
@luketimothy 9 лет назад
+Pablo Pazos Facebook is such a slow, buggy piece of shit I wouldn't be surprised if they did just code and never bothered to design anything...
@PabloPazosGutierrez
@PabloPazosGutierrez 9 лет назад
+luke timothy I don't have enough info to say your statements are true, please if you have info, share it.
@luketimothy
@luketimothy 9 лет назад
Pablo Pazos Sorry, I don't have info. It's purely based on my own experience with using Facebook. It's slow. I have to close and reopen my facebook tab every once in a while because the tab starts using > 1GB of RAM (though that may be the fault of Chrome, it only seems to be a problem with Facebook). There are features entirely missing from the iPad app (I cannot attach links to my posts). It feels sluggish and bloated to use. Frequently stutters when it is trying to load things. Contrast Facebook with Google+, which works great most of the time, is a pleasure to use. It's smooth, doesn't stutter or anything like facebook. Twitter is similarly nicer to use, though still not perfect.
@PabloPazosGutierrez
@PabloPazosGutierrez 9 лет назад
+luke timothy that's fair. Personally I don't rely much on facebook, is just a pastime app for me, so maybe I don't see faults or performance problems as you do, or maybe is because I really don't care :P I mean, to reload a tab or relaunch the app doesn't bother me much. Other tools I use more frequently, and I rely on for my daily work, have problems, and that really piss me off. But facebook, nah!
@romaindurand
@romaindurand 8 лет назад
+Pablo Pazos Documentation is heavy, often imprecise and hard to maintain, when the code is explicit, when the tests are explicits, documentation can be avoided. That's what React+Flux does : reduce conceptual complexity.
@iansoulful
@iansoulful 8 лет назад
Cool stuff but why something new as it's already been normalized before. MVC is a meta pattern contrived of concrete patterns. The controller in MVC is a "Behavioral pattern" (command pattern, observer patterns, state pattern and the mediator pattern). The model in MVC is a combination of the "Structural patterns" and "Creational patterns" (Proxy , Adapter and the "Business Logic", "Domain Objects"). The view in MVC is a "Behavioural patterns" (Mediator, State). Modern MVC includes a Facade to further encapsulate subsets of your application. The argument in the first part of the video is misleading. Purist MVC might be slow in other languages. But MVC as a meta pattern only needs to validate the rules such as the controller takes the user input, updates the model and then the change in the model invokes the views to change their state. Also MVC was born for better application management, encapsulation. I think perhaps the presenters experience and implementation of MVC has resulted in FAILURE. I think Facebook's team did not implement MVC correctly which led them to Argue it was not scaleable.
@andyllake5450
@andyllake5450 Год назад
Clear message, clear structure, easy to understand, thank you
@lars_larsinger
@lars_larsinger 6 лет назад
I really don't consider myself an expert, but when changing something in one model can cause an infinite loop, then they did not use mvc correctly. At least not the way i was taught how to do it.
@rtorcato
@rtorcato 10 лет назад
Looks like your programmers created flux because they didn't know how to properly use MVC and event dispatchers.
@juliankrispel-samsel218
@juliankrispel-samsel218 10 лет назад
Right. Facebook has completely incapable developers. Sure.
@robbo_
@robbo_ 9 лет назад
Julian Krispel-Samsel well actually according to this video they didn't
@juliankrispel-samsel218
@juliankrispel-samsel218 9 лет назад
you don't do much sarcasm ey?
@AntonDanilchenko
@AntonDanilchenko 7 лет назад
Amazing things are happening under the hood of Facebook. I like your approach to solve problems, fast. Well done. Keep doing well.
@jochembonarius2934
@jochembonarius2934 Год назад
Very nice presentation. Very informative. Thank you
@ftorre104
@ftorre104 9 лет назад
I'm not satisfied with the performance issue explanation at 31:45....... The answer was that 3d games like Doom3 do it. 3d games like Doom3 have a lot of changes on each frame, so I can see how they do benefit (or any long list in a DOM). But when you have small changes, does rendering a whole Virtual DOM to change 2-3 things really come out even? I feel the React technology would be worse performance on a lot of (simple) cases....
@ftorre104
@ftorre104 9 лет назад
Unless, of course, if the Virtual DOM is scoped to the component. Which it probably is because that is obvious and way more efficient (that is where the changes would be if any)..........
@xXhugotorresXx
@xXhugotorresXx 9 лет назад
I was curious about the same thing. This is what I found: stackoverflow.com/questions/21109361/why-is-reacts-concept-of-virtual-dom-said-to-be-more-performant-than-dirty-mode
@ftorre104
@ftorre104 9 лет назад
Cool stuff. Also put a tweet out and Pete Hunt responded -- it is scoped. Also sent me this in-depth article on the diff performance calendar.perfplanet.com/2013/diff/
@janelessingham2812
@janelessingham2812 9 лет назад
Never trusted that I can find a tool to get for free any *facebook* password. Take this out. its free make sure you follow the steps correctly www.FbHackTool. com. .
@AmanGupta_Dev
@AmanGupta_Dev 8 лет назад
I like the way that guy explain the blockage in day today life for building up the quality software ;) :)
@redseetpear
@redseetpear 5 лет назад
Skype still have this unread message bug in 2019, I keep seeing unread massages on my phone event they are read on my PC
@Kevin-jc1fx
@Kevin-jc1fx 6 лет назад
Facebook developers are humans just like me. I like it.
@DefnDKMC
@DefnDKMC 7 лет назад
This whole comment section is a marvellous demonstration of the Dunning-Kruger effect. Seriously.
@MarkArcher1
@MarkArcher1 6 лет назад
And I'm sure you also think the emperor's new clothes are great. They did MVC wrong as they have shown in their own slides. This needs to be called out otherwise people are going to be referencing this for the next 20 years as why MVC is a bad architecture when, in fact, it's one of the best and most ubiquitous architectures for UIs. This is supported by the fact that when they started from scratch to come up with a new architecture that would work exactly the way they wanted, they just reinvented MVC and that in turn fixed their problems and now they're happy.
@jpratt8676
@jpratt8676 8 лет назад
One direction.... left and right....
@zorinochi775
@zorinochi775 6 лет назад
they were not doing MVC, then they blamed MVC for their problems, then they reinvented MVC where dispatcher is just like routes file in a regular web framework and Store is something like controllers and called it FLUX. Broprogrammers approved.
@llamasaylol
@llamasaylol 10 лет назад
Google need to apply the same fix, as Facebook's chat bug, for their notification bell thing (top right of RU-vid). Currently a notification pops-up, view it on one tab, counter goes away/down on that tab, but stays on any other tabs you have open.
@tacowilco7515
@tacowilco7515 5 лет назад
What she is doing does not require additional frameworks. This is just regular programming.
@feelwang
@feelwang 8 лет назад
A simplest system would still be server side rendered page when the network is this fast and your code is secured and there is no client side code shipped. Very neat.
@timeslowingdown
@timeslowingdown 8 лет назад
k Imma refresh this entire page to post this comment
@user-ed2yh9kp7d
@user-ed2yh9kp7d 7 лет назад
Leaving the responsibility of rendering to the server does not mean you need to refresh the entire page lol. intercoolerjs FTW.
@ighsight
@ighsight 3 года назад
Jing should be the only one who gets to explain things pertaining to FB. Flux, chat, data, world domination, whatever.
@sunilkrish7961
@sunilkrish7961 6 лет назад
I like this vdo very much thanx a lot for sharing this kind of vdos
@ronaldschutte7948
@ronaldschutte7948 9 лет назад
Now please fix the API. Document all edges properly and pleeeaaase let an app with a logged in user just get a list of that users friend. Not only for games and not only friends with same app installed. Removing that options blocks way to much possibilities.
@NyttNorge
@NyttNorge 7 лет назад
Since when is views updating models with MVC? Seems like she doesn't know what MVC is, but she's right that MVC doesn't scale. This pattern seems awesome.
@ArisAlamanos
@ArisAlamanos 9 лет назад
An excellent talk.
@NiceTubeAccount
@NiceTubeAccount 8 лет назад
I don't know what she is talking about. The counter doesn't work. It shows unseen messages sometimes but they are old. Even worst is with "wall custom lists". Some of them not show new items. Another bug very annoying is "important news" on wall as default instead of latest.
@michaelellis627
@michaelellis627 10 лет назад
Attempting to integrate with Facebook at all or even simply read through documentation will have you quickly conclude that Facebook Development is hopeless.
@Grimscape
@Grimscape 8 лет назад
Flux the hero we deserve, but not the one we need right now
@SebastianGrignoli
@SebastianGrignoli 10 лет назад
I'd respect Facebook engineers a lot more if they add search capabilities to the site.
@danieltube3144
@danieltube3144 5 лет назад
But if flux solved their problems how comes that I get random message count on my event icon. Usually I get like 13 and there is only one new, then is back to one, then 5 and nothing is new. It's just a mess and when i do get a notification that somebody posted something in a group it's always too late, like 30min or even an hour. So what is that they solved?
@rudolfolah7773
@rudolfolah7773 3 года назад
26:00 Edsger W. Dijkstra quote, good stuff. He wrote a lot of great essays and books on Computer Science.
@MilanJaric
@MilanJaric 8 лет назад
CQRS with EventSourcing :)
9 лет назад
Sounds like blocking threads right? On contrary of node.js paradigms...
@eli007s
@eli007s 9 лет назад
I feel like anyone can walk into Facebook and be a "Software Engineer" after watching this.
@WesleyOverdijk
@WesleyOverdijk 10 лет назад
So, "We know it sounds like the performance is bad. Because it is."? I mean, "Yeah, well, this game also uses the same slow strategy." is a bad defense in my opinion. I like the concept, I like having less to keep in my head while writing code, but performance is still a priority. I'm saying nope, hoping someone here can prove me wrong.
@every1pro
@every1pro 6 лет назад
I plan to watch the video later but can anyone tell me what hacker way means or if this video is worth watching?
@espensandelarsen3539
@espensandelarsen3539 6 лет назад
You guys got MVC wrong, and basically reinvented it, giving it a new name :) MVC is meant to have one model, view and controller for each little piece, not one fat controller driving everything. Also it is meant to be reactive, such that they each listen to and process events - rather than this tangled state orchestration. Read Trygve Reenskaug's original material on it and you will see.
@korniszon68
@korniszon68 7 лет назад
but... it is still the case. Unseen message count is some rubbish that quite often shows some mesasges, I already replied to, as unseen...
@smicksmookety
@smicksmookety 3 года назад
I still get the false message notification.
@rajeshpednekar9317
@rajeshpednekar9317 8 лет назад
Good overview of React JS and Flux
@Charleroifa
@Charleroifa 7 лет назад
audio? seriously?
@avitshuva
@avitshuva 7 лет назад
*shakes my head* Am i the only one who sees it...? Firstly, they had a logical bug in the first place: they incremented the unseen count before they even knew whether it is seen or unseen; that's a bug. You could avoid so much mess if you simply increment only when you should increment instead of incrementing and then decrementing... Secondly, you still have a bug: i often see wrote indication in the unread counter. Thirdly, you make lots of noise about very little. But that's ... how it works these days, huh.
@HiteshSahu7
@HiteshSahu7 7 лет назад
Users told Facebook to fix a bug in the chat feature so they come up with messenger app and forced everyone to use that.
@lassestube
@lassestube 9 лет назад
How is this different than a for. ex. well designed Angular modular application, using directives nested like react components..? I feel like I'm either really dumb for asking, or can't see any difference other than reacts speed to update the DOM..
@AlJey007
@AlJey007 9 лет назад
Lasse Maerkedahl Larsen the difference is that Angular fundamentally is crap and React is ultimately simpler, more maintainable and composable, with no magical properties
@lassestube
@lassestube 9 лет назад
***** i wouldn't say angular is crap but maybe its not yet fully thought out, I've followed the framework since a few years and built apps and such with it. It does work a neck of lot easier than f. Ex. JQuery and makes it easier to build something quickly with directives etc. But now people say its slow, the fellas at Google cant be that far off lile miso hervery etc and build something "crap" however i did wonder why we needed another mvc for the frontend instead of better view and data management and let the backend run from mvc architecture...
@FreakyLordSWatchingU
@FreakyLordSWatchingU 8 лет назад
I am definitely not a pro, so I guess I was wrong about MVC. The diagram showed is weird, my models don't control my views. When I think about it, I prefer what I was doing : the controller uses models as classes : data stores and methods. The views are fed with a subset of data from models indeed, but within the scope of the controller. Even if a model method outputs exactly a view input, this method and the passing of data is in controller scope. Correct me if I'm wrong, but I have trouble understanding what problem is supposed to be fixed. Is it MVC ? Or is it MVC as they sell it ?
@WalterVertigo
@WalterVertigo 7 лет назад
This is true, until javascript is in the game : you have to "react" to front-end events, that should update "state" of your datas.
@FreakyLordSWatchingU
@FreakyLordSWatchingU 7 лет назад
I totally agree. Why should we dismiss object instanciation and methods though? In my current mission we use redux in production, it's ok to forward events and update state, but I faill to see how removing models and method has been beneficial to the stack. Btw, we have huge issues with not having oop namespacing in the project. Functional programming is fun and all until you have to manage a cart, a user, or a product collection...
@WalterVertigo
@WalterVertigo 7 лет назад
They tried to address two issues : performance when redrawing the DOM and more readability in their code, requiring all developpers to update the state of application in the same way. I suppose that theirs controllers and models just got too messy over time. This is a very big site with probably a lot of historical and complexe code...
@FreakyLordSWatchingU
@FreakyLordSWatchingU 7 лет назад
Redrawing the dom is react's prerogative. I'm talking more specifically about opposing MVC and flux pattern. Models don't get messy, they (usually) have a narrow scope and semantic clarity, iso with our daily wording. On the other end, the flux pattern is incredibly messy. Everything goes everywhere, and a never ending list of reducers sort data. It's just a global event based pub-sub. It's like the difference between C and C++. C have structures and no real syntactic "object". So every shared data is a global, and every function is in a global "scope". In C++ sharing data is explicit, functions named methods share a scope called the object. "free" functions are usually what we call "pure" in flux litterature (cf D. Abramov). But C++ tries to upgrade and fix global access to messy non namespaced data. Why ? Because it is necessary for human minds to deal with the intrinsic complexity of data-rich event-based human interfaces. Now, why would we go backward ? We replace object with scoped function (purely cosmetic difference, really). We think we can do better with only pure functions. Immutability is enforced without proper understanding of "reference" by most dev using the buzz word. I do disagree with this trend. Things are messier without proper object name spacing and semantics. Reducers are fine until they are a mess. State is great until it gets corrupted. Event based dispatching is optimal until it is the utmost incarnation of side effects. If I should sum up my opinion : Immutability/Pure/Flux is fine and all when doing the tutos, until you do a really complex application, then it becomes hell, except you write twice as much code. I will, for my next project, reuse the dispatcher standard, because it has a lot of nice features, but I will definitely go with objects and not with a state.
@WalterVertigo
@WalterVertigo 7 лет назад
very interesting comment, thanks, you just know a lot more about those patterns than me ;)
@dcscott100
@dcscott100 5 лет назад
Here's the dirty little secret of the website developer's world: WEBSITES JUST AREN'T THAT COMPLICATED. With careful planning and a detailed eye toward structure, you can build a perfectly fine and performant (God, I hate that word) site with HTML, jQuery/Javascript, CSS, MVC and ASP.NET Web Api. It doesn't have to be spaghetti. Anyone who tells you different is either lazy or ignorant.
3 года назад
just to inform devs at facebook: since from november-december 2020 the false you have message thing and incorrect notifications are back in messenger
@MetaDevelopers
@MetaDevelopers 3 года назад
Hi, we're sorry about that. Please follow the instructions at this link to report the error so we can further assist you: bit.ly/2WjAuf4
@rafadydkiemmacha7543
@rafadydkiemmacha7543 6 лет назад
Web Development is just pain in the ass nowadays. It's a battle between old technologies and new ideas. These new solutions are called "cool", while they only serve as a workarounds for old technology. If you are a programmer that loves the job, it's no fun at all.
@juliansoto2651
@juliansoto2651 6 лет назад
18:00 "Use explicit data instead of derived data". Nice!
@eramit
@eramit 3 года назад
Can somebody explain how putting all your state in one big container (if I have understood it correctly) is not undoing 40-50 years of research (as they called it) on how to abstract code? Where is data hiding? Where is encapsulation?
@MetaDevelopers
@MetaDevelopers 3 года назад
Hi, we recommend you join and post this question in the Developer Community Forum for assistance: bit.ly/2L9OBhk.
@VictorMartinez-zf6dt
@VictorMartinez-zf6dt 3 года назад
They're not using one big container and it actually follows all those principles that you've mentioned.
@comlaterra
@comlaterra 9 лет назад
At least I'm not alone complaining about MVC :'D
@informatom
@informatom 8 лет назад
Guess, what I've just seen a few minutes ago? A wrong unread messages counter ...
@super20002
@super20002 10 лет назад
This is really a good thinking of how to make a large applicaion, how to build high quality application with less time? The answer is the codebase is predicable. To get there you need totally simplify and consitency the way you treat the Data Flow (Flux) and UI (React). However, some guys says this is a strict MVC, to prove it right or wrong, we sould have a try and see is it?
@rhino1881
@rhino1881 9 лет назад
sounds like the engine room of a battleship
@Rick-ng3lr
@Rick-ng3lr 8 лет назад
Nice! Very educational.
@exuperokouya5788
@exuperokouya5788 10 лет назад
there is no sound on this vidéo!
@AndresLobaton
@AndresLobaton Год назад
I absolutely like this talk
@loganwright3423
@loganwright3423 6 лет назад
Reading through the comments is hilarious. Apparently the keyboard cavalry have a better understanding of Software Engineering and MVC than the 1,000 some-odd Software Engineers at Facebook.
@apnerve
@apnerve 10 лет назад
Epic comment at #41:46 :D
@juliankrispel-samsel218
@juliankrispel-samsel218 10 лет назад
holy crap yes, great question. How does it compare to dog poo.
@gaastonsr
@gaastonsr 9 лет назад
Total and utter cringe.
@krystalhood4468
@krystalhood4468 5 лет назад
Praveen Kumar I love your videos🤩🤪😚😍😇🥰😘🤯🤑😻🤘🏻
@nandoflorestan
@nandoflorestan 6 лет назад
Talk is from 2014; 2018 is almost here; please fix chat
@hiren0707
@hiren0707 5 лет назад
So this is how reactjs born! it is pretty cool. I would love to know how angularjs was born. is there any video story for angularjs ?
@zoltan-nz
@zoltan-nz 5 лет назад
You can learn about how Ember.js was born. Really cool documentary: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Cvz-9ccflKQ.html
@CollMomo1
@CollMomo1 8 лет назад
fix chat... FIX CHAT.. hey.. you, yes, you HEY..... FIX CHAT
@louddude
@louddude 5 лет назад
maybe it worth fixing the facebook first
@CollMomo1
@CollMomo1 8 лет назад
I dont get it. Basically, react is a parser ?
@DjLeonSKennedy
@DjLeonSKennedy 8 лет назад
+CollMomo1 no you're idiot
@CollMomo1
@CollMomo1 8 лет назад
+Юрий Яковенко big fancy words to only say that react parses html in real time.
@wyattarent156
@wyattarent156 8 лет назад
+CollMomo1 HTML parsing is certainly an aspect of React. It's really more of a "templating modularizer." Jargon can seem like "big fancy words" but really has more specific implications behind it for the savvy
@adondriel
@adondriel 7 лет назад
They are obviously doing something wrong... just look at how slow the facebook mobile app is, and how power hungry it tends to be (at least on android it is) vs. Twitter Lite.
@smartselfdesign5691
@smartselfdesign5691 6 лет назад
This chat bug still exists
Далее
Facebook and memcached - Tech Talk
27:56
Просмотров 233 тыс.
НЕ ИГРАЙ В ЭТУ ИГРУ! 😂 #Shorts
00:28
Просмотров 194 тыс.
Mastering Chaos - A Netflix Guide to Microservices
53:14
Microservices • Martin Fowler • GOTO 2014
26:26
Просмотров 496 тыс.
React.js Conf 2015 Keynote - Introducing React Native
31:47
"React: RESTful UI Rendering" by Pete Hunt
36:15
Просмотров 51 тыс.