Tag Info

New answers tagged

0

Fundamental concept: At a low(er) level, the UI element is subscribed to events coming from the data collection (array, list, dictionary, etc...) that holds the data that is changing. When the collection changes, it signals an event to the effect of "My data has changed" and subscribers to that event handle it accordingly. As you described in your example, ...


0

Generally, UI code is based on redrawing at least an entire component from an underlying data structure that describes what it should contain (e.g., a list of strings and icons becomes a list view, a string for a text field, etc). Sometimes data structures cannot receive incremental updates (e.g., String in Java). Other times they can. It's case-by-case. ...


0

I had to implement an off-line mode for viewing (including a caching system for future syncing). A friend recommended that I look into yapdatabase, which has actually worked very well for my needs. I haven't had to work around any of the CoreData issues (yapdatabase is actually built on top of CoreDatabase, but it hides all of that stuff from me) and was ...


1

This is only a suggestion so don't scrutinize me. I did something similar to this. After a while you will notice that these scenarios are inevitable: The user opens the app loads a feed and then closes the app. A minute later the user opens the app and requests a feed that is identical to the one he just opened. This will increase server load and it will ...


-2

I wanted to use this for my thesis project next year, [...] Using a mobile game for your thesis is non-trivial (you will probably need your project's documentation to include game theory and what not (I think this is how Tetris was invented). Good luck! [...] and possibly a way to pay back college loans. Steps: write game ??? proffit In short, ...


-3

BLE max datarate limits you to your 23 packet size. you need to change to Standard bluetooth to get the 2Mbps datarates.


1

I can see some sensible answers to this question already, but I thought I would expand and offer my opinion. You've described a system that appears to couple logic into large classes, and be tightly coupled across many different functions. The first way to try and refactor this is to first ensure you understand what a 'good' architecture/codebase would ...


1

Of course, I never saw your actual code, but from what you've said, I would propose something close to the following architecture. I'm sorry for pseudo-code, I just wanted it to be fast & clear ;) UI layer: dataService = new DataService(); dataService->makeDataRequest(requestName, requestParams[], cachedDataArrivedCallback, ...


-1

You are asking intelligent questions about refactoring. When single classes mix up different functionality, it gets hard to read and debug. Never mind the lengthy code. Sometimes a class can get large innocently, but mixing metaphors within the same class = bad List the methods in your class and separate out into different classes any utility type classes ...


2

As Frank said, you appear to have figured out a lot of this on your own already, so I only have one piece of advice regarding the main question. Do the refactoring gradually, incrementally, alongside whatever changes you make to add business value. Don't try to break the 5000 LOC monster into five 1000 LOC critters all in one go. As long as you keep in mind ...



Top 50 recent answers are included