Hi Steve, Welcome!
Yes, Pharo and similar dynamic object system can seem overwhelming, but they are also powerful. The trick is to find the shortest path from the system to your application, (re)using as much as possible. You should indeed also learn to skip over details and look at the interfaces of objects. There are a couple of books, see http://books.pharo.org (and much more other documentation). As for an MQTT client, that already exists: https://github.com/svenvc/mqtt There is not much handholding documentation though, check out the unit tests. Don't hesitate to ask questions. HTH, Sven > On 18 Dec 2019, at 09:11, Steve Davies <st...@connection-telecom.com> wrote: > > Hi, > > I'm having yet another go to get to grips with Pharo. > > My project is for home automation. It seems in principle a great match since > object inside Smalltalk are obviously a great match for physical objects > being controlled. > > I started at the Pharo Wiki on Github "Setting up a new project". > > I'm a career programmer but I'm nearly 60 and sadly I can't absorb > information like I used to be able to, and I'm just finding Pharo so > overwhelming - I feel like a maintenance programmer trying to find a way into > a million lines of code when you don't understand the principles of > organisation and the conventions of the developers. > > Is there no way to have some sort of "progressive revelation" of the insides > of Pharo? Just documentation on most classes, examples of how to use the > class, without the implementation being exposed initially? > > The stuff I need to look into for my project is mixed in with 1000s of > classes that I (hopefully) can ignore for now - but there seems to be no way > to hide away all the irrelevant stuff. > > Traditionally if I was trying to get to grips with a large unfamiliar code > base I would use grep to search, skim through source files getting a sense of > it. With the browser in Pharo I feel like I'm looking through a keyhole. No > doubt this is just unfamiliarity and I just need to learn the tools better. > > Please read this as a request for help as to how to get a finger hold and how > to shake this feeling of drinking from the firehose? It's not intended as a > complaint. > > My first task is to write an MQTTClient. MQTT is a messaging protocol. MQTT > has "clients" - who subscribe for "topics" and receive matching messages, and > which can publish to topics. And there are brokers which distribute > published messages to subscribing clients. > > I only need to implement a client. The protocol is binary, not text. It > runs over TCP. Here's a description of the messaging > > SInce I envision objects inside Pharo that model the real external objects > then I will need some sort of background process running the connection to > the mqtt broker, and each object would receive and send MQTT messages via > that process. > > So to tackle this I need to understand: > • How to implement a TCP client (subclass ProtocolClient? Or do I need > to work at a lower level with SocketStream?) > • Packing and unpacking binary data, working with bits. > • How to talk to and from a background process. > Any and all suggestions and help to get going would be welcome. I do > understand the principles of Smalltalk and can read code OK. > > Thanks, > Steve > > >