2

Me and my colleague are working on a new application that should replace as soon as possible an old VB6/Access 97 application made years ago.This application has a lot of problems, adjusting them in the same environment is simply impossibile. What we are trying to do is rewrite all the code in C# and MySql.

We're basically starting from scratch, the only things we can keep from the old project are some data that we already migrated from Access to MySQL

My question is, since we've a restricted time and we're learning while coding (no past experience in C#) what are the things that we should consider to implement and what should we just avoid for now ?

The scope of the application here is not really important, just some reading and writing on the database.

This is what we're already doing in our small team of 2:

  1. Source Control - Git, we had no SC before
  2. Bug tracking - FogBugz in our case, we moved on from Excel
  3. Solution - We now have 1 solution with 3 Projects inside, in VB6 there was 5 different project. 5 different .exe for no real reason.

This is what we're not really sure is worth the time implements:

  1. Entity Framework - Seems good but there's a learning curve, as of right now we're going with ADO.NET,pretty straight forward. Planning on using Dapper when possibile since it seems really fast and easy.
  2. Unit test - We've never done any unit test before, we started with NUnit but since our application is only writing and reading data from the database we're not really sure how implement it. Tried moq also with the same results. In this case we think our way to go is just have a dump of the database and just test that.

  3. WPF - WPF seems awesome but there is a learning curve here too. We started our project in WinForms, our main gol now is to have a functional app as soon as possibile not a pretty one. This is also pretty big for the future of this application because for what I've understand going from WinForms to WPF is a big step and need a lot of rewriting.

  4. Reports We have 100+ reports to recreate. They're all made in CRXI using a table like Report1_Printin the database with all the data repeated on all the rows. Awful. We've not tried anything yet but we're planning on using Visual Studio Report designer.

  5. Deploying 30-35 users are going to use it, as of right now we share the updated .exe of the vb6 app on our server and users download it with a .bat. We're looking for something a little more fancy here...

With time in mind, what should be our main focus ? We're not really looking for the best way to do things, we're looking for the best way to get the job (a good job) done as soon as possibile. The focus here is on the users that as of right now can't work efficiently.

closed as too broad by gbjbaanb, Doc Brown, gnat, TMN, David Arno Mar 14 '16 at 12:08

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    This is surely too broad to get a good answer here on Programmers, don't be astonished if the community will close this soon. For any sensible answer, one should know your team and the task in depth.As a suggestion: make a spike, implement a small, running version 0.1 which touches all the topics above. Use that to collect experience, and if you run into trouble with a specific topic, ask a question about that on Stackoverflow (or on Programmer's, if it is a conceptual question). – Doc Brown Mar 14 '16 at 9:08
  • This question is pretty broad, but it seems you already know the answer to some of the sub-questions. E.g. you already have experience with WinForms, and you provide no reason at all for why you should shift to a new framework when you have enough risk already. – JacquesB Mar 14 '16 at 9:22
  • 1
    As for the overriding question "what should be our main focus", nobody can answer that without knowing about your customers requirements - and if somebody think they can answer without this knowledge, they are the kind of people you shouldn't listen to :) – JacquesB Mar 14 '16 at 9:26
  • Well, the customers requirements is having a working application since as of right now they're using an awful VB6 application with loads of bugs. The point is not really them, is what should be the focus for my small team. – SilentRage47 Mar 14 '16 at 9:41
  • @SilentRage47: If the customers requirements are not the focus for your team, you are heading for trouble in the long run. For example, if the main concern for the customer is "loads of bugs" then surely you should focus on fixing these bugs before anything else. – JacquesB Mar 14 '16 at 9:52
2

WPF is indeed a steep learning curve if you are taking that jump from older UI frameworks; not least because to be proficient with WPF you need to learn the finer points of XAML and the MVVM pattern; but you will probably end up finding yourself with problems which are solved by various MVVM frameworks (e.g. Prism, Caliburn, MVVM Light) and IOC containers (e.g. Unity, Castle Windsor, StructureMap) - so those are added to your list too.

Unit Testing As Lawrence mentioned, this is undoubtedly the best place to start - because unit testing and Test-Driven Development cannot realistically be done retrospectively (i.e. once the code is written, adding unit tests is usually too hard and too time-consuming to be worthwhile).

It will undoubtedly take time to be acquainted with the overall unit testing mindset and methodology; but time you spend right now learning to apply TDD the right way will make all other aspects of your development process easier in future.

On a note about unit testing with MOQ and Entity Framework/Dapper - you can save yourself some pain of mocking ORM entities if you use an auto-mocking tool such as AutoFixture. https://stackoverflow.com/questions/5786628/what-are-the-differences-between-moq-and-autofixture

Entity Framework is generally quick to get something basic running if you've never used it before; There's a 10-minute "Quick-start" video on MSDN for letting EF create a new database from scratch using Code First. https://msdn.microsoft.com/en-us/data/jj193542

Of course, EF goes a lot deeper than that; although if its performance is a problem then Dapper is of course a better alternative. (Though I'd suggest waiting to find out whether its performance is a problem before abandoning EF).

Deployment - You could take a look at ClickOnce - you can this get up and running very quickly. https://www.youtube.com/watch?v=t4BTLdIMYEY

Lastly, I see you didn't mention Continuous Integration anywhere - do you have anything set up? If not, I'd strongly urge you to get an automated build server ASAP which can react to each new commit and runs your unit tests every time. (e.g. TeamCity or Jenkins - both are relatively quick and easy to get started with)

2

With the context you've described, there are many suggestions that can be made. However, you ask for just one:

With time in mind, what should be our main focus?

With the 5 things you're not sure is worth the time and needing to choose just one to start with, I'd recommend starting with unit test. Coupled with proper source control, doing this properly should give you confidence to try out the other things. Think of it as a safety-net of sorts. It's doubly important if you're unfamiliar with the target language - too easy to break something accidentally.

Have a look at Test-Driven Development if you aren't already familiar with it.

Not the answer you're looking for? Browse other questions tagged or ask your own question.