Tribridge Connections

A Technology, Cloud Solutions & Industry Expertise Blog


Foundation Tool Basic Principles

Technology has come a long way from the beginning. The first computers would fill an area the size of your living room. We went to the moon on computing power that is now less than what is in a hand calculator. But as computers have grown more complex, so has the development of their software. Gone are the days when code was written on punch cards or the code consisted of a hand full of files and resources. With the growing complexity of computers, tools had to be invented to manage big projects effectively. One example is the Foundation Tool, a revolutionary tool which cuts development time and costs.

Using the Foundation Tool in 3 Tier Approach to Applications

In order to understand what the Foundation Tool is and how it helps, you first have to understand the main components of an application. Successful projects use the three tier approach. The first tier is your data layer, which in most cases is a database. Data tier holds no logic and is used as a repository for the applications information. The next tier is the business logic tier or what software engineers refer to as a middle tier. Any business rules used to validate data or determine what data the user should see is kept here. The last tier is the user interface or the front end. The person interacting with the application will see the front end, but its responsibility to the application is just to gather, and display information to the user. Now the three tier approach is great, but there is a problem that can cost businesses money in the long run.

The problem I speak of is there are no standards to development of the middle tier. Yes you are supposed to place all business logic there, but how you accomplish the task can be daunting. There are patterns around, some are good, but some are bad, and using a bad pattern can cause all sort of issues, which can cost businesses time and money. The Foundation Tool is what solves those issues. It is a set of patterns and tools that allows the development team to generate a middle tier.

The way the generation of the middle tier is accomplished, is first the team lead determines how the database is going to be laid out. Once he has determined the structure of the data tier, he creates a spread sheet with all the details of the objects the front end is going to use. Once the data tier is designed and the spread sheet has been reviewed, it is handed off to the developers who use tools to generate smart objects. These smart objects have two components to them, a generated component and a non-generated component. The generated component is never added to once it has been created. The purpose is that if any changes to the database happen, the developer can regenerate the smart object without wiping out custom code. The non-generated component allows the developer to add custom business logic without fear that any change to the database will cause the code to be generated over.

The business rules are handled by the non-generated part of the smart object, and use data annotations to validate the data. For example, if you have a string in the database with a max length of 100 characters, a data annotation will be created when the object is rendered that restricts the variable to a 100 characters. Now the Foundation Tool only generates basic data annotations, it is up to the developer to create more complex ones as needed. Another useful aspect of Foundation is class hierarchies.

Creating CustomOrder Tables Using Foundation Tools

Class hierarchies in Foundation Tools allow the developers to make relationships between data objects. For example, you have a customer which can have multiple orders. You would create a customer, order, and CustomerOrder tables. The customer and order tables connect to the CustomerOrder, join table allow for customer’s to have multiple orders. Developers can generate the classes, so that the customer object has a list of orders. When you retrieve a customer, foundation automatically retrieves the list of orders. You can also delete a customer which deletes all orders for you, or delete one order through the customer object. The ability to create class hierarchies simplifies development, because fewer steps need to be taken to retrieve, delete, or save objects.

The Foundation Tool is great for building out a reliable and efficient middle tier, saving a team valuable time and money. The time is saved by the ease you can generate objects, and the ability to add to a design without huge rewrites. With less time needed, money is saved, because you don’t need as big of a team to complete complex projects, or to add new features to an existing application. Also moving developers between projects is a snap, because the Foundation Tool is a standard, and the developer needs less time learning how the code was implemented. With all these benefits, Foundation should be the choice for all projects.

Have any experiences working with the Foundation Tool? Did it cut your development time and costs? Did you encounter any issues when using Foundation? Please share them with me below.

Share Your Thoughts With Us

Load more comments
Thank you for the comment! Your comment must be approved first