Hacker News Comments on
Smalltalk, Objects, and Design
·
2
HN comments
- This course is unranked · view top recommended courses
Hacker News Stories and Comments
All the comments and stories posted to Hacker News that reference this book.Interesting, I've been learning and doing almost everything with a functional or procedural style, but I've felt kind of guilty I don't understand OOP patterns enough, or don't know when I would want to use them.So I've been learning Smalltalk/Pharo and reading Smalltalk, Objects, and Design [1] because people say that's what OOP was really supposed to be. It's been interesting and enlightening in some ways, but I still feel like I'd rather do most things without OOP. Do you think it's still helpful or worth it to dig into all this for someone now?
[1]: https://www.amazon.com/Smalltalk-Objects-Design-Chamond-Liu/...
⬐ bowsamicYou should read Gang of Four imo. There are still a lot of very influential ones in there⬐ progre"Read" GoF is not a thing I would do, just as I don't sit down and read a recipe book. Because GoF is kinda a recipe book for oop.I would skim it though, just to have a sense of what's in there.
⬐ bowsamicIt's not very long. Why not just read it and work through it? It isn't written like a recipe book, but even if it was, you should sit down and read your recipe books
The original MVC architecture was for GUI interfaces in Smalltalk. It was so helpful a design pattern it was borrowed for use in request/response web application, where naturally the use of each part was very different.If you really want to "get" the original MVC, see the classic book "Smalltalk, Objects, and Design" [1] which explains MVC and other OO architectures as well as the principles behind them, which might guide you to picking an appropriate structure for applications that don't fit the GUI/MVC paradigm.
[1] http://www.amazon.com/Smalltalk-Objects-Design-Chamond-Liu/d...
⬐ alttabMy original implementation of Mvc was writing a game of connect 4 in java. There was a board model. There were two views. One graphical, and one command line. You could update both views by clicking your next move on the graphical board, or putting input on the command line. Once the model was updated, the controller would update any view that was listening on it.⬐ cbsmithThe controller shouldn't be updating the views. The views should be observers of the models. The controller updates the model, which triggers messages from the models to their observers, the views. They would then would then reflect the change in the model.