Re:TDLib – Build Your Own Telegram Client
by zingmars on Thursday February 01, 2018 @08:52AM
(#16281808)
Looks to be UI related stuff, some of which looks automatically generated to some extent, some parts look boilerplate.
Having files with many LoCs can be unavoidable when the system you're building on encourages design like that (.NET comes to mind, wouldn't be surprised if Android was like that as well), and does not necessarily mean that it's badly engineered.
Re:TDLib – Build Your Own Telegram Client
by tomsmeding on Thursday February 01, 2018 @01:34PM
(#16284416)
As far as I can see, that's lots of code for generating a UI. Interesting that they do that instead of using the usual xml files for specifying the UI on android; the result is that there's lots of code, a number of statements for each single UI element, and all the listeners and such are declared inline.
The compiled code will be fine, probably. It won't be much different from that would happen if they used the standard method of xml files and separate classes for that stuff, and might even be slightly faster.
But it surely is less maintainable, and the code definitely doesn't look generated to me. Maybe if you count copy-paste as code generation.
I hope they don't use Atom as an editor, because it surely won't be able to cope with such a file. [/s; but might even be true. not tested.]
Re:TDLib – Build Your Own Telegram Client
by balladeer on Thursday February 01, 2018 @01:56PM
(#16284615)
Less maintainable? That's a nightmare. As an Android developer who has struggled with couple of 4 digit lines long activity classes I literally shuddered.
This is as if someone used a tool to translate UI code from some other platform to Android (completely into Java) and forgot to refactor.
Re:TDLib – Build Your Own Telegram Client
by orbifold on Thursday February 01, 2018 @08:29AM
(#16281682)
Well the c++ code is pretty good... In any case it works much better than the signal app on android.
Re:TDLib – Build Your Own Telegram Client
by mintplant on Thursday February 01, 2018 @10:05AM
(#16282296)
I've never had any problems with Signal for Android. With Telegram, though, I once woke up to find myself added to what looked like the first 500 groups in their database, alphabetically sorted. My phone was buzzing continuously from the stream of notifications. Had to remove myself from them one by one.
Re:TDLib – Build Your Own Telegram Client
by parmesan on Thursday February 01, 2018 @08:22AM
(#16281636)
Takes a great engineer to make that work as well as it does..
https://github.com/DrKLO/Telegram/blob/e9e40cb13ea942b148b25...