vb6 windows application migration to silverlight/wcf web application - silverlight

we have existing vb6 win application for gaming industry. There are mainly 3 big modules. For 1st module/part, I converted vb6 code to vb.net library. I used that vb.net library in wcf duplex service to use existing business logic and get/set data. And, this wcf service, I use in silverlight application. 1st part was dealing with much calculation, so I didn't convert vb6 code to c#, instead I converted to vb.net. Even, old vb6 code has hard-coded sql queries instead of calling pre-compiled stored procedures. I kept the same in vb.net library.
Now, client wants to convert entire system to silverlight web app. And, so I am thinking that for rest of the 2 modules, I should convert vb6 code to c# as there is less calculation and more db operations. Also, I will clean up code to use stored proc instead of hard-coded queries.
So, plz let me know
if my approach is correct or not. What can go wrong here? What things I should take into consideration before processing further ? should I manually convert vb6 to c# ? I know there is tool for vb.net to c# conversion, but don't know about vb6 to c#. Any advice on migrating code from win app to service oriented architecture ?
Thanks a lot :)

The tools that take VB.net to c# are far from perfect, so I highly doubt that going from VB6 to c# is going to be painless. One of the beautiful things about .NET is the fact that it allows easy integration of components regardless if their original programming language. So there shouldn't be any problem migrating your old code to VB.net (easy, cheap), componetizing it and writing new code in c#.
You need to ask yourself: What is the business value/benefit to your customers if the code happens to be in C# rather than VB.NET?
Performance, reusability, maintainability, etc. of a mature codebase is not likely to be significantly different with C# vs VB.net. I would bet that converting your mature code to c# rather than vb.net will introduce more problems than it will solve.

I would recommend using these tools http://www.artinsoft.com/visual-basic-6-or-csharp-to-the-web.aspx
They migrate from VB6 to Silverlight and WCF services

Related

Converting VB6 Forms to .Net Core WinForms

I have a VB6 Forms application and want to convert to .Net Core WinForms. I know conversion tools are available that make that claim. However, I'm looking for recommendations or first hand experience in doing this.
Manual may be best, but if you're looking for an automated route, I would suggest
VB6 to VB.NET WinForms (.NET Framework)
VB.NET to C# (.NET Framework)
Upgrade to .NET Core
I do not have any experience with #1, VB6 to VB.NET.
For #2 check out this project https://github.com/icsharpcode/CodeConverter. It works very well.
For #3, Microsoft has a try-convert project to upgrade .NET Framework projects to .NET Core. It has worked flawlessly for me. https://github.com/dotnet/try-convert
I just converted a decent sized app from VB6 to C#. The biggest challenge for me was the third party controls. Most tools can't manage those as most old controls are either discontinued or the interfaces are so wildly different it made no sense to use a tool.
I ended up just recreating all the forms using modern controls first. I would then just paste the old VB6 code where is made sense and worked my way through converting the logic to C#. In some cases I literally printed files to paper and read through them and typed in the C# code.
I wanted to take advantage of the .net programming model so I rewrote a lot and improved the function and readability of the code.
I have used tools and while they do help, I didn't feel it really saved me a lot of time. My "brute force" method helped me understand the application much better and helped me sort through errors and bugs easier.
In my experience it's worth the effort doing it manually. There really is no shortcut if you want to do a proper job.

Is there a way to run my XBAP (or WPF) application as OLE object?

I need to run my WPF application as OLE object. I apologize that if I make it XBAP-application I could, but how?
Generally I need this cause of I need to access my application from CIMPLICITY.
You need to modify your existed .NET application to be COM visible. it's a quite general question and I may suggest to look at .NET - COM Interoperability and Microsoft .NET/COM Migration and Interoperability. I'm sure there is a very popular issue and you can find much more materials about it.

Designing a data model in VS2010 and generating ORM code, application

