Learn how Diagram manages common code modules through our Core Library to keep all our developers on the same page.
Developing web applications can be complicated, but one of the exciting things about the internet is the vast amount of information and resources available that can simplify these processes. When writing code, developers often end up performing some common tasks or re-using certain functionalities, so using modules that contain commonly-used code can simplify the development process considerably, keeping developers from having to reinvent the wheel every time they create an application.
The Diagram Way
Diagram's team of web developers uses this process of packaged modules to not only streamline the development process, but also to make sure the code being used is consistent across the entire organization. We utilize what we call the Diagram Core Library when developing every site, which ensures that all developers are including the latest versions of our code library in each of their projects.
We previously used a version control repository for our code library, providing access to the necessary files for developers, who would need to search for the files they need. However, we’ve recently updated the delivery mechanism for the Diagram Core Library by implementing the NuGet package management system, which allows our developers to download pre-built packages of modular code to use in Microsoft Visual Studio.
One of the biggest benefits of NuGet is that it resolves any inter-modular dependencies automatically. If a module being installed is dependent on another module, NuGet will resolve these dependencies, ensuring that the correct version of all necessary modules are installed in order to run a specific module. For example, if a developer wants to install our 301 redirect module on a website, NuGet will also automatically install the core DLL which this module is dependent upon.
In addition, the web.config file which contains the configuration settings for each website needs to be customized for each of the modules installed on the site. We’ve configured NuGet to automatically update the site’s web.config file with the necessary customizations when a module is installed. This puts a standard in place that allows developers to install modules without having to worry about whether the correct settings have been included in the web.config file.
NuGet also allows for easy updates and fixes to be made to the modules in the Diagram Core Library. In the old repository, any of these updates we made would need to be committed to the version control system, and developers would need to update their local copy and search for the latest versions of the software in order to update the version of the library they were using. With NuGet, we can make changes and push them to the server that contains our custom packages. Developers will be notified when an update is available, so they no longer have to search for it, and they can then download those updates within Visual Studio.
Using Package Management for Deployment
While our NuGet implementation is focused around developer code, we also use package management when deploying websites. For website deployments, we use Microsoft’s Web Deploy, which works in a similar fashion, taking the code for the web application and packaging it up in a zip file. When a site is ready to be deployed, we can use Web Deploy to create one of these packages and hand it off to the non-development IT personnel who maintain the servers which host the company’s website, and they can run an install wizard to create and deploy the website based on that package.
This package management process makes the creation and deployment of websites a streamlined, consistent effort across both our organization and our clients’ teams. This mentality of packaged modules has greatly reduced the duplication of efforts, and it ensures that everyone is using the correct versions of our code library. It also maintains the correct dependencies and configurations for any modules we use. Do you have any questions about how to implement your own code library or package management system? Please feel free to leave a comment below, or contact us to speak to a web development expert.
Image credit: Pixabay
Related Posts
What is Umbraco CMS?
Migrating your content management system? Why not consider Umbraco? Learn about this .NET CMS, pricing and why it's the right choice for your organization.
How to Budget for Digital Transformation
Optimize digital transformation budgets by aligning marketing, IT, and AI to enhance customer experience and efficiency.
Results Matter.
We design creative digital solutions that grow your business, strengthen your brand and engage your audience. Our team blends creativity with insights, analytics and technology to deliver beauty, function, accessibility and most of all, ROI. Do you have a project you want to discuss?
Like what you read?
Subscribe to our blog "Diagram Views" for the latest trends in web design, inbound marketing and mobile strategy.