mardi 30 janvier 2018

Computation Classes in MVC Architecture

I am trying to build an command-line menu based application base to attempt to implement MVC architecture.

The "application" I am trying to build is based around cryptography. At its core features include the ability to display the original text and modified text in alternating line. e.g

originaltext originaltext oringaltext
modifiedtext modifiedtext modifiedtext

originaltext originaltext oringaltext
modifiedtext modifiedtext modifiedtext

Currently, I have created a number of Cipher classes that all contain an encrypt and decrypt() function that takes in 2 strings - an input and output. I have also created a Project class that holds 2 pieces of information - the originalstring and modifiedstring.

In this case, I understand that the View should display the Menu that users will see, and that the Project class belongs in the Model. However, where do classes that contain computation (my Cipher classes) belong?

Aucun commentaire:

Enregistrer un commentaire