Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #41457
| Newsgroups | comp.lang.javascript |
|---|---|
| Date | 2023-10-10 06:00 -0700 |
| References | <963227be-2594-4ae3-8d4c-4b65b3d3e142n@googlegroups.com> <9ec432b3-bbf4-4e17-9b89-6745042d5c46n@googlegroups.com> |
| Message-ID | <eaeb8578-aca2-41bb-b1cc-cb3f77182543n@googlegroups.com> (permalink) |
| Subject | Re: Code review: personnel scheduling app |
| From | luserdroog <luser.droog@gmail.com> |
On Sunday, October 8, 2023 at 9:53:58 PM UTC-5, Julio Di Egidio wrote: > On Monday, 9 October 2023 at 03:15:41 UTC+2, luserdroog wrote: > <snip> > > <https://github.com/luser-dr00g/luser-dr00g.github.io> > > > > The code is organized (loosely) around the MVVC design. > > A few global variables hold the "Model" data. The output() > > function renders this data into HTML structures populated > > with event handlers. Any event handler which wants to alter the > > model has to call one of the Model's interface functions > > which first creates an Undo/Redo record for the change > > and then does a Redo (albeit for the first time this time). > Which suggests you are rather lumping model an controller. > But the code is too unstructured to look at (unless you pay > me for a couple of days of re-engineering): 2K+ lines of > lumped HTML+CSS+JS is simply not good enough. I'd > advise you to start by separating things... and while you > are at it, review all naming and code structure. > > So, it's my attempt to do an MVC design > It isn't: indeed nobody can understand MVC who has not > actually tried to build a project with explicit model, view > and controller components. Sigh. I suppose you're right. It kind of has these components "spiritually" but not explicitly. All of my design work is done on paper. So there are several sketches with the Model, View and Controller parts as separate boxes with arrows connecting them. But then I just wrote functions for all the arrows and the larger structure vanished. Plus, several of my functions are really, really long with deep nesting (taking full advantage of my 2 space indents) and still have to do crazy hand formatting to squeeze everything in. ach. oop.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Code review: personnel scheduling app luserdroog <luser.droog@gmail.com> - 2023-10-08 18:15 -0700
Re: Code review: personnel scheduling app Julio Di Egidio <julio@diegidio.name> - 2023-10-08 19:53 -0700
Re: Code review: personnel scheduling app luserdroog <luser.droog@gmail.com> - 2023-10-10 06:00 -0700
Re: Code review: personnel scheduling app Julio Di Egidio <julio@diegidio.name> - 2023-10-10 06:55 -0700
Re: Code review: personnel scheduling app "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2023-10-14 11:17 -0700
Re: Code review: personnel scheduling app luserdroog <luser.droog@gmail.com> - 2023-10-18 07:47 -0700
Re: Code review: personnel scheduling app "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2023-10-18 10:22 -0700
Re: Code review: personnel scheduling app "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2023-10-18 10:32 -0700
Re: Code review: personnel scheduling app luserdroog <luser.droog@gmail.com> - 2023-10-20 10:39 -0700
csiph-web