Technical Chapter 10
OCC Innovation Delivery hold fortnightly Technical Chapter meetings to help advance cross-team knowledge sharing. The meetings cover a wide range of topics, usually around technologies used in on-going project work, but also on tools and techniques that benefit the development process.
IIS ARR (Application Request Routing)
Greg told us about his experience with ARR. This IIS component is required when you want to forward requests to another machine on a port that isn't port 80. One of the settings is "reverse rewrite host in response headers", which rewrites URLs so they correctly point to the IIS paths when a 3## HTTP response is given (redirection). However, Greg found that it was not just changing the URLs to his site, but also his links to Twitter. This is a known issue and the only solution is to turn it off and write your own code for replacing URLs.
Visual Studio and debugging HTTPS
Tim discovered a little thing that is worth knowing: If your website is HTTPS only or redirects to HTTPS then you may find that you get a 404 when you try to debug it using IIS. The solution is to open IIS and make sure your Default Website has an HTTPS binding. When creating a HTTPS binding, you will need to select a certificate. There will be a developer certificate on the list, which will work for your HTTPS for localhost websites.
EntityFramework - JSON serialiser circular references - and the benefits of DTOs
EntityFramework will give you classes for all your entities, so it is tempting to use them to transfer information to your web page. However, the JSON serialiser may also serialise all entities related to each entity, and the entities related to those, and the entities related to those, and the entities related to those. On some projects this results in a circular reference exception. Even more dangerously, this exception did not occur on all deployments. It passed testing with OCC and the client, and only when deployed to a customer did it occur.
We strongly recommend creating a data transfer object (DTO) - or view model - whenever passing data to a page. These should be a class containing just the properties required and not reference the entity model.
Temi's team is continuing development of TRALC3. This project is about load capacity modelling of transformers.
It consists of a MVC website, which queues tasks on a database. A windows service polls the database and triggers numerical calculations in Unix. The backend languages are C++ and Fortran.
TRALC2 used an Access database, but TRACL3 is using SQL Server. Because the backend Unix numerical software is running within Cygwin, the team were able to communicate to SQL Server from Unix.
Leave a Reply