Re: Win8 Tiles, Shortcuts and multi-program applications.
Hi, Thanks Ian. Things are certainly hotting up in the new/updated MS program world. So far two people have explained how Win8 Application navigation works and now this so it is becoming clear that I wasn't clear in the first place. Probably my pathetic attempt at using ozzie colloquialisms and assumptions ... sigh. It is IMHO, far to early to foretell if the general public will quickly adapt to the new navigation. Having only used Win8 RTM on my VM and only to test my own application, I'm certainly not qualified to make any educated guesses. I do know that the new navigation did not immediately impress me with it's ease but I readily accept we have a whole new concept in Win8 and I will have to change my ways as well as my program. I do however believe that until my application evolves and adapts to the changing times, my end users will appreciate what in effect is a two click start of either my Main program or any of its Secondary programs. This should be easy to achieve by creating a Metro Inspired application that does nothing else but open a full screen window with a tile/shortcut to each of those programs. If the new Metro Inspired application is pinned to the Start Screen (not the Start Menu) then the end user will only need to click twice from the Start Screen rather than type anything on the keyboard to start a Secondary program from the All Apps screen. Alternatively, they can use the new Metro navigation technique as I will support that as well. The creation of the new Metro inspired application should take me not much longer than a few minutes if you believe the sales pitch from DevExpress :-) Designing the Tiles background image will take me days although perhaps Blend will come to the rescue. I hope the above clarifies my original post. I would appreciate comments as to whether you believe there is a need to even bother with implementing the above and/or if it will prove as easy to implement as it sounds? Thanks, Glen.
Re: Anyone using structs in C# Business Applications?
On Fri, Aug 17, 2012 at 10:53 AM, Arjang Assadi arjang.ass...@gmail.com mailto:arjang.ass...@gmail.com wrote: Hello I have found myself not needing to use structs for any reason in the vanilla business apps ( DB to front end WindosForms,WPF,ASP.net etc) for past 7 years or so. All BO's are classes, and I can't think of anything more fine grind than that. Unless I have been missing something, my question is to Business App writers, do you use structs any where for any reasons? In all the usuall VS demos I have not seen structs being used ( graphics demos do not count!) Regards Arjang Tristan Reeves wrote: Hi, To answer your specific question, int, double, bool, DateTime are all structs. I can't see any (even vanilla) business application getting by without them, can you? Regard, Tristan. Int is a struct? And yes, I use structs a fair bit for small things. Sure a struct is pretty much an class without methods/functions/whatevertheterminology, and maybe a class would be neater/better suited/etc but when I am returning a few small things, sometimes I'll hack together something like struct sResult { public bool valid, public string[] errors, public string[] warnings } Just so I can have certain bits and pieces come back nicely to the UI. Any reason why this is a bad idea? -- Les Hughes l...@datarev.com.au
Re: Anyone using structs in C# Business Applications?
Heinrich, I still don't understand in plain vanilla business app i.e. GUI ( WinForm/WPF/Asp.net ) + Domain/BLL + Repository/DLL etc, where would using structs be beneficial. Of course a simple example using Classes vs Structs just to compare the pros and cons would be great but where in business apps that becomes relevant? Regards Arjang On 22 August 2012 20:50, Les Hughes l...@datarev.com.au wrote: Heinrich Breedt wrote: http://msdn.microsoft.com/en-**us/library/ms229017.aspxhttp://msdn.microsoft.com/en-us/library/ms229017.aspx -- Heinrich Breedt “Do not wait to strike till the iron is hot; but make it hot by striking.” - William B. Sprague That post just touches on the pros/cons of storing data in the heap/stack with a brief mention in linking immutable objects. It doesn't mean putting things on the stack is automatically a bad idea. In the example I gave in my last post, I would be putting 96bytes on instead of 32 for a reference type, and it would mean those 96bytes would be duplicated when the function returns. Nothing to really worry about there, whereas if you had a struct with a few thousand primitive types/references which is run numerous times, then you might want to worry. The link also says that generally value types are cheaper than reference types, and also mentions structs are good for short-lived data. I'd say that the example I provided is a good candidate for when to use a struct. Anyone disagree? -- Les Hughes l...@datarev.com.au
Re: Anyone using structs in C# Business Applications?
http://www.codeproject.com/Articles/8612/Structs-in-C http://www.csharp-station.com/Tutorial/CSharp/lesson12 Basically use them when you want to have a complex value type semantic. An example could be Address. As with all things in our profession it really depends on your context. One example of a key difference: a readonly struct - all fields is readonly, unlike a readonly object(class) where the instance is readonly but you are free to change individual properties. On Thu, Aug 23, 2012 at 9:23 AM, Arjang Assadi arjang.ass...@gmail.comwrote: Heinrich, I still don't understand in plain vanilla business app i.e. GUI ( WinForm/WPF/Asp.net ) + Domain/BLL + Repository/DLL etc, where would using structs be beneficial. Of course a simple example using Classes vs Structs just to compare the pros and cons would be great but where in business apps that becomes relevant? Regards Arjang On 22 August 2012 20:50, Les Hughes l...@datarev.com.au wrote: Heinrich Breedt wrote: http://msdn.microsoft.com/en-**us/library/ms229017.aspxhttp://msdn.microsoft.com/en-us/library/ms229017.aspx -- Heinrich Breedt “Do not wait to strike till the iron is hot; but make it hot by striking.” - William B. Sprague That post just touches on the pros/cons of storing data in the heap/stack with a brief mention in linking immutable objects. It doesn't mean putting things on the stack is automatically a bad idea. In the example I gave in my last post, I would be putting 96bytes on instead of 32 for a reference type, and it would mean those 96bytes would be duplicated when the function returns. Nothing to really worry about there, whereas if you had a struct with a few thousand primitive types/references which is run numerous times, then you might want to worry. The link also says that generally value types are cheaper than reference types, and also mentions structs are good for short-lived data. I'd say that the example I provided is a good candidate for when to use a struct. Anyone disagree? -- Les Hughes l...@datarev.com.au -- Heinrich Breedt “Do not wait to strike till the iron is hot; but make it hot by striking.” - William B. Sprague
Re: Anyone using structs in C# Business Applications?
http://msdn.microsoft.com/en-us/library/system.int32.aspx On Wed, Aug 22, 2012 at 7:35 PM, Les Hughes l...@datarev.com.au wrote: On Fri, Aug 17, 2012 at 10:53 AM, Arjang Assadi arjang.ass...@gmail.commailto: arjang.assadi@gmail.**com arjang.ass...@gmail.com wrote: Hello I have found myself not needing to use structs for any reason in the vanilla business apps ( DB to front end WindosForms,WPF,ASP.net etc) for past 7 years or so. All BO's are classes, and I can't think of anything more fine grind than that. Unless I have been missing something, my question is to Business App writers, do you use structs any where for any reasons? In all the usuall VS demos I have not seen structs being used ( graphics demos do not count!) Regards Arjang Tristan Reeves wrote: Hi, To answer your specific question, int, double, bool, DateTime are all structs. I can't see any (even vanilla) business application getting by without them, can you? Regard, Tristan. Int is a struct? And yes, I use structs a fair bit for small things. Sure a struct is pretty much an class without methods/functions/**whatevertheterminology, and maybe a class would be neater/better suited/etc but when I am returning a few small things, sometimes I'll hack together something like struct sResult { public bool valid, public string[] errors, public string[] warnings } Just so I can have certain bits and pieces come back nicely to the UI. Any reason why this is a bad idea? -- Les Hughes l...@datarev.com.au
Re: Anyone using structs in C# Business Applications?
Hi, Int, DateTime, bool. They are all structs. Are you saying they are not useful in a vanilla business app? Tristan. On Thu, Aug 23, 2012 at 9:23 AM, Arjang Assadi arjang.ass...@gmail.comwrote: Heinrich, I still don't understand in plain vanilla business app i.e. GUI ( WinForm/WPF/Asp.net ) + Domain/BLL + Repository/DLL etc, where would using structs be beneficial. Of course a simple example using Classes vs Structs just to compare the pros and cons would be great but where in business apps that becomes relevant? Regards Arjang On 22 August 2012 20:50, Les Hughes l...@datarev.com.au wrote: Heinrich Breedt wrote: http://msdn.microsoft.com/en-**us/library/ms229017.aspxhttp://msdn.microsoft.com/en-us/library/ms229017.aspx -- Heinrich Breedt “Do not wait to strike till the iron is hot; but make it hot by striking.” - William B. Sprague That post just touches on the pros/cons of storing data in the heap/stack with a brief mention in linking immutable objects. It doesn't mean putting things on the stack is automatically a bad idea. In the example I gave in my last post, I would be putting 96bytes on instead of 32 for a reference type, and it would mean those 96bytes would be duplicated when the function returns. Nothing to really worry about there, whereas if you had a struct with a few thousand primitive types/references which is run numerous times, then you might want to worry. The link also says that generally value types are cheaper than reference types, and also mentions structs are good for short-lived data. I'd say that the example I provided is a good candidate for when to use a struct. Anyone disagree? -- Les Hughes l...@datarev.com.au
RE: Anyone using structs in C# Business Applications?
I believe everyone in this thread is talking about programmer implemented structs not ones provided by the .Net framework. From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Tristan Reeves Sent: Thursday, 23 August 2012 2:13 PM To: ozDotNet Subject: Re: Anyone using structs in C# Business Applications? http://msdn.microsoft.com/en-us/library/system.int32.aspx On Wed, Aug 22, 2012 at 7:35 PM, Les Hughes l...@datarev.com.aumailto:l...@datarev.com.au wrote: On Fri, Aug 17, 2012 at 10:53 AM, Arjang Assadi arjang.ass...@gmail.commailto:arjang.ass...@gmail.com mailto:arjang.ass...@gmail.commailto:arjang.ass...@gmail.com wrote: Hello I have found myself not needing to use structs for any reason in the vanilla business apps ( DB to front end WindosForms,WPF,ASP.net etc) for past 7 years or so. All BO's are classes, and I can't think of anything more fine grind than that. Unless I have been missing something, my question is to Business App writers, do you use structs any where for any reasons? In all the usuall VS demos I have not seen structs being used ( graphics demos do not count!) Regards Arjang Tristan Reeves wrote: Hi, To answer your specific question, int, double, bool, DateTime are all structs. I can't see any (even vanilla) business application getting by without them, can you? Regard, Tristan. Int is a struct? And yes, I use structs a fair bit for small things. Sure a struct is pretty much an class without methods/functions/whatevertheterminology, and maybe a class would be neater/better suited/etc but when I am returning a few small things, sometimes I'll hack together something like struct sResult { public bool valid, public string[] errors, public string[] warnings } Just so I can have certain bits and pieces come back nicely to the UI. Any reason why this is a bad idea? -- Les Hughes l...@datarev.com.aumailto:l...@datarev.com.au
Re: Anyone using structs in C# Business Applications?
Arjang, Didn't my earlier example demonstrate a benefit in just such a plain vanilla application? That's certainly where it has been used. David If we can hit that bullseye, the rest of the dominoes will fall like a house of cards... checkmate! -Zapp Brannigan, Futurama On 23 August 2012 09:23, Arjang Assadi arjang.ass...@gmail.com wrote: Heinrich, I still don't understand in plain vanilla business app i.e. GUI ( WinForm/WPF/Asp.net ) + Domain/BLL + Repository/DLL etc, where would using structs be beneficial. Of course a simple example using Classes vs Structs just to compare the pros and cons would be great but where in business apps that becomes relevant? Regards Arjang