Saturday, 20 August 2016

Pondering back on my project: Scalability of MVC architecture on Windows CE (with multiple Windows Forms)

I had been working with Windows CE for 2+ years and I would like to ponder back regarding the architectural decisions that were made at the beginning of the projects based from the book that I used as a reference for my MVC implementation on my project. I followed this book (I won't be mentioning the exact name of the book here), because it seems the author is very confident about MVC. He has a very simple example code in Java and I took a leap of faith on it. But then I slowly see the problems as the project grows larger.

In my project, there are 50+ UIs/View/Windows Forms, Data Layer SQL, Interop with another DLL, 3 product variants of the same software (heavy use of Strategy Pattern and Template Method Pattern on this), Cloud, XML/JSON/Protobuf Serialization and unique features based from the OEM variants of our product. I would say that this is a huge and complex project. And I have around more than 150+ source files where I had written 90% to 95% of the total code base. In that book, I saw that the Model was almost repeated on the Controller (but with the views references and manipulation). This has caused pain because of the redundancy just to achieve great separation of concern. I felt that the author's approach is ok on small projects, but I have great doubts on it on big projects unless you have all the time and resources to accomplish that (but we are on a small company and time is gold to us). So midway on the schedule of the project, I found myself refactoring a lot to keep everything under control and to keep the flames down.

With the aforementioned issues, I did more research and found articles regarding Skinny Controllers-Fat Model, Model-Mediator-GUI and MVP(in Supervising Controller). From there and based from the issues I faced, I was able to come up with this Model-Mediator-Controller-View (MMCV - which I coined the term by myself). This is still in current version and may still change, but I have confidence that this will solve most of the scalability issues that I had encountered. This is not yet final and I may modify it, depending on the circumstances that I may face.



Saturday, 6 August 2016

FreeRTOS on Renesas RX62N

Just recently, I would like to learn VxWorks. But with the cost of the license, I turned to FreeRTOS. I saw that it supports Renesas RX62N and luckily, I have the development kit.

I downloaded the latest software for Renesas RX62N (HEW,Segger, and other toolchain) as well as updating the GCC compiler. Then I used the information here http://www.freertos.org/FreeRTOS_RX62N_GCC_GNURX.html.

After opening the project on folder FreeRTOSv9.0.0\FreeRTOS\Demo\RX600_RX62N-RDK_GNURX , I was able to start working with it and was able to create tasks, implement mutexes,etc easily.  I would say that it is almost the same with the MQX RTOS that I previously used in one of the RF products that I was involved with (except for the API syntax).

All my experiments are located here: https://github.com/fwswdev/RenesasRX62NFreeRTOSDemo