General
Good Links
Building distributed systems provides great benefits in terms of reliability, scalability, deployment flexibility, decoupling of disparate services and apps, and so on. Actually realizing these benefits can be a challenge. It requires architects and developers pay a lot of attention to app and service boundaries, messaging patterns, and data ownership. This session is an architecture-focused dive into distributed systems design, including the creation of microservices, apps, and the messaging patterns used to communicate between them. You will learn: •About the challenges you’ll face when trying to realize the benefits of distributed systems •How to manage service and app boundaries to achieve practical decoupling •About messaging patterns key to successful interaction across the services and apps in a distributed system/
The SOLID principles are the five commandments of the software world. They have been forgotten for years, as developers focused on JavaScript frameworks with stupid names and complicated patterns. The SOLID principles transcend frameworks and patterns. They are the foundation of building good software, the breakers of monoliths, the decouplers of coupling, and the squashers of regression bugs. One might even say they’re the creators of maintainable code. Unless you’re already a believer, you need to attend this session and get on the right path. You’ll work through each of the principles, learn what they mean, what they will do for you, and why you should stop breaking them. You will even check out some C# code that explains how they can help you; and problems that will haunt you if you ignore them and are face their wrath.
Over the last couple of years Microsoft has offered a wide array of new data access products and technologies. Learn about which technology you should choose in a given situation: LINQ to SQL, the Entity Framework, DataSets, SQL Server stored procedures, ADO.NET, Access, REST based services, and third party ORMs? This interactive session features audience participation with industry experts.
Web Site: .NET Multi Web Application Development – Part 2
Web Site: .NET Multi Web Application Development – Part 2
Multi-web Application Development – Part 2
To continue from part 1, this post describes the setup for a Visual Studio Solution with multiple projects. I’m using Visual Studio 2015, but the concepts can be used with almost any version of Visual Studio.
I always start with a solution containing a couple of projects. The number of projects will grow to many projects, but can be broken apart into multiple solutions for each WebApi or Web application. (The ideal setup would be to put common libraries on a local nuget server).
My current philosophy for .NET systems (Web, WinForms, Wpf, UWP, or whatever) is to break the system apart and create multiple applications for back end access through restful web services. The front end can be any flavor of MVC, WinForms, Wpf, UWP, JavaScript, etc.
In the following example the application is for teacher certification and is based from a similar system created at Texas Education Agency. To begin, the following image is a set of projects I created as one naming convention of projects and how a system may be structured.
I use Solution Folders to group projects together and will discuss each of the groups and how they relate to the overall solutions. This particular solution uses five Solution Folders, Core Libraries, Database Libraries, Model Libraries, WebApi Applications, and WebApps Applications.
Core Libraries
This set of libraries is a set of common libraries that may be used by any application project being developed within the organization. It contains the extension methods for string, StringBuilder, Linq, object, dictionary, and etc classes. There are also library projects for core database classes, Mvc, and WebApi classes.
Database Libraries
This set of set of library projects are for accessing specific databases within the organization. I use one library project per database. Notice each of the database projects contain folders for data storage models (Dsm), data view models (Dvm) and the database repository classes and interfaces used for accessing the database. My current preference is to use Dapper because it is small, lightweight, and pretty fast compared to Entity Frameworks and nHibernate. Using Dapper, you need to write the SQL for database CRUD operations which some may consider a negative.
The Dsm folder contains the classes that are a direct mapping or one to one relationship for each of the database tables. The Dvm is for classes that are used for result sets when joins between two or more tables are needed. The classes in these libraries are a direct result of accessing the database.
Model Libraries
The model libraries are going to contain a combination of data transfer objects, or other model classes that are special for this solution. It might contains some view models for moving data from an MVC controller and/or an WebApi controller. These classes may also be smart or intelligent classes with a fair amount of logic.
WebApi Applications
This folder holds all of the WebApi applications or web services applications used by this system and/or other solution projects. They may be specialized for this current solution but it’s also acceptable to bring in WebApi applications from other solutions. For example, the Access Panel Application (Apa) may have some WebApi services that may be used by the current system. These applications contain the restful web services for the entire website and can be used by any web application. In general, the web services could be broken off into a separate solution or even be created by a different group of developers as long as they provide the api required by the web applications.
WebApps Applications
This folder contains the web applications used by this system and they work together to form one system or at least the appearance of a single system. The applications share a common look and feel for the user interface and also have the ability to share session state. Once the security is estabished the user will not notice when they go from one application to another. They act as one application, even though this example shows three web applications.
This example provides a methodology on how a system can be organized to use several webapi and mvc applications to give the appearance as one application. It also shows the building blocks that can be used to promote code reuse and a methodogoly for developing all applications within an organization. Another side benefit of doing it this way is it promotes consistency between how systems are developed and allows developers to work on more than one system without getting lost when they move on to a different project.
We’re currently using this methodology at the Texas Education Agency and it’s the methodology I used while I was a developer at the Texas Water Development Board. While at TWDB, this process allowed a handful(4) of programmers to create over 25 web applications in less than five years. I believe most of the applications are still in production at the time of this writing.
In my first post on this topic, I showed how to setup multiple applications in IIS so on my next post on this topic (several months away), I’ll dive deeper into the system and start with the development of an Access Panel Application used for logging into the system and displays applications a user has access to within the entire system.
As I’ve been writing this, .NET Core has been released for a while and I’ve experimented with it some. It does change things a bit and not all of it for the better. Setting up and using IIS (localhost) is still doable but you can’t just build and test, instead you have to publish and test even when you make a change to a javascript or css file. I’m not sure yet how this is going to affect using common css or javascript files between projects, perhaps this is where a nuget server for common libraries becomes a big benefit.
Are Great Employees Replaceable?
I’ve seen several posts on the web that refer to the original post by Amy Rees Anderson which led me to other posts that plagiarized parts of the article. The links below are what I believe is the original and some others are based on what she wrote. I’ll let you be the judge on who is original and who is taking credit for other people’s ideas.
Great Employees Are Not Replaceable
by Amy Rees Anderson.
Key Employees You Can’t Afford to Lose
by staff editor.
Great Employees Are Not Replaceable by
by Hira Jha.
Good Leaders Are Invaluable To A Company. Bad Leaders Will Destroy It
by Amy Rees Anderson.
Modernizing a Classic ASP Web Application to .NET
I’m currently working on a classic asp system started in the late 90’s. It was developed in ASP using Sybase. The system consists of a classic asp application, Windows PowerBuilder application, Windows PowerBuilder Batch applications, and Java Batch applications. The windows server is 2003 and Sybase is 12.5. The primary reason the database hasn’t been upgraded is because of the PowerBuilder applications. We’re in the process of rewriting the batch applications and the single Windows application by adding the features and capabilities to the web application.
It’s my understanding there have been two attempts to rewrite the system in Java, both attempts failed. Why did they fail? I’m not sure, but I believe it was because it was taking too long and the users were not happy with the UI. Based on my experience, doing a rewrite on a large system rarely succeeds because the tendency is to redo everything.
In the early 90’s there was an initiative at the company I was working to rewrite some DOS applications used by their sales engineers with a development team of three programmers. The initiative called for a new Windows 3.1 system to be developed in PowerBuilder. It was going to take 18 months to completely rewrite and deliver the system, seven years later was the first released. It was called a success, but I think it was management’s spin on something they couldn’t let fail.
Another time, I was asked to estimate a rewrite on a project that was written in Microsoft Access. My basic estimate was that it would take three developers about 3 to 4 years or 10 man years. Executive leadership went with a consulting firm because the effort was going to take too long and the consulting company could do it cheaper and faster. In the end, it took two full time developers (on-site) around six years to deliver the first release.
I’m not saying you can’t do a complete rewrite of a large legacy system, what I’m saying is that stopping everything and doing a complete rewrite is usually destined to fail. It’s no fault of anyone involved in the project, it’s a matter of expectations and what it takes to rewrite a large system. The time and resources required to redesign and rewrite a legacy system is significant and usually the task is grossly underestimated because management insists it can’t take that long, it’s only code.
Given that small rant, I believe any organization wanting to modernize their system needs a good plan in place and needs to look at how they can achieve modernizing a system without rewriting the system all at once. One thing I’ve noticed over the years is doing development in small chunks and delivering often (3 or 4 times a year) seems to work the best. Management likes it and users accept small changes easier than having everything change at once.
At my current place of employment, I believe we’re on a good track for rewriting the current asp system because we’re not trying to do everything at once. It’s going to take time and project management is trying to lay out the order of everything, but we’re doing small pieces for each release which allows us to make adjustments as technology and requirements change. We made the GUI look and work the same as the legacy system to make the rewrite as transparent as possible to the end user. So far, things are working out very well.
The basic architecture for the new system is to create restful web services for backend processing and use .NET MVC 5 with AngularJS for client side pages. It’s not complex and Microsoft has made it easy to create restful web services, which is helping the process. The biggest problems we have are related to Sybase and how Sybase works with the ORM (Dapper). As a whole Dapper works really well, except it does have issues with Sybase which (based on reading the internet) do not seem to be happening with SQL Server or Oracle.
How does the architecture look in the new system? In order to keep things short I’ll write about that in my next post, which could take a while.
Why Good Employees Leave Their Jobs
Great article on why good employees leave their job.
Learning AngularJS
Just finished a class on AngularJS. The title of the class was Developing Web Applications Using AngularJS. It was a four day class and the instructor was Brad Gillespie who was a very good instructor. Overall, I have to admit it was a pretty good class that provides an overview on the basics of using angularJS on the client side for web applications, which fit in perfectly for where we’re at with regards to our system.
We are currently in the process of remodeling our legacy Classic ASP web application into several .NET web applications. We’re using .NET WebApi 2.x for restful services and .NET/MVC 5 and angularJS for client side applications.
For the restful web services we’re breaking those into several applications by function, which at the moment is by main menu classification. We’ve created three client side applications, one for admin, education institutions, and educators.
For the end user, there is little difference in the appearance of the system. The menus, page headers and footers are the same as the original application. As we replace existing pages we’ll be able to remove them from the legacy application.
I estimate the remodeling or rewrite will take about seven years to complete when we consider enhancements, bug fixes and changes we’ll be required to make because of changes in state and federal laws.
This is a picture of the certificate that says I completed the class.