Some refactoring needed?
#18
I got another idea Smile
I think it´s the best to use this thread, because it´s the right topic.

Always when I want to do something with Placing Blocks, Right Clicking action, I start getting a headache, because it´s so messed up.
Everything is inside the cClientHandle Class / Inside the specific Handle function.
My idea would be to "outsource" everything a bit.
We could create some RightClickHandlers / LeftClickHandlers, we call in the right order.
So we don´t have everything in one function. (Placing Doors next to the food code, then the bucket code, the slab code and so on)
Wouldn´t it be cool to split it into multiple classes/functions. This would make everything much clearer, because you don´t have to scroll over hundred lines of code.
If we would keep the Handlers hardcoded in the clienthandle we wouldn´t have a big performance loss. (One function call more)

I would implement this, but I would like to hear your opinion first.

Simon Smile
Reply
Thanks given by:


Messages In This Thread
Some refactoring needed? - by Lapayo - 12-26-2011, 02:31 AM
RE: Some refactoring needed? - by mtilden - 12-26-2011, 02:57 AM
RE: Some refactoring needed? - by FakeTruth - 12-26-2011, 02:58 AM
RE: Some refactoring needed? - by Lapayo - 12-26-2011, 03:13 AM
RE: Some refactoring needed? - by FakeTruth - 12-26-2011, 03:34 AM
RE: Some refactoring needed? - by Lapayo - 12-26-2011, 03:35 AM
RE: Some refactoring needed? - by Lapayo - 12-26-2011, 08:52 AM
RE: Some refactoring needed? - by mtilden - 12-26-2011, 04:10 PM
RE: Some refactoring needed? - by mtilden - 12-26-2011, 07:16 PM
RE: Some refactoring needed? - by FakeTruth - 12-26-2011, 10:41 PM
RE: Some refactoring needed? - by Lapayo - 12-27-2011, 12:02 AM
RE: Some refactoring needed? - by mtilden - 12-27-2011, 12:20 AM
RE: Some refactoring needed? - by rs2k - 12-27-2011, 02:42 AM
RE: Some refactoring needed? - by Lapayo - 12-27-2011, 02:46 AM
RE: Some refactoring needed? - by FakeTruth - 12-27-2011, 02:50 AM
RE: Some refactoring needed? - by Lapayo - 12-27-2011, 02:51 AM
RE: Some refactoring needed? - by Lapayo - 07-11-2012, 01:55 AM
RE: Some refactoring needed? - by xoft - 07-11-2012, 02:33 AM
RE: Some refactoring needed? - by Lapayo - 07-16-2012, 06:51 AM
RE: Some refactoring needed? - by xoft - 07-16-2012, 07:07 AM
RE: Some refactoring needed? - by Lapayo - 07-16-2012, 03:11 PM
RE: Some refactoring needed? - by NiLSPACE - 07-16-2012, 06:09 PM
RE: Some refactoring needed? - by Lapayo - 07-17-2012, 01:53 AM
RE: Some refactoring needed? - by NiLSPACE - 07-17-2012, 03:56 AM
RE: Some refactoring needed? - by Lapayo - 07-17-2012, 04:00 AM
RE: Some refactoring needed? - by NiLSPACE - 07-17-2012, 04:15 AM
RE: Some refactoring needed? - by Lapayo - 07-17-2012, 04:21 AM
RE: Some refactoring needed? - by NiLSPACE - 07-17-2012, 04:23 AM
RE: Some refactoring needed? - by xoft - 07-17-2012, 04:25 AM
RE: Some refactoring needed? - by Lapayo - 07-17-2012, 04:41 AM
RE: Some refactoring needed? - by NiLSPACE - 07-17-2012, 04:26 AM
RE: Some refactoring needed? - by xoft - 07-17-2012, 04:48 AM
RE: Some refactoring needed? - by Lapayo - 07-17-2012, 05:40 AM
RE: Some refactoring needed? - by xoft - 07-17-2012, 06:01 PM
RE: Some refactoring needed? - by xoft - 07-17-2012, 10:54 PM
RE: Some refactoring needed? - by Lapayo - 07-18-2012, 12:35 AM



Users browsing this thread: 1 Guest(s)