From jwcolby at colbyconsulting.com Sat Oct 6 10:21:44 2012 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 06 Oct 2012 11:21:44 -0400 Subject: [dba-VB] C# winforms vs WPF Message-ID: <50704C88.2030203@colbyconsulting.com> Guys, I do a fair amount of C# programming, much of which is automating SQL Server from C#. I do almost no "DB Front End" kind of stuff, though I want to learn that. I have never taken the time to learn the Windows form / control stuff and today I went researching and discovered that apparently System.Windows.forms is dead technology. Something I read said that the programming team at MS was dismantled and WPF is not the latest thing. Obviously I don't know either one. For my purposes learning how to use the individual controls has worked pretty well, I have programmed wrapper classes, passed controls into the classes, sunk control events, raised events etc. I do not claim that is a superior paradigm, just 'what I know' from doing it that way in the Access / VBA environment. My question, addressed to any folks who do heavy duty windows form interface programming, is should I just keep on doing what I do or try to figure out how to use WPF. Just as an example, so that you can understand what I am looking to do, I have an existing class which takes a listview control, a progress bar, a 'clear status' button and a 'print' button and I pass all of these objects in to a class which forms a status system for my projects. I wrap all of the delegate functionality for writing back up to the controls, sinking the events of the buttons, setting up and using the progress bar and so forth. I then just instantiate one of the clsStatus objects in a form, place the controls on the form, pass the controls in to the form in the init and then call methods of this class to write status information to the list, tick the progress bar, clear the status list and so forth. Notice that none of this is 'data bound', and is used by my application to tell me (the operator) what the application is doing in real time. I hired a programmer to work with me (now moved on to another job), and I was the architect so to speak but didn't do very much of the bit twiddling of making this stuff happen. I do understand the C# code but I am having difficulty (for example) getting a handle on how to use the split container vs the splitter, the panel, dropping controls onto these objects, docking them and getting them to be where I want them to be at run time, mostly just because he figured this stuff out. He showed me (last year) how to do this stuff but... So here I am trying to learn the form / control stuff and I am reading that it is dead technology. But can WPF give me this level of object control? Do I need this level of object control? Has MS bypassed me and provided a framework that does the kind of stuff that I am doing programmatically? I obviously need some books to learn what I need, but I am not clear on what I need to learn. Any thoughts from interface programmers more experienced than I am? -- John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it From mcp2004 at mail.ru Sat Oct 6 10:42:23 2012 From: mcp2004 at mail.ru (=?UTF-8?B?U2FsYWtoZXRkaW5vdiBTaGFtaWw=?=) Date: Sat, 06 Oct 2012 19:42:23 +0400 Subject: [dba-VB] =?utf-8?q?C=23_winforms_vs_WPF?= In-Reply-To: <50704C88.2030203@colbyconsulting.com> References: <50704C88.2030203@colbyconsulting.com> Message-ID: <1349538143.658289950@f270.mail.ru> Do not panic there, John :) I'm personally programming mainly using WinForms. That happened historically. If I'd have started now, I'd have used WPF. If you're going to "start almost from scratch" - use WPF. There was a thread in Access-D recent;y with good WPF books recommendations. But WinForms should live as long as .NET Framewokr will I suppose. No panic. Thank you. -- Shamil Sat, 06 Oct 2012 11:21:44 -0400 ?? jwcolby : > > > > >Guys, > > I do a fair amount of C# programming, much of which is automating SQL Server from C#. I do almost > no "DB Front End" kind of stuff, though I want to learn that. > > I have never taken the time to learn the Windows form / control stuff and today I went researching > and discovered that apparently System.Windows.forms is dead technology. Something I read said that > the programming team at MS was dismantled and WPF is not the latest thing. > > Obviously I don't know either one. For my purposes learning how to use the individual controls has > worked pretty well, I have programmed wrapper classes, passed controls into the classes, sunk > control events, raised events etc. I do not claim that is a superior paradigm, just 'what I know' > from doing it that way in the Access / VBA environment. > > My question, addressed to any folks who do heavy duty windows form interface programming, is should > I just keep on doing what I do or try to figure out how to use WPF. > > Just as an example, so that you can understand what I am looking to do, I have an existing class > which takes a listview control, a progress bar, a 'clear status' button and a 'print' button and I > pass all of these objects in to a class which forms a status system for my projects. I wrap all of > the delegate functionality for writing back up to the controls, sinking the events of the buttons, > setting up and using the progress bar and so forth. I then just instantiate one of the clsStatus > objects in a form, place the controls on the form, pass the controls in to the form in the init and > then call methods of this class to write status information to the list, tick the progress bar, > clear the status list and so forth. > > Notice that none of this is 'data bound', and is used by my application to tell me (the operator) > what the application is doing in real time. > > I hired a programmer to work with me (now moved on to another job), and I was the architect so to > speak but didn't do very much of the bit twiddling of making this stuff happen. I do understand the > C# code but I am having difficulty (for example) getting a handle on how to use the split container > vs the splitter, the panel, dropping controls onto these objects, docking them and getting them to > be where I want them to be at run time, mostly just because he figured this stuff out. He showed me > (last year) how to do this stuff but... > > So here I am trying to learn the form / control stuff and I am reading that it is dead technology. > But can WPF give me this level of object control? Do I need this level of object control? Has MS > bypassed me and provided a framework that does the kind of stuff that I am doing programmatically? > I obviously need some books to learn what I need, but I am not clear on what I need to learn. > > Any thoughts from interface programmers more experienced than I am? > > -- > John W. Colby > Colby Consulting > > Reality is what refuses to go away > when you do not believe in it > > _______________________________________________ > dba-VB mailing list >dba-VB at databaseadvisors.com >http://databaseadvisors.com/mailman/listinfo/dba-vb >http://www.databaseadvisors.com > > From jwcolby at colbyconsulting.com Sat Oct 6 10:49:57 2012 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 06 Oct 2012 11:49:57 -0400 Subject: [dba-VB] Data dictionary to Report Message-ID: <50705325.2010701@colbyconsulting.com> I have a database, 225 million rows, 240 columns. Some of the fields apparently map to another database / marketing 'standard' somewhere in the world. My client has provided a spreadsheet which tells me that field ABC of my table 'matches' field XYZ of this other database, sometimes with a 'where value = xyz). He wants data element counts, i.e. what are the codes and counts of those codes in our table / fields matching this other database. How many records (the count) in our database has data in the specified field or matching the Where(). There are a 225 of these counts in the spreadsheet he provided to me. He wants to be able to provide me a spreadsheet like this and match it against this db but also match it against other databases that we have, one spreadsheet for each of our databases, defining field matches. Obviously this is simply a groupby / count on each specified field, or in some cases a count / where(value = xyz) . I have to present the data back to him somehow. My 'programmer' response is to design an application where I can import the spreadsheet he provides into a new table in each database that he gives me a spreadsheet for. He tells me the field name in our db that he wants the counts for so my application would then generate the SQL statement to do the SELECT / Groupby / count, execute the count, get the results back into C#, create a sheet in a workbook, and dump the data for each field into a sheet of a spreadsheet. Alternatively (and more realistically) denormalize the count into a comma delimited list and write the count back into the SQL Server table I just created, then paste the result back into the original spreadsheet he provided in a new column, or generate a new spreadsheet from the table. I don't want to launch into developing this application if SQL Server can do this for me natively. Does SQL Server have this functionality native? Can I just somehow generate a report of this? Can I push a denormalized string back to an excel spreadsheet that the client provided? It seems unlikely to me. -- John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it From jwcolby at colbyconsulting.com Sat Oct 6 11:32:07 2012 From: jwcolby at colbyconsulting.com (jwcolby) Date: Sat, 06 Oct 2012 12:32:07 -0400 Subject: [dba-VB] C# winforms vs WPF In-Reply-To: <1349538143.658289950@f270.mail.ru> References: <50704C88.2030203@colbyconsulting.com> <1349538143.658289950@f270.mail.ru> Message-ID: <50705D07.2030603@colbyconsulting.com> LOL, no panic. You are correct of course, Winform will continue to be part of .Net forever, however there are no new books on it. Not that it matters I suppose. John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it On 10/6/2012 11:42 AM, Salakhetdinov Shamil wrote: > Do not panic there, John :) > > I'm personally programming mainly using WinForms. > That happened historically. > If I'd have started now, I'd have used WPF. > > If you're going to "start almost from scratch" - use WPF. > There was a thread in Access-D recent;y with good WPF books recommendations. > But WinForms should live as long as .NET Framewokr will I suppose. > > No panic. > > Thank you. > > -- Shamil > > > Sat, 06 Oct 2012 11:21:44 -0400 ?? jwcolby : >> >> >> > > >> > > > >> Guys, >> >> > I do a fair amount of C# programming, much of which is automating SQL Server from C#. I do almost >> > no "DB Front End" kind of stuff, though I want to learn that. >> >> > I have never taken the time to learn the Windows form / control stuff and today I went researching >> > and discovered that apparently System.Windows.forms is dead technology. Something I read said that >> > the programming team at MS was dismantled and WPF is not the latest thing. >> >> > Obviously I don't know either one. For my purposes learning how to use the individual controls has >> > worked pretty well, I have programmed wrapper classes, passed controls into the classes, sunk >> > control events, raised events etc. I do not claim that is a superior paradigm, just 'what I know' >> > from doing it that way in the Access / VBA environment. >> >> > My question, addressed to any folks who do heavy duty windows form interface programming, is should >> > I just keep on doing what I do or try to figure out how to use WPF. >> >> > Just as an example, so that you can understand what I am looking to do, I have an existing class >> > which takes a listview control, a progress bar, a 'clear status' button and a 'print' button and I >> > pass all of these objects in to a class which forms a status system for my projects. I wrap all of >> > the delegate functionality for writing back up to the controls, sinking the events of the buttons, >> > setting up and using the progress bar and so forth. I then just instantiate one of the clsStatus >> > objects in a form, place the controls on the form, pass the controls in to the form in the init and >> > then call methods of this class to write status information to the list, tick the progress bar, >> > clear the status list and so forth. >> >> > Notice that none of this is 'data bound', and is used by my application to tell me (the operator) >> > what the application is doing in real time. >> >> > I hired a programmer to work with me (now moved on to another job), and I was the architect so to >> > speak but didn't do very much of the bit twiddling of making this stuff happen. I do understand the >> > C# code but I am having difficulty (for example) getting a handle on how to use the split container >> > vs the splitter, the panel, dropping controls onto these objects, docking them and getting them to >> > be where I want them to be at run time, mostly just because he figured this stuff out. He showed me >> > (last year) how to do this stuff but... >> >> > So here I am trying to learn the form / control stuff and I am reading that it is dead technology. >> > But can WPF give me this level of object control? Do I need this level of object control? Has MS >> > bypassed me and provided a framework that does the kind of stuff that I am doing programmatically? >> > I obviously need some books to learn what I need, but I am not clear on what I need to learn. >> >> > Any thoughts from interface programmers more experienced than I am? >> >> From df.waters at comcast.net Sat Oct 6 12:34:36 2012 From: df.waters at comcast.net (Dan Waters) Date: Sat, 6 Oct 2012 12:34:36 -0500 Subject: [dba-VB] C# winforms vs WPF In-Reply-To: <50704C88.2030203@colbyconsulting.com> References: <50704C88.2030203@colbyconsulting.com> Message-ID: <000301cda3e8$db294eb0$917bec10$@comcast.net> Hi John, Based on the recent discussion in our list, I recently purchased a used copy of Pro WPF in VB 2010 (there is a C# version too), because the reviews said the book gave a good description of WinForms vs. WPF. I read the introduction and stopped there. WPF can apparently do all the things that WinForms can do, and a lot more. The 'lot more' is a very enhanced GUI. For me, I develop basic business applications, and none of the enhanced part would be wanted by my customers. So I will stick with WinForms. The difference between MS deciding to stop enhancing a particular technology and MS deciding to prevent it from working for anyone is probably at least two decades. Several months ago I had purchased WPF 4 Unleashed and I got the same impression. >From Apress: Who this book is for: This book is designed for developers encountering WPF for the first time in their professional lives. A working knowledge of Visual Basic (VB) and the basic architecture of .NET is helpful to follow the examples easily, but all concepts will be explained from the ground up. Dan -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Saturday, October 06, 2012 10:22 AM To: VBA; Access Developers discussion and problem solving Subject: [dba-VB] C# winforms vs WPF Guys, I do a fair amount of C# programming, much of which is automating SQL Server from C#. I do almost no "DB Front End" kind of stuff, though I want to learn that. I have never taken the time to learn the Windows form / control stuff and today I went researching and discovered that apparently System.Windows.forms is dead technology. Something I read said that the programming team at MS was dismantled and WPF is not the latest thing. Obviously I don't know either one. For my purposes learning how to use the individual controls has worked pretty well, I have programmed wrapper classes, passed controls into the classes, sunk control events, raised events etc. I do not claim that is a superior paradigm, just 'what I know' from doing it that way in the Access / VBA environment. My question, addressed to any folks who do heavy duty windows form interface programming, is should I just keep on doing what I do or try to figure out how to use WPF. Just as an example, so that you can understand what I am looking to do, I have an existing class which takes a listview control, a progress bar, a 'clear status' button and a 'print' button and I pass all of these objects in to a class which forms a status system for my projects. I wrap all of the delegate functionality for writing back up to the controls, sinking the events of the buttons, setting up and using the progress bar and so forth. I then just instantiate one of the clsStatus objects in a form, place the controls on the form, pass the controls in to the form in the init and then call methods of this class to write status information to the list, tick the progress bar, clear the status list and so forth. Notice that none of this is 'data bound', and is used by my application to tell me (the operator) what the application is doing in real time. I hired a programmer to work with me (now moved on to another job), and I was the architect so to speak but didn't do very much of the bit twiddling of making this stuff happen. I do understand the C# code but I am having difficulty (for example) getting a handle on how to use the split container vs the splitter, the panel, dropping controls onto these objects, docking them and getting them to be where I want them to be at run time, mostly just because he figured this stuff out. He showed me (last year) how to do this stuff but... So here I am trying to learn the form / control stuff and I am reading that it is dead technology. But can WPF give me this level of object control? Do I need this level of object control? Has MS bypassed me and provided a framework that does the kind of stuff that I am doing programmatically? I obviously need some books to learn what I need, but I am not clear on what I need to learn. Any thoughts from interface programmers more experienced than I am? -- John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com From mcp2004 at mail.ru Thu Oct 25 23:25:11 2012 From: mcp2004 at mail.ru (=?UTF-8?B?U2FsYWtoZXRkaW5vdiBTaGFtaWw=?=) Date: Fri, 26 Oct 2012 08:25:11 +0400 Subject: [dba-VB] =?utf-8?q?FYI_and_records=3A_XMLHttpRequest_and_Caching?= Message-ID: <1351225511.792629099@f315.mail.ru> Hi All -- If you use XMLHtppRequest (with MSXML) you may meet with a nasty caching issue. Description and solution is here:?http://www.subbu.org/blog/2005/10/xmlhttprequest-and-caching?- the solution from Marco Dorantes worked well for me: request.setRequestHeader(?If-Modified-Since?, ?Sat, 1 Jan 2000 00:00:00 GMT?); The other ones proposed in the referred above article and comments didn't. I do use Win7 and IE?9.0.8112.16421 Thank you. -- Shamil XMLHttpRequest and Caching From accessd at shaw.ca Fri Oct 26 00:57:05 2012 From: accessd at shaw.ca (Jim Lawrence) Date: Thu, 25 Oct 2012 22:57:05 -0700 Subject: [dba-VB] FYI and records: XMLHttpRequest and Caching In-Reply-To: <1351225511.792629099@f315.mail.ru> References: <1351225511.792629099@f315.mail.ru> Message-ID: <8F575EBC844042189FA5C98FB167EB48@creativesystemdesigns.com> Hi Shamil: That problem use to be the case but our modern browsers have long since resolved it...not sure of IE as I do not general develop it. Jim PS The article you linked to is seven years old. -----Original Message----- From: dba-vb-bounces at databaseadvisors.com [mailto:dba-vb-bounces at databaseadvisors.com] On Behalf Of Salakhetdinov Shamil Sent: Thursday, October 25, 2012 9:25 PM To: Discussion concerning Visual Basic and related programming issues. Subject: [dba-VB] FYI and records: XMLHttpRequest and Caching Hi All -- If you use XMLHtppRequest (with MSXML) you may meet with a nasty caching issue. Description and solution is here:?http://www.subbu.org/blog/2005/10/xmlhttprequest-and-caching?- the solution from Marco Dorantes worked well for me: request.setRequestHeader(?If-Modified-Since?, ?Sat, 1 Jan 2000 00:00:00 GMT?); The other ones proposed in the referred above article and comments didn't. I do use Win7 and IE?9.0.8112.16421 Thank you. -- Shamil XMLHttpRequest and Caching _______________________________________________ dba-VB mailing list dba-VB at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-vb http://www.databaseadvisors.com