Jump to content

Final Year Project Details


Recommended Posts


So as you may or may not be aware. Win Toolkit v2.0 has been accepted to be my final year project. That means a year and a half of researching, re-designing, re-coding and re-testing). It will require me to start the project from scratch taking in lots of researching, coding practices and everything I've learnt in the first four years into one beautiful final product.


At the moment the current Win Toolkit code is a big mess. It has a mixture of old rubbish code, sorta ok code and new code. Unfortunately that means adding your requests is really hard because as you know, it leads to quite a few bugs from just forcing it in there. Some of the big tools such as the All-In-One Integrator, has become so hard to manage that it scares me just thinking about adding stuff to it. So, saying all that. A complete rewrite is required.


The main effort will be focusing on the design and planning, focusing on efficiency, maintainability and taking advantage of the latest tools such as .NET Framework v4.5. This is crucial for making a high end product. Planning is key!


Feel free to post any questions. Anything which isn't on topic will be deleted.



I hell of a lot of research is required, as I still have a lot to learn. In two hours alone, I learned so much about multi-threading. I even took the time to recover subjects in more detail such as abstract classes, constructors and best of all LINQ/Lambda. The potential of LINQ alone is huge but unfortunately, it's not implement much in the current release at all.


I also have to relearn Windows Presentation Foundation (WPF), as I plan on moving to that instead of Windows Forms to create an even better GUI. So far on my list of research material is:

  • .NET 4.5 features
  • Threading (Tasks & Paralellism)
  • WPF - Windows Presentation Foundation
  • WIMGAPI - Remove the need for imagex
  • Extraction - Remove the need for 7z
  • Automated Testing
  • Languages
  • List will most likely grow.

Maintainability and Efficiency

At the moment, the code is one big heap of mess with a low maintainability score and very high Cyclomatic Complexity rate. Adding new features and request, has become such as hard task that most of the time it's not even worth bothering, which is why not many requests get done.


Don't get me wrong, I know all my code of by heart pretty much and understands what it does, even without a single line of comments but it's still hard to add features. I absolutely need to focus on making the code as easily read as possible AND also efficient. Both of these together will create one hell of a program. Before I start on a feature or any code at all really. I need to sit back and look at it from a different perspective. Heck, even get a pencil and some paper out if I have to!


At the minute Visual Studio rates my Maintainability Score and Cyclomatic Complexity rating for the All-In-One Integrator as 31 (higher better) and 2,508 (lower better) respectively. However, with the new error logging system. It gets a rating of 80%+ and a cyclomatic rating of 4, which I think is impressive. If I took a step back and look at it again, I'm pretty sure I can get it to 90%+. The point is, the new system is so much easier to read and understand. I can add anything to it so easily, I could do it in my sleep. With the All-In-One Integrator on the other hand, just scares me thinking about changing even a tiny change.


Error Logging Experiment

Believe it or not error logging is an absolute critical feature that needs to work 99% of the time. Before the experiment, error logging worked about 10% of the time, with the other 90% of error logs being completely unreadable and therefore pointless. Using the latest code and practices I've learnt. I made Error Logging v2.0 which works 99% of the time, producing nice readable and detailed reports which you can view at your discretion. Also as more and more logs get moved onto the new system, you will see more details about the issues you are seeing. Better yet, they are in YOUR language! The new error logs system was a huge success and I'm proud of that.


The new EL2.0 system only took 5-6 hours of planning but it was done with minimal code and it worked like a dream from day 1. This just shows what happens when I sit back and think about things rather than just the usual hack and patch method to just get it working. Imagine the potential if the rest of the program had the same make-over!


.NET Framework 4.5

I've always been behind on the releases. Originally I used v2.5 when 3.5 was available. Currently I'm on v3.5 when v4.5 is available. I am eagerly wanting to jump to the latest release and take use of all the new features. v4.5 has a lot more features compared to 3.5, the biggest one of all is threading. I can't even begin to list them all.


Win Toolkit v1.4.xx will remain available on .NET Framework v3.5 for XP users. It will only have bug fixes.



Having a version of Win Toolkit has been requested for years. Since the program will be written from scratch, I will definitely explore the idea of having this in from the beginning. So hopefully the first version you test will have this feature. This will definitely make a lot of people happy.



Another focus will be on taking advantage, in a positive way, your computer’s hardware. Since computers these days are having more processing cores, I thought it’s about time Win Toolkit took advantage of that. Win Toolkit at the moment only uses a maximum of two threads. For example, in the All-In-One Integrator it uses a Background Workers to do the actual tasks whilst the GUI thread sits there doing nothing apart from keeping the GUI responsive. So in actual fact, Win Toolkit isn’t really multi-threaded at all. Even worse still, I’ve been told Background Workers are actually really bad for performance.


Imagine the potential if Win Toolkit used all of your cores instead of just the one. Integrating difference things at the same time. Reducing the amount of total time required. So this is where ‘Tasks’ and ‘Parallel’ come in. Tasks are a completely new feature of .NET 4.0 with huge enhancements in .NET 4.5. Tasks are absolutely powerful. Tasks will be used to do the split up each individual task whilst Parallel will be used within the tasks themselves to work on more than one file at a time.


If you have have a multi-core processor. The advantages you will gain are huge. Lets say, for example, you have an 8 core processor. Thats x8 the performance. In reality, it will be more like 6-7 times the performance but I won't complain about that at all and I doubt you will either. Check out the results of my multi-threaded experiments here.


