|
Hi Ravi-ji,
Assuming you have not published in depth about this strategy for app structure, I'd really appreciate seeing an article by you on this.
cheers, Bill
«There is a spectrum, from "clearly desirable behaviour," to "possibly dodgy behavior that still makes some sense," to "clearly undesirable behavior." We try to make the latter into warnings or, better, errors. But stuff that is in the middle category you don’t want to restrict unless there is a clear way to work around it.» Eric Lippert, May 14, 2008
|
|
|
|
|
Dunno if it's worthy of an article, Bill-ji. Maybe a tip, at best?
It isn't something I designed - just a pattern I employ. But I'll tipify it if you think it's worth doing.
/ravi
|
|
|
|
|
Sukria,
I accept tips
cheers, Bill
«There is a spectrum, from "clearly desirable behaviour," to "possibly dodgy behavior that still makes some sense," to "clearly undesirable behavior." We try to make the latter into warnings or, better, errors. But stuff that is in the middle category you don’t want to restrict unless there is a clear way to work around it.» Eric Lippert, May 14, 2008
|
|
|
|
|
OK.
But you're giving me more credit for my knowledge of Hindi (and software engineering) than I'm due.
/ravi
|
|
|
|
|
I use them extensively. Particularly for library routines.
.net 1 should not have been released without them.
|
|
|
|
|
Never having used one I now see an immediate use for them. I have a dashboard with multiple tabs, all the data is related but I got annoyed by the size of the code base and split the 3rd tab out to a UC. Now I see I should have create a partial class.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Usually when I have tabs I split out into separate classes, but partial classes seems like I good option
|
|
|
|
|
Partial classes is a good thing, but like anything it can be abused.
I have inherited an application with thousands of partial classes spread over just a few files partitioned by funtionality.
If I ever meet the programmer I'll teach him generics with a drill and a cactus.
|
|
|
|
|
For a particular WinForm app, I have a lot of controls on the main page. I use partial classes to break up the handling of the control events into their logical groups.
Otherwise, I never use partial classes, and instead use a publisher/subscriber pattern to communicate between instances, which also has the advantages of:
1) letting me hook in logging so I can see what the heck is going on
2) process intercommunication asynchronously, as the pub/sub I use can make message handler call on a separate thread
3) better exception handling, as the pub/sub will wrap the message handler call in a try-catch and log exceptions
4) because the exception handler uses the pub/sub itself to log the exception, I get can wire up other services, like an email notification, when errors occur
5) and the pub/sub instantiates the receiver class, so I'm enforcing completely isolated processing, which is great for thread safety.
So effectively, all the things that actually do non-UI things become services, and I often write them as runtime loaded modules that register themselves in the pub/sub, which is cool because I can then easily mock the services, change the business logic by loading a different module that implements different behaviors, extend the behaviors simply by adding new modules that handle the same messages, and so forth.
So there, in a nutshell, you have The Clifton Method[^].
Marc
|
|
|
|
|
Update: The contest has been extended to Aug 7! We know there's a couple of contestants who needed a little extra time so make the most of the extra week and get your entries in.
Our Internet of Things Article Challenge[^] is on and we've had a few questions I thought I may as well answer here:
- Any language, any platform. We're truly not fussed.
- It's about IoT which means connected devices. IMO there's no sensible definitive explanation of IoT: it's essentially just a label for technologies that connect "non-computer" devices with other devices or computers in order to achieve automation or sensing. You connect your thermostat to a weather service to get it to work out when to turn up the AC. You connect your burglar alarm and cameras to your phone so you can rest easy on holidays. If your idea is about connecting devices it's good to go.
- We need code. A discussion about your commercial app is great, but if your article doesn't actually allow someone to get down and get coding then it's not really a tutorial
- We want applications but it doesn't have to be a perfect, completed, packaged app you can sell. We're only after apps that run, that do something. Anything. Sprinkle it with bugs and build someting cute and pointless. It's the educational factor that's important.
This is really about having some fun with connected devices.
cheers
Chris Maunder
|
|
|
|
|
My mom is heading up to O'Hare to pick up a rescue dog coming from Europe, and her vehicle's (a 2016 Ford Explorer) GPS is off by AT LEAST 1/4 mile, as it told her to take an exit AFTER she passed it! I noticed this offset before (the little car icon would jump around), but usually it would sort itself out within a few seconds. I think the receiver may not be working correctly. Now it will take her AT LEAST another hour to get there thanks to traffic! And the plane has already landed!
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
I blame the software devs!!!!
They must be held accountable!!!
Seriously though...
|
|
|
|
|
Ford GPS? Turn it off and buy a Garmin (with a lifetime map/traffic subscription)!
/ravi
|
|
|
|
|
Not enough money to do so right now.
Seriously, though. Her Nokia phone gets better accuracy!
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
Gotcha.
I wouldn't pay extra for a GPS package if I bought a car. My $150 Garmin works wonders and is portable to boot. Plus a lifetime subscription of updated maps Hard to go wrong with that. Just sayin'.
/ravi
|
|
|
|
|
The car was cheaper than a 2015 version with no GPS!
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
|
Brisingr Aerowing wrote: The car was cheaper than a 2015 version with no GPS!
Now you know why...
That's what I do. I drink, and I know things. ~ Tyrion Lannister
|
|
|
|
|
I have had this problem with my phone. I was watching to see what exit I should be off on, and as soon as I passed the exit, the position updated. The next exit was quite a ways further on.
|
|
|
|
|
Oh the pain. I live a few minutes from said airport, and with all the construction happening, at this time of day, ouch. Off topic, the signage directing you to the airport leaves a lot to be desired. You shouldn't need GPS once you get within a certain distance from the airport. As far as GPSs go, my cheap-ass Tom Tom, does a resonable job. Good luck to your mother and the new pup!
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
He's an older dog, likely only has a few years left. He just needs a loving home and a family. His previous owner died earlier this year. His name is Lucky.
He has no teeth (someone kicked him in the mouth - before the previous owner got him) so he needs to eat canned dog food.
He is a very friendly dog and likes everyone.
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|
|
Sounds like a good dog, who has found a wonderful home.
Brisingr Aerowing wrote: He has no teeth (someone kicked him in the mouth some people need to be put down
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Brisingr Aerowing wrote:
He has no teeth (someone kicked him in the mouth - before the previous owner got him) I don't know, my dog risked the very same - twice - for a shovel hit by my dad... not volountary though! The dog was trying to catch the snow while my dad was cleaning the entryway and jumped on the shovel at the wrong moment. No damage, luckily.
GCS d--- s-/++ a- C++++ U+++ P- L- E-- W++ N++ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t++ 5? X R++ tv-- b+ DI+++ D++ G e++>+++ h--- ++>+++ y+++* Weapons extension: ma- k++ F+2 X
If you think 'goto' is evil, try writing an Assembly program without JMP. -- TNCaver
When I was six, there were no ones and zeroes - only zeroes. And not all of them worked. -- Ravi Bhavnani
|
|
|
|
|
Mine works ok but I tend to use my phone as it appears to be more accurate and they don't ask me for $149 every year for an update.
|
|
|
|
|
I probably could write one using OSM data and a cheap GPS dongle that would be more accurate than the built in one.
What do you get when you cross a joke with a rhetorical question?
The metaphorical solid rear-end expulsions have impacted the metaphorical motorized bladed rotating air movement mechanism.
Do questions with multiple question marks annoy you???
|
|
|
|