MVC (Model, View and Controller) … For Me, It Is The Right Way To Develop For The Web

I have been working on my Asecuritysite since 15 Feb 2013 [here]:

MVC (Model, View and Controller) … For Me, It Is The Right Way To Develop For The Web

I have been working on Asecuritysite.com since 15 Feb 2013 [here]:

It is basically free to use, and I support all the costs. For me, it has been a scratchpad for ideas and implementation methods. I also wanted to break down the barriers to learning complex cryptography methods, and try and show people how they can be abstracted in a simple way. I used to write lots of book, but I find that to be a slow process, and not dynamic, so now I write code for Web pages. I have much more control over my content, and if there’s a problem, I can fix. With books, once you have published, it is now static, and it’s not easy to change and update. So I write for the Web now.

By 2016, I had improved navigation and created a design that has stayed much the same since [here]:

By 2018, the site had a basic front page to allow users to quickly find their content:

But, my site has grown massively, and currently has around 1.5 million unique users every year, and nearly 40 million accesses:

I have coped with this growth through two things: AWS and MVC. Okay, sorry for using acronyms here, but, hopefully, you should know that AWS is Amazon’s Cloud, and an amazing resource. I used to rent a bare metal server in 1&1, and it was expensive and had none of the Cloud features that I have now. I used to have to call them up on a regular basis and ask them to do a console access boot. Although it was a bare metal server, it’s performance wasn’t actually that good (as I was stuck with old hardware). The disks often failed, and one disk was on its last boot option. If it failed again, I would lose the whole site, and backups were very expensive and clunky.

The move to an EC2 instance, though, was the best decision I made. It took me a few days to rebuild but has since ran without any problems. Whenever I need a big instance for an exam or a course, I just pause it for a few minutes and replace it with an instance with more memory and more CPUs. I can also firewall easily, and open and close ports whenever I need to. Along with that, I can snapshot the instance whenever I want. And the costs are much less than the bare-metal server. I am not locked in, but the AWS resource gives me everything I need, with DNS integration using Route53, and Python scripting support.

But, the great choice was to go with MVC … Model, View and Control. I had previously developed my NetworkSims product using .NET and it ran as a Windows program:

But I knew the future was the Web. So I selected MVC ASP.NET as it easily allowed me to port my C# code from Windows to ASP.NET. It was genius and such an easy port. Overall, C# and .NET is still one of the best development environments you can have and basically nailed the porting between Windows and Web. At its core is still the creation of a DLL that runs on the server, but this makes it fast in its operation. If it is matched with Microsoft Visual Studio (on a Mac!), there’s few better environments around.

And so with ASP.NET, I can create the data layer (with the model part) and which abstracts the data away from the rest of the layers. I can easily move XML or SQL databases in and out, and it doesn’t matter the other layers. Then in the middle, I have my controller, and which does all of the main logic of the infrastructure. In the following, you can see I have a Controllers folder, and which contains the C# code for each of the Web pages:

And then finally we have the Views, and which contain CSTML files. These have special commands which run when the pages are rendered. In the following the @html.partial() method brings in some external code and @html.actionlink() builds a link:

The whole thing is dynamic, and where I can easily modify things in the View, without affecting the rest of the code. So, just now, I am colour doing and moving files within a better structure (as I had dumped most of the files with the encryption folder). It is so simple to just integrate the additional code for colour coding the pages, either with static code in a folder or dynamically [here]:

I don’t have massive resources to develop a deep user interface — and I don’t think it is needed, as I just need a quick way to get a user to the content. When the menus are there, it is simple to then make all the pages in the topic area colour coded, such as for ECC [here]:

or lattice [here]:

The organising is improved as the pages were often organised within: https://asecuritysite.com/encryption, but now I have https://asecuritysite/lattice and https://asecuritysite.com/ecc. This means that topics can be found in an easier way.

If you are interested, here’s how MVC ASP.NET works:

MVC has been a guide for me over the years, and has forced me to design for an interface, and then to divorce this from the middleware and then from the data layer. I believe it has allowed to write code, without worrying about the vehicle of delivery. Overall, for me, the natural data layer is XML, and most of the data underneath in ASP.NET and for my content is XML — the purest all of the data types.

Over the years, I’ve developed quite a few tricks, such as integrating LaTeX into Web pages [here]:

And I previously employed the colour change pages the code I created for Bright Red Publishing [here]:

You will see that the pages match the book colours, and which give a strong sense of your eye quickly finding content, and for it to know it is in the right place.

If you want to support Asecuritysite.com, one way to do it, is to subscribe to its Blog, here: