The following documents a high-level outline of things to
consider when planning a robust, mission-critical business application and solution, from tooling choices during
development all the way through to deployment and performance strategies – we have collected the application
development concept and main basics of CloudTrust.
The following is a selection of key areas that CloudTrust selects based on the best recommendations and experience we use,
and we take great care to keep each tool, method and procedure up to date.
- Software management tools
- Development process methodology
- Tooling and development
- Backend methodologies
- Entity framework
- Knowing LINQ
- Testing methodologies
- Dependency injection
- Object mapping
- Frontend
Related to the content of How it all began
site: The Microsoft ecosystem is getting increasingly more open and platform-independent – and we are not even going to
touch upon the Minecraft acquisition. With .NET Core, your .NET apps can run natively outside of Windows for the first time.
With the various .NET technologies, you can target virtually any app platform and any device family – the opportunities
are endless.
Software management tools
To manage the development of an application, you’ll need to select from the following software
management tools to manage code, assets and team members’ tasks – see Software management tools and Examples list:
- Issues and feature tracker – GitHub, TFS
- Version control system – GitHub, TFS
- Document/asset storage – Slack, O365, internal network storage
- Team communication – Slack, HipChat, IRC, Skype
- Task manager – Visual Studio Team Services, GitHub Org Tasks, Trello
- Continuous integration and continuous delivery (CICD) – Visual Studio Team Services, Azure
Ensure that you and your team adopt the tools you choose, and frequently assess and improve
your workflow. New applications and tools are released to the public all the time and you may
wish to address new tools that coincide with features or project gaps. It is natural to adopt new
tools as time progresses.
Development process methodology
Whichever development methodology you choose (Agile, Waterfall, Scrum, Kanban, etc.) it's
important to remain consistent. In most situations, the ideal methodologies are the custom,
loosely enforced, agile-like processes that can be wrapped around the uniqueness of the
project and team members.
Tooling and development
Tooling has been increasingly important when developing any kind of application for the web
or other platforms. With ASP.NET MVC, there are a vast amount of tooling options available.
Adding the right tools to Visual Studio can help boost productivity. All of these tools are free – see Tool and Purpose list:
- Web Essentials – Multiple tools for speeding up web development in Visual Studio
- SideWaffle – Templates for Visual Studio
- Fiddler – Web debugging proxy for any browser, system or platform
- JustDecompile – Easily read and navigate
Backend methodologies
The first step assumes a
Test-Driven Development (TDD) approach, which is an excellent
software development process. In a nutshell, TDD means that you test first as you build to
spec-that is, you're developing a highly reliable codebase in short repetitive cycles. Note that
during unit testing and API construction, frontend developers should be rapidly prototyping
minimal viable features using the API and providing feedback to the API engineers. Working
TDD in tandem with rapid prototyping ensures that all aspects of the application are being
considered from code reliability to user experience.
It may be assumed that security and authentication details will accompany the application
when doing so be sure to follow basic security practices for web applications. It is also assumed
that developers will provide separate development and production systems. Using the same
systems and data for both development and production should never be an option.
Entity framework
When it comes to database access with ASP.NET, Microsoft's Entity Framework (EF) is the
go-to option. EF is an object-relational mapper that enables .NET developers to work with
relational data using domain-specific objects. It eliminates the need for most of the data-access code that developers
usually need to write. Using EF to query data using LINQ means
developers don't need to switch context between C# code and SQL.
While EF provides a robust infrastructure for working with databases in .NET, there are special
scenarios where additional tooling can be helpful. The tools listed below will assist in speeding
up the development process – see Tool and Purpose list:
- Entity Framework 6 Power Tools Community Edition – Useful design-time utilities for EF6
- Entity Framework Reverse POCO Generator –
Reverse engineers an existing database and
generates EntityFramework Code First POCO classes,
configuration mappings and DbContext
Knowing LINQ
When LINQ was added to C# in ASP.NET 3.0, it changed the way that we work with data
collections. When working with server-side data in ASP.NET applications, LINQ is an invaluable
time-saver. LINQ makes short work of iterative functions by means of a simple syntax that is
easy to read and understand. In addition, LINQ enables developers to build queries in C# code,
which are translated into SQL by Entity Framework. This means LINQ is not only a handy tool
for operating on collections and arrays, but also for interacting with databases from .NET – see Category and Methods list:
- Quantify – All, Any, Contains
- Filter – Where, OfType
- Project/Transform – Select, SelectMany, Zip
- Criteria/Set – Distinct, Except, Intersect, Union
- Sorting – OrderBy, OrderByDecending, ThenBy, ThenByDecending, Reverse
Testing methodologies
How you test and what you test is less important than the fact that you test something. You’ll
likely want to test each module or unit of code by writing unit tests. When all of the units of
code unite to form a running application, you’ll want to do functional end-to-end testing. Below
are the tools required – see Category and Methods list:
- Microsoft.VisualStudio.TestTools.UnitTesting – Microsoft's standard unit testing library
- XUnit – A free, open-source, community-focused unit testing tool for the .NET Framework
- NUnit – One of the most popular unit testing frameworks for .NET
- MOQ – Write Mocks with Mocking Framework (MOQ) with a real world N-Tier web application
To take testing to the next level, consider a complete test automation solution for integration
testing at the GUI level.
Dependency injection
Dependency management in a large-scale application is critical and because of this, service-oriented design principles have gained popularity.
In modern ASP.NET applications, it is quite
common to use Dependency Injection (DI), a concept of loosely coupling application components
through interfaces rather than relying on concrete classes. In fact, this practice has become so
commonplace in .NET development that Microsoft has created its own DI framework: Unity. In
essence, Unity is a concept of loosely coupling application components through interfaces rather
than relying on concrete classes.
Many DI frameworks exist to help facilitate DI in ASP.NET applications. The following solutions
are well supported and fully featured DI frameworks, each with their own strengths – see Frameworks and .NET supported:
- Castle Windsor – Framework 4.5+
- Ninject – Framework 4.5+
- Autofac – Framework 4.5.1+ | .NET Core
- StructureMap – Framework 4.5.1+ | .NET Core
Object mapping
When building web applications in ASP.NET MVC, typically there's a rich domain model that's
bound to the database with Entity Framework. With this exists a general problem where
backend objects are generally very rich and behavioural and the user interface is not. Mixing
those two things together poses a challenge for developers. To solve this problem an object
mapper can be used to copy that information from the rich backend objects to frontend data
transfer objects (DTO). In doing so, a separation is clearly defined between database behaviours
and frontend view models. Additionally, this approach will provide added security by solving
mass-assignment vulnerabilities that can exist in MVC applications.
Automapper is one effective tool that can be used to handle object mapping in ASP.NET.
Automapper, as the name suggests, can copy values between two like objects so mappings
don't need to be created by hand.
Frontend
Building web applications means that you are likely going to require some additional UI
components beyond what HTML itself has to offer. Textboxes, labels and dropdown lists will
only get you so far. With ASP.NET MVC’s default template, Bootstrap is included by default.
Bootstrap is great for creating a nice visual style for your application and provides additional UI
controls that go beyond basic HTML inputs. Bootstrap also makes short work of mobile layouts
with a simple grid system that is quick to learn and easy to master.
Accessibility, internationalization (i18n) and building for the correct environments are an
essential part of any application. It’s not just deciding what to build, but how you’re going to
build and support it. Addressing these considerations at the beginning of a project will enable
you to clearly envision how you’ll implement the said features, such as accessibility concerns
and i18n, for example.
Below are some examples for consideration when deciding baseline standards and types of
support your application can offer. These details may differ per project, for things such as i18n
and offline strategies, it comes down to the goals of your project. Ideally, the application should
conform to these standards to ensure an inclusive platform for all users – see Software management tools and Examples.
- Internationalization / Globalization – Translations for different languages and culture differences
- Minimum Browser Support – Support IE10+
- Accessibility – Comply with WAI-ARIA
Until the release of the iPhone and the plethora of devices that followed, we had assumed that
everyone who browses the web does so using a desktop PC. The mobile market is growing and
evolving rapidly, and so are user expectations. Developing with a desktop browser mindset is
now obsolete and we must consider the mobile market, even when developing internal line-of-business applications.
It's important to ensure that frontend development is done with mobile
responsive views, forms and UI components.
When it comes to UI components, there are a lot of great options. You can choose from either
commercial or open-source components. The important thing is to pick a component library
that meets your development needs, offers mobile-responsive components and provides
accessibility out-of-the-box.
To create a successful ASP.NET application, you must plan ahead and choose options that best
support your team and the goals of the project. Consider the various developer roles in the
development stack such as backend, frontend, and testing when evaluating tooling. Depending on
the size of your team, developers may specialize in a single technology or their activities may span
the full development stack.
For tooling that provides end-to-end consistency, feature-rich UIs for everyone from JavaScript
and ASP.NET novices to gurus as well as mobility and accessibility.
Related resources and solutions