|
Kevin Marois wrote: I can't imagine a real world app that DOESN'T need this. Most "real world apps" have been doing fine without.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
I don't! I have offered to build something for a number of clients who raised the issue and then put a rather high price on the work. I then suggest that they delay the decision till they actually experience the problem.
To date, in over 30 years, I have never had a client come back and ask to implement a solution. Caveat I do LOB work only.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
Kevin Marois wrote: How do you handle a situation where, say in a desktop app, User A starts editing, and then User B wants to access that record?
What is the business use case for that?
Like the other poster I have never seen a real case for that. I have however seen QA and even developers make up cases and then claim it is a problem.
There are situations where locking (general term) is required such as in an inventory/POS system where receiving must add to the inventory and the POS must subtract but a transaction takes care of that.
And what happens when the lock holder terminates abruptly. Then one must deal with self expiring locks or even lock clean up code and one must decide on a 'reasonable' time period.
I had a real app that represented a dentists office and QA claimed that the address could be updated by two people. So I came up with the following real (reasonably) valid business case.
1. Parents are divorced and fighting over child custody.
2. Parent A is in the office and insisting that child's address be set to their address.
3. Parent b is on the phone and insisting that child's address be set to their address.
The above is an example of one record that has two different values. The only problem is that there is absolutely no way for software to determine which one is correct. Locking doesn't solve anything. Notifications do not solve anything.
The only solution for the above involves a ruling from a court of law.
|
|
|
|
|
"Contact Mechanism" entities ...
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
jschell wrote: What is the business use case for that?
Not having app instances overwrite each other's data.
Without a safeguard, it's happening.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
Kevin Marois wrote:
Not having app instances overwrite each other's data. If yours does your database is not normalized
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
jschell wrote: I had a real app that represented a dentists office and QA claimed that the address could be updated by two people. So I came up with the following real (reasonably) valid business case.
1. Parents are divorced and fighting over child custody.
2. Parent A is in the office and insisting that child's address be set to their address.
3. Parent b is on the phone and insisting that child's address be set to their address.
The above is an example of one record that has two different values. The only problem is that there is absolutely no way for software to determine which one is correct. Locking doesn't solve anything. Notifications do not solve anything.
I totally disagree. Your example is perfect case FOR locking..
User A with parent standing there clicks "EDIT". All other instance's EDIT buttons become disabled.
User B with parent on phone can now not modify the record until the other user is done.
I'm currently working on a mid-sized app for a construction company. There are 5 users in two buildings on site. The app existed when I got there. One problem they have is exactly this scenario...multiple users attempting to update a job record at the same time. It IS happening because the app isn't doing anything to prevent it.
I hear you and others here saying there's no use case for this and I'm left scratching my head because this scenario most definitely exists and needs to be handled.
The only use case where this doesn't need to be addressed is when there's only one user.
jschell wrote: What is the business use case for that?
Not everything built into an app comes out of the customer requirements. There are expectations that the app will function correctly, and we as developers are responsible to ensure that happens. If you're not building in safeguards, then bad things WILL happen.
If it's not broken, fix it until it is.
Everything makes sense in someone's mind.
Ya can't fix stupid.
|
|
|
|
|
Kevin Marois wrote: I totally disagree. Your example is perfect case FOR locking..
Actually it is an example for not doing it.
First it is is extremely unlikely to actually occur.
Second developers should not be adding work load for improbably scenarios and certainly should not do it with business owners driving it.
Third as I already pointed out, the only correct solution requires a court case. Neither the software nor the dentist office employees can determine the correct resolution.
Kevin Marois wrote: Not everything built into an app comes out of the customer requirements. There are expectations that the app will function correctly, and we as developers are responsible to ensure that happens. If you're not building in safeguards, then bad things WILL happen.
You can't do that.
First, the business not the developers are ultimately the arbitrators of risk. A developer might point out a problem but the business owners must decide if it is worth it.
Second, code costs money. Every single line of code adds additional cost a produce. Every new requirement adds cost to the product. At the end of the day the business wants the software to work in a reasonable way. At the end of the day. Not 10 years from now when it is finally delivered because the developers started fixing every possible problem they could ever imagine.
Kevin Marois wrote: If you're not building in safeguards, then bad things WILL happen.
Been doing this for a very long time. And my deliverables are robust in that they protect against technical failures. More so than anyone I have ever worked with. But I have learned that making up business requirements do nothing but reduce the bottom line. The domain experts, not me, are much more likely to be able to analyze risk, need and reality than me. And it doesn't require a lot of thought to see that imagined scenarios by me never happen.
Kevin Marois wrote: One problem they have is exactly this scenario...multiple users attempting to update a job record at the same time.
Then you have a business case that needs a solution. That one business case however should not lead to every single case requiring a solution.
|
|
|
|
|
On a smaller scale, I needed to coordinate 7 "views" within an order entry process.
For my purpose, I created a separate static multi-threaded "order entry process" class that contained a single "mode" enum and a public list of Action<mode> that anyone could "add" to (as a listener).
A mode "setter" on the process class, calls all the Action list listeners when the "mode" changes; the listeners act on the mode(s) they are interested in.
"(I) am amazed to see myself here rather than there ... now rather than then".
― Blaise Pascal
|
|
|
|
|
I have written an app for Ease of Access on desktop
which plays sound for typing on keyboard and releases the shift key automatically after a letter typed.
I used MFC messages and SetWindowsHookEx(WH_KEYBOARD_LL, …)
I’m not so happy with the ancient dialog elements and
need advice to port the software to a modern GUI.
Needed features, used in the software are:
Handling of keyboard events and SendInput() to release shift-key automatically
Hide the dialog and placed as tray icon
Usage of the XAudio2 library
Imbed sounds of .wav files in the resources of the App
Regions for the shape of the dialog and oval buttons
Now I use C++ and MFC
Are the features mentioned practicable also
for a WPF app written in C# or an other ?
Thank you for tips
Erhy
|
|
|
|
|
Of course, WPF and .NET allow you to control the input capturing from the System.Windows.Input namespace, where you get all the features such as Keyboard , or Binding for the inputs etc. You can use these classes to control the input from users, change the input or even change the key bindings all.
Secondly — but not recommended, you can consider using P/Invoke as well, to invoke the dll functions, such as and especially the SendInput function to actually send something as input a number of times. The benefit of this is, that you still get all of the high-level features of WPF application, while being able to easily go back to the native stuff and controlling hardware from unmanaged code, and maintaining states through marshalling.
There are several other types available there in the System.Windows.* namespace gallery, you would be amazed to see all of that service-level stuff available in managed and "modern GUI" way. That said, you can still go back to native stuff and do the things you want to do to your application.
System.Windows.Input Namespace
Keyboard Class (System.Windows.Input)
keypress using SendInput API
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Thanks for your answer.
Can you tell me more about
P/Invoke
I never heard above.
Erhy
|
|
|
|
|
P/Invoke is actually a technology, which allows you to invoke the native and unmanaged code functions from your managed applications. For instance, your WPF app is a managed application, whereas the low-level function SendInput is an unmanaged one — and others written in C or C++ runtimes etc. Thus, to execute them you would need to use P/Invoke, it lets you specify where your function exists.
It is similar to using the extern modifier in C or C++ to guide compiler, that the function exists somewhere else (kernel.dll , user32.dll , custom.dll etc.). The statement are similar to something like this,
[DllImport("custom.dll")]
static extern void Add(int a, int b);
You would require to control how these things actually go about. Marshalling, for instance, allows you to actually go deep down and control how data is passed at the boundary of unmanaged and managed code. Strings, arrays, integers and other stuff requires this much control so you need to make sure that your application easily takes care of all of that.
Platform Invoke Tutorial (C#)
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
now with .NET a hang with the resources
I embedded more than 150 wave Files with the
build action 'Embedded Resource'
and want memory pointers to the data.
With MFC a used LockResource to get a pointer - this is fast.
I see, in .NET an access is only possible with Streams.
I think this will take a while and need a big memory space.
Have you an idea?
Erhy
|
|
|
|
|
hello pls am new to this Design and Architecture
i want to Design my own App for a school pls how i start
|
|
|
|
|
You start by putting together your list of requirements: what does the app need to do, what input data will there be and where will it come from, what will be the outputs, will you need to have permanent storage of date (i.e. database), etc.
|
|
|
|
|
Hi, We are currently using "XML, XSLT" to generate HTML dynamically and server side we have Grails, Groovy. But because of High memory usage by groovy API in prod, we are planning to replace it with some other good technologies (JVM based) without remove XML, XSLT.
Please suggest good options, Thanks
modified 20-Jul-17 6:45am.
|
|
|
|
|
Hi,
I am using a multimedia desktop application (PC and Mac) from a small developer, and am thinking of how this application could benefit from online collaboration.
What I have in mind is this: User 1 is working on a project on his/her computer. User 1 runs into a problem and invites User 2 via a menu in the software. User 2 is granted access to User 1's project and it is somehow copied to User 2's computer (peer to peer). They can then share the files, probably with some kind of version control, and perhaps using an included chat room or similar. Note that the file format doesn't matter - this should just be a way to have several people looking at and working on the same files (basically more convenient than sending them over ftp or so).
There are two uses for this feature: a) to help out or improve (say, helping with filter settings that enhance an image/audio file/movie, and b) to enable online collaboration between several users, for example students running the same software (like Google Apps, but not necessarily in real-time).
So, is there any software that would take care of this and serve other software with a suitable API? I am sure that the developer I have in mind could come up with something similar, but I want to have a third party solution so that this will get quicker to implement and not take any direct effort from the main software development. (A parallel cold be drawn to software used for creating license keys: most developers could come up with something similar, but it's faster to use a third party solution.)
I have tried to find such solutions online, but “online collaboration” and similar searches give the wrong kind of search replies.
Thanks for any suggestions!
Petter
|
|
|
|
|
I'm not sure that what you are describing would be a practical problem to solve, for multiple reasons. The biggest issue I see with your problem is what effect pulling the code across from user 1 to user 2 would have on the code that user 2 was working on; they would either have to copy the whole codebase to a whole new area on disk because any changes might conflict with work that user 2 was already doing, or they would have to merge in the changes into their codebase, resolve any merge issues and then start the code review process - but you're talking here about multiple users all working with the same codebase, presumably submitting back to User 1, so how would these changes be resolved, where multiple solutions have to be merged back - (1 to n isn't that hard, n to 1 would be an absolute nightmare)?
There are already tools that allow you to stash work that you are working on and let others take copies. You can use GIT (for instance) to stash your work and let others take copies - which could then be worked on, reviewed and merged back in, in a controlled fashion. Unfortunately, this doesn't meet with your realtime collaboration goals but what you could do is combine GIT with something like Lync (yeah, I know, it's not the greatest collaboration tooling but it's an idea), and then have the users discuss changes online with one user making the changes while the others watched and talked things through; this would be a form of pair programming.
This space for rent
|
|
|
|
|
Thanks Pete for the answer!
Due to some lagging on the website, I didn't see your reply (or my question for that matter) until I had just posted an updated version of it on General questions. As I don't think I can erase a question, I'll leave it there (I'm not sure this forum was the best place for it anyway).
Anyway: well, I wasn't really thinking an n:1 thingy. Rather something like this: I am working on a song in some music software. I could really need some help on volume levels and the like. Instead of copying the entire file plus included audio files somewhere, having someone else downloading it, and then trying to find out what the other person has done to it, it would be much easier if I could just find a list of (visible) online users within the software, send a PM to one of them and ask him/er for advice. He/she would then just click a button in the software to download my files, and then being able to make changes to them. That's the idea anyway.
Thanks again,
Petter
|
|
|
|
|
|
You're right - screen sharing would make this easy.
Thanks!
|
|
|
|
|
petter2012 wrote: this should just be a way to have several people looking at and working on the same files
I doubt that is workable. The situations where that specifically is used would be so rare that it isn't useful.
In normal situations there are two actual peers, each with about the same experience and one needs a 'tweak' to get around some problem. In those cases just seeing the code and doing a verbal walkthough is sufficient. There are many existing solutions that allow that.
The second case is where the first person is a junior and the second, the observer, is a senior. In that case although the second could write the code the complexity means they would need to test it as well. As such they might as well write it in the first place. Not to mention that the first person loses out on the learning opportunity.
petter2012 wrote: So, is there any software that would take care of this and serve other software with a suitable API?
I would be really surprised if there are not open source collaboration tools. Since they are open source the code is available to you to do what you will.
|
|
|
|
|
I am looking for suggestions to develop a back office business system for a family startup. Specifically a programming language that will meet the needs of the business. I have already laid out the design concepts, data structures, etc.. I envision 10 - 15 thousand lines of code to start and it will grow to about 50 thousand. The will be very limited access to this data via the web.
The requirements are:
1. Target operating system will be Linux - probably Ubuntu/Mint.
2. Language must be strong in data structures and I/O to handle sequential, text, direct, and index files. I do not want to get into writing my own indexes and access methods. Been there done that.
3. Must be compiled. Scripted languages can be hacked where compiled languages are much harder to hack. Source code will be kept far the the web.
4. I don't mind if the language has OO constructs but do not want to be forced into using them. From my experience OO the hinders more than it helps. It's like putting handcuffs. The shorted distance between two points is a straight line. That's a personal requirement.
I know the list isn't long but I could be missing something out there I don't know about.
Thanks...
|
|
|
|
|