Darren
Darren

Reputation: 11021

Whats the best way to describe what a framework is and the benefits of a framework over procedural code?

I am at a company that does not understand the concept of using frameworks and the benefits of them. I have tried to explain that it provides structure and organization but the people I am trying to explain to are still a little fuzzy about it. In your opinion, what is the best way to describe a framework in the most simplest terms and how it could overall benefit a company to transition their code from procedural and spaghetti code to a nice organized framework?

Thank you for your time.

Upvotes: 0

Views: 1060

Answers (4)

Jörg W Mittag
Jörg W Mittag

Reputation: 369428

I'm going to concentrate on only a part of the question:

In your opinion, what is the best way to describe a framework in the most simplest terms

Framework == Library + Inversion of Control

Upvotes: 0

GWW
GWW

Reputation: 44093

I guess the best explanation I can think of for using a framework are to standardize your design process and save yourself a lot of effort as your code-base grows. Not to mention that a lot of work can be taken care of for you by the framework (which could save hours of coding). A framework can give you all the parts you need to build your application, you just have to assemble them.

The best reasons I can think of for using a framework are:

  1. Code reuse -- If you try and follow the design of the framework you can save yourself a lot of coding time. However, some frameworks do require a time investment to master.

  2. Encapsulation -- You can change the underlying implementation of different parts of the framework in a way that doesn't require a lot of code rewriting.

  3. Extendability -- You can extend the code of the framework to add features you need and if you are careful about your design, you can reuse these features too.

I'm sure there are many other good reasons, but I'm sleepy.

EDIT: A good example of the benefits of a framework can be replacing the database adapter with another ie. switching from mysql to postgresql. This could be awful with functional programming but a framework could make this transition very easy.

Upvotes: 1

shenju
shenju

Reputation: 11

Let them do as they like ,first. then pick up their shortcomings and finally generalise your framework to avoid procedural code.

Upvotes: 0

mbeckish
mbeckish

Reputation: 10579

Your coworkers most likely already use libraries, which one could define as code that exists outside of your project, and is meant to used in many projects.

A framework is like a library, but usually has other featues, such as

  • It might enforce changes to your code. For example, you wouldn't replace one method of your WebForms project with a call to the ASP.NET MVC framework - the entire project would be written differently to conform to the framework.

  • It might restrict the universe of applications that you can write. For example, you might be using a CRUD generating framework that lets you make data entry applications, but wouldn't let you make a video editing application.

However, a framework will usually give you a lot of value in return.

Upvotes: 0

Related Questions