Frameworks vs. SDKs

前端 未结 8 839
无人及你
无人及你 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: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.

提交回复
热议问题