Frameworks vs. SDKs

前端 未结 8 765
无人及你
无人及你 2021-01-30 16:48

What is the difference between a framework and an SDK? Take, for example, the MS platform SDK and the .NET framework. Both have API\'s, both hide their inner workings, and bot

相关标签:
8条回答
  • 2021-01-30 17:47

    In a nutshell the difference is :

    • You call the SDK functions.
    • The framework calls your functions.

    A SDK is like a toolbox with lots of tools and you choose which ones you use and how. You have control but also a lot of decisions to make. That's quite low level.

    A framework makes a lot of decisions for you, so you don't have to reinvent the wheel; It's more a "fill in the blanks" approach. Less freedom but you save a lot of time and probably avoid some mistakes.

    In the particular case of the .NET framework it also refers to the runtime files needed to run applications using it but it's not the way the word is used in a programming context...

    0 讨论(0)
  • 2021-01-30 17:48

    I was the lead on Zend Framework through its 1.0 release. We often got comments that it wasn't a "framework" in the sense that developers expected -- they said it was more of a class library.

    They expected a framework is more like a set of classes that must be used together for them to work. A framework may also include a set of coding conventions, guiding you to organize your code in a certain way. Also a framework may impose naming conventions for your classes and database entities. And finally, code-generation tools.

    Zend Framework was designed to be loosely coupled, so you could use any of the classes standalone if you wanted to. It imposed few conventions on your code or your database. And we had intended to develop code generators but hadn't implemented them yet.

    But I still felt that Zend Framework qualified as a framework, instead of an SDK, in one other way: a framework is extensible. It's designed as a set of object-oriented base classes, and the intended usage is that developers either extend these classes, or write simple plug-in classes, to add functionality.

    A traditional SDK is not extensible. You simply call API methods in the provided classes, they do what they do, and you deal with the result. Any customization is in your usage of the API and how you make use of the results.

    0 讨论(0)
提交回复
热议问题