Me and my colleague are working on a new application that should replace as soon as possible an old
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
We’re basically starting from scratch, the only things we can keep from the old project are some data that we already migrated from
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:
- Source Control –
Git, we had no SC before
- Bug tracking –
FogBugzin our case, we moved on from Excel
- 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:
- 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
Dapperwhen possibile since it seems really fast and easy.
Unit test – We’ve never done any unit test before, we started with
NUnitbut since our application is only writing and reading data from the database we’re not really sure how implement it. Tried
moqalso 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.
WPFseems 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
WPFis a big step and need a lot of rewriting.
Reports We have 100+ reports to recreate. They’re all made in
CRXIusing 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.
Deploying 30-35 users are going to use it, as of right now we share the updated
.exeof 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.
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
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)
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.