Win Toolkit v1.4.xx.x All-In-One Integrator

At the moment with just one thread, the tasks are queued.

Mount > Updates > Drivers > Removal > Tweaks > Silents > Themes > Wallpapers > etc.. > Unmount

As you can see, it can take a while to get to the last task especially since most of the work is with Drivers.


Win Toolkit v2.x.x.x All-In-One Integrator

The new task method will give each one of those their own thread so all of them will be done at the same time. The image will be mounted, and then once mounted a task will be assigned to add Updates, Drivers and Component Removals. AT THE SAME TIME, your wallpapers, custom files, gadgets, theme packs


Stage 1:

Whilst Updates, Drivers and Components are queued under one task due to the fact they can't be done at the same time. Every other task will be given their own thread and will be done in the background.

MountMain Task: Updates > Drivers > Component RemovalTask 2: WallpapersTask 3: ThemesTask 4: GadgetsTask 5: Copy Silent Installersetc..

Stage 2: These are things which require the registry but are locked during the DISM tasks.

Task 1: TweaksTask 2: Add Silent Installer entries.Task 3: Services



Windows Presentation Foundation, WPF

At the moment Win Toolkit uses Windows Forms which is very dated with controls which look they are made for Windows 98. WPF is the latest in GUI design, with all new controls, features, options and so on. ListViews for example, are sort-able by column built-in. It will made the app look more modern and give me much more control over the design. The bad news is, it's completely alien to me but I'm going to enjoy the learning experience so it isn't really bad news at all.



Rate of WPF adoption 2005-2007


As you can see, the rate of adoption for WPF is huge and that was back in 2007 so I'm definitely behind the times. Some say WPF is dead, I disagree but either way it's newer and I want to learn something new.



This is just a sample design of the new startup screen. Still has a tiny bit more work. Mostly just experimenting with WPF.


Automated Online Database

To save time, there will be a mostly automated SQL database which will contain if a description of an update, if it's LDR/GDR (update.mum present), any known issues and if it can't be integrated or not. This should save time in extracting files, HDD usage and immediately make it so I don't have to release a new version when a problem update appears. It may also include it the update is superseded or out-of-date.



Win Toolkit relies on quite a few external tools which makes it size pretty big. It currently has imagex, 7z.exe, 7z.dll and some others built-in to the main exe which has made the exe itself a lot larger than it should be. I plan to hopefully get rid of imagex and replace it with WIMGAPI but also 7z with my own code. This will mostly benefit those on slow internet connections.


Component Removal

The vLite tab will be completely removed. Minor items such as removing themes will be moved to the normal Component Removal tab but more complicated ones such as 'Speech and Natural Language' will be removed. I will be sticking to the official methods of removing components.



Yes I admit, I can rush things and can leave or add new bugs because I didn't do enough testing. In Win Toolkit 2.0, I will be using automated testing. With just a click of the button it will automatically test the product and look for things which did work and no longer do. The automated testing is another key part of making Win Toolkit a high quality product by hopefully decreasing the amount of bugs.


As new bugs appear, I can add more testing to prevent it from re-occurring in the future. Unfortunately however, not everything can be tested automatically.

Edited by Legolash2o
Link to comment
Share on other sites

  • 2 weeks later...

Problem with External SQL Database is, that someone has to maintain it.


IMHO it would be more feasible to use SQLite and maintain local copy on user PC aswell (and sync it against online one) so program would be still usable without Internet connection or even after Development is being ceased.

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

I've already started my experiments again. At the moment I've been designing class diagrams and experimenting with WPF. At the moment, progress will be slow whilst I get used to using WPF instead of Windows Forms.

Link to comment
Share on other sites

To possibly save you some trouble, (or at least move you along when creating your own 7zip support), you might consider using the dlls written for 7zip.  The following is a quote from the 7zip.org faq.  I see no reason for you to "reinvent the wheel" when the code is already available for you.

How can I add support for 7z archives to my application?

One way is to use the 7z.dll or 7za.dll (available from sf.net for download). The 7za.dll works via COM interfaces. It, however, doesn't use standard COM interfaces for creating objects. You can find a small example in "CPP\7zip\UI\Client7z" folder in the source code. A full example is 7-Zip itself, since 7-Zip works via this dll also. There are other applications that use 7za.dll such as WinRAR, PowerArchiver and others.

Link to comment
Share on other sites

At the moment I'm focusing on converting the public methods from WinToolkit v1.x into better v2 code :P This time round I'm actually making my own nice, clean, efficient and organised DLL which can be used in later projects.


For example if both v1.x and v2.x used my DLL. I would only have to fix bugs once and both versions would be fixed :P But I doubt I can use it for v1.x as it's .NET 4.5 


Make sense?

Link to comment
Share on other sites

  • 2 weeks later...

Don't I am still on the forum. I'm just focusing my efforts on coding but mostly planning.


Since I'm working on the DLL. I can't release a BETA so it requires a lot of time testing as well, then doing some tweaks, testing, then further tweaks. Testing has been taking up a lot of my time :P

Link to comment
Share on other sites

  • 3 weeks later...
  • 4 weeks later...

OK so the last week or so, I've been thinking about designs and coding the DLL. From Sunday, I will be working on the GUI again so expect more releases next week :)


I have to for my FYP do a lot of research and push myself to learn new things and, more importantly, produce better code!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...