Simply put: I have a database design in my head and I now want to use Visual Studio 2010 to create a WPF application. Key is to use the VS2010 tools to take much as possible manual work out of my hands.
The database engine is SQLite
ORM probably through DBLINQ
Use of LINQ
The application can create new, empty database instances
Easily maintainable (changes in data model possible)
Questions
How do I start designing the database model (visually) in Visual Studio 2010? Should this be an xsd? Do I do this in a separate project?
Next, how can I make the most use of VS2010 code generation tools to generate a Data Access Layer?
I suppose the Data Access Layer will be added as a Data Source (in another project?) and from there it's a rather generic data binding solution?
I tried finding clear examples of this but it's a jungle out there, the hunt for a solution is NOT converging to one clear method.
Update
So I decided to use ADO.NET entity framework, DBLINQ is out of the picture. I downloaded and installed the System.Data.SQLite ADO.NET provider which integrates with VS2010. From the VS2010 Server Explorer one can create and design a new database but it could be done with a standalone tool for SQLite as well. I then created a new WPF application project, and in the solution explorer added an ADO.NET Entity Data Model, which automatically generates an edmx with C# code (which is the Data Access Layer) from the already created database file. WAF (waf.codeplex.com) seems like a good idea to implement the rest but plain LINQ to SQL will do. This (click here) is also a very helpful question on stackoverflow.
Kay,
Please consider using ADO .NET Framework. It's supported by VS 2010 and LINQ (quick article).
There is one thing you must know before designing your architecture. BLL (Business Logic Layer) is a layer of logic specific for a particular data usage, hence cannot be generated automatically by (whatever you will use) framework. I guess you had Data Access Layer in mind - don't worry about that - if you're going to use ADO .NET and LINQ to Entities, DAL will be generated for you automatically. LINQ to Entities together with ADO .NET Framework are powerful set of tools which should 100% cover your needs. Additional info about LINQ to Entities.
Please feel free to ask if you have any questions.

Winforms or Silverlight

I have a small project that I will be working on shortly that collects employees time and what project the person was working on. Pretty straight forward. I was orginally going to work on it in WinForms but since im new to that I though maybe using Silverlight for the application since I will have a learning curve for each. Here is a couple of business requirements that i need to incorporate into the application.
-System will use an Access database hosted on a particular persons computer.
-Ability to generate and print reports
-Installed on the emploees desktop who will have access.
Would one technology be recommended over the other in terms of what I need to do. Here is a screen mockup of one of the pages I will need to create.
http://teewebco.com/images/main-copy.png
If you want access to the machine on which the application will run (e.g. to access a database, and to use printing), that pretty much rules out Silverlight, without jumping through a lot of hoops (e.g. having to install something on the user's machine anyway).
You say that WinForms will require a learning curve for you - well you might as well use WPF then, as it's a similar technology from the UI perspective as Silverlight. However, you can proably find a lot more resources online for WinForms though, and it's likely you'd be more productive in WinForms given its strong Visual Studio designer support.
Deployment with WinForms or WPF should be fairly easy with ClickOnce.
Since it's a local (desktop) app which needs to access a local resource (Access database), it's probably better to do winforms.
However, you might be better off doing this as WPF instead - it's more current than winforms.
Winforms and WPF are easier than Silverlight when you have to access a database because you can do it directly. If your install base uses only .net 2.0 then stick with WinForms, if you know they can install .NET 3.5 then try out WPF. Just be warned, there is more to learn with WPF and XAML but it's very rewarding especially if you want to get fancy.
Silverlight 3 lets your application to run on desktop as well.
So I'd write it on silverlight. Yet another technology to master.

Can Silverlight 4 run SSIS packages, SSRS reports... etc?

Can Silverlight 4 run SSIS packages & SSRS reports directly? What about interacting with Office object models? I am wondering if Silverlight 4 can be used to create full blown Line of Business Apps and for me to skip learning WPF and using RIA services. I know SL is a subset of WCF. I don't know either and want to save time and concentrate on learning SL4 if it does LOB apps?
As I recall, SSIS and SSRS expose a COM interface (though I could be wrong on that). If they do, then, yes, it would be possible to call SSIS packages through the out-of-browser option in Silverlight 4. See, for starters, this video.
However, this isn't really what Silverlight was designed for. If your LOB app is just a standard data access/updating thing, then, yeah, Silverlight is a reasonable candidate. But if you're having to interact with your enterprise infrastructure in any significant way that can't easily be wrapped in a WCF web service, I'd probably stick with WinForms or WPF. I suspect you'll probably find yourself chasing fewer dead ends.

Resources